Esempio n. 1
0
        public void NewCamera_Handler(object sender, RoutedEventArgs args)
        {
            string camMode = (string)(sender as MenuItem).Header;

            camMode = camMode.Substring(1).Remove(camMode.Length - 8); //This trims out '_' and ' Camera'
            camMode = camMode.Replace(" ", "");                        //This removes empty spaces
            TabItem temp = dTabs.AddTabItem(camMode);

            CameraModes.BlankTab blank = new CameraModes.BlankTab((Frame)temp.Content, mainCamera_MainWindow, modelList);
            dTabs.InsertTab(temp);
            blank.SelectCamMode(camMode);
            dTabs.Navigate(temp, blank);
            blank.Navigate();
        }
Esempio n. 2
0
 public void NewCameraMode_Handler(object sender, RoutedEventArgs args)
 {
     try {
         UserControls.Dialogues.NewCameraMode dialog = new UserControls.Dialogues.NewCameraMode();
         if (dialog.ShowDialog() == true)
         {
             TabItem temp = dTabs.AddTabItem(dialog.Name);
             CameraModes.BlankTab blank = new CameraModes.BlankTab((Frame)temp.Content, mainCamera_MainWindow, modelList);
             blank.SelectCamMode(dialog.SelectedFamily.ToString());
             dTabs.InsertTab(temp);
             dTabs.Navigate(temp, blank);
             blank.Navigate();
         }
     } catch (Exception e) { Console.WriteLine("Cause: " + e.Message + "\nMethod: " + e.TargetSite + "\nStack: " + e.StackTrace); }
 }