コード例 #1
0
        private Control OnCreateTab(ExtendedControls.TabStrip t, int no)
        {
            UserControl uc = new UserControl();

            uc.BackColor     = Color.Cyan;
            uc.AutoScaleMode = AutoScaleMode.Font;

            DLabel lb = new DLabel();

            lb.Location = new Point(10, 10);
            lb.Size     = new Size(200, 24);
            lb.Text     = t.Name + " User Control " + (no + 0);

            ExtButton bb = new ExtButton();

            bb.Location = new Point(10, 40);
            bb.Size     = new Size(40, 40);
            bb.Text     = "BUT";
            bb.Name     = "UC " + no + " BUT";
            uc.Controls.Add(bb);

            uc.Name = "UC " + no + "!.";
            uc.Dock = DockStyle.Fill;
            uc.Controls.Add(lb);
            t.SetControlText("CT<" + uc.Name + ">");

            theme.ApplyStd(uc);
            return(uc);
        }
コード例 #2
0
        private void DropDown(bool themeit)
        {
            var dropdown = new ExtListBoxForm("", true);

            Image[] imagelist = new Image[] {
                Properties.Resources.galaxy_black,
                Properties.Resources.galaxy_gray,
                Properties.Resources.galaxy_red,
                Properties.Resources.galaxy_white,
            };

            string[] textlist = new string[] { "256", "192", "128", "96" };

            dropdown.Items      = textlist.ToList();
            dropdown.ImageItems = imagelist.ToList();
            dropdown.FlatStyle  = FlatStyle.Popup;
            dropdown.PositionBelow(extButton11);

            if (themeit)
            {
                theme.ApplyStd(dropdown);
            }
            else
            {
                var stdtheme = new ThemeStandard();
                stdtheme.LoadBaseThemes();
                stdtheme.SetThemeByName("Windows Default");

                stdtheme.ApplyStd(dropdown, true);
            }


            dropdown.Show(this.FindForm());
        }
コード例 #3
0
        // proving you can't control RTF for scroll bar purposes.

        public TestTextBoxesRTF()
        {
            theme = new ThemeStandard();
            ThemeableFormsInstance.Instance = theme;
            theme.LoadBaseThemes();
            //theme.SetThemeByName("Elite EuroCaps");
            theme.SetThemeByName("Elite Verdana");
            //theme.FontName = "Microsoft Sans Serif";
            //theme.FontName = "Arial";
            //theme.FontName = "Euro Caps";
            theme.FontSize     = 14f;
            theme.WindowsFrame = true;

            InitializeComponent();

            string tx = "";

            for (int i = 0; i < 20; i++)
            {
                tx = tx.AppendPrePad(i.ToStringInvariant("0000") + ":" + " Here is some text", Environment.NewLine);
            }
            extRichTextBox1.Text = tx;

            var x = Properties.Resources.EDD_License;

            extRichTextBox1.Rtf = x;

            theme.ApplyStd(this);
        }
コード例 #4
0
        public TestAutoComplete()
        {
            InitializeComponent();
            theme = new ThemeStandard();
            theme.LoadBaseThemes();
            theme.SetThemeByName("Elite Verdana");
            theme.WindowsFrame = true;
            ExtendedControls.ThemeableFormsInstance.Instance = theme;

            list.Add("one");
            list.Add("only");
            list.Add("onynx");
            list.Add("two");
            list.Add("three");
            list.Add("four");
            list.Add("five");
            list.Add("Aone");
            list.Add("Btwo");
            list.Add("Cthree");
            list.Add("Dfour");
            list.Add("Efive");

            autoCompleteTextBox1.SetAutoCompletor(AutoList);
            autoCompleteTextBox1.KeyUp += AutoCompleteTextBox1_KeyUp;
            autoCompleteTextBox2.SetAutoCompletor(AutoList);
            autoCompleteTextBox2.FlatStyle = FlatStyle.Popup;
            autoCompleteTextBox2.KeyUp    += AutoCompleteTextBox2_KeyUp;

            comboBoxCustom1.Items.AddRange(list);

            theme.ApplyStd(this);
        }
コード例 #5
0
 public TestVScroll()
 {
     InitializeComponent();
     theme = new ThemeStandard();
     theme.LoadBaseThemes();
     theme.SetThemeByName("Elite Verdana");
     theme.WindowsFrame = true;
     theme.ApplyStd(this);
 }
コード例 #6
0
        private void extButton4_Click(object sender, EventArgs e)
        {
            CheckedIconListBoxForm f = new CheckedIconListBoxForm();

            var imglist = new Image[] { Properties.Resources.edlogo24, Properties.Resources.Logo8bpp48, Properties.Resources.galaxy_white, Properties.Resources.Logo8bpp48rot, Properties.Resources.galaxy_red, };

            for (int i = 0; i < 20; i++)
            {
                f.AddItem("T" + i.ToString(), "Tx" + i.ToString(), imglist[i % imglist.Length]);
            }

            f.PositionBelow(extButton1);
            f.SetChecked("Two;Four");
            f.CheckedChanged += F_CheckedChanged;
            f.SaveSettings   += F_SaveSettings;
            f.Font            = new Font("Euro Caps", 16);
            theme.ApplyStd(f);
            f.Show(this);
        }
