Exemplo n.º 1
0
 private void Saving_Executed(object sender, ExecutedRoutedEventArgs e)
 {
     Button Clicked = (Button)e.Parameter;
     if (Clicked == SaveAsNewBtn)
     {
         string temporary = thisStructureName;
         NEW = new NameEditionWindow();
         NEW.IsItBeingSaved = true;
         NEW.ShowDialog();
         if (thisStructureName != temporary)
         {
             if (CurrentlyChosenDir != null)
                 {
                     CurrentlyChosenDir.IsMarked = false;
                 }
             string filePath = @"..\..\saved\" + thisStructureName;
             SaveAndReadElementInBinaryFile.GetDefaultInstance().WriteToBinaryFile<IEditableDirWithChildren>(filePath, Seed);
         }
     }
     else if (Clicked == SaveBtn)
     {
         if (CurrentlyChosenDir != null)
         {
             CurrentlyChosenDir.IsMarked = false;
         }
         string filePath = @"..\..\saved\" + thisStructureName;
         SaveAndReadElementInBinaryFile.GetDefaultInstance().WriteToBinaryFile<IEditableDirWithChildren>(filePath, Seed);
     }
     if (CurrentlyChosenDir != null)
     {
         CurrentlyChosenDir.IsMarked = true;
     }
     HideAllPanels();
 }
Exemplo n.º 2
0
 private void NameEditionWindow_Executed(object sender, ExecutedRoutedEventArgs e)
 {
     NEW = new NameEditionWindow();
     NEW.IsItBeingSaved = false;
     NEW.ShowDialog();
 }