- Timestamp:
- 08/10/09 16:21:09 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.CEDMA.Core/3.3/ConsoleEditor.cs
r2223 r2273 34 34 private ComboBox viewComboBox; 35 35 private Button resultsButton; 36 private Button openButton; 36 37 private Console console; 37 38 … … 39 40 InitializeComponent(); 40 41 this.console = console; 42 resultsButton.Enabled = false; 43 viewComboBox.Enabled = false; 41 44 PopulateViewComboBox(); 42 45 } … … 46 49 this.viewComboBox = new System.Windows.Forms.ComboBox(); 47 50 this.resultsButton = new System.Windows.Forms.Button(); 51 this.openButton = new System.Windows.Forms.Button(); 48 52 this.SuspendLayout(); 49 53 // 50 54 // viewComboBox 51 55 // 52 this.viewComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));53 56 this.viewComboBox.FormattingEnabled = true; 54 this.viewComboBox.Location = new System.Drawing.Point( 3, 3);57 this.viewComboBox.Location = new System.Drawing.Point(0, 29); 55 58 this.viewComboBox.Name = "viewComboBox"; 56 59 this.viewComboBox.Size = new System.Drawing.Size(121, 21); … … 59 62 // resultsButton 60 63 // 61 this.resultsButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 62 this.resultsButton.Location = new System.Drawing.Point(130, 1); 64 this.resultsButton.Location = new System.Drawing.Point(127, 27); 63 65 this.resultsButton.Name = "resultsButton"; 64 66 this.resultsButton.Size = new System.Drawing.Size(86, 23); … … 68 70 this.resultsButton.Click += new System.EventHandler(this.resultsButton_Click); 69 71 // 72 // openButton 73 // 74 this.openButton.Location = new System.Drawing.Point(4, 0); 75 this.openButton.Name = "openButton"; 76 this.openButton.Size = new System.Drawing.Size(75, 23); 77 this.openButton.TabIndex = 8; 78 this.openButton.Text = "Open..."; 79 this.openButton.UseVisualStyleBackColor = true; 80 this.openButton.Click += new System.EventHandler(this.openButton_Click); 81 // 70 82 // ConsoleEditor 71 83 // 72 84 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 85 this.Controls.Add(this.openButton); 73 86 this.Controls.Add(this.viewComboBox); 74 87 this.Controls.Add(this.resultsButton); 75 88 this.Name = "ConsoleEditor"; 76 this.Size = new System.Drawing.Size( 445, 189);89 this.Size = new System.Drawing.Size(224, 112); 77 90 this.ResumeLayout(false); 78 91 … … 94 107 PluginManager.ControlManager.ShowControl(control); 95 108 } 109 110 private void openButton_Click(object sender, EventArgs e) { 111 OpenFileDialog dialog = new OpenFileDialog(); 112 DialogResult result = dialog.ShowDialog(); 113 if (result == DialogResult.OK) { 114 viewComboBox.Enabled = true; 115 resultsButton.Enabled = true; 116 console.Database = dialog.FileName; 117 } 118 } 96 119 } 97 120 }
Note: See TracChangeset
for help on using the changeset viewer.