コード例 #7
0
        private void extButton3_Click(object sender, EventArgs e)
        {
            theme = new ThemeStandard();
            ThemeableFormsInstance.Instance = theme;
            theme.LoadBaseThemes();
            theme.SetThemeByName("Elite EuroCaps");
            theme.FontName     = "Microsoft Sans Serif";
            theme.FontSize     = 8.25f;
            theme.WindowsFrame = false;

            two = new DraggableForm();
            theme.ApplyStd(two);
            two.Show(this);
        }
コード例 #8
0
        public TestDraggableForm()
        {
            theme = new ThemeStandard();
            ThemeableFormsInstance.Instance = theme;
            theme.LoadBaseThemes();
            theme.SetThemeByName("Elite EuroCaps");
            theme.Form         = Color.FromArgb(50, 50, 0);
            theme.FontName     = "Microsoft Sans Serif";
            theme.FontSize     = 8.25f;
            theme.WindowsFrame = false;

            InitializeComponent();

            theme.ApplyStd(this);
        }
コード例 #9
0
        public TestDateTime()
        {
            theme = new ThemeStandard();
            ThemeableFormsInstance.Instance = theme;
            theme.LoadBaseThemes();
            theme.SetThemeByName("Elite EuroCaps");
            theme.FontName     = "Microsoft Sans Serif";
            theme.FontSize     = 8.25f;
            theme.WindowsFrame = true;

            InitializeComponent();

            theme.ApplyStd(this);


            extDateTimePicker1.Format        = DateTimePickerFormat.Custom;
            extDateTimePicker1.CustomFormat  = "yyyy/MM/dd HH:mm:ss";
            extDateTimePicker1.BackColor     = Color.Blue;
            extDateTimePicker1.SelectedColor = Color.DarkBlue;
        }
コード例 #10
0
        public TestButtons()
        {
            theme = new ThemeStandard();
            ThemeableFormsInstance.Instance = theme;
            theme.LoadBaseThemes();
            theme.SetThemeByName("Elite EuroCaps");
            theme.FontName = "Microsoft Sans Serif";

            theme.FontSize     = 8.25f;
            theme.WindowsFrame = true;

            InitializeComponent();

            CompositeButton b = CompositeButton.QuickInit(Properties.Resources.Selector,
                                                          "B1 Dyn", new Font("Verdana", 8.25f), Color.Yellow, Color.Transparent,
                                                          Properties.Resources.edsm32x32, new Size(32, 32),
                                                          new Image[] { Properties.Resources.edlogo24, Properties.Resources.galaxy_black }, new Size(24, 24),
                                                          3,
                                                          (o, p) => { System.Diagnostics.Debug.WriteLine("CB " + o + " " + p); });

            this.Controls.Add(b);
            b.Location = new Point(250, 10);

            System.Diagnostics.Debug.WriteLine("Size needed " + b.FindMaxSubControlArea(0, 6));
            b.Size = new Size(128, b.FindMaxSubControlArea(0, 6).Height);

            b = CompositeButton.QuickInit(Properties.Resources.Selector,
                                          "B2 Dyn", new Font("Verdana", 8.25f), Color.Yellow, Color.Transparent,
                                          Properties.Resources.ScreenShot, new Size(24, 24),
                                          new Image[] { Properties.Resources.edlogo24, Properties.Resources.galaxy_black }, new Size(24, 24),
                                          3,
                                          (o, p) => { System.Diagnostics.Debug.WriteLine("CB " + o + " " + p); });
            b.Name = "Realistic";
            this.Controls.Add(b);
            b.Location = new Point(250, 120);
            b.Size     = new Size(128, b.FindMaxSubControlArea(0, 6).Height);

            theme.ApplyStd(this);
        }
コード例 #11
0
        public TestAutoComplete()
        {
            InitializeComponent();
            theme = new ThemeStandard();
            theme.LoadBaseThemes();
            theme.SetThemeByName("Elite Verdana");
            theme.WindowsFrame = true;
            ExtendedControls.ThemeableFormsInstance.Instance = theme;

            list.Add("one");
            list.Add("only");
            list.Add("onynx");
            list.Add("two");
            list.Add("three");
            list.Add("four");
            list.Add("five");
            list.Add("Aone");
            list.Add("Btwo");
            list.Add("Cthree");
            list.Add("Dfour");
            list.Add("Efive");

            autoCompleteTextBox1.SetAutoCompletor(AutoList);
            autoCompleteTextBox1.KeyUp += AutoCompleteTextBox1_KeyUp;
            autoCompleteTextBox2.SetAutoCompletor(AutoList);
            autoCompleteTextBox2.FlatStyle = FlatStyle.Popup;
            autoCompleteTextBox2.KeyUp    += AutoCompleteTextBox2_KeyUp;

            comboBoxCustom1.Items.AddRange(list);

            for (int i = 0; i < 5; i++)
            {
                dataGridViewColumnHider1.Rows.Add("", "");
            }

            Column1.AutoCompleteGenerator            = ReturnSystemAutoCompleteListDGV;
            dataGridViewColumnHider1.PreviewKeyDown += DataGridViewColumnHider1_PreviewKeyDown;
            theme.ApplyStd(this);
        }
