Пример #1
0
        /// <summary>
        /// Restores the state of the main window from the settings file:
        /// sets paths in file panels and focus
        /// </summary>
        private void RestoreSettings()
        {
            var leftPanelPath = Settings.LeftPanelPath;

            if (!Directory.Exists(leftPanelPath))
            {
                leftPanelPath = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile);
            }

            LeftFilePanel.SetPath(leftPanelPath);

            var rightPanelPath = Settings.RightPanelPath;

            if (!Directory.Exists(rightPanelPath))
            {
                rightPanelPath = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile);
            }

            RightFilePanel.SetPath(rightPanelPath);

            if (Settings.FocusedPanel == "LeftPanel")
            {
                SetFocus(LeftPanel, false);
            }
            else if (Settings.FocusedPanel == "RightPanel")
            {
                SetFocus(RightPanel, false);
            }
        }
Пример #2
0
        /// <summary>
        /// Restores the state of the main window from the settings file:
        /// sets paths in file panels and focus
        /// </summary>
        private void RestoreSettings()
        {
            LeftFilePanel.SetPath(Settings.LeftPanelPath);
            RightFilePanel.SetPath(Settings.RightPanelPath);

            if (Settings.FocusedPanel == "LeftPanel")
            {
                SetFocus(LeftPanel, false);
            }
            else if (Settings.FocusedPanel == "RightPanel")
            {
                SetFocus(RightPanel, false);
            }
        }