private void MenuItem_File_Workspace_New_Click(object sender, RoutedEventArgs e) { NewWorkspaceWindow newWorkspaceWindow = new NewWorkspaceWindow(); newWorkspaceWindow.Owner = this; newWorkspaceWindow.WindowStartupLocation = WindowStartupLocation.CenterOwner; if (newWorkspaceWindow.ShowDialog().Value) { Global.CurrentWorkspace = Data.Workspace.CreateNew(newWorkspaceWindow.Input, newWorkspaceWindow.LanguageCode); } }
private void AddButton_Click(object sender, RoutedEventArgs e) { NewWorkspaceWindow newWorkspaceWindow = new NewWorkspaceWindow(); newWorkspaceWindow.Owner = this; newWorkspaceWindow.WindowStartupLocation = WindowStartupLocation.CenterOwner; if (newWorkspaceWindow.ShowDialog().Value) { Data.Workspace.CreateNew(newWorkspaceWindow.Input, newWorkspaceWindow.LanguageCode); UpdateWorkspacesList(newWorkspaceWindow.Input); } }