Changeset 9627
- Timestamp:
- 06/13/13 20:54:50 (11 years ago)
- Location:
- branches/HeuristicLab.DataImporter
- Files:
-
- 3 added
- 8 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.DataImporter/HeuristicLab.DataImporter.Data/View/ColumnGroupView.cs
r9615 r9627 333 333 this.commandChain.Add(new SortCommand(DataSet, this.ColumnGroup.Name, 334 334 e.ColumnIndex, (Control.ModifierKeys & Keys.Control) == Keys.Control)); 335 //this.UpdateSortGlyph();336 //this.dataGridView.AutoResizeColumns(DataGridViewAutoSizeColumnsMode.DisplayedCells);337 //UpdateStateInformation();338 335 } 339 336 } … … 497 494 498 495 private string ToExcelColumnIndex(int index) { 499 //if (symb.Length == 1) { // 'A' .. 'Z'500 // return TryTranslateColumnIndexDigit(symb[0], out columnIndex);501 //} else if (symb.Length == 2) { // 'AA' ... 'ZZ'502 // bool ok;503 // int d0, d1;504 // ok = TryTranslateColumnIndexDigit(symb[0], out d1) & TryTranslateColumnIndexDigit(symb[1], out d0);505 // columnIndex = (d1 + 1) * 26 + d0;506 // return ok;507 //} else {508 // columnIndex = 0;509 // return false;510 //}511 496 #region digits 512 497 var digits = new char[] { … … 553 538 #region DataGridView virtual mode event handler 554 539 private void dataGridView_CellValueNeeded(object sender, System.Windows.Forms.DataGridViewCellValueEventArgs e) { 540 if (!ColumnGroup.Columns.Any()) return; 555 541 e.Value = ColumnGroup.Columns.ElementAt(e.ColumnIndex).GetValue(e.RowIndex); 556 542 } … … 603 589 #region txtColumnName event handler 604 590 private void txtColumnName_Leave(object source, EventArgs e) { 591 if (!this.txtColumnName.Visible) return; 605 592 this.txtColumnName.Visible = false; 593 594 DataGridView.HitTestInfo h = this.dataGridView.HitTest(txtColumnName.Location.X, txtColumnName.Location.Y); 595 if (txtColumnName.Text != this.ColumnGroup.GetColumn(h.ColumnIndex).Name) 596 this.commandChain.Add(new RenameColumnCommand(DataSet, this.ColumnGroup.Name, h.ColumnIndex, txtColumnName.Text)); 606 597 } 607 598 … … 611 602 if (e.KeyCode == Keys.Enter) { 612 603 DataGridView.HitTestInfo h = this.dataGridView.HitTest(txtColumnName.Location.X, txtColumnName.Location.Y); 613 this.commandChain.Add(new RenameColumnCommand(DataSet, this.ColumnGroup.Name, h.ColumnIndex, txtColumnName.Text)); 604 if (txtColumnName.Text != this.ColumnGroup.GetColumn(h.ColumnIndex).Name) 605 this.commandChain.Add(new RenameColumnCommand(DataSet, this.ColumnGroup.Name, h.ColumnIndex, txtColumnName.Text)); 614 606 } 615 607 this.txtColumnName.Visible = false; … … 653 645 654 646 private bool CheckIfNewColumnGroupNameIsAllowed(string newName) { 655 return !this.DataSet.ColumnGroups.Any(cg => cg.Name == newName);647 return this.DataSet.ColumnGroups.All(cg => cg.Name != newName); 656 648 } 657 649 #endregion -
branches/HeuristicLab.DataImporter/HeuristicLab.DataImporter.DataProcessor/DataProcessorView.cs
r9615 r9627 343 343 private bool CheckUnsavedChanges() { 344 344 if (this.lastSavedCommand != this.dataProcessor.CommandChain.LastExecutedCommand) { 345 DialogResult result = MessageBox.Show("Save changes (Yes), discard changes (No) or cancel the current action (Cancel)?", "Warning", MessageBoxButtons.YesNoCancel);345 DialogResult result = new SaveDialog().ShowDialog(this); 346 346 if (result == DialogResult.Yes) 347 this.Save();347 return this.Save(); 348 348 else if (result == DialogResult.Cancel) 349 349 return false; … … 352 352 } 353 353 354 private voidSave() {354 private bool Save() { 355 355 if (string.IsNullOrEmpty(this.lastSavedFile)) 356 this.SaveAs(); 357 else 358 this.Save(dataProcessor, this.lastSavedFile); 356 return this.SaveAs(); 357 358 this.Save(dataProcessor, this.lastSavedFile); 359 return true; 359 360 } 360 361 … … 372 373 } 373 374 374 private voidSaveAs() {375 private bool SaveAs() { 375 376 SaveFileDialog saveFileDialog = new SaveFileDialog(); 376 377 saveFileDialog.AddExtension = true; … … 396 397 Save(dataProcessor, lastSavedFile); 397 398 } 398 } 399 return true; 400 } 401 return false; 399 402 } 400 403 -
branches/HeuristicLab.DataImporter/HeuristicLab.DataImporter.DataProcessor/HeuristicLab.DataImporter.DataProcessor.csproj
r8532 r9627 145 145 </Compile> 146 146 <None Include="Plugin.cs.frame" /> 147 <Compile Include="SaveDialog.cs"> 148 <SubType>Form</SubType> 149 </Compile> 150 <Compile Include="SaveDialog.Designer.cs"> 151 <DependentUpon>SaveDialog.cs</DependentUpon> 152 </Compile> 147 153 <Compile Include="ProgressDialog.cs"> 148 154 <SubType>Form</SubType> … … 210 216 <Generator>ResXFileCodeGenerator</Generator> 211 217 <LastGenOutput>Resources.Designer.cs</LastGenOutput> 218 </EmbeddedResource> 219 <EmbeddedResource Include="SaveDialog.resx"> 220 <DependentUpon>SaveDialog.cs</DependentUpon> 212 221 </EmbeddedResource> 213 222 </ItemGroup> … … 254 263 </BootstrapperPackage> 255 264 </ItemGroup> 265 <ItemGroup> 266 <None Include="Resources\VS2008ImageLibrary_Actions_Warning.png" /> 267 </ItemGroup> 256 268 <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> 257 269 <!-- To modify your build process, add your task inside one of the targets below and uncomment it. -
branches/HeuristicLab.DataImporter/HeuristicLab.DataImporter.DataProcessor/Properties/Resources.Designer.cs
r6133 r9627 2 2 // <auto-generated> 3 3 // This code was generated by a tool. 4 // Runtime Version:4.0.30319.1 4 // Runtime Version:4.0.30319.18047 5 5 // 6 6 // Changes to this file may cause incorrect behavior and will be lost if … … 61 61 } 62 62 63 /// <summary> 64 /// Looks up a localized resource of type System.Drawing.Bitmap. 65 /// </summary> 63 66 internal static System.Drawing.Bitmap Edit_redoHL { 64 67 get { … … 68 71 } 69 72 73 /// <summary> 74 /// Looks up a localized resource of type System.Drawing.Bitmap. 75 /// </summary> 70 76 internal static System.Drawing.Bitmap Edit_RedoHS { 71 77 get { … … 75 81 } 76 82 83 /// <summary> 84 /// Looks up a localized resource of type System.Drawing.Bitmap. 85 /// </summary> 77 86 internal static System.Drawing.Bitmap Edit_UndoHL { 78 87 get { … … 82 91 } 83 92 93 /// <summary> 94 /// Looks up a localized resource of type System.Drawing.Bitmap. 95 /// </summary> 84 96 internal static System.Drawing.Bitmap Edit_UndoHS { 85 97 get { … … 89 101 } 90 102 103 /// <summary> 104 /// Looks up a localized resource of type System.Drawing.Bitmap. 105 /// </summary> 91 106 internal static System.Drawing.Bitmap OpenSelectedItemHS { 92 107 get { … … 96 111 } 97 112 113 /// <summary> 114 /// Looks up a localized resource of type System.Drawing.Bitmap. 115 /// </summary> 98 116 internal static System.Drawing.Bitmap RecordHS { 99 117 get { … … 103 121 } 104 122 123 /// <summary> 124 /// Looks up a localized resource of type System.Drawing.Bitmap. 125 /// </summary> 105 126 internal static System.Drawing.Bitmap SaveAllHS { 106 127 get { … … 110 131 } 111 132 133 /// <summary> 134 /// Looks up a localized resource of type System.Drawing.Bitmap. 135 /// </summary> 112 136 internal static System.Drawing.Bitmap StopHS { 113 137 get { … … 116 140 } 117 141 } 142 143 /// <summary> 144 /// Looks up a localized resource of type System.Drawing.Bitmap. 145 /// </summary> 146 internal static System.Drawing.Bitmap VS2008ImageLibrary_Actions_Warning { 147 get { 148 object obj = ResourceManager.GetObject("VS2008ImageLibrary_Actions_Warning", resourceCulture); 149 return ((System.Drawing.Bitmap)(obj)); 150 } 151 } 118 152 } 119 153 } -
branches/HeuristicLab.DataImporter/HeuristicLab.DataImporter.DataProcessor/Properties/Resources.resx
r6133 r9627 113 113 </resheader> 114 114 <resheader name="reader"> 115 <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version= 2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>115 <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> 116 116 </resheader> 117 117 <resheader name="writer"> 118 <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version= 2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>118 <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> 119 119 </resheader> 120 <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> 120 <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> 121 <data name="Edit_redoHL" type="System.Resources.ResXFileRef, System.Windows.Forms"> 122 <value>..\Resources\Edit_redoHL.bmp;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> 123 </data> 124 <data name="OpenSelectedItemHS" type="System.Resources.ResXFileRef, System.Windows.Forms"> 125 <value>..\Resources\OpenSelectedItemHS.BMP;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> 126 </data> 127 <data name="Edit_UndoHS" type="System.Resources.ResXFileRef, System.Windows.Forms"> 128 <value>..\Resources\Edit_UndoHS.bmp;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> 129 </data> 130 <data name="StopHS" type="System.Resources.ResXFileRef, System.Windows.Forms"> 131 <value>..\Resources\StopHS.bmp;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> 132 </data> 121 133 <data name="Edit_UndoHL" type="System.Resources.ResXFileRef, System.Windows.Forms"> 122 134 <value>..\Resources\Edit_UndoHL.bmp;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> … … 125 137 <value>..\Resources\Edit_RedoHS.bmp;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> 126 138 </data> 127 <data name="Edit_UndoHS" type="System.Resources.ResXFileRef, System.Windows.Forms">128 <value>..\Resources\Edit_UndoHS.bmp;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>129 </data>130 <data name="Edit_redoHL" type="System.Resources.ResXFileRef, System.Windows.Forms">131 <value>..\Resources\Edit_redoHL.bmp;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>132 </data>133 139 <data name="SaveAllHS" type="System.Resources.ResXFileRef, System.Windows.Forms"> 134 140 <value>..\Resources\SaveAllHS.bmp;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> 135 </data>136 <data name="OpenSelectedItemHS" type="System.Resources.ResXFileRef, System.Windows.Forms">137 <value>..\Resources\OpenSelectedItemHS.BMP;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>138 141 </data> 139 142 <data name="RecordHS" type="System.Resources.ResXFileRef, System.Windows.Forms"> 140 143 <value>..\Resources\RecordHS.bmp;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> 141 144 </data> 142 <data name=" StopHS" type="System.Resources.ResXFileRef, System.Windows.Forms">143 <value>..\Resources\ StopHS.bmp;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>145 <data name="VS2008ImageLibrary_Actions_Warning" type="System.Resources.ResXFileRef, System.Windows.Forms"> 146 <value>..\Resources\VS2008ImageLibrary_Actions_Warning.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> 144 147 </data> 145 148 </root> -
branches/HeuristicLab.DataImporter/HeuristicLab.DataImporter.DbExplorer.MsSqlServer/Properties/AssemblyInfo.cs.frame
r7632 r9627 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 2Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HeuristicLab.DataImporter/HeuristicLab.DataImporter.DbExplorer.MsSqlServer/SqlServerExplorer.cs
r7629 r9627 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 2Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HeuristicLab.DataImporter/HeuristicLab.DataImporter.DbExplorer.Oracle/Properties/AssemblyInfo.cs.frame
r7632 r9627 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 2Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab.
Note: See TracChangeset
for help on using the changeset viewer.