internal void OpenSignRequestForm_Click(object sender, RoutedEventArgs e) { string header0 = "Issue Certificate"; IEnumerable <TabablzControl> tctrl; GetTabablzData(out header0, out tctrl); header0 = "Issue Certificate"; GenerateSignRequest gr = new GenerateSignRequest(certFriendlyName); if (loadedUserForm == null || loadedUserForm != gr) { loadedUserForm = new GenerateSignRequest(certFriendlyName); } //mainGrid.Child = loadedUserForm; //TabContent tc1 = new TabContent("Issue Certificate", loadedUserForm); TabContent tc1 = new TabContent(header0, loadedUserForm); AddTabablzData(header0, tctrl, tc1); //MenuItem mi = (MenuItem)sender; //sbiSelectedMenuOption.Content = mi.Header; sbiSelectedMenuOption.Content = header0; }
internal void GetTabablzData(out string header0, out IEnumerable <TabablzControl> tctrl) { MetroWindow wnd = (MetroWindow)App.Current.MainWindow; TabablzControl tc = (TabablzControl)wnd.FindName("InitialTabablzControl"); TabContent itc0 = (TabContent)tc.SelectedItem; header0 = itc0.Header; tctrl = TabablzControl.GetLoadedInstances(); }
public static MainWindowViewModel CreateWithSamples() { var result = new MainWindowViewModel(); TabContent tc = new TabContent("Main", new IntroductionPage()); result.TabContents.Add(tc); return(result); }
private void CACertificatesForm_Click(object sender, RoutedEventArgs e) { string header0 = "CA Certificate"; IEnumerable <TabablzControl> tctrl; GetTabablzData(out header0, out tctrl); header0 = "CA Certificate"; CreateCA gr = new CreateCA(); if (loadedUserForm == null || loadedUserForm != gr) { loadedUserForm = gr; } TabContent tc1 = new TabContent(header0, loadedUserForm); AddTabablzData(header0, tctrl, tc1); sbiSelectedMenuOption.Content = header0; }
internal void OpenSignRequestForm_Click(object sender, RoutedEventArgs e) { string header0 = "Issue Certificate"; IEnumerable <TabablzControl> tctrl; GetTabablzData(out header0, out tctrl); header0 = "Issue Certificate"; IssueCert gr = new IssueCert(); if (loadedUserForm == null || loadedUserForm != gr) { loadedUserForm = gr; } TabContent tc1 = new TabContent(header0, loadedUserForm); AddTabablzData(header0, tctrl, tc1); sbiSelectedMenuOption.Content = header0; }
internal void AddTabablzData(string header0, IEnumerable <TabablzControl> tctrl, TabContent tc1) { TabablzControl lastTabablzControl = tctrl.Last(); // adds a new tab after the last right tab IEnumerable <DragablzItem> orderedDragablzItem = lastTabablzControl.GetOrderedHeaders(); DragablzItem lastTab = orderedDragablzItem.Last(); TabablzControl.AddItem(tc1, lastTab.DataContext, AddLocationHint.After); TabablzControl.SelectItem(tc1); }
internal void AddTabablzData(string header0, IEnumerable <TabablzControl> tctrl, TabContent tc1) { TabablzControl lastTabablzControl = tctrl.Last(); // dodaje novi tab iza zadnjeg tab-a koji se vidi IEnumerable <DragablzItem> orderedDragablzItem = lastTabablzControl.GetOrderedHeaders(); DragablzItem lastTab = orderedDragablzItem.Last(); TabablzControl.AddItem(tc1, lastTab.DataContext, AddLocationHint.After); TabablzControl.SelectItem(tc1); }