Changeset 6760 for branches/PersistenceSpeedUp/HeuristicLab.Problems.ExternalEvaluation.Views/3.3/EvaluationCacheView.cs
- Timestamp:
- 09/14/11 13:59:25 (13 years ago)
- Location:
- branches/PersistenceSpeedUp
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/PersistenceSpeedUp
- Property svn:ignore
-
old new 12 12 *.psess 13 13 *.vsp 14 *.docstates
-
- Property svn:mergeinfo changed
- Property svn:ignore
-
branches/PersistenceSpeedUp/HeuristicLab.Problems.ExternalEvaluation.Views/3.3/EvaluationCacheView.cs
r6183 r6760 1 using System; 1 #region License Information 2 /* HeuristicLab 3 * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 * 5 * This file is part of HeuristicLab. 6 * 7 * HeuristicLab is free software: you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation, either version 3 of the License, or 10 * (at your option) any later version. 11 * 12 * HeuristicLab is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>. 19 */ 20 #endregion 21 22 using System; 23 using System.ComponentModel; 2 24 using System.Windows.Forms; 3 25 using HeuristicLab.Core.Views; … … 20 42 21 43 protected override void DeregisterContentEvents() { 22 Content.SizeChanged -= new System.EventHandler(Content_StatusChanged); 23 Content.HitsChanged -= new System.EventHandler(Content_StatusChanged); 24 Content.ActiveEvalutionsChanged -= new EventHandler(Content_StatusChanged); 44 Content.Changed -= new System.EventHandler(Content_StatusChanged); 25 45 base.DeregisterContentEvents(); 26 46 } … … 28 48 protected override void RegisterContentEvents() { 29 49 base.RegisterContentEvents(); 30 Content.SizeChanged += new System.EventHandler(Content_StatusChanged); 31 Content.HitsChanged += new System.EventHandler(Content_StatusChanged); 32 Content.ActiveEvalutionsChanged += new EventHandler(Content_StatusChanged); 50 Content.Changed += new System.EventHandler(Content_StatusChanged); 33 51 } 34 52 … … 55 73 base.SetEnabledStateOfControls(); 56 74 clearButton.Enabled = !ReadOnly && Content != null; 75 saveButton.Enabled = !ReadOnly && Content != null; 57 76 } 58 77 … … 62 81 } 63 82 #endregion 83 84 private void saveButton_Click(object sender, EventArgs e) { 85 if (saveFileDialog.ShowDialog() == DialogResult.OK) { 86 saveButton.Enabled = false; 87 BackgroundWorker worker = new BackgroundWorker(); 88 worker.DoWork += (s, a) => { 89 Content.Save((string)a.Argument); 90 }; 91 worker.RunWorkerCompleted += (s, a) => { 92 SetEnabledStateOfControls(); 93 }; 94 worker.RunWorkerAsync(saveFileDialog.FileName); 95 } 96 } 64 97 } 65 98 }
Note: See TracChangeset
for help on using the changeset viewer.