示例#1
0
 private void DialogRemoveCollection_DialogCompleted(object sender, DialogButtonClickedEventArgs e)
 {
     if (e.DialogResult == DialogResult.OK)
     {
         TileManagerViewModel vm = DataContext as TileManagerViewModel;
         CollectionSet        selectedCollection = vm.SelectedCollection;
         selectedCollection.Delete();
         vm.LoadedCollections.Remove(selectedCollection);
         vm.SelectedCollection = null;
     }
 }
示例#2
0
 private void DialogRemovePlaceable_DialogCompleted(object sender, DialogButtonClickedEventArgs e)
 {
     if (e.DialogResult == DialogResult.OK)
     {
         TileManagerViewModel vm = DataContext as TileManagerViewModel;
         Placeable            selectedPlaceable = vm.SelectedCollection.PlaceableFile.Data[vm.SelectedPlaceableIndex];
         int index = vm.SelectedCollection.PlaceableFile.Data.ToList().FindIndex(x => x.Guid == selectedPlaceable.Guid);
         if (index > -1)
         {
             vm.SelectedCollection.PlaceableFile.Data.RemoveAt(index);
             vm.SelectedPlaceableIndex = -1;
         }
     }
 }
示例#3
0
 private void DialogButtonClicked(object sender, DialogButtonClickedEventArgs e)
 {
     if (e.Button == DialogButton.FirstButton)
     {
         e.CloseDialogAfterHandle = CloseOnFirstButton;
     }
     else if (e.Button == DialogButton.SecondButton)
     {
         e.CloseDialogAfterHandle = CloseOnSecondButton;
     }
     else if (e.Button == DialogButton.ThirdButton)
     {
         e.CloseDialogAfterHandle = CloseOnThirdButton;
     }
 }
示例#4
0
 protected virtual void OnDialogCompleted(DialogButtonClickedEventArgs e)
 {
     DialogCompleted?.Invoke(this, e);
 }