コード例 #1
0
ファイル: fmMain.cs プロジェクト: ProfPorkins/GPStudio
        private void menuProjectNew_Click(object sender, EventArgs e)
        {
            //
            // Create the new project entry
            GPProject proj = new GPProject("New Project");

            //
            // Bring up the project form
            fmProject project = new fmProject(proj);

            project.MdiParent = this;
            project.Show();
        }
コード例 #2
0
        private void btnDelete_Click_1(object sender, EventArgs e)
        {
            if (MessageBox.Show("Confirm Project Removal?", "Project Delete", MessageBoxButtons.YesNo) == DialogResult.Yes)
            {
                ListViewItem lvSelected = lvProjects.Items[lvProjects.SelectedItems[0].Index];
                int          ProjectID  = Convert.ToInt32(lvSelected.Tag.ToString());

                if (GPProject.DeleteProject(ProjectID))
                {
                    lvSelected.Remove();
                }
                else
                {
                    MessageBox.Show("Unable to delete the project from the database.", "Project Delete", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
        }
コード例 #3
0
        public fmProject(GPProject Project)
        {
            InitializeComponent();

            m_Project = Project;
            Title     = m_Project.Name;

            //
            // Set the UI controls
            InitializeUISettings();

            //
            // Disable the ability to edit the profile
            foreach (TabPage Page in tabProfile.TabPages)
            {
                foreach (Control Child in Page.Controls)
                {
                    Child.Enabled = false;
                }
            }

            //
            // Modeling Profile - Load the list of available functions
            InitializeFunctionSet();

            //
            // Modeling Profile - Load the list of available fitness functions
            InitializeFitnessFunctions();

            //
            // Prepare the visual appearance of the graphs
            InitializeFitnessGraph();
            InitializePopComplexityGraph();
            InitializePopFitnessGraph();

            //
            // Register with the batch processing manager
            fmMain.BatchManager.RegisterClient(this);
        }
コード例 #4
0
ファイル: fmMain.cs プロジェクト: ProfPorkins/GPStudio
        private void menuProjectOpen_Click(object sender, EventArgs e)
        {
            //
            // Bring up the list of project
            fmProjectManager dlg = new fmProjectManager();

            if (dlg.ShowDialog(this) == DialogResult.OK)
            {
                //
                // Load up this project and bring up the Project form
                ListViewItem lvSelected = dlg.lvProjects.Items[dlg.lvProjects.SelectedItems[0].Index];
                int          ProjectID  = Convert.ToInt32(lvSelected.Tag.ToString());
                //
                // Load up the project
                GPProject proj = new GPProject("New Project");
                proj.Load(ProjectID);
                //
                // Bring up the project form
                fmProject project = new fmProject(proj);
                project.MdiParent = this;
                project.Show();
            }
        }