Ejemplo n.º 1
0
        private void Window_closing(object sender, System.ComponentModel.CancelEventArgs e)
        {
            DemoTab dt = null;

            if (demoTab.Content != null)
            {
                dt = (DemoTab)demoTab.Content;
                dt.abortDemo();
            }
        }
Ejemplo n.º 2
0
 public void CloseDemo(object sender, RoutedEventArgs e)
 {
     if (demoTab.Visibility == Visibility.Visible)
     {
         DemoTab dt = (DemoTab)demoTab.Content;
         dt.abortDemo();
         demoTab.Content    = null;
         demoTab.Visibility = Visibility.Hidden;
         glavniTab.Focus();
         if (helpTab.Visibility == Visibility.Visible && mainTabControl.Items.IndexOf(helpTab) == 2)
         {
             mainTabControl.Items.RemoveAt(1);
             mainTabControl.Items.Insert(2, demoTab);
             helpTab.Focus();
         }
     }
     else
     {
         return;
     }
 }