public void AddClass(bool topMost) { ProjectCont.GetNodeCount(true); var node = GetNode(); // get the file attributes for file or directory var attr = File.GetAttributes(ProjectCont.SelectedNode.Tag.ToString()); //detect whether its a directory or file if ((attr & FileAttributes.Directory) == FileAttributes.Directory) { _textEditor = new FastColoredTextBox(); _textEditor.PaintLine += fastColoredTextBox1_PaintLine; classcontainer.MouseClick += ClassCont_MouseClick; var addClass = new CreateClassForm((string)node.Tag, node, classcontainer, _fochild.Searchtext, _fochild.Displayhelptext, _textEditor, envoroment_icon, feedback); if (topMost) { addClass.TopMost = true; } addClass.Show(); } else { MessageBox.Show("This is a class not project, please select Project to add class", "Select project", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }
private void ProjectCont_MouseDown(object sender, MouseEventArgs e) { ProjectCont.SelectedNode = ProjectCont.GetNodeAt(e.X, e.Y); }