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(); }
private void NameEditionWindow_Executed(object sender, ExecutedRoutedEventArgs e) { NEW = new NameEditionWindow(); NEW.IsItBeingSaved = false; NEW.ShowDialog(); }