|
Hi,
I want to build an application that will enable the user to create chart of accounts in nXn(n by n) tree structure. I want to use data structures to do so. The user should be able to not only add new nodes to the tree but also manipulate the data in the tree using references to parent and child nodes(Traversing). Please, help me and provide a solution ASAP.
Thank You.
HASAN ABBAS
|
|
|
|
|
Basically, i would just use the treeview.
But if not have a struct or class for your node, and within it, have a list of itself:
class Node
{
List<node> nodeCollection;
...
}
My current favourite word is: Bauble!
-SK Genius
|
|
|
|
|
I implemented a simple AVL-tree (that are balanced trees) - the code will only compile in .net 3.5 (because I use some simple LINQ to object statements and a lot of var-declerations) but you should be able to modify it to .net 2.0 without problems (.net 1.1 is not that easy because I use generics for the tree-structures)
I only commented the code in german but I can send you the files if you PM me your adress.
|
|
|
|
|
Hi,
Even I am working on similar tree-project. I have already performed lot of research on it but not getting some proper result.
Can you please mail your code on ujjavalmodi@gmail.com
It would be a great help.
Thanx in advance !
Regards,
Ujjaval Modi
Manpower moves wrenches, horsepower moves cars, and the power of the mind moves the world.
|
|
|
|
|
Hey!! I'd love to have ur code. My email ID is hasanabbas19@hotmail.com.
Thanks.
HASAN ABBAS
|
|
|
|
|
Hi,
I'm not at office for till Jan. 9th but I will send you the files on first ocassion.
|
|
|
|
|
Ok, thx for ur cooperation buddy. I am working on it in the meantime. I think I have come up with some kinda solution. But, please do send the code anyhow.
Thanks again for ur cooperation.
HASAN ABBAS
|
|
|
|
|
Hasan_Abbas wrote: provide a solution ASAP
Nope.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
How can i use The cameras depending on
a number of cameras that i want them to do at the same time ?
Is this posible with Webcamcapture library ?
if not,Do you know how to solve by using thread ?
|
|
|
|
|
Not sure. Good luck.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
I have one programme, which may needs many loops, I found if the loop is too large, then after the running is done, the speed of computer is very slow. Then I want to know is there method to clear the
memory after each loop?
|
|
|
|
|
In order to force garbage collection, you would use GC.Collect() but this is an expensive operation. Let the garbage collector work out when it needs to collect from your application. I suspect that your real issue is that you have items that aren't being disposed - thus taking up memory.
|
|
|
|
|
What do you do in the loop ? How much memory do you end up using ? Unless you're creating objects in the loop and not cleaning them up, GC.Collect is going to do precisely zero for you.
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 a lot.
related to this quesiton, I have several small questions to trouble you:
1) I use many static variables in my program, does this influence the memory?
2) in the loop I mentioned, I do create several temporal objects such as Dictionary<key, string=""> dic1=new Dictionary<key, string="">, does this will influence the memory? or this can be automatically released when one loop is finished?
thanks again.
|
|
|
|
|
Hi everybody,
I am using toolstrip menuitems in my form.Problem is that when menuitem is disabled and mouse is moved over it,it shows a rectangle on that menuitem as if it is active.
so,I want that rectangle should not appear when menuitem is disabled.
thanks
|
|
|
|
|
hi
i am creating a login page.Inthe form load itself i need to hide the MenuStrip in MDI Parent to HIDE, When the users gives the correct passwd and pushes the Loginbutton , My MDIParent1 forms menustrip should be visible .
c my code . but it doesnt works. Any body pls clear my doubt.
private void LoginForm_Load(object sender, EventArgs e)<br />
{<br />
mdifrm = new MDIParent1();<br />
<br />
mdifrm.menuStrip.Visible = false;<br />
}
I had created formobj mdifrm and made it visible false on load. this also not works.
private void btnLogin_Click_1(object sender, EventArgs e)<br />
<br />
{<br />
if (strPasswd == dsUsers.Tables[0].Rows[0].ItemArray[0].ToString())<br />
<br />
{<br />
<br />
this.mdifrm.menuStrip.Visible = true;<br />
<br />
this.Hide();<br />
<br />
}<br />
<br />
else<br />
<br />
{<br />
<br />
MessageBox.Show("Incorrect Password","Error",MessageBoxButtons.OK,MessageBoxIcon.Error);<br />
<br />
}<br />
<br />
<br />
<br />
}<br />
<br />
thanks in adv
kssk
senthil
|
|
|
|
|
You did VB6 before right?
What you are doing is this: you create a NEW invisible(because never shown through .Show) mdi-form and set it's visibility to false.
But you will have to acces the mdi-form-object that is shown in your app!
The easiest way is to use the parent/owner property of your form (you set the owner/mdi-parent of the login-form to the mdi-form) and use this:
<br />
this.Parent.Hide();<br />
|
|
|
|
|
i think u didnt understand my exact problem.
My problem is not hiding or making my MDIparent as visible.
I have two forms FORM1 ,FORM2. FORM1 is MDIParent. FORM2 is Loginform
i have a menustrp in FORM1(MDIParent).That menustrip should be invisible till the user enters the correct password(I had checked it in my code) in the FORM2(Login form), so if the passwd is correct
menustrip should be visible!
Hope now u can give me right idea.
senthil
|
|
|
|
|
I commented on your code - but the solution is simple: just implement some public function in FORM1 that shows/hides the menustrip and use this with
<br />
((FORM1)this.Parent).ShowMenuStrip(true);<br />
|
|
|
|
|
Just a piece of suggestion...
Why don't you use a dialog box for your login? In that way your main form/MDI Parent form is hidden and it will only be visible not until the user gives the correct username/password..
Maybe you might want to consider this for your login:
**Create two forms, one is the Login Form, and the other is the Main Form.
LOGIN FORM:
1. Add a textbox control (say txtPassword) and button controls (OK & Cancel), set the form's FormBorderStyle to FixedDialog & set the ControlBox to false (this is one way on how you create your own custom dialog box )
2. on the OnClick event of the OK button, do your validation...
i.e.
********
private void button1_Click(object sender, EventArgs e)
{
if (txtPassword.Text == "whatever your condition is...")
{
this.Close();
//once the user inputs the correct username/password, just close
//the Login Form..
}
}
********
then this is just what you need to code in the MAIN FORM..
********
private void MainForm_Load(object sender, EventArgs e)
{
LoginForm log = new LoginForm();
log.ShowDialog();
}
*********
With this kind of program, you are more assured that your Main form will be displayed only if the user will input the correct username and password.
Hope this helps.
|
|
|
|
|
After the excellent assistance given to me earlier I thought I'd come back and ask another question
I have the following:
1. A string array populated with the inner text of an xml element
2. An rtf file with regular text and encapsulated words in the following format <+> Name <+> etc, where the encapsulated word corresponds directly to a string held in the previously mentioned string array (minus the <+>s). So the corresponding string array looks something like: string [] data = new string[] {"Name", "Jim", "Address", "Some Street"};
Basically I'm looking for a way to read all the encapsulated strings in the rtf and find (and replace them with) the corresponding data in the string array... does anyone have any ideas? I've been using linq to perform the xml queries & manipulation so if anybody has any linq based ideas or any ideas at all I'd be very grateful...
|
|
|
|
|
Maybe using regular expressions.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
hi
Is it possible to make a print document using drag and drop or a wizard?
if it is, please give me a hint.
(VS 2005)
|
|
|
|
|
Not sure how, but it should be fairly easy to implement.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
hi,
i am having two codes to send a message to another PC by using Socket Connection........soc is the object of socket....str is a string variable
Code 1.
string str = textBox1.Text;
byte[] msg = Encoding.ASCII.GetBytes(str);
soc.Send(msg);
Code 2.
Object objData = textBox1.Text;
byte[] byData =System.Text.Encoding.ASCII.GetBytes(objData.ToString ());
soc.Send (byData);
In the code 1 message is stored in a string then converted to byte stream then it's send
In the Code 2 a object of the textbox text is created then it is converted to byte stream ,,n then it is sended ...
So which one is the correct way...plz do reply .
Regards
Sindhu tiwari
its me sid
|
|
|
|