Example #1
0
 //==========================================================================
 //Create a new code file
 //==========================================================================
 private void addNewCodeFileToolStripMenuItem_Click(object sender, EventArgs e)
 {
     HelperForms.MessageBoxWithOneLineInput input = new MessageBoxWithOneLineInput();
     input.ShowDialog();
     if (input.getStatus())
     {
         addBlankCodeFile(input.value + ".acf");
         MainTreeView.Nodes[0].Nodes[0].Nodes.Add(input.value + ".acf");
     }
 }
Example #2
0
        //==========================================================================
        //Create a new project
        //==========================================================================
        private void newProjectToolStripMenuItem_Click(object sender, EventArgs e)
        {
            HelperForms.MessageBoxWithOneLineInput asker = new MessageBoxWithOneLineInput();
            asker.ShowDialog();
            string name;

            if (asker.getStatus())
            {
                name = asker.value;
                Directory.CreateDirectory(originalFilePath + name);
                var myFile = File.Create(originalFilePath + "\\" + name + "\\" + name + ".apf");
                myFile.Close();

                projectName = name;

                fileManager.setProjectPath(originalFilePath + name);
            }
        }
Example #3
0
 //==========================================================================
 //Rename node
 //==========================================================================
 private void renameToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (MainTreeView.SelectedNode.Name != "MappingRoot" &&
         MainTreeView.SelectedNode.Name != "CodeRoot" &&
         MainTreeView.SelectedNode.Name != "ProjectRoot" &&
         MainTreeView.SelectedNode.Name != "SpriteRoot")
     {
         MessageBoxWithOneLineInput asker = new MessageBoxWithOneLineInput
         {
             value = MainTreeView.SelectedNode.Name
         };
         asker.ShowDialog();
         if (asker.getStatus())
         {
             string name = asker.value;
             if (name != "")
             {
                 MainTreeView.SelectedNode.Name = name;
                 MainTreeView.SelectedNode.Text = name + ".mxt";
             }
         }
     }
 }