Exemple #1
0
        /// <summary>
        /// Add some style to the GUI.
        /// </summary>
        private void InitializeStyle()
        {
            // Add a bit of style
            footer.BackColor          = Color.FromArgb(70, 73, 88);
            footer.ForeColor          = Color.FromArgb(230, 232, 242);
            btnSaveAndClose.ForeColor = Color.FromArgb(0, 0, 1);
            button6.ForeColor         = Color.FromArgb(0, 0, 1);

            pgGeneral.HelpBackColor = Color.FromArgb(203, 205, 217); // Description
            pgGeneral.HelpForeColor = Color.FromArgb(0, 0, 1);       // Description
            // pgGeneral.BackColor = Color.FromArgb(203, 205, 217); // Category
            pgGeneral.ForeColor = Color.FromArgb(66, 69, 84);        // Category
            pgGeneral.LineColor = Color.FromArgb(203, 205, 217);     // Category
            // pgGeneral.ViewBackColor = Color.FromArgb(66, 69, 84); // properties
            // pgGeneral.ViewForeColor = Color.FromArgb(230, 232, 242); // properties

            pgClass.HelpBackColor = Color.FromArgb(203, 205, 217); // Description
            pgClass.HelpForeColor = Color.FromArgb(0, 0, 1);       // Description
            // pgClass.BackColor = Color.FromArgb(203, 205, 217); // Category
            pgClass.ForeColor = Color.FromArgb(66, 69, 84);        // Category
            pgClass.LineColor = Color.FromArgb(203, 205, 217);     // Category
            // pgClass.ViewBackColor = Color.FromArgb(66, 69, 84); // properties
            // pgClass.ViewForeColor = Color.FromArgb(230, 232, 242); // properties

            textBox1.BackColor = Color.FromArgb(70, 73, 88);
            textBox1.ForeColor = Color.FromArgb(230, 232, 242);
            textBox2.BackColor = Color.FromArgb(70, 73, 88);
            textBox2.ForeColor = Color.FromArgb(230, 232, 242);

            // hide the toolbar
            pgGeneral.ToolbarVisible = false;
            pgClass.ToolbarVisible   = false;

            // Collapse All Grid Items
            pgGeneral.CollapseAllGridItems();
            pgClass.CollapseAllGridItems();

            // SysLog.Log(Utilities.AssemblyDirectory); //todo: fix me

            if (File.Exists(Utilities.AssemblyDirectory + @"\Routines\CLU\GUI\Resources\CLU.png"))
            {
                pictureBox1.ImageLocation = Utilities.AssemblyDirectory + @"\Routines\CLU\GUI\Resources\CLU.png";
            }

            if (File.Exists(Utilities.AssemblyDirectory + @"\Routines\CLU\GUI\Resources\CLU.ico"))
            {
                this.Icon = new Icon(Utilities.AssemblyDirectory + @"\Routines\CLU\GUI\Resources\CLU.ico");
            }

            // AoE and Single target healing control ============================================================
            const string Firstrowtext  = "Ok, so this is how it works. The slider below is linked to";
            const string Secondrowtext = "the AoE Healing abilities maxAverageHealthPercent for your";
            const string Thirdrowtext  = "given class. You can still set the maxAverageHealthPercent";
            const string Fourthrowtext = "values for the individual AoE abilitys in the Class Specific Tab.";
            const string Fifthhrowtext = "The slider increases or decreases those values *independently*.";
            // Environment.NewLine
            const string Eighthhrowtext = "Currently this control is only available for Discipline/AA Priests.";
            // Environment.NewLine
            const string Eleventhhrowtext   = "Moving the Slider closer to single target will reduce the";
            const string Twelthhrowtext     = "maxAverageHealthPercent values thus allowing more single";
            const string Thirteenthhrowtext = "target healing to be done.";


            label9.Text = Firstrowtext + Environment.NewLine +
                          Secondrowtext + Environment.NewLine +
                          Thirdrowtext + Environment.NewLine +
                          Fourthrowtext + Environment.NewLine +
                          Fifthhrowtext + Environment.NewLine + Environment.NewLine +
                          Eighthhrowtext + Environment.NewLine + Environment.NewLine +
                          Eleventhhrowtext + Environment.NewLine +
                          Twelthhrowtext + Environment.NewLine +
                          Thirteenthhrowtext + Environment.NewLine;

            // setup initial Maximum, Minimum, and Value
            // HealingtrackBar.Minimum = 0;
            // HealingtrackBar.Maximum = 100;

            maxAoEHealingValues = new List <int> {
                CLUSettings.Instance.Priest.PowerWordBarrierPartymaxAH, CLUSettings.Instance.Priest.DivineHymnPartymaxAH, CLUSettings.Instance.Priest.PrayerofHealingPartymaxAH
            };
            double median = Median(this.maxAoEHealingValues);

            HealingtrackBar.Value = (int)median;

            // setup LargeChange and SmallChange
            HealingtrackBar.SmallChange = 2;  //  keyboard arrows
            HealingtrackBar.LargeChange = 10; // page up and page down keys

            // TickFrequency and TickStyle
            HealingtrackBar.TickFrequency = 1;
            HealingtrackBar.TickStyle     = TickStyle.BottomRight;

            // Attaching TrackBar to a Control
            this.HealingtrackBar.Scroll += this.HealingtrackBar_Scroll;

            HealingtrackBar.SetRange(40, 98);

            num_Barrier.Value = CLUSettings.Instance.Priest.PowerWordBarrierPartymaxAH;
            num_Hyme.Value    = CLUSettings.Instance.Priest.DivineHymnPartymaxAH;
            num_Prayer.Value  = CLUSettings.Instance.Priest.PrayerofHealingPartymaxAH;

            // =================================================================================================

            // Set the panel double buffered for smoother updates.
            GUIHelpers.SetDoubleBuffered(this.panel1);
            GUIHelpers.SetDoubleBuffered(this.HealingGrid);
        }