コード例 #1
0
        public MainControl()
        {
            // Initialize interface.
            InitializeComponent();
            _bwm = new BaseWithHeaderManager(HelpHeadLabel, HelpBodyLabel, LeftIcon, this);
            if (ControlsHelper.IsDesignMode(this))
            {
                return;
            }

            // Hide status values.
            StatusTimerLabel.Content = "";
            StatusDllLabel.Content   = "";
            // Set status labels.
            StatusIsAdminLabel.Content = JocysCom.ClassLibrary.Win32.WinAPI.IsVista
                                ? string.Format("Elevated: {0}", JocysCom.ClassLibrary.Win32.WinAPI.IsElevated())
                                : "";
            // Initialize Debug panel.
            DebugPanel = new Forms.DebugWindow();
            ControlsHelper.BeginInvoke(() =>
            {
                if (SettingsManager.Options.ShowDebugPanel)
                {
                    DebugPanel.ShowPanel();
                }
            });
            InitGameToCustomizeComboBox();
            // Map event handler.
            SettingsManager.CurrentGame_PropertyChanged += CurrentGame_PropertyChanged;
            var o = SettingsManager.Options;

            o.PropertyChanged += Options_PropertyChanged;
            LoadSettings();
        }
コード例 #2
0
 public MainControl()
 {
     InitHelper.InitTimer(this, InitializeComponent);
     if (ControlsHelper.IsDesignMode(this))
     {
         return;
     }
     // Hide status values.
     StatusTimerLabel.Content = "";
     StatusDllLabel.Content   = "";
     // Set status labels.
     StatusIsAdminLabel.Content = JocysCom.ClassLibrary.Win32.WinAPI.IsVista
                         ? string.Format("Elevated: {0}", JocysCom.ClassLibrary.Win32.WinAPI.IsElevated())
                         : "";
     // Initialize Debug panel.
     DebugPanel = new Forms.DebugWindow();
     ControlsHelper.BeginInvoke(() =>
     {
         if (SettingsManager.Options.ShowDebugPanel)
         {
             DebugPanel.ShowPanel();
         }
     });
     InitGameToCustomizeComboBox();
     SettingsManager.Options.PropertyChanged += Options_PropertyChanged;
     LoadSettings();
 }