public void ShutDown()
        {
            // Release the render count strings.
            foreach (DText aSent in RenderCountStrings)
            {
                aSent?.Shutdown();
            }
            RenderCountStrings = null;

            // Release the position text strings.
            foreach (DText sent in VideoStrings)
            {
                sent?.Shutdown();
            }
            VideoStrings = null;

            // Release the position text strings.
            foreach (DText sentence in PositionStrings)
            {
                sentence?.Shutdown();
            }
            PositionStrings = null;

            PreviousPositions = null;
            // Release the fps text string.
            FpsString?.Shutdown();
            FpsString = null;
            // Release the font object.
            Font1?.Shutdown();
            Font1 = null;
        }
        public static UnicodeRange[] GetUnicodeRanges(this Font1 font1)
        {
            var ranges = new UnicodeRange[0xffff];
            int actualCount;

            font1.GetUnicodeRanges(ranges.Length, ranges, out actualCount);
            return(ranges.Take(actualCount).ToArray());
        }
Beispiel #3
0
        protected override void WriteDataXML(XElement ele, ElderScrollsPlugin master)
        {
            XElement subEle;

            ele.TryPathTo("Type", true, out subEle);
            subEle.Value = Type.ToString();

            ele.TryPathTo("X", true, out subEle);
            subEle.Value = X.ToString();

            ele.TryPathTo("Y", true, out subEle);
            subEle.Value = Y.ToString();

            ele.TryPathTo("Width", true, out subEle);
            subEle.Value = Width.ToString();

            ele.TryPathTo("Height", true, out subEle);
            subEle.Value = Height.ToString();

            ele.TryPathTo("Orientation", true, out subEle);
            subEle.Value = Orientation.ToString("G15");

            ele.TryPathTo("Font1/Font", true, out subEle);
            subEle.Value = Font1.ToString();

            ele.TryPathTo("Font1/Color/Red", true, out subEle);
            subEle.Value = Font1Red.ToString("G15");

            ele.TryPathTo("Font1/Color/Green", true, out subEle);
            subEle.Value = Font1Green.ToString("G15");

            ele.TryPathTo("Font1/Color/Blue", true, out subEle);
            subEle.Value = Font1Blue.ToString("G15");

            ele.TryPathTo("Font1/Alignment", true, out subEle);
            subEle.Value = Font1Alignment.ToString();

            ele.TryPathTo("Unknown1", true, out subEle);
            subEle.Value = Unknown1.ToHex();

            ele.TryPathTo("Font2/Font", true, out subEle);
            subEle.Value = Font2.ToString();

            ele.TryPathTo("Font2/Color/Red", true, out subEle);
            subEle.Value = Font2Red.ToString("G15");

            ele.TryPathTo("Font2/Color/Green", true, out subEle);
            subEle.Value = Font2Green.ToString("G15");

            ele.TryPathTo("Font2/Color/Blue", true, out subEle);
            subEle.Value = Font2Blue.ToString("G15");

            ele.TryPathTo("Unknown2", true, out subEle);
            subEle.Value = Unknown2.ToHex();

            ele.TryPathTo("Stats", true, out subEle);
            subEle.Value = Stats.ToString();
        }
Beispiel #4
0
        public String getThooBackColor(String thoId)
        {
            String aa = "#FFFFFF";
            Font1  i  = new Font1();

            foreach (Font1 t in thoColor)
            {
                if (t.id.Equals(thoId))
                {
                    aa = t.BackColor;
                }
            }
            return(aa);
        }
Beispiel #5
0
        private void setThoColor()
        {
            Font1 f1 = new Font1();

            f1.id        = "1";
            f1.BackColor = "#F37257";
            f1.foreColor = "";
            thoColor.Add(f1);
            Font1 f2 = new Font1();

            f2.id        = "2";
            f2.BackColor = "#F68D5C";
            f2.foreColor = "";
            thoColor.Add(f2);
            Font1 f3 = new Font1();

            f3.id        = "3";
            f3.BackColor = "#F4D27A";
            f3.foreColor = "";
            thoColor.Add(f3);
            Font1 f4 = new Font1();

            f4.id        = "4";
            f4.BackColor = "#517281";
            f4.foreColor = "";
            thoColor.Add(f4);
            Font1 f5 = new Font1();

            f5.id        = "5";
            f5.BackColor = "#7895A2";
            f5.foreColor = "#000000";
            thoColor.Add(f5);
            Font1 f6 = new Font1();

            f6.id        = "6";
            f6.BackColor = "#AFC1CC";
            f6.foreColor = "#000000";
            thoColor.Add(f6);
            Font1 f7 = new Font1();

            f7.id        = "7";
            f7.BackColor = "#E96D63";
            f7.foreColor = "#000000";
            thoColor.Add(f7);
            Font1 f8 = new Font1();

            f8.id        = "8";
            f8.BackColor = "#7FCA9F";
            f8.foreColor = "#000000";
            thoColor.Add(f8);
            Font1 f9 = new Font1();

            f9.id        = "9";
            f9.BackColor = "#F4BA70";
            f9.foreColor = "#000000";
            thoColor.Add(f9);
            Font1 f10 = new Font1();

            f10.id        = "10";
            f10.BackColor = "#85C1F5";
            f10.foreColor = "#000000";
            thoColor.Add(f10);
            Font1 f11 = new Font1();

            f11.id        = "11";
            f11.BackColor = "#4A789C";
            f11.foreColor = "#000000";
            thoColor.Add(f11);
        }
 private void Font_Click(object sender, EventArgs e)
 {
     Font1.ShowDialog();
     Txt.Font = new Font(Font1.Font, FontStyle.Regular);
     Txt.Refresh();
 }