Click here to Skip to main content
15,889,795 members
Home / Discussions / C#
   

C#

 
GeneralRe: User login or not to a system Pin
CodingLover6-Feb-08 0:04
CodingLover6-Feb-08 0:04 
GeneralRe: User login or not to a system Pin
Not Active5-Feb-08 3:37
mentorNot Active5-Feb-08 3:37 
GeneralRe: User login or not to a system Pin
CodingLover6-Feb-08 0:08
CodingLover6-Feb-08 0:08 
GeneralClose Window problem [modified] Pin
Neo Andreson4-Feb-08 23:04
Neo Andreson4-Feb-08 23:04 
GeneralRe: Close Window problem Pin
TJoe5-Feb-08 2:14
TJoe5-Feb-08 2:14 
GeneralRe: Close Window problem Pin
Neo Andreson5-Feb-08 18:22
Neo Andreson5-Feb-08 18:22 
GeneralRe: Close Window problem Pin
TJoe6-Feb-08 2:17
TJoe6-Feb-08 2:17 
Questionhow to add a now treenode in the following code? Pin
samidhas4-Feb-08 22:53
samidhas4-Feb-08 22:53 
if i want to insert a now node name an value , by entering it in the text box, and after cliking on button the node should be add to the tree view
--------------------------------------------------------------------
private void Form1_Load(object sender, System.EventArgs e)
{

button1.Text = "Populate the TreeView with XML";
button1.SetBounds(8, 20, 200, 20);
treeXml.Height = 600;
treeXml.Width = 400;
grpbox = new GroupBox();
grpbox.Height = 600;
grpbox.Width = 400;
grpbox.SetBounds(500, 2, 700, 600);
grpbox.Visible = true;
grpbox.Dock.Equals(Right);
grpbox.Show();
this.Controls.Add(grpbox);


}

private void ConvertXmlNodeToTreeNode(XmlNode xmlNode,
TreeNodeCollection treeNodes)
{

TreeNode newTreeNode = treeNodes.Add(xmlNode.Name);

switch (xmlNode.NodeType)
{
case XmlNodeType.ProcessingInstruction:
case XmlNodeType.XmlDeclaration:
newTreeNode.Text = "<?" + xmlNode.Name + " " +
xmlNode.Value + "?>";
break;
case XmlNodeType.Element:
if (xmlNode.Name.ToLower().Equals("node") == true)
{
newTreeNode.Text = "<" + xmlNode.Attributes["label"].Value.ToString() + ">";
}
else
newTreeNode.Text = "<" + xmlNode.Name + ">";
break;
case XmlNodeType.Attribute:

newTreeNode.Text = xmlNode.Name;

// newTreeNode.Text = "ATTRIBUTE: " + xmlNode.Name;
break;
case XmlNodeType.Text:
case XmlNodeType.CDATA:
newTreeNode.Text = xmlNode.Value;
break;
case XmlNodeType.Comment:
newTreeNode.Text = "<!--" + xmlNode.Value + "-->";
break;
}

if (xmlNode.Attributes != null)
{
foreach (XmlAttribute attribute in xmlNode.Attributes)
{
ConvertXmlNodeToTreeNode(attribute, newTreeNode.Nodes);
}
}
foreach (XmlNode childNode in xmlNode.ChildNodes)
{
ConvertXmlNodeToTreeNode(childNode, newTreeNode.Nodes);
}
}
--------------------------------------------------------------------------
AnswerRe: how to add a now treenode in the following code? Pin
Malcolm Smart5-Feb-08 1:54
Malcolm Smart5-Feb-08 1:54 
QuestionHow do I draw a lines in a cirle? Pin
east854-Feb-08 22:53
east854-Feb-08 22:53 
GeneralRe: How do I draw a lines in a cirle? Pin
Abhijit Jana5-Feb-08 0:20
professionalAbhijit Jana5-Feb-08 0:20 
GeneralRe: How do I draw a lines in a cirle? Pin
Guffa5-Feb-08 2:44
Guffa5-Feb-08 2:44 
GeneralRe: How do I draw a lines in a cirle? Pin
east855-Feb-08 20:03
east855-Feb-08 20:03 
GeneralRe: How do I draw a lines in a cirle? Pin
Guffa5-Feb-08 20:57
Guffa5-Feb-08 20:57 
QuestionHow to know when a file created is completed? (in FilestreamWatcher) Pin
Sara1234-Feb-08 22:49
Sara1234-Feb-08 22:49 
AnswerRe: How to know when a file created is completed? (in FilestreamWatcher) Pin
Giorgi Dalakishvili4-Feb-08 22:56
mentorGiorgi Dalakishvili4-Feb-08 22:56 
GeneralRe: How to know when a file created is completed? (in FilestreamWatcher) Pin
Sara1234-Feb-08 23:46
Sara1234-Feb-08 23:46 
GeneralRe: How to know when a file created is completed? (in FilestreamWatcher) Pin
Giorgi Dalakishvili5-Feb-08 0:28
mentorGiorgi Dalakishvili5-Feb-08 0:28 
GeneralRe: How to know when a file created is completed? (in FilestreamWatcher) Pin
Sara1235-Feb-08 0:01
Sara1235-Feb-08 0:01 
Generalcrystal report error Pin
Member 7816104-Feb-08 22:47
Member 7816104-Feb-08 22:47 
Question.NET (C#) and Word Application Pin
Emanuil ACHIM4-Feb-08 22:44
Emanuil ACHIM4-Feb-08 22:44 
GeneralRe: .NET (C#) and Word Application Pin
Christian Graus4-Feb-08 22:49
protectorChristian Graus4-Feb-08 22:49 
GeneralRe: .NET (C#) and Word Application Pin
Malcolm Smart5-Feb-08 1:58
Malcolm Smart5-Feb-08 1:58 
Generalmdf and ldf file name from Backup DataBase Pin
Thaer Hamael4-Feb-08 22:41
Thaer Hamael4-Feb-08 22:41 
GeneralRe: mdf and ldf file name from Backup DataBase Pin
Christian Graus4-Feb-08 22:50
protectorChristian Graus4-Feb-08 22:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.