Exemplo n.º 1
0
        private static void AddGeneral(UIHelperBase helper)
        {
            UIHelper group = helper.AddGroup(Localize.Settings_DisplayAndUsage) as UIHelper;

            AddDistanceSetting(group);
            AddCheckBox(group, Localize.Settings_LoadMarkingAssets, LoadMarkingAssets);
            group.AddLabel(Localize.Settings_ApplyAfterRestart, 0.8f, Color.yellow, 25);
            AddCheckBox(group, Localize.Settings_RailUnderMarking, RailUnderMarking);
            group.AddLabel(Localize.Settings_RailUnderMarkingWarning, 0.8f, Color.red, 25);
            group.AddLabel(Localize.Settings_ApplyAfterRestart, 0.8f, Color.yellow, 25);
            AddCheckBox(group, Localize.Settings_ShowTooltips, ShowToolTip);
            AddCheckBox(group, Localize.Settings_ShowPaneltips, ShowPanelTip);
            AddCheckboxPanel(group, Localize.Settings_ShowDeleteWarnings, DeleteWarnings, DeleteWarningsType, new string[] { Localize.Settings_ShowDeleteWarningsAlways, Localize.Settings_ShowDeleteWarningsOnlyDependences });
            AddCheckBox(group, Localize.Settings_QuickRuleSetup, QuickRuleSetup);
            AddCheckBox(group, Localize.Settings_QuickBorderSetup, QuickBorderSetup);
            AddCheckBox(group, Localize.Settings_CutLineByCrosswalk, CutLineByCrosswalk);
            AddCheckBox(group, Localize.Settings_DontCutBorderByCrosswalk, NotCutBordersByCrosswalk);
        }
Exemplo n.º 2
0
        public void AddLabel()
        {
            helper.AddLabel(panel1, "This is a test", 11, 5, 6);

            var label = panel1.Controls.OfType <Label>().First();

            Assert.AreEqual("This is a test", label.Text);
            Assert.AreEqual(11, label.Font.Size);
            Assert.AreEqual(5, label.Left);
            Assert.AreEqual(6, label.Top);
        }
Exemplo n.º 3
0
        public static void Make(ExtUITabstrip tabStrip)
        {
            UIHelper panelHelper = tabStrip.AddTabPage("Startup");

            panelHelper.AddLabel("restart required to take effect.", textColor: Color.yellow);
            panelHelper.AddSpace(10);

            panelHelper.AddButton("Reset load orders", OnResetLoadOrdersClicked);

            panelHelper.AddCheckbox(
                "remove ad panels",
                ConfigUtil.Config.TurnOffSteamPanels,
                val => {
                ConfigUtil.Config.TurnOffSteamPanels = val;
                ConfigUtil.SaveConfig();
            });

            var c2 = panelHelper.AddCheckbox(
                "Improve content manager",
                ConfigUtil.Config.FastContentManager,
                val => {
                ConfigUtil.Config.FastContentManager = val;
                ConfigUtil.SaveConfig();
            }) as UIComponent;

            c2.tooltip = "faster content manager";

            var c3 = panelHelper.AddCheckbox(
                "Add harmony resolver",
                ConfigUtil.Config.AddHarmonyResolver,
                val => {
                ConfigUtil.Config.AddHarmonyResolver = val;
                ConfigUtil.SaveConfig();
            }) as UICheckBox;

            var c4 = panelHelper.AddCheckbox(
                "Cache asset details for the tool.",
                ConfigUtil.Config.UGCCache,
                val => {
                ConfigUtil.Config.UGCCache = val;
                ConfigUtil.SaveConfig();
            }) as UICheckBox;

            var c5 = panelHelper.AddCheckbox(
                "Hide steam download errors (Ignorance is bliss!)",
                ConfigUtil.Config.IgnoranceIsBliss,
                val => {
                ConfigUtil.Config.IgnoranceIsBliss = val;
                ConfigUtil.SaveConfig();
            }) as UICheckBox;
        }