コード例 #1
0
        public void updateColours()
        {
            ConfigData.FontSettings iFs = new ConfigData.FontSettings();
            this.csHero.BackColor    = this.myFS.ColorBackgroundHero;
            this.csVillain.BackColor = this.myFS.ColorBackgroundVillain;
            this.csText.BackColor    = this.myFS.ColorText;
            this.csInv.BackColor     = this.myFS.ColorInvention;
            this.csInvInv.BackColor  = this.myFS.ColorInventionInv;
            this.csFade.BackColor    = this.myFS.ColorFaded;
            this.csEnh.BackColor     = this.myFS.ColorEnhancement;
            this.csAlert.BackColor   = this.myFS.ColorWarning;
            this.csValue.BackColor   = this.myFS.ColorPlName;
            this.csSpecial.BackColor = this.myFS.ColorPlSpecial;
            iFs.Assign(MidsContext.Config.RtFont);
            MidsContext.Config.RtFont.Assign(this.myFS);
            this.rtPreview.BackColor = this.myFS.ColorBackgroundHero;
            MidsContext.Config.RtFont.ColorBackgroundHero    = this.myFS.ColorPlName;
            MidsContext.Config.RtFont.ColorBackgroundVillain = this.myFS.ColorPlSpecial;
            RTF rtf = MidsContext.Config.RTF;

            this.rtPreview.Rtf            = RTF.StartRTF() + RTF.Color(RTF.ElementID.Invention) + RTF.Underline("Invention Name") + RTF.Crlf() + RTF.Color(RTF.ElementID.Enhancement) + RTF.Italic("Enhancement Text") + RTF.Color(RTF.ElementID.Warning) + " (Alert)" + RTF.Crlf() + RTF.Color(RTF.ElementID.Text) + "  Regular Text" + RTF.Crlf() + RTF.Color(RTF.ElementID.Text) + "  Regular Text" + RTF.Crlf() + RTF.Color(RTF.ElementID.Faded) + "  Faded Text" + RTF.Crlf() + RTF.Crlf() + RTF.Color(RTF.ElementID.BackgroundHero) + RTF.Bold("Value Name: ") + RTF.Color(RTF.ElementID.Text) + "Normal Text" + RTF.Crlf() + RTF.Color(RTF.ElementID.BackgroundHero) + RTF.Bold("Value Name: ") + RTF.Color(RTF.ElementID.BackgroundVillain) + "Special Case" + RTF.Crlf() + RTF.Color(RTF.ElementID.BackgroundHero) + RTF.Bold("Value Name: ") + RTF.Color(RTF.ElementID.Enhancement) + "Enahnced value" + RTF.Crlf() + RTF.Color(RTF.ElementID.BackgroundHero) + RTF.Bold("Value Name: ") + RTF.Color(RTF.ElementID.Invention) + "Invention Effect" + RTF.Crlf() + RTF.EndRTF();
            this.Listlabel1.SuspendRedraw = true;
            this.Listlabel1.ClearItems();
            this.Listlabel1.AddItem(new ListLabelV2.ListLabelItemV2("Available Power", ListLabelV2.LLItemState.Enabled, -1, -1, -1, "", ListLabelV2.LLFontFlags.Normal, ListLabelV2.LLTextAlign.Left));
            this.Listlabel1.AddItem(new ListLabelV2.ListLabelItemV2("Taken Power", ListLabelV2.LLItemState.Selected, -1, -1, -1, "", ListLabelV2.LLFontFlags.Normal, ListLabelV2.LLTextAlign.Left));
            this.Listlabel1.AddItem(new ListLabelV2.ListLabelItemV2("Taken Power (Dark)", ListLabelV2.LLItemState.SelectedDisabled, -1, -1, -1, "", ListLabelV2.LLFontFlags.Normal, ListLabelV2.LLTextAlign.Left));
            this.Listlabel1.AddItem(new ListLabelV2.ListLabelItemV2("Unavailable Power", ListLabelV2.LLItemState.Disabled, -1, -1, -1, "", ListLabelV2.LLFontFlags.Normal, ListLabelV2.LLTextAlign.Left));
            this.Listlabel1.AddItem(new ListLabelV2.ListLabelItemV2("Highlight Colour", ListLabelV2.LLItemState.Enabled, -1, -1, -1, "", ListLabelV2.LLFontFlags.Normal, ListLabelV2.LLTextAlign.Left));
            this.Listlabel1.HoverColor = this.myFS.ColorPowerHighlight;
            this.Listlabel1.UpdateTextColors(ListLabelV2.LLItemState.Enabled, this.myFS.ColorPowerAvailable);
            this.Listlabel1.UpdateTextColors(ListLabelV2.LLItemState.Selected, this.myFS.ColorPowerTaken);
            this.Listlabel1.UpdateTextColors(ListLabelV2.LLItemState.SelectedDisabled, this.myFS.ColorPowerTakenDark);
            this.Listlabel1.UpdateTextColors(ListLabelV2.LLItemState.Disabled, this.myFS.ColorPowerDisabled);
            this.Listlabel1.Font = new System.Drawing.Font(this.Listlabel1.Font.FontFamily, MidsContext.Config.RtFont.PairedBase);
            int num = this.Listlabel1.Items.Length - 1;

            for (int index = 0; index <= num; ++index)
            {
                this.Listlabel1.Items[index].Bold = MidsContext.Config.RtFont.PairedBold;
            }
            this.Listlabel1.SuspendRedraw = false;
            this.Listlabel1.Refresh();
            MidsContext.Config.RtFont.Assign(iFs);
        }
