Changeset 17843 for branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/ViewModels/JsonItemVMBase.cs
- Timestamp:
- 02/23/21 16:36:44 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/ViewModels/JsonItemVMBase.cs
r17828 r17843 1 1 using System; 2 using System.Collections.Generic;3 2 using System.ComponentModel; 4 3 using System.Drawing; 5 using System.Linq;6 using System.Text;7 using System.Threading.Tasks;8 4 using System.Windows.Forms; 9 5 … … 21 17 get => item; 22 18 set { 23 item?.LoosenPath();24 19 item = value; 25 item.FixatePath();26 20 ItemChanged?.Invoke(); 27 21 } … … 65 59 public event Action SelectedChanged; 66 60 67 68 61 protected void OnPropertyChange(object sender, string propertyName) { 69 62 // Make a temporary copy of the event to avoid possibility of … … 75 68 tmp?.Invoke(this, new PropertyChangedEventArgs(propertyName)); 76 69 } 77 78 #region IDisposable Support79 private bool disposedValue = false; // To detect redundant calls80 81 protected virtual void Dispose(bool disposing) {82 if (!disposedValue) {83 if (disposing) {84 item.LoosenPath();85 item = null;86 }87 disposedValue = true;88 }89 }90 91 // This code added to correctly implement the disposable pattern.92 public void Dispose() {93 // Do not change this code. Put cleanup code in Dispose(bool disposing) above.94 Dispose(true);95 }96 #endregion97 70 } 98 71 }
Note: See TracChangeset
for help on using the changeset viewer.