Changeset 8192 for trunk/sources/HeuristicLab.Problems.Instances.Views/3.3
- Timestamp:
- 07/03/12 13:41:36 (12 years ago)
- Location:
- trunk/sources/HeuristicLab.Problems.Instances.Views/3.3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.Instances.Views/3.3/ProblemInstanceConsumerViewGeneric.Designer.cs
r7967 r8192 55 55 this.openFileDialog = new System.Windows.Forms.OpenFileDialog(); 56 56 this.saveFileDialog = new System.Windows.Forms.SaveFileDialog(); 57 this.problemInstanceProviderSplitContainer = new System.Windows.Forms.SplitContainer(); 58 ((System.ComponentModel.ISupportInitialize)(this.problemInstanceProviderSplitContainer)).BeginInit(); 59 this.problemInstanceProviderSplitContainer.Panel1.SuspendLayout(); 60 this.problemInstanceProviderSplitContainer.Panel2.SuspendLayout(); 61 this.problemInstanceProviderSplitContainer.SuspendLayout(); 57 this.ProviderExportSplitContainer = new System.Windows.Forms.SplitContainer(); 58 this.ProviderImportSplitContainer = new System.Windows.Forms.SplitContainer(); 59 ((System.ComponentModel.ISupportInitialize)(this.ProviderExportSplitContainer)).BeginInit(); 60 this.ProviderExportSplitContainer.Panel1.SuspendLayout(); 61 this.ProviderExportSplitContainer.Panel2.SuspendLayout(); 62 this.ProviderExportSplitContainer.SuspendLayout(); 63 ((System.ComponentModel.ISupportInitialize)(this.ProviderImportSplitContainer)).BeginInit(); 64 this.ProviderImportSplitContainer.Panel1.SuspendLayout(); 65 this.ProviderImportSplitContainer.Panel2.SuspendLayout(); 66 this.ProviderImportSplitContainer.SuspendLayout(); 62 67 this.SuspendLayout(); 63 68 // 64 69 // problemInstanceProviderComboBox 65 70 // 66 this.problemInstanceProviderComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 67 | System.Windows.Forms.AnchorStyles.Right)));71 this.problemInstanceProviderComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 72 | System.Windows.Forms.AnchorStyles.Right))); 68 73 this.problemInstanceProviderComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; 69 74 this.problemInstanceProviderComboBox.FormattingEnabled = true; 70 75 this.problemInstanceProviderComboBox.Location = new System.Drawing.Point(50, 1); 71 76 this.problemInstanceProviderComboBox.Name = "problemInstanceProviderComboBox"; 72 this.problemInstanceProviderComboBox.Size = new System.Drawing.Size(17 1, 21);77 this.problemInstanceProviderComboBox.Size = new System.Drawing.Size(174, 21); 73 78 this.problemInstanceProviderComboBox.TabIndex = 16; 74 79 this.problemInstanceProviderComboBox.SelectedIndexChanged += new System.EventHandler(this.problemInstanceProviderComboBox_SelectedIndexChanged); … … 77 82 // 78 83 this.libraryInfoButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); 79 this.libraryInfoButton.Location = new System.Drawing.Point(2 27, -1);84 this.libraryInfoButton.Location = new System.Drawing.Point(230, -1); 80 85 this.libraryInfoButton.Name = "libraryInfoButton"; 81 86 this.libraryInfoButton.Size = new System.Drawing.Size(24, 24); … … 88 93 // 89 94 this.libraryLabel.AutoSize = true; 90 this.libraryLabel.Location = new System.Drawing.Point( 4, 4);95 this.libraryLabel.Location = new System.Drawing.Point(3, 5); 91 96 this.libraryLabel.Name = "libraryLabel"; 92 97 this.libraryLabel.Size = new System.Drawing.Size(41, 13); … … 96 101 // problemInstanceProviderViewHost 97 102 // 98 this.problemInstanceProviderViewHost.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 99 | System.Windows.Forms.AnchorStyles.Right)));103 this.problemInstanceProviderViewHost.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 104 | System.Windows.Forms.AnchorStyles.Right))); 100 105 this.problemInstanceProviderViewHost.Caption = "View"; 101 106 this.problemInstanceProviderViewHost.Content = null; … … 112 117 // 113 118 this.importButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); 114 this.importButton.Location = new System.Drawing.Point( 257, -1);119 this.importButton.Location = new System.Drawing.Point(1, -1); 115 120 this.importButton.Name = "importButton"; 116 121 this.importButton.Size = new System.Drawing.Size(24, 24); … … 140 145 this.saveFileDialog.Title = "Save RegressionInstance..."; 141 146 // 142 // problemInstanceProviderSplitContainer 143 // 144 this.problemInstanceProviderSplitContainer.FixedPanel = System.Windows.Forms.FixedPanel.Panel2; 145 this.problemInstanceProviderSplitContainer.IsSplitterFixed = true; 146 this.problemInstanceProviderSplitContainer.Location = new System.Drawing.Point(0, 0); 147 this.problemInstanceProviderSplitContainer.Name = "problemInstanceProviderSplitContainer"; 148 // 149 // problemInstanceProviderSplitContainer.Panel1 150 // 151 this.problemInstanceProviderSplitContainer.Panel1.Controls.Add(this.problemInstanceProviderComboBox); 152 this.problemInstanceProviderSplitContainer.Panel1.Controls.Add(this.importButton); 153 this.problemInstanceProviderSplitContainer.Panel1.Controls.Add(this.libraryLabel); 154 this.problemInstanceProviderSplitContainer.Panel1.Controls.Add(this.libraryInfoButton); 155 // 156 // problemInstanceProviderSplitContainer.Panel2 157 // 158 this.problemInstanceProviderSplitContainer.Panel2.Controls.Add(this.exportButton); 159 this.problemInstanceProviderSplitContainer.Size = new System.Drawing.Size(312, 22); 160 this.problemInstanceProviderSplitContainer.SplitterDistance = 280; 161 this.problemInstanceProviderSplitContainer.TabIndex = 20; 147 // ProviderExportSplitContainer 148 // 149 this.ProviderExportSplitContainer.FixedPanel = System.Windows.Forms.FixedPanel.Panel2; 150 this.ProviderExportSplitContainer.IsSplitterFixed = true; 151 this.ProviderExportSplitContainer.Location = new System.Drawing.Point(0, 0); 152 this.ProviderExportSplitContainer.Name = "ProviderExportSplitContainer"; 153 // 154 // ProviderExportSplitContainer.Panel1 155 // 156 this.ProviderExportSplitContainer.Panel1.Controls.Add(this.ProviderImportSplitContainer); 157 // 158 // ProviderExportSplitContainer.Panel2 159 // 160 this.ProviderExportSplitContainer.Panel2.Controls.Add(this.exportButton); 161 this.ProviderExportSplitContainer.Size = new System.Drawing.Size(312, 22); 162 this.ProviderExportSplitContainer.SplitterDistance = 283; 163 this.ProviderExportSplitContainer.TabIndex = 20; 164 // 165 // ProviderImportSplitContainer 166 // 167 this.ProviderImportSplitContainer.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 168 | System.Windows.Forms.AnchorStyles.Right))); 169 this.ProviderImportSplitContainer.FixedPanel = System.Windows.Forms.FixedPanel.Panel2; 170 this.ProviderImportSplitContainer.IsSplitterFixed = true; 171 this.ProviderImportSplitContainer.Location = new System.Drawing.Point(0, 0); 172 this.ProviderImportSplitContainer.Name = "ProviderImportSplitContainer"; 173 // 174 // ProviderImportSplitContainer.Panel1 175 // 176 this.ProviderImportSplitContainer.Panel1.Controls.Add(this.libraryLabel); 177 this.ProviderImportSplitContainer.Panel1.Controls.Add(this.problemInstanceProviderComboBox); 178 this.ProviderImportSplitContainer.Panel1.Controls.Add(this.libraryInfoButton); 179 // 180 // ProviderImportSplitContainer.Panel2 181 // 182 this.ProviderImportSplitContainer.Panel2.Controls.Add(this.importButton); 183 this.ProviderImportSplitContainer.Size = new System.Drawing.Size(282, 23); 184 this.ProviderImportSplitContainer.SplitterDistance = 253; 185 this.ProviderImportSplitContainer.TabIndex = 21; 162 186 // 163 187 // ProblemInstanceConsumerViewGeneric 164 188 // 165 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);166 189 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit; 167 this.Controls.Add(this. problemInstanceProviderSplitContainer);190 this.Controls.Add(this.ProviderExportSplitContainer); 168 191 this.Controls.Add(this.problemInstanceProviderViewHost); 169 192 this.Name = "ProblemInstanceConsumerViewGeneric"; 170 this.problemInstanceProviderSplitContainer.Panel1.ResumeLayout(false); 171 this.problemInstanceProviderSplitContainer.Panel1.PerformLayout(); 172 this.problemInstanceProviderSplitContainer.Panel2.ResumeLayout(false); 173 ((System.ComponentModel.ISupportInitialize)(this.problemInstanceProviderSplitContainer)).EndInit(); 174 this.problemInstanceProviderSplitContainer.ResumeLayout(false); 193 this.ProviderExportSplitContainer.Panel1.ResumeLayout(false); 194 this.ProviderExportSplitContainer.Panel2.ResumeLayout(false); 195 ((System.ComponentModel.ISupportInitialize)(this.ProviderExportSplitContainer)).EndInit(); 196 this.ProviderExportSplitContainer.ResumeLayout(false); 197 this.ProviderImportSplitContainer.Panel1.ResumeLayout(false); 198 this.ProviderImportSplitContainer.Panel1.PerformLayout(); 199 this.ProviderImportSplitContainer.Panel2.ResumeLayout(false); 200 ((System.ComponentModel.ISupportInitialize)(this.ProviderImportSplitContainer)).EndInit(); 201 this.ProviderImportSplitContainer.ResumeLayout(false); 175 202 this.ResumeLayout(false); 176 203 … … 180 207 181 208 protected System.Windows.Forms.ComboBox problemInstanceProviderComboBox; 182 pr ivateSystem.Windows.Forms.Button libraryInfoButton;183 pr ivateSystem.Windows.Forms.Label libraryLabel;209 protected System.Windows.Forms.Button libraryInfoButton; 210 protected System.Windows.Forms.Label libraryLabel; 184 211 protected MainForm.WindowsForms.ViewHost problemInstanceProviderViewHost; 185 pr ivateSystem.Windows.Forms.ToolTip toolTip;186 pr ivateSystem.Windows.Forms.Button importButton;187 pr ivateSystem.Windows.Forms.Button exportButton;212 protected System.Windows.Forms.ToolTip toolTip; 213 protected System.Windows.Forms.Button importButton; 214 protected System.Windows.Forms.Button exportButton; 188 215 protected System.Windows.Forms.SaveFileDialog saveFileDialog; 189 216 protected System.Windows.Forms.OpenFileDialog openFileDialog; 190 private System.Windows.Forms.SplitContainer problemInstanceProviderSplitContainer; 217 protected System.Windows.Forms.SplitContainer ProviderExportSplitContainer; 218 protected System.Windows.Forms.SplitContainer ProviderImportSplitContainer; 191 219 } 192 220 } -
trunk/sources/HeuristicLab.Problems.Instances.Views/3.3/ProblemInstanceConsumerViewGeneric.cs
r8180 r8192 92 92 problemInstanceProviderComboBox.Enabled = !ReadOnly && !Locked && Content != null && problemInstanceProviderComboBox.Items.Count > 0; 93 93 libraryInfoButton.Enabled = SelectedProvider != null && SelectedProvider.WebLink != null; 94 importButton.Enabled = !ReadOnly && !Locked && Content != null && Consumer != null; 94 importButton.Enabled = !ReadOnly && !Locked && Content != null && Consumer != null && 95 GenericSelectedProvider != null && GenericSelectedProvider.CanImportData; 96 ProviderImportSplitContainer.Panel2Collapsed = !importButton.Enabled; 95 97 exportButton.Enabled = !ReadOnly && !Locked && Content != null && Exporter != null && 96 GenericSelectedProvider != null && GenericSelectedProvider.Can SaveData;97 problemInstanceProviderSplitContainer.Panel2Collapsed = !exportButton.Enabled;98 GenericSelectedProvider != null && GenericSelectedProvider.CanExportData; 99 ProviderExportSplitContainer.Panel2Collapsed = !exportButton.Enabled; 98 100 } 99 101 … … 132 134 T instance = default(T); 133 135 try { 134 instance = GenericSelectedProvider. LoadData(openFileDialog.FileName);136 instance = GenericSelectedProvider.ImportData(openFileDialog.FileName); 135 137 } 136 138 catch (Exception ex) { … … 147 149 } 148 150 149 protected v oid exportButton_Click(object sender, EventArgs e) {151 protected virtual void exportButton_Click(object sender, EventArgs e) { 150 152 if (saveFileDialog.ShowDialog(this) == DialogResult.OK) { 151 153 try { 152 GenericSelectedProvider. SaveData(GenericExporter.Export(), saveFileDialog.FileName);154 GenericSelectedProvider.ExportData(GenericExporter.Export(), saveFileDialog.FileName); 153 155 } 154 156 catch (Exception ex) {
Note: See TracChangeset
for help on using the changeset viewer.