|
A question:
"Why do you want to allow users to ruin design a form?"
arefkarimi wrote: Specially what is the best way to persist entities inside DB
"Send your users on a database methodology and design course"
In all seriousness users are just that "users" - which means that they use systems which we as IT professionals create for them.
Allowing users to move fields around on a from is a different matter, however allowing them to have so much control that they could compromise the database integrity (which is what I'm guessing you mean by "best way to persist entities inside DB") is so so much a bad design idea.
Maybe if you gave more background...
Barring that I would suggest an interface such as Microsoft Access as it probably is one of the simplest form design interfaces I have encountered.
You always pass failure on the way to success.
|
|
|
|
|
Hi GuyThiebaut,
Thanks for the reply. First I must say that I dont want to write this program by my wish! The company in which I work have an old product line (written by Delphi) and a new .NET product line. In the Delphi product line there is such a program (we call it Form Maker) and I must say that our end users love it! They love it because they can extend the system's forms or they can add their desired forms. for example in Office Automation system, there is a Letter form. In some cases, some kind of letters have some information which our Letter form doenst support them. So the users can design an extra Letter form and attach it to the main Letter form. Or in some cases some users need to enter some data and make reports out of them but our total system doenst contain such a feature. For instance suppose that our integrated system has Accounting and Inventory programs but no Appointment system. By our Form Maker the user can design his own Appointment form in a few minutes and use it. Our Form Maker can only save and load data and there is no complex business supported in it.
As I mentioned, our Delphi systems has a Form Maker program. This program lets the user design the forms and then based on the structure of each form it creates some DB objects (i.e. Tables, Indcices...). When I was asked to write it in .NET I tough I would better search for better ways (better architecture or design) and not to rewrite the same thing in .NET. When I said "persisting entities" I ment to keep them somewhere, not DB only.
I googled in web and I found out that there are alot of Form Makers on the globe
Thanks again
Aref, MCTS and MCPD
|
|
|
|
|
Hi Aref,
Thanks for such a detailed response.
It looks to me like you need to buy some third party software for this.
Developing this yourself would be a very large task (you would probably need a team of developers to realise this sort of project in a reasonable time).
I'm sure there are applications out there which will do this (I have come across Delphi applications(which you mention)).
All I can say is, unless anyone else on this forum is able to give you some direction, google and you should find developer tools/applications addons that will do this.
Sorry I could not be of more help.
Good luck.
Guy
You always pass failure on the way to success.
|
|
|
|
|
How can I use delayed clipboard rendering (just some text) in C# ?
|
|
|
|
|
Methinks you'll need to SetClipboardData() with null data (i.e. just register the clipboard format) and then handle the WM_RENDERFORMAT and WM_RENDERALLFORMATS messages.
/ravi
|
|
|
|
|
I am loading up DataSets which use about 2GB of memory. My memory usage shows aproximately .5GB at start, then as it allocates space for the DataSets I show 2 GB being uses, I then get an error message saying I am out of memory yet I still have 1.5GB left. I have eliminated the possibility that the method is not working correctly.
Does anyone have any ideas on how to proceed or what the problem may be.
Michael
|
|
|
|
|
Why are you trying to put such a massive amount of data into memory?
|
|
|
|
|
Load Testing on Memory?
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
Is this a 32 bit or 64 bit application? A 32 bit application can't address more than 2 GB of memory.
Experience is the sum of all the mistakes you have done.
|
|
|
|
|
Hi, all.
If anyone knows of any articles or web sites that go into detail of a 'high score system' or internet usage (like a simple multiplayer game where you can chat) I'd be greatly appreciative. Also, if anyone could tell me how to publish a program... Step 1) Zip up contents - what are all the contents? Step 2) eMail content???
Thanks!
- I love D-flat!
|
|
|
|
|
Hich scores can be stored whereever you like, the registry, XML, a flat file. It's up to you. Any internet based stuff is going to revolve around a central server that at a minimum acts as a hub to allow players to find each other, even if traffic after that goes direct between the players.
To deploy a program, you're better off creating an installer, which also means it can enforce the need for the .NET framework.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
hi
i want, search in network for online computers by this code :
System.Diagnostics.Process pr = new System.Diagnostics.Process();<br />
System.Diagnostics.ProcessStartInfo pstart = new System.Diagnostics.ProcessStartInfo("cmd.exe");<br />
pstart.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;<br />
pstart.UseShellExecute = false;<br />
pstart.RedirectStandardOutput = true;<br />
pstart.RedirectStandardInput = true;<br />
pr.StartInfo = pstart;<br />
pr.Start();<br />
System.IO.StreamReader reader = pr.StandardOutput;<br />
System.IO.StreamWriter writer = pr.StandardInput;<br />
writer.WriteLine("net view");<br />
writer.Close();<br />
StringBuilder sb = new StringBuilder();<br />
<br />
while (!reader.EndOfStream)<br />
{<br />
string line = reader.ReadLine();<br />
if (line.StartsWith("\\"))<br />
{<br />
line = line.Replace("\\", "");<br />
sb.AppendLine(line.TrimEnd(null));<br />
}<br />
}<br />
this.textBox1.Text = sb.ToString(); <br />
pr.WaitForExit();<br />
pr.Close();
this code work correctly, but my problem is that when i set UseShellExecute property to false, this line of code :
pstart.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
does not work and cmd.exe was shown, how to solve this problem and prevent from show cmd.exe ?
thanks
|
|
|
|
|
AFAIK you can't. There basically are two kinds of apps:
- Windows apps, they can create and show a form, but they can not perform input/output in a
console window (such as "Command Prompt").
- console apps, they can create and show a form, and perform console input/output; when launched
inside a console (as a DOS command) they use that console; when launched outside, they create
a new console (which you can hide afterwards, but it WILL initially show no matter what).
cmd.exe is clearly a console app.
|
|
|
|
|
hi Luc Pattyn
in win app, when u start cmd.exe from your app, u can set input/output to your app(did u test my code ?), but my problem is not that, my problem is that how to prevent to display command prompt when i run cmd.exe with useSellExecute set to flase.
thanks
|
|
|
|
|
Try setting CreateNoWindow property to true.
|
|
|
|
|
thanks.
my problem was solved by your suggesstion.
|
|
|
|
|
You are welcome
|
|
|
|
|
Greetings,
Mostly I use enumerations to specify a list of constants that are connected.
However, recently I needed to create a code that does the following:
Paint a line with a specific color that is set by the value of the bits in a variable.
The bits values are arranged in enumeration:
enum bits
{
Switch1 = 1,
Switch2 = 2,
Switch3 = 4,
switch4 = 8,
}
What is the best way to assign a color to each switch?
I thought of two ways:
---------------------------------------------
creating a dictionary and set its values in runtime:
Dictionary<bits, color=""> Bits_Colors = new Dictionary<bits, color="">;<br />
<br />
Bits_Colors.Add(switch1, Color.Red);<br />
Bits_Colors.Add(switch2, Color.Ivory);<br />
..</bits,></bits,>
But this solution because the dictionary is not constant and readonly would not help here.
-------------------------------------------------
Creating another enumeration for the colors and using thier names as params to Color.
<br />
enum BitsColors<br />
{<br />
Red = 1,<br />
Ivory = 2.<br />
Blue = 4,<br />
Green = 8<br />
}<br />
<br />
string name = Enum.GetNames(bits, (int) switch2 );
Color c = Color.MakeByName(name);
-----------------------------------------------------------
I wrote the code from my memory so it might be a little not working.
Sincerely yours
Y.R.
|
|
|
|
|
How about an array ? A constant array of colors, and you reference it by index, using the value that is the combination of your bit values.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Thanks for your reply.
I thought of that but there are two problems:
First, I don't think there is an easy way to make array a contant (except for basic types arrays).
Second, my bits values are not 1, 2, 3, 4... (which would fit to an array).
They are 1, 2, 4, 8, ... (Which requires some logic to be implemented in an array).
I thought of constant dictionary but I don't think there is a way to make the dictionary constant or readonly.
Sincerely yours
Y.R.
|
|
|
|
|
You could use attributes, but the code can be verbose and (perhaps) inefficient.
I'd stick with the readonly static Dictionary idea; wrap it in something so the code that uses it can't change it.
|
|
|
|
|
I thought that this is the only way.
It strange that such a powerful language don't have this simple features.
Thanks for your help.
Sincerely yours
Y.R.
|
|
|
|
|
Microsoft tends to do the hard stuff and leave the easy stuff to you. (Which is better than the other way around.)
|
|
|
|
|
How to load HTML file using XmlDocument class
I try to do
System.Xml.XmlDocument doc = new System.Xml.XmlDocument();
doc.Load(path);
but html document not considered by doc.Load method like regullar xml document since what have some unclosed tags such as an other unwell formated things(<link)>Can i actually load this html file by using System.Xml.XmlDocument() for purpose transform this HTML file into an XML file by using XSLT.
THANK
|
|
|
|
|
As you have found, not all HTML documents are XHTML. Therefore, a DOM class will not load them. An XSLT can generate non XML documents, but it cannot work with documents that are not XML to start with, you need a different solution.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|