예제 #1
0
        void RedrawMainMenu()
        {
            Core.Properties fullscreenProperties = PropertyService.Get("FanHai.Gui.Framework.Gui.FullscreenOptions", new Core.Properties());
            bool            hideInFullscreen     = fullscreenProperties.Get("HideMainMenu", false);
            bool            showOnMouseMove      = fullscreenProperties.Get("ShowMainMenuOnMouseMove", true);

            mainMenuContainer.AutoHide        = wbForm.FullScreen && hideInFullscreen;
            mainMenuContainer.ShowOnMouseDown = true;
            mainMenuContainer.ShowOnMouseMove = showOnMouseMove;
        }
예제 #2
0
        void RedrawStatusBar()
        {
            Core.Properties fullscreenProperties = PropertyService.Get("FanHai.Gui.Framework.Gui.FullscreenOptions", new Core.Properties());
            bool            hideInFullscreen     = fullscreenProperties.Get("HideStatusBar", true);
            bool            showOnMouseMove      = fullscreenProperties.Get("ShowStatusBarOnMouseMove", true);
            bool            statusBarVisible     = PropertyService.Get("FanHai.Gui.Framework.Gui.StatusBarVisible", false);

            statusStripContainer.AutoHide        = wbForm.FullScreen && hideInFullscreen;
            statusStripContainer.ShowOnMouseDown = true;
            statusStripContainer.ShowOnMouseMove = showOnMouseMove;
            statusStripContainer.Visible         = statusBarVisible;
        }
예제 #3
0
        /// <summary>
        /// Gets the default primary display binding for the specified file name.
        /// </summary>
        public static DisplayBindingDescriptor GetDefaultCodonPerFileName(string filename)
        {
            WorkbenchSingleton.AssertMainThread();

            string defaultCommandID = displayBindingServiceProperties.Get("Default" + Path.GetExtension(filename).ToLowerInvariant()) as string;

            if (!string.IsNullOrEmpty(defaultCommandID))
            {
                foreach (DisplayBindingDescriptor binding in bindings)
                {
                    if (binding.Id == defaultCommandID)
                    {
                        if (IsPrimaryBindingValidForFileName(binding, filename))
                        {
                            return(binding);
                        }
                    }
                }
            }

            foreach (DisplayBindingDescriptor binding in bindings)
            {
                if (IsPrimaryBindingValidForFileName(binding, filename))
                {
                    return(binding);
                }
            }
            return(null);
        }
예제 #4
0
        void RedrawToolbars()
        {
            Core.Properties fullscreenProperties = PropertyService.Get("FanHai.Gui.Framework.Gui.FullscreenOptions", new Core.Properties());
            bool            hideInFullscreen     = fullscreenProperties.Get("HideToolbars", true);
            bool            toolBarVisible       = PropertyService.Get("FanHai.Gui.Framework.Gui.ToolBarVisible", true);

            toolBarPanel.Visible = toolBarVisible && !(wbForm.FullScreen && hideInFullscreen);
        }
예제 #5
0
 internal static void InitializeService()
 {
     bindings = AddInTree.BuildItems <DisplayBindingDescriptor>(displayBindingPath, null, true);
     displayBindingServiceProperties = PropertyService.Get("DisplayBindingService", new Core.Properties());
     foreach (ExternalProcessDisplayBinding binding in displayBindingServiceProperties.Get("ExternalProcesses", new ExternalProcessDisplayBinding[0]))
     {
         if (binding != null)
         {
             AddExternalProcessDisplayBindingInternal(binding);
         }
     }
 }
예제 #6
0
        public override void LoadPanelContents()
        {
            SetupFromXmlStream(this.GetType().Assembly.GetManifestResourceStream("FanHai.Gui.Framework.Resources.FullscreenPanel.xfrm"));

            Core.Properties properties = PropertyService.Get(fullscreenProperty, new Core.Properties());

            Get <CheckBox>("HideMainMenu").Checked            = properties.Get("HideMainMenu", false);
            Get <CheckBox>("ShowMainMenuOnMouseMove").Checked = properties.Get("ShowMainMenuOnMouseMove", true);
            Get <CheckBox>("HideToolbars").Checked            = properties.Get("HideToolbars", true);
            Get <CheckBox>("HideTabs").Checked = properties.Get("HideTabs", false);
            Get <CheckBox>("HideVerticalScrollbar").Checked    = properties.Get("HideVerticalScrollbar", false);
            Get <CheckBox>("HideHorizontalScrollbar").Checked  = properties.Get("HideHorizontalScrollbar", false);
            Get <CheckBox>("HideStatusBar").Checked            = properties.Get("HideStatusBar", true);
            Get <CheckBox>("ShowStatusBarOnMouseMove").Checked = properties.Get("ShowStatusBarOnMouseMove", true);
            Get <CheckBox>("HideWindowsTaskbar").Checked       = properties.Get("HideWindowsTaskbar", true);

            Get <CheckBox>("HideMainMenu").CheckedChanged  += delegate { RefreshStatus(); };
            Get <CheckBox>("HideStatusBar").CheckedChanged += delegate { RefreshStatus(); };

            RefreshStatus();
        }
예제 #7
0
        public void SetMemento(Core.Properties properties)
        {
            if (properties != null && properties.Contains("bounds"))
            {
                string[] bounds = properties["bounds"].Split(',');
                if (bounds.Length == 4)
                {
                    Bounds = normalBounds = new Rectangle(int.Parse(bounds[0], NumberFormatInfo.InvariantInfo),
                                                          int.Parse(bounds[1], NumberFormatInfo.InvariantInfo),
                                                          int.Parse(bounds[2], NumberFormatInfo.InvariantInfo),
                                                          int.Parse(bounds[3], NumberFormatInfo.InvariantInfo));
                }

                defaultWindowState = (FormWindowState)Enum.Parse(typeof(FormWindowState), properties["defaultstate"]);
                FullScreen         = properties.Get("fullscreen", false);
                WindowState        = (FormWindowState)Enum.Parse(typeof(FormWindowState), properties["windowstate"]);
            }
        }