Ejemplo n.º 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");
        }
Ejemplo n.º 2
0
 private void onPreMouseMove(object sender, MouseEventArgs e)
 {
     if (isMouseDown)
     {
         ExtPopup.dragPopupHandler();
         isMouseDown = false;
     }
     e.Handled = true;
 }
Ejemplo n.º 3
0
 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);
 }
Ejemplo n.º 4
0
 private void updateMenuPanState()
 {
     if (menuPanPopup.IsOpen)
     {
         menuPan.HideCommand.Execute(null);
     }
     else
     {
         //Make popup visible
         ExtPopup.SetIsInView(menuPanPopup, true);
     }
 }
Ejemplo n.º 5
0
        private void logPopupConfig()
        {
            //Log value
            var monitorConfig = ExtPopup.GetConfigs(monitor2Popup);
            var menuconfig    = ExtPopup.GetConfigs(menuPanPopup);
            var ellipseConfig = ExtPopup.GetConfigs(ellipsePopup);

            Logger.getLogger().logValue("mpconfig", menuconfig);
            Logger.getLogger().logValue("epConfig", ellipseConfig);
            Logger.getLogger().logValue("monitorConfig", monitorConfig);
            menuPan.saveMenu();
        }
Ejemplo n.º 6
0
 private void onKmMouseDragFinished(object sender, System.Windows.Forms.MouseEventArgs e)
 {
     if (!menuPanPopup.IsOpen)
     {
         double xoffset = Math.Abs(e.X - startPoint.X);
         double yoffset = Math.Abs(e.Y - startPoint.Y);
         if (xoffset < 100 && yoffset > 150 && ((xoffset / yoffset) > (1 / 3)))
         {
             //644 -> Transform.X + Canvas.Left + Ellipse.Width
             //276 -> MenuPan.Height - EllipseListBox.Height + Ellipse.Width + Fix(32)
             ExtPopup.GetConfigs(menuPanPopup).XOffset = e.X - 644;
             ExtPopup.GetConfigs(menuPanPopup).YOffset = e.Y - 276;
             updateMenuPanState();
         }
     }
 }
Ejemplo n.º 7
0
        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);
        }
Ejemplo n.º 8
0
 private void OnLockChanged(object sender, RoutedEventArgs e)
 {
     ExtPopup.SetDraggable(monitor2, !ExtPopup.GetDraggable(monitor2));
 }
Ejemplo n.º 9
0
 private void OnSetTopChanged(object sender, RoutedEventArgs e)
 {
     ExtPopup.SetTopMost(monitor2Popup, !ExtPopup.GetTopMost(monitor2Popup));
 }