private void buttonViewAdd_Click(object sender, RoutedEventArgs e) { CreateOrEditView newViewWindow = new CreateOrEditView(); //CreateNewView newViewWindow = new CreateNewView(); newViewWindow.Show(); }
void buttonCreateView_Click(object sender, RoutedEventArgs e) { AppController.Current.Logger.addDebugMessage("Create View clicked", "-", type: DebugMessage.DebugMessageTypes.FirstStartWizard); AppController.Current.AllViews.CollectionChanged += new System.Collections.Specialized.NotifyCollectionChangedEventHandler(AllViews_CollectionChanged); Nymphicus.UserInterface.CreateOrEditView newViewWindow = new CreateOrEditView(); newViewWindow.infoBoxViewName.textBoxContent.Text = "My first view"; try { newViewWindow.buttonSelectAll_Click(null, null); newViewWindow.infoBoxViewName.InfoContent = "Example view"; newViewWindow.buttonSave.IsEnabled = true; } catch { // just in case... } newViewWindow.Show(); }