コード例 #2
0
 public void Assign(ConfigData.FontSettings iFs)
 {
     this.RTFBase                = iFs.RTFBase;
     this.RTFBold                = iFs.RTFBold;
     this.ColorBackgroundHero    = iFs.ColorBackgroundHero;
     this.ColorBackgroundVillain = iFs.ColorBackgroundVillain;
     this.ColorText              = iFs.ColorText;
     this.ColorInvention         = iFs.ColorInvention;
     this.ColorInventionInv      = iFs.ColorInventionInv;
     this.ColorFaded             = iFs.ColorFaded;
     this.ColorEnhancement       = iFs.ColorEnhancement;
     this.ColorWarning           = iFs.ColorWarning;
     this.ColorPlName            = iFs.ColorPlName;
     this.ColorPlSpecial         = iFs.ColorPlSpecial;
     this.ColorPowerAvailable    = iFs.ColorPowerAvailable;
     this.ColorPowerTaken        = iFs.ColorPowerTaken;
     this.ColorPowerTakenDark    = iFs.ColorPowerTakenDark;
     this.ColorPowerHighlight    = iFs.ColorPowerHighlight;
     this.ColorPowerDisabled     = iFs.ColorPowerDisabled;
     this.PairedBold             = iFs.PairedBold;
     this.PairedBase             = iFs.PairedBase;
 }
