public static void Testa(BasePlayer player)
        {
            var d = new TextDraw(new Vector2(100, 100), "Diploma", TextDrawFont.Diploma);
            var p = new TextDraw(new Vector2(100, 140), "Pricedown", TextDrawFont.Pricedown);
            var n = new TextDraw(new Vector2(100, 180), "Normal", TextDrawFont.Normal);

            p.Show(player);
            d.Show(player);
            n.Show(player);
        }
Esempio n. 2
0
        public static void Testa(BasePlayer player)
        {
            var d = new TextDraw(new Vector2(100, 100), "Diploma", TextDrawFont.Diploma);
            var p = new TextDraw(new Vector2(100, 140), "Pricedown", TextDrawFont.Pricedown);
            var n = new TextDraw(new Vector2(100, 180), "Normal", TextDrawFont.Normal);

            p.Show(player);
            d.Show(player);
            n.Show(player);
        }
Esempio n. 3
0
        public void Initialize()
        {
            Text          = _language.Title + " - " + (IntPtr.Size * 8) + "-bit";
            okButton.Text = _languageGeneral.Ok;
            string[] versionInfo    = Utilities.AssemblyVersion.Split('.');
            string   revisionNumber = "0";

            if (versionInfo.Length >= 4)
            {
                revisionNumber = versionInfo[3];
            }
            if (revisionNumber == "0")
            {
                labelProduct.Text = String.Format("{0} {1}.{2}.{3}, ", _languageGeneral.Title, versionInfo[0], versionInfo[1], versionInfo[2]);
                revisionNumber    = Utilities.AssemblyDescription.Substring(0, 7);
            }
            else
            {
                labelProduct.Text = String.Format("{0} {1}.{2}.{3}, build", _languageGeneral.Title, versionInfo[0], versionInfo[1], versionInfo[2]);
            }
            linkLabelGitBuildHash.Left             = labelProduct.Left + labelProduct.Width - 5;
            linkLabelGitBuildHash.LinkColor        = Color.FromArgb(0, 102, 204);
            linkLabelGitBuildHash.VisitedLinkColor = Color.FromArgb(0, 102, 204);
            linkLabelGitBuildHash.Text             = revisionNumber;
            var toolTip1 = new ToolTip();

            toolTip1.SetToolTip(linkLabelGitBuildHash, GetGitHubHashLink());

            string aboutText = _language.AboutText1.TrimEnd() + Environment.NewLine +
                               Environment.NewLine +
                               _languageGeneral.TranslatedBy.Trim();

            while (aboutText.Contains("\n ") || aboutText.Contains("\n\t"))
            {
                aboutText = aboutText.Replace("\n ", "\n");
                aboutText = aboutText.Replace("\n\t", "\n");
            }
            richTextBoxAbout1.Text = aboutText;

            double height = TextDraw.MeasureTextHeight(richTextBoxAbout1.Font, richTextBoxAbout1.Text, false) * 1.4 + 80;

            richTextBoxAbout1.Height = (int)height;
            Height = richTextBoxAbout1.Top + richTextBoxAbout1.Height + 90;
        }
 /// <summary>
 ///     Initializes a new instance of the ClickTextDrawEventArgs class.
 /// </summary>
 /// <param name="player">The player.</param>
 /// <param name="textDraw">The text draw.</param>
 public ClickTextDrawEventArgs(BasePlayer player, TextDraw textDraw)
 {
     Player = player;
     TextDraw = textDraw;
 }