Exemplo n.º 1
0
        private void initControls()
        {
            FileTree      = new TreeView();
            FileTree.Size = new Size(50, 50);

            FileTree.ImageList = AssetManager.getImageList();
            //fileTree.ImageList.ImageSize = new Size(32, 32);
            //fileTree.ImageList.ColorDepth = ColorDepth.Depth32Bit;
            //fileTree.ImageList.ImageSize = new Size(16, 16);
            //fileTree.ImageList = new ImageList();
            //fileTree.ImageList.Images.Add(AssetManager.ICON_FLDR);
            //fileTree.ImageList.Images.Add(AssetManager.ICON_FILE);


            newLevelAction  = new NewLevelAction();
            newTypeAction   = new NewTypeAction();
            newScriptAction = new NewScriptAction();
            newArtAction    = new NewArtAction();
            newSoundAction  = new NewSoundAction();
            newFolderAction = new NewFolderAction();
            newShaderAction = new NewShaderAction();

            folderNodeMenu       = new ContextMenuStrip();
            folderNodeMenu.Width = 200;

            ToolStripLabel label = new ToolStripLabel("Add File...");

            folderNodeMenu.Text = "Add File";
            // folderNodeMenu.Items.Add(label);
            folderNodeMenu.Items.Add(newTypeAction.generateControl <ToolStripButton>());
            folderNodeMenu.Items.Add(newScriptAction.generateControl <ToolStripButton>());
            folderNodeMenu.Items.Add(newLevelAction.generateControl <ToolStripButton>());
            folderNodeMenu.Items.Add(newArtAction.generateControl <ToolStripButton>());
            folderNodeMenu.Items.Add(newSoundAction.generateControl <ToolStripButton>());
            folderNodeMenu.Items.Add(newShaderAction.generateControl <ToolStripButton>());

            //folderNodeMenu.Items.Add(newFolderAction.generateControl<ToolStripButton>()); //TODO add folder support

            deleteAction = new DeleteFileAction(this);

            fileNodeMenu = new ContextMenuStrip();

            ToolStripLabel fileNodeLabel = new ToolStripLabel("Options...");

            fileNodeMenu.Text = "Options...";
            //fileNodeMenu.Items.Add(fileNodeLabel);
            fileNodeMenu.Items.Add(deleteAction.generateControl <ToolStripButton>());
        }
Exemplo n.º 2
0
        private void initControls()
        {
            newFileAction      = new NewFileAction();
            newFileAction.Name = "File";


            newScriptAction      = new NewScriptAction();
            newScriptAction.Name = "Script";

            newTypeAction      = new NewTypeAction();
            newTypeAction.Name = "Type";

            newLevelAction      = new NewLevelAction();
            newLevelAction.Name = "Level";

            newForm = new NewFileForm();

            openProjDialog                 = new OpenFileDialog();
            openProjDialog.DefaultExt      = ".whiskeyproj";
            openProjDialog.Filter          = "WhiskeyProjects|*.whiskeyproj";
            openProjDialog.CheckPathExists = false;
            openProjDialog.CheckFileExists = false;

            fileNewProject = new ToolStripMenuItem("Project");
            fileNewType    = new ToolStripMenuItem("Type");
            fileNewScript  = new ToolStripMenuItem("Script");
            fileNewLevel   = new ToolStripMenuItem("Level");
            fileNew        = new ToolStripMenuItem("New");

            //fileNew.DropDown.Items.Add(newFileAction.generateControl<ToolStripMenuItem>());
            //fileNew.DropDown.Items.Add(newProjectAction.generateControl<ToolStripMenuItem>());
            fileNew.DropDown.Items.Add(newTypeAction.generateControl <ToolStripMenuItem>());
            fileNew.DropDown.Items.Add(newScriptAction.generateControl <ToolStripMenuItem>());
            fileNew.DropDown.Items.Add(newLevelAction.generateControl <ToolStripMenuItem>());

            fileNew.DropDown.Items.Add(fileNewProject);
            //fileNew.DropDown.Items.Add(fileNewType);
            //fileNew.DropDown.Items.Add(fileNewScript);
            //fileNew.DropDown.Items.Add(fileNewLevel);

            fileOpenProject = new ToolStripMenuItem("Project");
            fileOpen        = new ToolStripMenuItem("Open");
            fileOpen.DropDown.Items.Add(fileOpenProject);

            fileSaveAll = new ToolStripMenuItem("Save All");


            fileExit = new ToolStripMenuItem("Exit");



            fileItem = new ToolStripMenuItem("File", null,
                                             fileNew,
                                             fileOpen,
                                             fileSaveAll,
                                             fileExit);


            viewOutput    = new ToolStripMenuItem("Output");
            viewLibrary   = new ToolStripMenuItem("Library");
            viewDocuments = new ToolStripMenuItem("Documents");
            viewProps     = new ToolStripMenuItem("Properties");
            viewItem      = new ToolStripMenuItem("View", null,
                                                  viewOutput,
                                                  viewLibrary,
                                                  viewProps,
                                                  viewDocuments);
        }