Exemplo n.º 1
0
        /// <summary>
        /// The <see cref="MonoBehaviour"/> Start event.  Starts Action Group Manager's Visual component.
        /// </summary>
        private void Start()
        {
            singleton = this;
            if (this.uiList == null)
            {
                this.uiList = new SortedList <UiType, UiObject>();
            }

            if (!this.uiList.TryGetValue(UiType.Main, out UiObject main))
            {
                main = new MainUi();
                this.uiList.Add(UiType.Main, main);
            }

            if (!this.uiList.TryGetValue(UiType.Reference, out UiObject recap))
            {
                recap = new ReferenceUi(SettingsManager.Settings.GetValue <bool>(SettingsManager.IsReferenceWindowVisible, false));
                this.uiList.Add(UiType.Reference, recap);
            }

            if (ToolbarManager.ToolbarAvailable)
            {
                Program.AddDebugLog("Initializing Toolbar");

                // Blizzy's Toolbar support
                this.uiList.Add(UiType.Icon, new Toolbar(main, recap));

                if (!UiSettings.ToolBarListRightClick)
                {
                    this.uiList.Add(UiType.ReferenceIcon, new ToolbarReference(recap));
                }
            }
            else
            {
                Program.AddDebugLog("Initializing Application Launcher");

                // Stock Application Launcher
                this.uiList.Add(UiType.Icon, new AppLauncher(main, recap));

                if (!UiSettings.ToolBarListRightClick)
                {
                    this.uiList.Add(UiType.ReferenceIcon, new AppLauncherReference(recap));
                }
            }

            main.Visible             = SettingsManager.Settings.GetValue <bool>(SettingsManager.IsMainWindowVisible);
            this.ShowReferenceWindow = SettingsManager.Settings.GetValue <bool>(SettingsManager.IsReferenceWindowVisible, false);
            Program.AddDebugLog("Visual User Interface has started.");
        }
Exemplo n.º 2
0
        /// <summary>
        /// The <see cref="MonoBehaviour"/> Start event.  Starts Action Group Manager's Visual component.
        /// </summary>
        private void Start()
        {
            singleton = this;
            if (this.uiList == null)
            {
                Program.AddDebugLog("Creating: Start this.uiList ");
                this.uiList = new SortedList <UiType, UiObject>();
            }

            if (!this.uiList.TryGetValue(UiType.Main, out UiObject main))
            {
                main = new MainUi();
                this.uiList.Add(UiType.Main, main);
            }

            if (!this.uiList.TryGetValue(UiType.Reference, out UiObject recap))
            {
                Program.AddDebugLog("Creating: ReferenceUi ");
                recap = new ReferenceUi(SettingsManager.Settings.GetValue <bool>(SettingsManager.IsReferenceWindowVisible, false));
                this.uiList.Add(UiType.Reference, recap);
            }
            if (!this.uiList.ContainsKey(UiType.Icon))
            {
                this.uiList.Add(UiType.Icon, new ToolbarController(main, recap));
            }
            if (!UiSettings.ToolBarListRightClick)
            {
                if (!this.uiList.ContainsKey(UiType.ReferenceIcon))
                {
                    this.uiList.Add(UiType.ReferenceIcon, new ToolbarControllerReference(recap));
                }
            }

            main.Visible             = SettingsManager.Settings.GetValue <bool>(SettingsManager.IsMainWindowVisible);
            this.ShowReferenceWindow = SettingsManager.Settings.GetValue <bool>(SettingsManager.IsReferenceWindowVisible, false);
            Program.AddDebugLog("Visual User Interface has started.");
        }