/* ---------------------------------------*/ /* TOOL BAR ACTIONS */ /* ---------------------------------------*/ /* Toolbar Menu - New Project Clicked */ private void MenuItemNew_Click(object sender, RoutedEventArgs e) { DialogNewProject newProject = new DialogNewProject(); newProject.Show(); newProject.Activate(); }
////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////// // // // FORM ELEMENTS // // // ////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////// ///////////////////////////////////// // Menu Strip ///////////////////////////////////// // file private void newToolStripMenuItem_Click(object sender, EventArgs e) { int width = 0; int height = 0; DialogNewProject newProjectMessageBox = new DialogNewProject(); DialogResult result = newProjectMessageBox.ShowDialog(); if (result == DialogResult.OK) { // empty layer list control layerList.clearAll(); // get input from new project dialog width = newProjectMessageBox.m_width; height = newProjectMessageBox.m_height; // tell the program to create the project m_program.createNewProject(Color.FromArgb(0, 255, 255, 255), new Size(width, height)); // populate the layer list control for (int i = 0; i < m_program.getLayerCount(); i++) { string s = m_program.getLayerText(i); layerList.AddItem(s); } // get the display image from the program updateCanvasImage(); } }