コード例 #3
0
        private void updateColors()
        {
            var iFs = new ConfigData.FontSettings();

            BGColor.BackColor = _myFs.ColorBackgroundHero;
            //csVillain.BackColor = _myFs.ColorBackgroundVillain;
            TextColor.BackColor            = _myFs.ColorText;
            InventionsColor.BackColor      = _myFs.ColorInvention;
            InventionsWhiteColor.BackColor = _myFs.ColorInventionInv;
            FadedColor.BackColor           = _myFs.ColorFaded;
            EnhancementsColor.BackColor    = _myFs.ColorEnhancement;
            AlertColor.BackColor           = _myFs.ColorWarning;
            ValueColor.BackColor           = _myFs.ColorPlName;
            SpecialCaseColor.BackColor     = _myFs.ColorPlSpecial;
            AvailPowerColor.BackColor      = _myFs.ColorPowerAvailable;
            UnavailPowerColor.BackColor    = _myFs.ColorPowerDisabled;
            TakenHeroColor.BackColor       = _myFs.ColorPowerTakenHero;
            DarkTakenHero.BackColor        = _myFs.ColorPowerTakenDarkHero;
            HighlightHero.BackColor        = _myFs.ColorPowerHighlightHero;
            TakenVillain.BackColor         = _myFs.ColorPowerTakenVillain;
            DarkTakenVillain.BackColor     = _myFs.ColorPowerTakenDarkVillain;
            HighlightVillain.BackColor     = _myFs.ColorPowerHighlightVillain;
            iFs.Assign(MidsContext.Config.RtFont);
            MidsContext.Config.RtFont.Assign(_myFs);
            richTextBox1.BackColor  = _myFs.ColorBackgroundHero;
            ctlColorList1.BackColor = _myFs.ColorBackgroundHero;
            baseDamagebar.BackColor = _myFs.ColorDamageBarBase;
            enhDamagebar.BackColor  = _myFs.ColorDamageBarEnh;
            MidsContext.Config.RtFont.ColorBackgroundHero    = _myFs.ColorPlName;
            MidsContext.Config.RtFont.ColorBackgroundVillain = _myFs.ColorPlSpecial;
            richTextBox1.Rtf = RTF.StartRTF() + RTF.Color(RTF.ElementID.Invention) + RTF.Underline("Invention Name") +
                               RTF.Crlf() + RTF.Color(RTF.ElementID.Enhancement) + RTF.Italic("Enhancement Text") +
                               RTF.Color(RTF.ElementID.Warning) + " (Alert)" + RTF.Crlf() +
                               RTF.Color(RTF.ElementID.Text) + "  Regular Text" + RTF.Crlf() +
                               RTF.Color(RTF.ElementID.Text) + "  Regular Text" + RTF.Crlf() +
                               RTF.Color(RTF.ElementID.Faded) + "  Faded Text" + RTF.Crlf() + RTF.Crlf() +
                               RTF.Color(RTF.ElementID.BackgroundHero) + RTF.Bold("Value Name: ") +
                               RTF.Color(RTF.ElementID.Text) + "Normal Text" + RTF.Crlf() +
                               RTF.Color(RTF.ElementID.BackgroundHero) + RTF.Bold("Value Name: ") +
                               RTF.Color(RTF.ElementID.BackgroundVillain) + "Special Case" + RTF.Crlf() +
                               RTF.Color(RTF.ElementID.BackgroundHero) + RTF.Bold("Value Name: ") +
                               RTF.Color(RTF.ElementID.Enhancement) + "Enhanced value" + RTF.Crlf() +
                               RTF.Color(RTF.ElementID.BackgroundHero) + RTF.Bold("Value Name: ") +
                               RTF.Color(RTF.ElementID.Invention) + "Invention Effect" + RTF.Crlf() + RTF.EndRTF();
            _myFs.ColorList = new List <Color>
            {
                _myFs.ColorPowerTakenHero, _myFs.ColorPowerTakenDarkHero, _myFs.ColorPowerHighlightHero,
                _myFs.ColorPowerTakenVillain, _myFs.ColorPowerTakenDarkVillain, _myFs.ColorPowerHighlightVillain
            };
            ctlColorList1.Colors = _myFs.ColorList;
            ctlColorList1.Items.Clear();
            var powerColors = new List <string>
            {
                "Power Taken (Hero)", "Power Taken Dark (Hero)", "Power Highlight (Hero)", "Power Taken (Villain)",
                "Power Taken Dark (Villain)", "Power Highlight (Villain)"
            };

            foreach (var itemString in powerColors)
            {
                ctlColorList1.Items.Add(itemString);
            }
            ctlColorList1.Invalidate();
            MidsContext.Config.RtFont.Assign(iFs);
        }