示例#1
0
        ///
        /// <summary>
        /// Allows the user to edit the current project's settings.
        /// </summary>
        private void editProject()
        {
            if ((_strTabIndex != "") && (_proInter.checkActiveAll(_strTabIndex) == false)) //Checks it the project is currently uploading
            {
                List <string>      lstNames       = _proInter.getProNames();
                ProjectSettings    oldProSettings = _proInter.getProSettings(_strTabIndex);           //Get the current project settings
                frmProjectSettings frmNewProject  = new frmProjectSettings(lstNames, oldProSettings); //Use them to fill form

                if (frmNewProject.ShowDialog() == DialogResult.OK)
                {
                    TabPage oldTabPage = mainTabControl.SelectedTab;           //Old TabPage
                    this.mainTabControl.TabPages.Remove(oldTabPage);           //Removes old tab page from Tab Control
                    ProjectSettings newSettings = frmNewProject.getSettings(); //Fetch the new settings
                    _proInter.editProject(oldProSettings.ProjectName, newSettings);
                }
            }
            enableProButtons();
            enableTargetButtons();
        }