|
In my opinion you can remove the impact of the entire design choice by having a good up front design that handles all aspects you mentioned.
You talk about the technical design, but you need a functional design first. A functional design focuses on use cases, workflows etc...
EG.:
Functional: A user says he wants a dialog that holds a person's information and that has buttons to save the information, copy the information and close the dialog. He also explains what that 'information' is, in detail. (name, first name, age, etc...) The user mentions how this information is used in other parts of the application and or system or even in other applications or systems. You can give some direction to the user here like do you want to have a remote service for this? (indicating pro's and con's)
Technical: Based on the information of thze technical information you can design the application technically, will we use services, forms/wpf or web UI's? What dataobjects can we define? How many tiers do we need, etc... This can go as far as defining the SQL statements necessary and writing propotypes.
Hope this is what you wanted.
V.
|
|
|
|
|
In implementing the app, yeah. It's good.
In design mode or user talks or functionality it is the other way around.
First talk to the users, see what(functionality) they want, how they want it(technical data such as web app, win app...).
Then, after all data about the app is gathered, start with the DB. That's how I do it.
I may be wrong, but don't tell anybody.
All the best,
Dan
|
|
|
|
|
Hi experts,
there is a project called MyProject . It compiles to a file called MyProjectAssembly.exe .
Since it has to support multiple languages, there is also a resource file MyProject.resx , which contains string-typed keys and string-typed values.
I can, in code, gain access to the strings via
string translatedValue = MyProject.KeyForTranslatedValue
Now there are some strings that I don't know the keys for at compile time. Therefore I have the application process KeyForTranslatedValue and get the translated string via
string translatedValue = Properties.Resources.ResourceManager.GetString("KeyForTranslatedValue");
The mentioned Properties.Resources.ResourceManager cannot find the string and therefore returns null . It seems to be able to retrieve some other resources (numbers, icons, ...) that are language-independent and are stored in Project Explorer -> RightClick -> Properties -> Resources.
Is this normal behaviour?
Can I redirect Properties.Resources.ResourceManager to the langugage-dependent resources? Would that be stupid?
Should I use a separate ResourceManager for the language-dependent resources?
Ciao,
luker
|
|
|
|
|
The ResourceManager.GetString method has an overload that takes in the resource culture as the second parameter. You may want to experiment with that.
|
|
|
|
|
I would like to move the selected row information from one datagrid to another.However datagrid1 only has two columns and datagrid2(the one that needs to recieve the specified data) has four columns.The information displayed in datagrid2 needs to be in the last two columns and not the first two.Hope someone can help me....Thank you in advance.
|
|
|
|
|
hello
i am writing an application that one of the thing that it should do is to open another application using that application command line arguments. the problem is that the command line arguments contain user and password details, and if i use utilities like process explorer i can see all the argumnents that ware used to start the process, including user and password.
i am looking for a way to hide/mask the process arguments, so that there will no way to find the user and password after starting the process.
altenatively, i will try to hide the process fromm the process list.
Thanks
|
|
|
|
|
You can consider encrypting sensitive arguments from the calling program and descrypting the arguments from the called program using the same encryption scheme and key.
|
|
|
|
|
this might work if i am writing the called program, but in my case, i am trying to open an existing application, that i didnt wrote.
|
|
|
|
|
There is nothing you can do about it then. If the called program doesn't expose a COM interface to do the work without using the command line, you're just going to have to live with it or replace the called program with something that fits the security requirements.
|
|
|
|
|
If the called program requires that passwords be passed in as plain-text parameters, then there is nothing much you can do about it.
|
|
|
|
|
I wish to open from 1 - 20 instances of the same form.
I then wish to place them in order of the instance in which they were called, at specific locations.
Therefore, I need to know what number the instance is that is associated with the form, and refer back to the form when needed.
How do I get the numerical instance associated with the form created.
Any help will be appreciated.
Thanks in advance,
Michael
|
|
|
|
|
I would consider creating a List containing pointers to the form instances as they are opened. If you need to reverse the process, i.e. figure out the number when you have the form, then save the number in the Tag field.
CQ de W5ALT
Walt Fair, Jr., P. E.
Comport Computing
Specializing in Technical Engineering Software
|
|
|
|
|
A Dictionary<int, Form> ?
modified on Wednesday, August 3, 2011 7:49 AM
|
|
|
|
|
You have two good answers, already, but I'll go ahead and ask whether the 1-20 Form instances are:
1. created when you launch the application: i.e., in the Main Form's 'Load or 'Shown Events, or as a result of parsing command line parameters ?
2. if created at run-time after the Main Form is shown, is their creation executed once and only once ... or, are they liable to be 'disposed,' and then a new set is created ?
If created at application launch, there are several strategies you could pursue, including:
1. making all the created Forms have the Main Form as their owner: then you can use the 'OwnedForms Form Collection of the Main Form to access them sequentially ... as long as the Main Form doesn't own other Forms of a different Type.
2.using the Application.OpenForms Form Collection, after the duplicate Forms have been shown, and iterating through it, testing for if (currentForm is FormForCopying) to discriminate copied Forms from other Forms.
A simpler strategy, independent of whether you create the Forms at launch, or at run-time:
1. Take your existing Form definition used for copies, make it sub-class Form, then add a public property to it of type int with getter and setter: as you create the copies assign the value you want to the public property.
I'd probably go with the strategy suggested in either Walt or Shameel's answers ... unless ... there were other compelling reasons to add additional properties, methods, special events, etc. to the copied Forms.
If one of your 'issues' is you want the end-user to be able to re-position the copied Forms on-demand at run-time, perhaps after moving them about, or whatever, you might consider caching their original positions the first time you display them, so that you can 'pop' them back into their original position without calculation ... assuming none have been deleted or added.
You could apply the same strategy for preserving the original positions of the copied Forms that you choose to preserve the numerical index of the Forms.
best, Bill
"In the River of Delights, Panic has not failed me." Jorge Luis Borges
|
|
|
|
|
hi!
im using wmi for my coded project, and i need to get some data in system properties. can anyone help me how to get the values for the initial size and maximum size of the virtual memory and how to change their values.
thanks!
|
|
|
|
|
<pre lang="xml">How do you dynamically assign a datagrid's headers in c#?
Consider the following XAML:
<data:DataGrid x:Name="dataGrid" AutoGenerateColumns="False" Margin="1,1,1,1" >
<data:DataGrid.Columns>
<data:DataGridTextColumn
Header="Substantive"
Binding="{Binding Path=Substantive}"
IsReadOnly="True"
/>
<data:DataGridTextColumn
Header=""
Binding="{Binding Path=Month[0]}"
IsReadOnly="True"
/>
<data:DataGridTextColumn
Header=""
Binding="{Binding Path=Month[1]}"
IsReadOnly="True"
/>
</data:DataGrid.Columns>
</data:DataGrid>
In the C# code, how would I define the headers that are blank?</pre>
|
|
|
|
|
hi
i have C# program that work with access database. (i have datetime field in access - Short Date)
How to make sure that the program will not crash with the wrong date format ?
for example:
in my computer the date in this format: dd/MM/yyyy
and if i run my program on computer that has this format: MM/dd/yyyy
the program will crash or will show me abnormal result
is there any generic solution ?
can i get any C# code for this ?
thanks in advance
|
|
|
|
|
This might help
http://msdn.microsoft.com/en-us/library/w2sa9yss.aspx[^]
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997
|
|
|
|
|
You can and should get rid of all regional setting stuff and avoid all string representations for dates, use the proper data types in your code AND in your database. This implies you use SQL parameters, not literal data.
For MS Access, use OleDbParameter (which requires the ? symbolic name in the SQL statement, where other databases would allow real symbolic names for the parameters; the question marks and parameters are synchronized in chronological order).
Example:
string SQL="UPDATE [references] SET name=?,address=?,zip_code=?,date=? WHERE referenceID = 1115224993"
OleDbCommand cmd=new OleDbCommand(...);
...
cmd.Parameters.Add("date", OleDbType.Date).Value=DateTime.Today;
...
See, no date strings at all.
|
|
|
|
|
I like that!
Nice to see you around Luc.
------------------------------------
I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave
CCC Link[ ^]
Trolls[ ^]
|
|
|
|
|
Dalek Dave wrote: I like that!
This ain't bloody Facebook (yet)!
|
|
|
|
|
I have found that you can use @name in place of ? , which allows one to use a parameter more than once, but they still have to be in typographical order.
|
|
|
|
|
I am assuming you mean the following would be good:
string SQL="UPDATE tableName SET anInt=@anInt, aString=@aString, anotherInt=@anInt, aDate=@aDate WHERE ..."
OleDbCommand cmd=new OleDbCommand(...);
cmd.Parameters.Add("@anInt", OleDbType.Int).Value=12;
cmd.Parameters.Add("@aString", OleDbType.VarChar).Value="abc";
cmd.Parameters.Add("@aDate", OleDbType.Date).Value=DateTime.Today;
as the parameters are given in the order of first use.
But then that limitation seems pretty weird, as now they use parameter names to handle duplicate uses, but not for general parameter identification? That doesn't make much sense to me. If they would use names all the way (not hard at all), it would work like T-SQL and others!?
Maybe it depends on the OleDb version, where older ones need "?" and newer ones do it the proper way? Just guessing. Do you have any reference?
|
|
|
|
|
I think both uses of @anInt have to be consecutive, but it has been a while since I last experimented with it.
Luc Pattyn wrote: Do you have any reference?
Just experience.
|
|
|
|
|
I just performed a simple experiment with @name and it works just fine, so now my code for Access (using Provider=Microsoft.Jet.OLEDB.4.0) and for SQLServer looks pretty much the same, except for those stupid OleDbTypes/SqlTypes enums the parameters need.
[ADDED]
The MSDN doc[^] doesn't mention named parameters in a positive way, all it says is: The OLE DB.NET Framework Data Provider uses positional parameters that are marked with a question mark (?) instead of named parameters.
[/ADDED]
Luc Pattyn [My Articles] Nil Volentibus Arduum
modified on Monday, August 1, 2011 11:05 PM
|
|
|
|
|