Exemple #1
0
 public override void Dispose()
 {
     _CompositeDisposable.Dispose();
     Text?.Dispose();
     SelectedItem?.Dispose();
     NowUpdateCandidateList?.Dispose();
     base.Dispose();
 }
Exemple #2
0
 private void RemoveButton_OnClick(object sender, RoutedEventArgs e)
 {
     if (SelectedItem != null)
     {
         SelectedItem.Dispose();
         FileMonitors.Remove(SelectedItem);
     }
 }
Exemple #3
0
 public void Dispose()
 {
     Model = null;
     foreach (var item in Options)
     {
         item.Dispose();
     }
     SelectedItem.Dispose();
     SelectedItem = null;
 }
Exemple #4
0
        /// <summary>
        /// Deletes the currently selected Item
        /// </summary>
        public void DelItem()
        {
            if (SelectedItem == null)
            {
                return;
            }

            SelectedItem.Remove();
            SelectedItem.Dispose();

            int oldindex = SelectedScene.Items.IndexOf(SelectedItem);

            SelectedScene.Items.Remove(SelectedItem);

            if (SelectedScene.Items.Any())
            {
                SetItem(oldindex < SelectedScene.Items.Count ? SelectedScene.Items[oldindex] : SelectedScene.Items.Last());
            }
        }