示例#1
0
        private void Pinned_Click(object sender, RoutedEventArgs args)
        {
            if (ControlInView != null)
            {
                WorkspaceControl.Children.Clear();
                ToolBarControl.Visibility = Visibility.Collapsed;

                Window ParentWindow = Window.GetWindow(this);
                ParentWindow.Closed += new EventHandler(ParentWindow_Close);

                if (ToolBarControl.FileMenu.HasItems)
                {
                    if (ToolBarControl.FileMenu.Items[0].GetType().BaseType == typeof(UserControl))
                    {
                        GhostWindow = new Wrapper.Window(ControlInView, (List <UserControl>)ToolBarControl.FileMenu.ItemsSource);
                    }
                    else if (ToolBarControl.FileMenu.Items[0].GetType().BaseType == typeof(System.Object))
                    {
                        GhostWindow = new Ghost.Wrapper.Window(ControlInView, (Files.ImageCollection)ToolBarControl.FileMenu.ItemsSource);
                    }
                }

                GhostWindow.Closed          += new EventHandler(GhostWindow_Closed);
                GhostWindow.CloseButtonState = CloseButtonStates.UnPin;
                GhostWindow.Show();
            }
        }
示例#2
0
 public static Window OpenDialog()
 {
     if (Settings.IsGhostApp)
     {
         Ghost.Wrapper.Window ghostWndw = new Ghost.Wrapper.Window(App.MasterDialogTemplate);
         ghostWndw.CloseButtonState = Ghost.CloseButtonStates.Close;
         return(ghostWndw);
     }
     else
     {
         HVCC.Prototype2.PrototypeWindow wndw = new HVCC.Prototype2.PrototypeWindow(App.MasterDialogTemplate);
         return(wndw);
     }
 }