Ejemplo n.º 1
0
        public override void OnLevelLoaded(LoadMode mode)
        {
            base.OnLevelLoaded(mode);
            Debugger.Log("ON_LEVEL_LOADED");
            Debugger.OnLevelLoaded();

            try
            {
                // Don't load if it's not a game
                if (mode != LoadMode.LoadGame && mode != LoadMode.NewGame)
                {
                    return;
                }

                BuildingThemesManager.instance.ImportThemes();

                PolicyPanelEnabler.UnlockPolicyToolbarButton();
                UIThemeManager.Initialize();
                UIStyleButtonReplacer.ReplaceStyleButton();
            }
            catch (Exception e)
            {
                Debugger.LogException(e);
            }
        }
Ejemplo n.º 2
0
 public CTitleBar()
 {
     InitializeComponent();
     MouseDown += MouseDown_Drag;
     UIThemeManager.RegisterCustomThemeHandler(typeof(CTitleBar), ApplyThemeCustomType_Implementation);
     UIThemeManager.OnThemeChanged(this, ApplyThemeCustom_Implementation);
     TitleLabel.MouseDown += MouseDown_Drag;
 }
Ejemplo n.º 3
0
        public override void OnLevelUnloading()
        {
            base.OnLevelUnloading();
            Debugger.Log("ON_LEVEL_UNLOADING");
            Debugger.OnLevelUnloading();

            BuildingThemesManager.instance.Reset();
            UIThemeManager.Destroy();
        }
Ejemplo n.º 4
0
 public CBorderedForm()
 {
     InitializeComponent();
     MouseDown           += MouseDown_Drag;
     MainPanel.MouseDown += MouseDown_Drag;
     UIThemeManager.RegisterCustomThemeHandler(typeof(CBorderedForm), ApplyThemeCustom_Implementation);
     TypeDescriptor.AddAttributes(this.DesignerContents,
                                  new DesignerAttribute(typeof(CBFInnerPanelDesigner)));
 }
Ejemplo n.º 5
0
 public CErrorDialog(string title, string description)
 {
     InitializeComponent();
     UIThemeManager.OnThemeChanged(this, OnThemeChanged_Implementation);
     this.SetThemeAware();
     MaximizeBox             = true;
     MinimizeBox             = true;
     Text                    = title;
     InnerForm.TitleBarTitle = title;
     ErrorRTB.Text           = description;
 }
Ejemplo n.º 6
0
        public MainForm()
        {
            // Sets up stealth calls for native funcs to try to avoid api hooking
            NativeStealth.SetStealthMode(NativeStealthType.ManualInvoke);

            InitializeComponent();
            UIThemeManager.OnThemeChanged(this, OnThemeChanged_Implementation);
            this.SetThemeAware();
            MaximizeBox = true;
            MinimizeBox = true;
        }
Ejemplo n.º 7
0
 public CComboDialog(string title, object[] selectables, int defaultIndex = 0)
 {
     InitializeComponent();
     UIThemeManager.OnThemeChanged(this, OnThemeChanged_Implementation);
     this.SetThemeAware();
     MaximizeBox             = true;
     MinimizeBox             = true;
     Text                    = title;
     InnerForm.TitleBarTitle = title;
     cComboBox1.Items.Clear();
     cComboBox1.Items.AddRange(selectables);
     if (defaultIndex > -1 && defaultIndex < selectables.Length)
     {
         cComboBox1.SelectedIndex = defaultIndex;
     }
 }
Ejemplo n.º 8
0
        public override void OnLevelLoaded(LoadMode mode)
        {
            base.OnLevelLoaded(mode);

            // Don't load if it's not a game
            if (mode != LoadMode.LoadGame && mode != LoadMode.NewGame)
            {
                return;
            }

            Debugger.Log("ON_LEVEL_LOADED");

            Debugger.AppendModList();
            Debugger.AppendThemeList();

            PolicyPanelEnabler.UnlockPolicyToolbarButton();
            UIThemeManager.Initialize();
        }