コード例 #12
0
 private void extButton1_Click(object sender, EventArgs e)
 {
     theme.FontSize = 12;
     theme.ApplyStd(this);
 }
コード例 #13
0
 private void extButton12_Click(object sender, EventArgs e)
 {
     theme.SetThemeByName("Windows Default");
     theme.FontSize = 12;
     theme.ApplyStd(this);
 }
コード例 #14
0
 private void extButton1_Click(object sender, EventArgs e)
 {
     theme.FontSize = 12;
     theme.ApplyStd(this);
     System.Diagnostics.Debug.WriteLine("Font " + this.Font + this.Font.Height);
 }
コード例 #15
0
        public TestTextBoxes()
        {
            theme = new ThemeStandard();
            ThemeableFormsInstance.Instance = theme;
            theme.LoadBaseThemes();
            //theme.SetThemeByName("Elite EuroCaps");
            theme.SetThemeByName("Elite Verdana");
            //theme.FontName = "Microsoft Sans Serif";
            //theme.FontName = "Arial";
            //theme.FontName = "Euro Caps";
            //theme.FontSize = 20f;
            theme.WindowsFrame = true;

            InitializeComponent();

            theme.ApplyStd(this);

            textBoxDouble1.FormatCulture = CultureInfo.GetCultureInfo("en-gb");
            textBoxDouble2.FormatCulture = CultureInfo.GetCultureInfo("fr");
            numberBoxLong1.FormatCulture = CultureInfo.GetCultureInfo("en-gb");

            numberBoxLong1.Minimum       = 1000;
            numberBoxLong1.Maximum       = 2000;
            numberBoxLong1.ValueNoChange = 1100;

            numberBoxLong2.Minimum       = 1000;
            numberBoxLong2.Maximum       = 2000;
            numberBoxLong2.ValueNoChange = 1400;
            numberBoxLong2.SetComparitor(numberBoxLong1, 2);

            textBoxDouble1.Minimum       = -20.0;
            textBoxDouble1.Maximum       = 20.0;
            textBoxDouble1.ValueNoChange = 1.1;

            textBoxDouble2.Minimum       = 10.0;
            textBoxDouble2.Maximum       = 20.0;
            textBoxDouble2.ValueNoChange = 12.1;


            extRichTextBox1.HideScrollBar = true;

            extNumericUpDown1.AutoSize = true;
            extNumericUpDown1.Minimum  = -100;

            commanders = new List <EDDiscovery2.EDCommander>();
            commanders.Add(new EDCommander(-1, "Hidden log", ""));
            commanders.Add(new EDCommander(1, "Robby1", ""));
            commanders.Add(new EDCommander(2, "Robby2", ""));
            commanders.Add(new EDCommander(3, "Robby3", ""));
            commanders.Add(new EDCommander(4, "Robby4", ""));
            commanders.Add(new EDCommander(6, "Robby6", ""));
            commanders.Add(new EDCommander(7, "Robby7", ""));
            commanders.Add(new EDCommander(8, "Robby8", ""));
            commanders.Add(new EDCommander(9, "Robby9", ""));
            commanders.Add(new EDCommander(10, "Robby10", ""));
            commanders.Add(new EDCommander(11, "Robby11", ""));

            extComboBox1.DataSource    = commanders;
            extComboBox1.DisplayMember = "Name";
            extComboBox1.ValueMember   = "Nr";
            extComboBox1.FlatStyle     = FlatStyle.Popup;
            extComboBox1.Repaint();

            commanders2 = new List <EDDiscovery2.EDCommander>();
            commanders2.Add(new EDCommander(-1, "2Hidden log", ""));
            commanders2.Add(new EDCommander(1, "2Robby1", ""));
            commanders2.Add(new EDCommander(2, "2Robby2", ""));
            commanders2.Add(new EDCommander(3, "2Robby3", ""));
            commanders2.Add(new EDCommander(4, "2Robby4", ""));
            commanders2.Add(new EDCommander(6, "2Robby6", ""));
            commanders2.Add(new EDCommander(7, "2Robby7", ""));
            commanders2.Add(new EDCommander(8, "2Robby8", ""));
            commanders2.Add(new EDCommander(9, "2Robby9", ""));
            commanders2.Add(new EDCommander(10, "2Robby10", ""));
            commanders2.Add(new EDCommander(11, "2Robby11", ""));


            extComboBox2.DataSource    = commanders2;
            extComboBox2.DisplayMember = "Name";
            extComboBox2.ValueMember   = "Nr";
            extComboBox2.FlatStyle     = FlatStyle.System;
            extComboBox2.Repaint();

            string tx = "";

            for (int i = 0; i < 20; i++)
            {
                tx = tx.AppendPrePad(i.ToStringInvariant("0000") + ":" + " Here is some text", Environment.NewLine);
            }
            extRichTextBox1.Text = tx;
        }