예제 #1
0
        public void EnableControls()
        {
            SaveExtractedDocs.CheckState = Properties.Settings.Default.SaveDocs ? CheckState.Checked : CheckState.Unchecked;
            LibraryGen.CheckState        = Properties.Settings.Default.GenLib ? CheckState.Checked : CheckState.Unchecked;
            Verbose.CheckState           = Properties.Settings.Default.Verbose ? CheckState.Checked : CheckState.Unchecked;

            LibraryGen.Enabled = true;
            LibraryGen.Update();
            SaveExtractedDocs.Enabled = true;
            SaveExtractedDocs.Update();
            Verbose.Enabled = true;
            Verbose.Update();
            FileHistory.Enabled = true;
            FileHistory.Update();
            button1.Enabled = true;
            button1.Update();
            SelectSource.Enabled = true;
            SelectSource.Update();
            CleanUp.Enabled = true;
            CleanUp.Update();
            LaunchPCBNew.Enabled = (PcbnewLocation != "" && FileHistory.Items.Count != 0)?true:false;
            LaunchPCBNew.Update();
            Edit.Enabled = (TextEditorLoc != "" && FileHistory.Items.Count != 0) ? true : false;
            Edit.Update();
            ClearHistory.Enabled = FileHistory.Items.Count != 0;
            ClearHistory.Update();
        }
예제 #2
0
        private void CleanUp_Click(object sender, EventArgs e)
        {
            var Clean = new CleanUp
            {
                StartPosition = System.Windows.Forms.FormStartPosition.Manual
            };

            Clean.Location = new System.Drawing.Point((this.Location.X + this.Width / 2) - (Clean.Width / 2), (this.Location.Y + this.Height / 2) - (Clean.Height / 2));
            Clean.ShowDialog();
            switch (CleanFlag)
            {
            case CleanEnum.None: break;

            case CleanEnum.Current: CleanOutput(FileHistory.Text); break;

            case CleanEnum.All: CleanUpAll();
                break;
            }
        }