Monday, 29 October 2007
|
| Localization of help (.chm) files Amit Bhatnagar 20:24:53 |
| | Hi All.
Does anyone know how to handle deploying localized .chm help files? Say I want to have an English and French versions of my help, but how does Windows know which version of the help to bring up when the application calls upon Help.ShowHelp()?
The information contained in this e-mail message is PRIVATE. It may contain confidential information and may be legally privileged. It is intended for the exclusive use of the addressee(s). If you are not the intended recipient, you are hereby notified that any dissemination, distribution or reproduction of this communication is strictly prohibited. If the intended recipient(s) cannot be reached or if a transmission problem has occurred, please notify the sender immediately by return e-mail and destroy all copies of this message. Thank you.
|
| | 2 answer | Add comment |
|
| Suggestions: File Layout Editor Brady Kelly 20:07:11 |
| | I'd would like some suggestions on how to implement the actual bands, or groupings, editor GUI for a file export system I am busy with. Currently, I have a tree view on the left, explorer style, which lists as top level nodes all the Sections in an export, e.g. Customers, Clients, Customer Invoices etc. Then, under each section I have the data source queries for that section, and all record defintions, i.e. column collections, for that section. Now in the XML definition file, under the record definitions, I have groupings to one level, where each grouping may be on Invoice Number. Each grouping can have a header, emitted once before each group, body emitted for each item in the group, and a footer, emitted once after each group. Header, body, and footer can contain one or more lines that correspond to record definitions. I'm now looking for ideas on how to present the layout of these groupings to users for editing.
=================================== This list is hosted by DevelopMentor http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com
|
| | 3 answer | Add comment |
|
| OT Is the list still active William E. Booth 18:56:59 |
| | I have not received any messages since September. Is the list still active?
=================================== This list is hosted by DevelopMentor http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com
|
| | 7 answers | Add comment |
|
| Class Function in WinForms project R. Rogers 18:44:36 |
| | Hi everyone,
I have a very simple form that allows the user to select an upload type from a combo box, then either click on ok or cancel. The main form calls the UploadType form as so:
frm_GetUploadType frmGetUploadType = new frm_GetUploadType(); if frmGetUploadType.ShowDialog() == DialogResult.OK { UserSelectedUploadType = frmGetUploadType.UploadType; ... }
I don't want the calling form to have to instantiate, check, and get the upload type. I want a class method/constructor to do all that for me. I've begun doing that by writing this simple code for the in the frm_GetUploadType class:
public static UploadTypes GetUploadType(ref bool OKClicked) { }
I have three questions: . I believe I should be doing this in a static method, not a static constructor; constructors only get called when an instance is created. Is this true? . I call these class methods, from a previous language, but are they called that in C#? . Why am I getting a CS0050 compile error? Inconsistent accessibility: return type 'type' is less accessible than method 'method'
Thank you for any help you can provide.
Richard Rogers http://www.RichardRogers.ca/
|
| | 2 answer | Add comment |
Friday, 26 October 2007
|
| Persistant variable value in CLR stored proc Brady Kelly 00:08:22 |
| | I've just had a very strange experience running a CLR stored proc. The procedure is a data export procedure, from our application database, its data source, to an accounting database, its data destination. It takes its data source connection from the context, and its destination connection string from the source DB. When I first ran the proc, I got back the error, "Keyword not supported: Provider", so I removed the provider clause from the destination connection string.
However, until I restarted my SQL server, I continued to get the same error. My ONLY action that resolved it AFTER correcting the connection string was restarting the server. This is plain scary if updating DATA, never mind code, requires a server restart. I can reproduce this on demand, using my existing codebase.
=================================== This list is hosted by DevelopMentor http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com
|
| | 8 answers | Add comment |
Thursday, 25 October 2007
|
| Why must the designer create an instance of my control's absract base class? Brady Kelly 18:47:45 |
| | I'm not asking it to create an instance of the base class, just the derive class. Can anyone tell me why this is so?
|
| | 2 answer | Add comment |
|
| Windows Forms changes in framework 3.5 James Berry 15:01:58 |
| | I can't find any documentation on the net, so thought I would ask here
Are there any changes (either new features) or bug fixes to the windows forms librarys in .net framework 3.5?
Best wishes James
|
| | 2 answer | Add comment |
Monday, 22 October 2007
|
| Managed enums Andrew Eames 22:22:43 |
| | Hi, According to the the MSDN docs http://msdn2.microsoft.com/en- us/library/a6cskb49(VS.80).aspx
Quote If a standard C++ enum is defined (without class or struct), compiling with /clr will cause the enumeration to be compiled as a managed enum. The enumeration still has the semantics of an unmanaged enumeration. Note, the compiler injects an attribute, Microsoft::VisualC::NativeEnumAttribute, which the Visual C++ compiler recognizes, to identify a programmer's intent for the enum to be a native enum. Other compilers will simply see the standard enum as a managed enum. /Quote
When I do this, the enum is marked as internal so this is not actually very helpful - is there a way to make it public (other than making it a managed enum) - I dont see the NativeEnumAttribute either Thanks Andrew
=================================== This list is hosted by DevelopMentor http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com
|
| | 2 answer | Add comment |
Friday, 19 October 2007
|
| Databinding panel.Height Alan Baljeu 18:03:40 |
| | I created a Mypanel object and docked it full to a form. Within class Mypanel the following code is called before the form is shown.
this.DataBindings.Add("Height", psm, "Height"); this.DataBindings.Add("Width", psm, "Width");
Shouldn't this result in psm.Height property changing whenever I resize the form by dragging with my mouse? It doesn't, and I have no idea what's at fault. Maybe these properties don't support databinding events?
=================================== This list is hosted by DevelopMentor http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com
|
| | 4 answer | Add comment |
Thursday, 18 October 2007
|
| How to quickly find control in DataGrid... Gyorgy Bozoki 18:01:46 |
| | Hi all,
I have a DataGrid on a web page (ASP.Net 2.0) and I need to go through each DataGridItem when a button is pressed on the page. The grid has 5 columns and one of the columns has an HtmlTable control with a single row and 10 columns and each column contains a CheckBox control.
When the button is clicked on the page, I go through the grid (100 rows, for example) and I need to access each checkbox to see if it changed. Right now this is what I do:
DataGridItem oItem; DataGridItemCollection oItems; CheckBox chkCheckBox; ... for ( int i = 0, lCount = oItems.Count; i < lCount; i++ ) { oItem = oItems[i];
chkCheckBox = oItem.FindControl ( "ControlName" ); if ( chkCheckBox != null ) { ... } }
I assume that each row in the DataGrid has the same order of these checkboxes (since it's generated from the HTML designer template), so I was wondering if it was possible to somehow cache the control indices for my 10 checkboxes, since I found that FindControl() is a very expensive call. (Checked in Reflector.)
The problem is that all these controls are the children of the immediate HTML table cell in which they're placed, not the DataGridItem, so using an index instead of the name-based lookup seems out of question (all checkboxes have a 0 index, because they're the only controls in each table cell.)
Is there anything I could do to do away with the unnecessary lookups and recursive string matches of FindControl? I feel like I'm missing something.
Thanks, Gyorgy Bozoki
=================================== This list is hosted by DevelopMentor http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com
|
| | 2 answer | Add comment |
Wednesday, 17 October 2007
|
| Databinding Vince Pacella 23:24:32 |
| | This is driving me nuts... and I need someone to set me straight.
I'm trying to configure the SQL Command Parameter for the foreign key of a "Child" table. The .net code side source of data is a Stong Typed dataset of the master child and relation. The Primary Key of the master is a SQL Idenity Column.
What's the proper way to set the Parameter value in code, if the code is handling Inserts and Updates of both master and child tables. There is no "rule" that the master needs to be "INSERTed" in order for there to be a child INSERT, so just doing a blanket caputure of an Output Parameter of a SQL Stored Proc on an INSERT on Master isn't the answer.
I tried this approach, but it's not working properly, I get the error that my Stored Proc is expecting the value of this Parameter but that it doesn't have it.
if (dataset.Tables[0].Rows[0].RowState == DataRowState.Unchanged || dataset.Tables[0].Rows[0].RowState == DataRowState.Modified) commSubInsert.Parameters.Add("@Profile2Key", SqlDbType.Int, 4, "Profile2Key"); if (dataset.Tables[0].Rows[0].RowState == DataRowState.Added) { commSubInsert.Parameters.Add("@Profile2Key", SqlDbType.Int, 4); commSubInsert.Parameters["@Profile2Key"].Value = commMainInsert.Parameters["@Profile2Key"].Value; }
Regards, J. Vince Pacella / OOCL Chicago 10.30 - 7.00 Central Tel - 773-399-6218 Fax - 773-867-5050
Cargo Tracking Online at: www.cargosmart.com and www.oocl.com
IMPORTANT NOTICE Email from OOCL is confidential and may be legally privileged. If it is not intended for you, please delete it immediately unread. The internet cannot guarantee that this communication is free of viruses, interception or interference and anyone who communicates with us by email is taken to accept the risks in so doing. Without limitation, OOCL and its affiliates accept no liability whatsoever and howsoever arising in connection with the use of this email. Under no circumstances shall this email constitute a binding agreement to carry or for provision of carriage services by OOCL, which is subject to the availability of carrier's equipment and vessels and the terms and conditions of OOCL's standard bill of lading which is also available at http://www.oocl.com.
|
| | 3 answer | Add comment |
|
| Problem with data bound master - detail Brady Kelly 13:44:02 |
| | I have a DataSet called 'exportDefsDataSet', with two tables, 'ExportDef' and 'ExportDefItem'. The data set contains a relation, 'ExportDef_ExportDefItem' that relates the two on ExportDefID. This represents a set of export definitions, and definition items within the export definition, i.e. one export definition has many items.
I have a form with two binding sources on it, 'exportDefBindingSource' and 'exportDefItemBindingSource'. The DataSource of the 'parent' binding source is set to 'exportDefsDataSet' and the DataMember to 'ExportDef'. The DataSource of the 'child' binding source is set to 'exportDefBindingSource', and the DataMember to the relation 'ExportDef_ExportDefItem'.
I have a ComboBox bound to 'exportDefBindingSource' and a BindingNavigator and two textboxes bound to 'exportDefItemBindingSource'. When I select an export definition in the combobox, I can navigate between the definition items for that definition, but chaos ensues, as often the selected definition disappears from the combo box, or the items for another definition appear in the textboxes. I am battling to reliably preproduce this behaviour, as often the setup works correctly, and after after a seemingly random number of navigations does everything go bad.
Let me describe a typical scenario:
I start the application, and the first definition, "Access Accounting" is automatically selected, and the BindingNavigator correctly navigates between the items for "Access Accounting". The next definition is "AccpPac DOS", and if I select it, the correct items for "AccPac DOS" are available, BUT, "Access Accounting" is no longer visible in the ComboBox! Now there are two "AccPac DOS" entries, and the first one of them selects the items for "Access Accounting". Now I select a third option, "AMS", and get the AMS items, but now I have two AMS entries, and the first one still points to the "Access Accounting" items. The ComboBox is thouroughly out of sync, but I can't find why.
|
| | Add comment |
Friday, 12 October 2007
|
| Regex.Replace... Gary Harpin 14:40:09 |
| | Hello all,
I am trying to use Regex.Replace() to clean a string before working on it.
The incoming string can be of the form " 5E1Y - UMCF - PZNG - RPR4 - H4KF - 6ICJ - HQ " or "5E1Y:UMCF ZNG" or ... and I need to replace any ones and zeros with Is and Os and the strip it of everything that is not A-Z or 2-7. "5EIYUMCFPZNGRPR4H4KF6ICJHQ"
So far I do the following: ... cleankey = cleankey.Replace("1", "I").Replace("O", "0"); cleankey = Regex.Replace(cleankey, @"-([A-Z2-7])*", ""); ...
The data will come from multiple sources (database, files, user input) so need to handle different encodings, the above code fails on the first stample because the last '-'.
I don't understand regex that well and could do with a hand.
Thank you.
Regards, Gary Harpin ________________________________
"...a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are, in short, a perfect match.." Bill Bryson
[No Disclaimer]
=================================== This list is hosted by DevelopMentor http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com
|
| | 3 answer | Add comment |
Thursday, 11 October 2007
|
| Report grouping design Brady Kelly 15:37:31 |
| | Apologies if this is a little OT, but I seem to have hit a block and needed a bit of a sounding board.
I'm developing a data export / import application, mainly focused on producing text files, but also extended to read and write other database tables. I'm having difficulty coming up with a structure / mechanism for grouping for simple aggregates. At the moment have something like this in my export definition. The header and footer attributes refer to previous elements that define a sequence of columns for a type of record, as does the "Line" element.
<Group name="Invoice" driverQuery="ClientInvoices" groupFooter="InvHeader" groupKey="InvNoSort">
<Line recordDefinition="InvDetail" />
</Group>
My problem is that I need to include a single "InvDetail" line in the header as well, and this probably requires me to remove the header def to its own element, a child of the Group. I am just wondering if there are any existing patterns I could employ here to do this a better way.
=================================== This list is hosted by DevelopMentor http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com
|
| | Add comment |
Tuesday, 9 October 2007
|
| User Settings Vanish Brady Kelly 19:08:26 |
| | I've determined that my user settings are being stored in isolated storage, and are replaced by defaults in app.config when my build number changes. Is there any way around this while still retaining an automatic build number?
=================================== This list is hosted by DevelopMentor http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com
|
| | 2 answer | Add comment |
Friday, 5 October 2007
|
| What does yield do? Bill Booth 19:05:48 |
| | I got a code sample from the internet and am trying to convert it to VB. It is the first time I have run across "yield". Can someone give me some idea of what is going on in this line (yield return box;)? Thanks for any assistance. Bill
/// <summary> /// Read the IDataReader and return a list of of the specified type /// </summary> /// <typeparam name="T">The type of the generic list</typeparam> /// <param name="reader">The reader to read</param> /// <returns>A list of class</returns> public IEnumerable<T> GetEnumerator<T>(IDataReader reader) where T : new() { SmartReader<T> smartReader = InitDelegate<T>(reader);
// Read while (reader.Read()) { T box; smartReader(reader, out box); yield return box; } }
The information in this e-mail is confidential, may be legally privileged and is intended solely for the addressee. If you have received this e-mail in error, you are hereby notified that any use, distribution, or copying of this communication is strictly prohibited.
=================================== This list is hosted by DevelopMentor http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com
|
| | 2 answer | Add comment |
|
| Control.Validating event Anthony Nassar 00:15:32 |
| | I'm somewhat puzzled over what the CancelEventArgs argument to this event handler is actually supposed to accomplish. Yes, I've read the documentation. I have a number of composite controls in docking panels, and I'd like to prevent the user, somehow, from setting focus to another control in a different docking panel if he's put the model into an invalid state from the current panel. However, a mouse click will cause events the fire in this order: GotFocus, LostFocus, Leave, Validating, Validated. Now the user can edit stuff in other controls, drag and drop, whatever. It seems like I have no choice but to have the parent control maintain the validity of the entire model, and therefore find the control the user *was* working on and set the focus back to it. I could do this in a clean, OO way, but in essence I'm grabbing the mouse and putting it back where I want it to be, which seems like a horrible, hacky, pre-.NET tning to do.
What exactly is the semantics of "Validate," if I can't cancel it in any meaningful sense? The new control will get focus before the invalid control loses focus, which makes sense in terms of Win32 messages, but does *not* make sense in the context of my application, where a composite control with invalid state should be able to keep the user's attention as long as it needs to.
|
| | 2 answer | Add comment |
Wednesday, 19 September 2007
|
| Host Name of the request Sudhakar Jalli 22:05:42 |
| | Hello all,
I have a question around the host name. I believe the following statement returns the host name.
Request.UrlReferrer.Host
If my url is http://test.web.com/testing/one.aspx The result of the above statement would be test.web.com
If my url is http://www.one.com/testing/one.aspx What would be the result of the above statement?
Any help appreciated.
Thanks NM
=================================== This list is hosted by DevelopMentor http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com
|
| | 1 answer | Add comment |
Wednesday, 12 September 2007
|
| Re: GridView and Page.IsValid Adam Sills 22:35:16 |
| | I think most people (myself included) would like to skip validation because typically the Delete button should avoid all input validation that is associated with the current editing row (since you're deleting the row anyway).
Adam..
-----Original Message----- From: Discussion of building .NET applications targeted for the Web [mailto OTNET-WEB@DISCUSS.DEVELOP.COM] On Behalf Of Mark Brackett Sent: Monday, September 10, 2007 9:38 AM To: DOTNET-WEB@DISCUSS.DEVELOP.COM Subject: [DOTNET-WEB] GridView and Page.IsValid
The GridView seems to check Page.IsValid before handling an Update (reflected C#):
private void HandleUpdate(GridViewRow row, int rowIndex, bool causesValidation) { if ((!causesValidation || (this.Page == null)) || this.Page.IsValid) { // ... do update to datasource ... // } }
But not on Delete. It calls Page.Validate() in bool HandleEvent(EventArgs e, bool causesValidation, string validationGroup), but only actually checks Page.IsValid in HandleUpdate(). Personally, I think it should be checking IsValid on both Delete and Edit commands at a minimum....
This seems like a huge oversight to me - is everyone hooking a handler to GridView.RowDeleting and setting e.Cancel = !IsValid?
=================================== This list is hosted by DevelopMentor http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com
|
| | 2 answer | Add comment |
|
| Simple Text Parser Matthew Bell 19:55:01 |
| | I am looking at developing a simple text parser. Is there an easy way to format '<b>hello</b> world' and place it in a textbox or label.
I'm looking at implementing hyperlinks and maybe a picture from a text document like the example above and I might as well add in the normal b/u/i. Basically I'm looking for speed and a reduction in the size of the file that needs to be stored as doing this using word documents would be very sloppy.
Are there any useful controls out there or am I going to have to craft something myself. And if I'm crafting it myself is there an easy way to go about it or do I have to start hovering link-labels over textboxes etc.
Cheers Matt ___________________________ Disclaimer Notice ____________________ This message and any attachments are confidential and should only be read by those to whom they are addressed. If you are not the intended recipient, please contact us, delete the message from your computer and destroy any copies. Any distribution or copying without our prior permission is prohibited.
Internet communications are not always secure and therefore the E.ON Group does not accept legal responsibility for this message. The recipient is responsible for verifying its authenticity before acting on the contents. Any views or opinions presented are solely those of the author and do not necessarily represent those of the E.ON Group.
E.ON UK plc, Westwood Way, Westwood Business Park, Coventry, CV4 8LG. Registered in England & Wales No. 2366970
E.ON UK Trading Ltd, Westwood Way, Westwood Business Park, Coventry, CV4 8LG Registered in England & Wales No. 4178314
E.ON UK Trading Ltd is authorised and regulated by the Financial Services Authority to carry out energy investment activities.
Telephone +44 (0) 2476 42 4000 Fax +44 (0) 2476 42 5432
|
| | 2 answer | Add comment |
|
| Re: DOTNET-CLR Digest - 10 Sep 2007 to 11 Sep 2007 (#2007-123) Mike Cohen 08:13:44 |
| | Because of the Jewish High Holidays we will be closed until Monday Sept 17th, but we will check in for urgent messages
Mike Cohen Network-Companions Xerox Sales Agency Document Solutions Networks, Architecting, Wi-Fi, Hotspots Operating Systems, Exchange Server SQL Server, Ecommerce, Web Sites, Enterprise Application Integration, Cardiovascular Research Solutions, GLP, CFR 21 Part 11 Compliance Solutions Phone 800-921-NET0 (6380) Vociemail or Fax 800-859-6529 <http://netcomp.d2g.com> http://netcomp.d2g.com <mailto:mpcmanch@network-companions.d2g.com> mpcmanch@network-companions.d2g.com
=================================== This list is hosted by DevelopMentor http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com
|
| | Add comment |
Tuesday, 11 September 2007
|
| Enumerating Dictionaries Brady Kelly 23:31:48 |
| | I find it a tad irritating that when I want to iterate all the ColumnDefintion objects in my RecordDefinition, I always have to use '.in recDef.Columns.Values'.
Is there a nice way I can expose an enumerator over the values property as my 'Columns' property? Then I have problems adding etc.
=================================== This list is hosted by DevelopMentor http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com
|
| | 1 answer | Add comment |
|
| Evaluation of post-increment Brady Kelly 21:49:34 |
| | Suppose I use the following to compare column names in my test columns array with columns parsed by a parser under test. The parsed columns should be the same as those used to create the string that is parsed.
RecordDefinition def = parser.ParseLineAsHeader(headerLine);
int i = 0;
foreach (ColumnDefinition col in def.Columns.Values)
{
Assert.AreEqual(testHeader[i], col.ColumnName, "Incorrect name on column {0}.", i++);
}
Am I correct in assuming that 'i' will always be incremented?
=================================== This list is hosted by DevelopMentor http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com
|
| | 3 answer | Add comment |
Monday, 10 September 2007
|
| Guessing field delimiters Brady Kelly 21:28:42 |
| | I'm busy developing a tool to convert my existing base of template based record layouts to record layouts defined by an XML schema. Maintaining a record layout definition as one long string full of empty quotes and empty field double delimiters is looking for trouble. I'm now working on a tool where the user selects a single line in the existing template, or in an example file, and my code infers a collection of columns that define the record layout.
So far, just today, I have come across three different column delimiters, v.i.z TAB, comma, and something that renders a right angled corner graphics character. I would like to be able to guess the delimiter, if there is some sort of pattern I can look for, but it's not easy finding one.
Maybe the best I can do is allow the user to guess, and give a visual representation of the result of using the guessed delimiter. Another option is to allow the user to select two field contents and find the non-printable character in between the two field contents.
=================================== This list is hosted by DevelopMentor http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com
|
| | 1 answer | Add comment |
Sunday, 9 September 2007
|
| ItemDataBound not Firing on Repeater Brady Kelly 18:04:51 |
| | I have a user control that comprises a Repeater that builds a vertical table of buttons. In the Page_Load event of the user control I bind an event handler, but the event never fires. My code is like this:
protected void Page_Load(object sender, EventArgs e)
{
rptPageButtons.ItemDataBound += new RepeaterItemEventHandler(rptPageButtons_ItemDataBound);
}
void rptPageButtons_ItemDataBound(object sender, RepeaterItemEventArgs e)
{
throw new Exception("The method or operation is not implemented.");
}
However, if I use the OnItemDataBound attribute, the event fires. Why could this be?
=================================== This list is hosted by DevelopMentor http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com
|
| | 5 answers | Add comment |
|