Exemple #1
0
        public void SetFormat(List <ControlEntryProperties> cep)
        {
            for (int i = 0; i < items.Count; i++)
            {
                items[i].Font      = cep[i].font;
                items[i].ForeColor = cep[i].colour;

                int nexttabpos = (i < items.Count - 1) ? cep[i + 1].tabstop : 2000;

                if (items[i] is ExtendedControls.DrawnPanel)
                {
                    ExtendedControls.DrawnPanel dp = items[i] as ExtendedControls.DrawnPanel;
                    dp.MouseOverColor     = ButtonExt.Multiply(cep[i].colour, 1.3F);
                    dp.MouseSelectedColor = ButtonExt.Multiply(cep[i].colour, 1.5F);
                    dp.BackColor          = Color.Black;
                    items[i].Location     = new Point(cep[i].tabstop, items[i].Location.Y + 3);
                    items[i].Size         = new Size(nexttabpos - cep[i].tabstop - 4, items[i].Size.Height - 6);
                }
                else
                {
                    items[i].BackColor = Color.Transparent;
                    items[i].Location  = new Point(cep[i].tabstop, items[i].Location.Y);
                    items[i].Size      = new Size(nexttabpos - cep[i].tabstop - 4, items[i].Size.Height - 4);
                }
            }
        }
Exemple #2
0
        bool hiddenmarkershouldbeshown = false; // if to show it now

        public RollUpPanel()
        {
            SuspendLayout();

            this.Height = UnrolledHeight;

            pinbutton                 = new CheckBoxCustom();
            pinbutton.Appearance      = Appearance.Normal;
            pinbutton.FlatStyle       = FlatStyle.Popup;
            pinbutton.Size            = new Size(24, 24);
            pinbutton.Image           = ExtendedControls.Properties.Resources.pindownwhite2; //colours 222 and 255 used
            pinbutton.ImageUnchecked  = ExtendedControls.Properties.Resources.pinupwhite2;
            pinbutton.Checked         = true;
            pinbutton.CheckedChanged += Pinbutton_CheckedChanged;
            pinbutton.Name            = "RUP Pinbutton";

            hiddenmarker               = new DrawnPanelNoTheme();
            hiddenmarker.Name          = "Hidden marker";
            hiddenmarker.Location      = new Point(0, 0);
            hiddenmarker.ImageSelected = DrawnPanel.ImageType.Bars;
            hiddenmarker.Size          = new Size(100, 3);
            hiddenmarker.Visible       = false;
            hiddenmarker.Click        += Hiddenmarker_Click;

            Controls.Add(pinbutton);
            Controls.Add(hiddenmarker);

            ResumeLayout();

            mode        = Mode.None;
            timer       = new Timer();
            timer.Tick += Timer_Tick;

            pinbutton.Visible = false;
        }
Exemple #3
0
        }                              // row id of creator..

        public ControlRowEntry(int id, List <ControlEntryProperties> cep, int vpos, int vsize, Control p)
        {
            RowId  = id;
            parent = p;

            items = new List <Control>();
            for (int i = 0; i < cep.Count; i++)
            {
                if (cep[i].text.Length > 11 && cep[i].text.Substring(0, 11).Equals("!!<EDSMBUT:"))
                {
                    ExtendedControls.DrawnPanel edsm = new ExtendedControls.DrawnPanel();
                    edsm.Name       = cep[i].text.Substring(11);
                    edsm.Image      = DrawnPanel.ImageType.Text;
                    edsm.ImageText  = "EDSM";
                    edsm.Size       = new Size(100, vsize);
                    edsm.MarginSize = -1;       // 0 is auto calc, -1 is zero
                    edsm.Location   = new Point(0, vpos);
                    parent.Controls.Add(edsm);
                    items.Add(edsm);
                }
                else
                {
                    LabelExt lab = new ExtendedControls.LabelExt();
                    lab.Text     = cep[i].text;
                    lab.Location = new Point(0, vpos);
                    lab.AutoSize = false;
                    lab.Size     = new Size(100, vsize);
                    parent.Controls.Add(lab);
                    items.Add(lab);
                }
            }
        }
Exemple #4
0
        public ControlRowEntry(int id , List<ControlEntryProperties> cep, int vpos, int vsize , Control p )
        {
            RowId = id;
            parent = p;

            items = new List<Control>();
            for (int i = 0; i < cep.Count; i++)
            {
                if (cep[i].text.Length > 11 && cep[i].text.Substring(0,11).Equals("!!<EDSMBUT:"))
                {
                    ExtendedControls.DrawnPanel edsm = new ExtendedControls.DrawnPanel();
                    edsm.Name = cep[i].text.Substring(11);
                    edsm.Image = DrawnPanel.ImageType.Text;
                    edsm.ImageText = "EDSM";
                    edsm.Size = new Size(100, vsize);
                    edsm.MarginSize = -1;       // 0 is auto calc, -1 is zero
                    edsm.Location = new Point(0, vpos);
                    parent.Controls.Add(edsm);
                    items.Add(edsm);
                }
                else
                {
                    LabelExt lab = new ExtendedControls.LabelExt();
                    lab.Text = cep[i].text;
                    lab.Location = new Point(0, vpos);
                    lab.AutoSize = false;
                    lab.Size = new Size(100, vsize);
                    parent.Controls.Add(lab);
                    items.Add(lab);
                }
            }
        }