示例#1
0
        protected override void OnInitialized(EventArgs e)
        {
            base.OnInitialized(e);
            HideCommand = new Command();
            HideCommand.ExecuteCommand = o =>
            {
                updateUnloaded();
                var popup = this.Parent as System.Windows.Controls.Primitives.Popup;
                if (popup != null)
                {
                    ExtPopup.SetIsInView(popup, false);
                }
            };

            selectionForwardHistory = new List <int>();
            selectionBackHistory    = new List <int>();

            //Initilize MainMenus
            if (!loadLogMenu())
            {
                initDefaultMenus();
            }
            NavMenus = new BindingList <BindingList <NavItem> >();

            //Binding and initilized state
            FrdNavigate.ItemsSource = MainNavs;
            SubNavigate.ItemsSource = NavMenus;
            MsgPane.Visibility      = Visibility.Collapsed;
            Indicator.Visibility    = Visibility.Collapsed;
            createAnimation();
            Debug.WriteLine("Initilized");
        }
 protected override void OnClosing(CancelEventArgs e)
 {
     ExtPopup.SetIsInView(monitor2Popup, false);
     ExtPopup.SetIsInView(menuPanPopup, false);
     ExtPopup.SetIsInView(ellipsePopup, false);
     logPopupConfig();
     Logger.getLogger().save();
     Dispose();
     base.OnClosing(e);
 }
 private void updateMenuPanState()
 {
     if (menuPanPopup.IsOpen)
     {
         menuPan.HideCommand.Execute(null);
     }
     else
     {
         //Make popup visible
         ExtPopup.SetIsInView(menuPanPopup, true);
     }
 }
        private void configPopup()
        {
            //Load config
            PopupConfigs epConfig, mpconfig, monitorConfig;

            getPopupConfig(out mpconfig, "mpconfig");
            getPopupConfig(out epConfig, "epConfig");
            getPopupConfig(out monitorConfig, "monitorConfig");
            ExtPopup.SetConfigs(ellipsePopup, epConfig);
            ExtPopup.SetConfigs(menuPanPopup, mpconfig);
            ExtPopup.SetConfigs(monitor2Popup, monitorConfig);

            menuPanPopup.Opened += OnMenuPaneOpened;
            menuPanPopup.Closed += OnMenuPaneClosed;
            ExtPopup.SetIsInView(ellipsePopup, true);
            ExtPopup.SetIsInView(monitor2Popup, true);
        }