Beispiel #1
0
        public Main()
        {
            InitializeComponent();
            InitializeNotifyIcon();
            CenterToScreen();

            // Started from Windows startup, launch minimized.
            if (Program.LaunchedViaStartup)
                WindowState = FormWindowState.Minimized;

            // Initialize battle controller.
            BattleNotifierController.InitializeBattleNotifierController(this);
            battleNotifier = BattleNotifierController.Instance;

            // Initialize Main Panel.
            mainPanel = new MainPanel();
            BackgroundPanel.Controls.Add(mainPanel);

            settingsPanel = new SettingsPanel();
            NavigateHomeButton.Visible = false;

            UserSettings.InitializeConfigStorageBroker(this, mainPanel, settingsPanel);

            UserSettings.Load();

            if (UserSettings.Instance.MustNotifyOnStartup())
                mainPanel.NotificateBattles();

            settingsPanel.UpdateRunOnWinStartupRegistryKey();
            RegisterCurrentBattleHotkeyFromPanel();
        }
        public MainPanel()
        {
            InitializeComponent();
            battleNotifier = BattleNotifierController.Instance;

            AutocompleteKuskisList = new List<string>();
            InitializeHelpDescriptions();
        }
        public SettingsPanel()
        {
            InitializeComponent();
            battleNotifier = BattleNotifierController.Instance;
            ShowOnMapGroup.Click += new EventHandler(SettingsPanel_Click);
            GeneralSettingsGroup.Click += new EventHandler(SettingsPanel_Click);
            NotificationSoundGroup.Click += new EventHandler(SettingsPanel_Click);
            InitializeColorPicker();
            InitializeHelpDescriptions();

            if (ShowOverFullScreenCheckBox.Checked)
                ShowOnTopCheckBox.Checked = true;
        }
 public static void InitializeBattleNotifierController(IMain view)
 {
     if (instance == null)
         instance = new BattleNotifierController(view);
 }