예제 #1
0
        private void ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ToolStripMenuItem tmi = sender as ToolStripMenuItem;

            switch (tmi.Text)
            {
            case "CollapseAll":
            {
                treeView1.CollapseAll();
            }
            break;

            case "Collapse":
            {
                treeView1.SelectedNode.Parent.Collapse();
            }
            break;

            case "Run":
            {
                XDCUnity.OpenTextFileWith("", treeView1.SelectedNode.Name);
            }
            break;

            case "AddToNewPack":
            {
            }
            break;

            default:
                break;
            }
        }
예제 #2
0
 private void treeView1_NodeMouseDoubleClick(object sender, TreeNodeMouseClickEventArgs e)
 {
     if (!File.Exists(e.Node.Name) ||
         (!e.Node.Name.ToLower().EndsWith(".txt") &&
          !e.Node.Name.ToLower().EndsWith(".ini") &&
          !e.Node.Name.ToLower().EndsWith(".xml") &&
          !e.Node.Name.ToLower().EndsWith(".html") &&
          !e.Node.Name.ToLower().EndsWith(".log") &&
          !e.Node.Name.ToLower().EndsWith(".bat") &&
          !e.Node.Name.ToLower().EndsWith(".htm")))
     {
         return;
     }
     ShowStatus(e.Node.Name);
     //OpenTextFileWith("notepad++.exe", e.Node.Name);
     XDCUnity.OpenTextFileWith("notepad++.exe", e.Node.Name);
 }