コード例 #1
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);
        }
コード例 #2
0
        public TestPanelScroll()
        {
            InitializeComponent();
            theme = new ThemeStandard();
            theme.LoadBaseThemes();
            theme.SetThemeByName("Elite Verdana");
            theme.WindowsFrame = true;

            int spacing = 30;

            for (int i = 0; i < 30; i++)
            {
                Label lx = new Label();
                lx.Location = new Point(44 + i % 10, i * spacing);
                lx.Text     = "Label " + i;
                lx.Size     = new Size(200, 20);
                extPanelScroll1.Controls.Add(lx);

                Label lx2 = new Label();
                lx2.Location = new Point(24, i * spacing);
                lx2.Text     = "px" + i;
                lx2.Size     = new Size(20, 20);
                extPanelScroll1.Controls.Add(lx2);

                Panel px = new Panel();
                px.Location              = new Point(5, i * spacing);
                px.BackgroundImage       = Properties.Resources.edlogo24;
                px.Size                  = new Size(24, 24);
                px.BackgroundImageLayout = ImageLayout.Stretch;
                extPanelScroll1.Controls.Add(px);
            }
        }
コード例 #3
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.ApplyToForm(this);
        }
コード例 #4
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());
        }
コード例 #5
0
 public TestListBoxIcon()
 {
     InitializeComponent();
     theme = new ThemeStandard();
     ThemeableFormsInstance.Instance = theme;
     theme.LoadBaseThemes();
     theme.SetThemeByName("Elite EuroCaps");
 }
コード例 #6
0
 public TestVScroll()
 {
     InitializeComponent();
     theme = new ThemeStandard();
     theme.LoadBaseThemes();
     theme.SetThemeByName("Elite Verdana");
     theme.WindowsFrame = true;
     theme.ApplyStd(this);
 }
コード例 #7
0
 public TestExtendedForms()
 {
     InitializeComponent();
     theme = new ThemeStandard();
     ThemeableFormsInstance.Instance = theme;
     theme.LoadBaseThemes();
     theme.SetThemeByName("Elite EuroCaps");
     theme.FontSize = 12;
 }
コード例 #8
0
 public TestPanelScroll2()
 {
     InitializeComponent();
     theme = new ThemeStandard();
     theme.LoadBaseThemes();
     theme.SetThemeByName("Elite Verdana");
     theme.WindowsFrame = true;
     extPanelScroll1.FlowControlsLeftToRight = true;
 }
コード例 #9
0
 public TestConditionUC()
 {
     InitializeComponent();
     theme = new ThemeStandard();
     theme.LoadBaseThemes();
     theme.SetThemeByName("Elite Verdana");
     theme.WindowsFrame = true;
     ExtendedControls.ThemeableFormsInstance.Instance = theme;
 }
コード例 #10
0
        public TestTabControlCustom()
        {
            theme = new ThemeStandard();
            theme.LoadBaseThemes();
            theme.SetThemeByName("Elite Verdana");
            theme.WindowsFrame = true;

            InitializeComponent();
            tabControl1.FlatStyle        = FlatStyle.Popup;
            tabControl1.TabStyle         = new TabStyleAngled();
            tabControl1.AllowDragReorder = true;
        }
コード例 #11
0
        public TestRollUpPanel()
        {
            InitializeComponent();

            theme = new ThemeStandard();
            theme.LoadBaseThemes();
            theme.SetThemeByName("Elite Verdana");
            theme.WindowsFrame = true;

            rolluppanel.HiddenMarkerWidth = -100;
            rolluppanel.SetPinState(true);
        }
コード例 #12
0
        public TestVariousForms()
        {
            InitializeComponent();
            theme = new ThemeStandard();
            ThemeableFormsInstance.Instance = theme;
            theme.LoadBaseThemes();
            //theme.SetThemeByName("Elite EuroCaps");
            theme.SetThemeByName("EDSM");
            theme.FontSize = 12;

            // extButton1_Click(null, null);
        }
コード例 #13
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);
        }
コード例 #14
0
        public TestPanelScroll()
        {
            InitializeComponent();
            theme = new ThemeStandard();
            theme.LoadBaseThemes();

            int spacing = 30;

            for (int i = 0; i < 30; i++)
            {
                Label lx = new Label();
                lx.Location = new Point(44 + i % 10, i * spacing);
                lx.Text     = "Label " + i;
                lx.Size     = new Size(200, 20);
                extPanelScroll1.Controls.Add(lx);

                Label lx2 = new Label();
                lx2.Location = new Point(24, i * spacing);
                lx2.Text     = "px" + i;
                lx2.Size     = new Size(20, 20);
                extPanelScroll1.Controls.Add(lx2);

                Panel px = new Panel();
                px.Location        = new Point(5, i * spacing);
                px.BackgroundImage = Properties.Resources.edlogo24;
                px.Size            = new Size(24, 24);
                extPanelScroll1.Controls.Add(px);
            }

            //for (int i = 0; i < 100; i++)
            //{
            //    Label lx = new Label();
            //    lx.Location = new Point(44 + i % 10, i * 20);
            //    lx.Text = "Label " + i;
            //    lx.Size = new Size(200, 20);
            //    panel1.Controls.Add(lx);

            //    Label lx2 = new Label();
            //    lx2.Location = new Point(24, i * 20);
            //    lx2.Text = "px" + i;
            //    lx2.Size = new Size(20, 20);
            //    panel1.Controls.Add(lx2);

            //    Panel px = new Panel();
            //    px.Location = new Point(5, i * 20);
            //    px.BackgroundImage = Properties.Resources.edlogo24;
            //    px.Size = new Size(24, 24);
            //    panel1.Controls.Add(px);
            //}
        }
コード例 #15
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);
        }
コード例 #16
0
        public TestSplitter()
        {
            theme = new ThemeStandard();
            ThemeableFormsInstance.Instance = theme;
            theme.LoadBaseThemes();
            theme.SetThemeByName("Elite EuroCaps");
            theme.FontSize     = 8.25f;
            theme.WindowsFrame = true;

            InitializeComponent();

            string splitctrl = "H(0.50, U'0,-1', U'1,-1')";       // default is a splitter without any selected panels

            SplitContainer sp = ControlHelpersStaticFunc.SplitterTreeMakeFromCtrlString(new BaseUtils.StringParser(splitctrl), MakeSplitContainer, MakeNode, 0);

            tabPage1.Controls.Add(sp);

            //theme.ApplyStd(this);
        }
コード例 #17
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;
        }
コード例 #18
0
        public TestPanelDGV()
        {
            InitializeComponent();

            theme = new ThemeStandard();
            theme.LoadBaseThemes();
            theme.SetThemeByName("Elite Verdana");
            theme.WindowsFrame = true;

            for (int i = 0; i < 100; i++)
            {
                DataGridViewRow row = dataGridView1.RowTemplate.Clone() as DataGridViewRow;
                row.CreateCells(dataGridView1, i.ToString(), "2", "3");
                dataGridView1.Rows.Add(row);
            }

            System.Diagnostics.Debug.WriteLine("HW {0} ", dataGridView1.RowHeadersWidth);
            for (int i = 0; i < dataGridView1.Columns.Count; i++)
            {
                System.Diagnostics.Debug.WriteLine("Col {0} w {1} ", i, dataGridView1.Columns[i].Width);
            }
        }
コード例 #19
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);
        }
コード例 #20
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);
        }
コード例 #21
0
        public TestMisc()
        {
            InitializeComponent();
            theme = new ThemeStandard();
            theme.LoadBaseThemes();
            theme.SetThemeByName("Elite Verdana");
            theme.WindowsFrame = true;

            for (int i = 0; i < 100; i++)
            {
                extComboBox1.Items.Add("Item " + i);
            }

            extPanelDropDown1.Items = new List <string>()
            {
                "One", "two", "three"
            };

            extTextBoxAutoComplete1.SetAutoCompletor(AutoList);

            System.Drawing.Imaging.ColorMap colormap = new System.Drawing.Imaging.ColorMap();       // any drawn panel with drawn images
            colormap.OldColor = Color.White;                                                        // white is defined as the forecolour
            colormap.NewColor = Color.Orange;
            System.Drawing.Imaging.ColorMap colormap2 = new System.Drawing.Imaging.ColorMap();      // any drawn panel with drawn images
            colormap2.OldColor = Color.FromArgb(222, 222, 222);                                     // white is defined as the forecolour
            colormap2.NewColor = Color.Orange.Multiply(0.8F);
            foreach (Control c in tableLayoutPanel3.Controls)
            {
                if (c is ExtendedControls.ExtCheckBox)
                {
                    (c as ExtendedControls.ExtCheckBox).SetDrawnBitmapRemapTable(new System.Drawing.Imaging.ColorMap[] { colormap, colormap2 });
                }
                else if (c is ExtendedControls.ExtButton)
                {
                    (c as ExtendedControls.ExtButton).SetDrawnBitmapRemapTable(new System.Drawing.Imaging.ColorMap[] { colormap, colormap2 });
                }
            }
        }
コード例 #22
0
        public TestSelectionPanel()
        {
            InitializeComponent();

            theme = new ThemeStandard();
            theme.LoadBaseThemes();
            theme.SetThemeByName("Elite Verdana");
            theme.WindowsFrame = true;


            panelSelectionList1.Items = new List <string>()
            {
                "One", "two", "three"
            };
            panelSelectionList1.SelectedIndexChanged += PanelSelectionList1_SelectedIndexChanged;

            comboBoxCustom1.Items = new List <string>()
            {
                "One", "two", "three", "four"
            };
            comboBoxCustom1.Repaint();

            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);
        }
コード例 #23
0
        public TestPanelScrollOutlining()
        {
            InitializeComponent();

            theme = new ThemeStandard();
            theme.LoadBaseThemes();
            theme.SetThemeByName("Elite Verdana");
            theme.WindowsFrame = true;

            for (int i = 0; i < 100; i++)
            {
                DataGridViewRow row = dataGridView1.RowTemplate.Clone() as DataGridViewRow;
                row.CreateCells(dataGridView1, i.ToString(), "2", "3");
                dataGridView1.Rows.Add(row);

                DataGridViewRow row2 = dataGridView1.RowTemplate.Clone() as DataGridViewRow;
                row2.CreateCells(dataGridView1, "R2-" + i.ToString(), "2", "3");
                dataGridView2.Rows.Add(row2);
            }

            Outlining1.ForeColor = Color.Black;
            Outlining1.Add(5, 22);
            Outlining1.Add(6, 8);
            System.Diagnostics.Debug.Assert(Outlining1.Add(6, 8) == false); // should fail
            Outlining1.Add(8, 12);
            Outlining1.Add(13, 20);
            Outlining1.Add(50, 70);
            Outlining1.Add(40, 80);


            BaseUtils.IntRangeList rl = new BaseUtils.IntRangeList();
            rl.Add(10, 20);
            rl.Add(40, 60);
            rl.Dump();
            rl.Add(20, 30);
            rl.Add(50, 60); // no action, all inside 4-60
            rl.Add(61, 70); // merge up
            rl.Dump();      // 10-30, 40-70
            rl.Add(35, 39);
            rl.Dump();      // 10-30, 35-70
            rl.Add(32, 33);
            rl.Sort();
            rl.Dump();      // 10-30, 32-33, 35-70
            rl.Remove(0, 10);
            rl.Dump();      // 11-30, 32-33, 35-70
            rl.Remove(15, 20);
            rl.Sort();
            rl.Dump();      // 11-14, 21-30, 32-33, 35-70
            rl.Remove(21, 30);
            rl.Dump();      // 11-14, 32-33, 35-70
            rl.Add(34, 34);
            rl.Dump();      // 11-14, 32-70
            rl.Remove(50, 60);
            rl.Dump();      // 11-14, 32-49 61-70
            rl.Remove(50, 60);
            rl.Dump();      // 11-14, 32-49 61-70
            rl.Remove(65, 75);
            rl.Dump();      // 11-14, 32-49 61-64
            rl.Remove(60, 62);
            rl.Dump();      // 11-14, 32-49 63-64
            rl.Remove(60, 63);
            rl.Dump();      // 11-14, 32-49 64-64
            rl.Remove(60, 64);
            rl.Dump();      // 11-14, 32-49
            rl.Remove(32, 64);
            rl.Dump();      // 11-14
            rl.Add(32, 49);
            rl.Remove(30, 64);
            rl.Dump();      // 11-14
            rl.Add(32, 49);
            rl.Add(100, 200);
            rl.Remove(1, 300);
            rl.Dump();      // nothing
            rl.Add(32, 49);
            rl.Add(100, 200);
            rl.Remove(34, 300);
            rl.Dump();      // 32-33
            rl.Add(32, 49);
            rl.Add(60, 70);
            rl.Add(100, 200);
            rl.Remove(34, 150);
            rl.Dump();          // 32-33 151-200
            rl.Remove(32, 200); // removes both start and end block, which are different
            rl.Dump();          // 0
            rl.Add(32, 33);
            rl.Add(151, 200);
            rl.Remove(31, 201);        // 0 uses the tidy up routine at the end
            rl.Add(32, 33);
            rl.Add(151, 200);
            rl.Add(31, 201); // subsume ranges..
            rl.Dump();       // 31-201
        }
コード例 #24
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;
        }
コード例 #25
0
        public TestTabStrip()
        {
            theme = new ThemeStandard();
            theme.LoadBaseThemes();
            theme.SetThemeByName("Elite Verdana");
            theme.WindowsFrame = true;
            theme.FontSize     = 15;

            InitializeComponent();
            tabStrip1.ImageList = new Bitmap[] {
                DialogTest.Properties.Resources.galaxy_red, DialogTest.Properties.Resources.galaxy_gray,
                DialogTest.Properties.Resources.galaxy_black, DialogTest.Properties.Resources.galaxy_gray,
                DialogTest.Properties.Resources.galaxy_black, DialogTest.Properties.Resources.galaxy_gray,
                DialogTest.Properties.Resources.galaxy_black, DialogTest.Properties.Resources.galaxy_gray,
                DialogTest.Properties.Resources.galaxy_black, DialogTest.Properties.Resources.galaxy_gray,
                DialogTest.Properties.Resources.galaxy_black, DialogTest.Properties.Resources.galaxy_gray,
                DialogTest.Properties.Resources.galaxy_white, DialogTest.Properties.Resources.galaxy_gray,
                DialogTest.Properties.Resources.galaxy_gray, DialogTest.Properties.Resources.galaxy,
                DialogTest.Properties.Resources.galaxy_gray,
                DialogTest.Properties.Resources.galaxy_white,
                DialogTest.Properties.Resources.galaxy_gray,
                DialogTest.Properties.Resources.galaxy_white,
            };
            tabStrip1.TextList = new string[] { "icon 0", "icon 1",
                                                "icon 2", "icon 3",
                                                "icon 4", "icon 5",
                                                "icon 6", "icon 7",
                                                "icon 8", "icon 9",
                                                "icon 10", "icon 11",
                                                "icon 12", "icon 13",
                                                "icon 14", "icon 15",
                                                "icon 16", "icon 17",
                                                "icon 18", "icon 19", };

            tabStrip1.EmptyColor = Color.Red;
            tabStrip1.StripMode  = ExtendedControls.TabStrip.StripModeType.StripTop;
            tabStrip1.SetControlText("Ctext1");
            tabStrip1.OnPopOut         += (t, i) => System.Diagnostics.Debug.WriteLine("Command pop out" + t + " " + i);
            tabStrip1.OnCreateTab      += OnCreateTab;
            tabStrip1.SelectedBackColor = Color.Green;

            tabStrip2.ImageList = new Bitmap[] {
                DialogTest.Properties.Resources.galaxy_red,
                DialogTest.Properties.Resources.galaxy_gray,
                DialogTest.Properties.Resources.galaxy_gray,
                DialogTest.Properties.Resources.galaxy_white,
                DialogTest.Properties.Resources.galaxy_gray,
                DialogTest.Properties.Resources.galaxy_white,
            };
            tabStrip2.TextList = new string[] { "icon 0", "icon 1",
                                                "icon 2", "icon 3",
                                                "icon 4", "icon 5", };

            tabStrip2.StripMode = ExtendedControls.TabStrip.StripModeType.StripTop;
            tabStrip2.SetControlText("Ctext2");
            tabStrip2.OnPopOut    += (t, i) => System.Diagnostics.Debug.WriteLine("2 Command pop out" + t + " " + i);
            tabStrip2.OnCreateTab += OnCreateTab;

            tabStrip3.ImageList = new Bitmap[] {
                DialogTest.Properties.Resources.galaxy_red,
                DialogTest.Properties.Resources.galaxy_gray,
                DialogTest.Properties.Resources.galaxy_gray,
                DialogTest.Properties.Resources.galaxy_white,
                DialogTest.Properties.Resources.galaxy_gray,
                DialogTest.Properties.Resources.galaxy_white,
            };
            tabStrip3.TextList = new string[] { "3icon 0", "3icon 1",
                                                "3icon 2", "3icon 3",
                                                "3icon 4", "3icon 5", };

            tabStrip3.StripMode = ExtendedControls.TabStrip.StripModeType.ListSelection;
            tabStrip3.SetControlText("Ctext3");
            tabStrip3.OnPopOut    += (t, i) => System.Diagnostics.Debug.WriteLine("3 Command pop out" + t + " " + i);
            tabStrip3.OnCreateTab += OnCreateTab;

            tabStrip4.ImageList = new Bitmap[] {
                DialogTest.Properties.Resources.galaxy_red,
                DialogTest.Properties.Resources.galaxy_gray,
                DialogTest.Properties.Resources.galaxy_gray,
                DialogTest.Properties.Resources.galaxy_white,
                DialogTest.Properties.Resources.galaxy_gray,
                DialogTest.Properties.Resources.galaxy_white,
            };
            tabStrip4.TextList = new string[] { "4icon 0", "4icon 1",
                                                "4icon 2", "4icon 3",
                                                "4icon 4", "4icon 5", };

            tabStrip4.StripMode = ExtendedControls.TabStrip.StripModeType.StripTopOpen;
            tabStrip4.SetControlText("Ctext3");
            tabStrip4.OnPopOut         += (t, i) => System.Diagnostics.Debug.WriteLine("4 Command pop out" + t + " " + i);
            tabStrip4.OnCreateTab      += OnCreateTab;
            tabStrip4.SelectedBackColor = Color.Green;
            tabStrip4.EmptyColor        = Color.Pink;


            ListViewItem item1 = new ListViewItem("item1", 0);

            // Place a check mark next to the item.
            item1.Checked = true;
            item1.SubItems.Add("1");
            item1.SubItems.Add("2");
            item1.SubItems.Add("3");
            ListViewItem item2 = new ListViewItem("item2", 1);

            item2.SubItems.Add("4");
            item2.SubItems.Add("5");
            item2.SubItems.Add("6");
            ListViewItem item3 = new ListViewItem("item3", 0);

            // Place a check mark next to the item.
            item3.Checked = true;
            item3.SubItems.Add("7");
            item3.SubItems.Add("8");
            item3.SubItems.Add("9");

            // Create columns for the items and subitems.
            // Width of -2 indicates auto-size.
            listView1.Columns.Add("Item Column", -2, HorizontalAlignment.Left);
            listView1.Columns.Add("Column 2", -2, HorizontalAlignment.Left);
            listView1.Columns.Add("Column 3", -2, HorizontalAlignment.Left);
            listView1.Columns.Add("Column 4", -2, HorizontalAlignment.Center);

            //Add the items to the ListView.
            listView1.Items.AddRange(new ListViewItem[] { item1, item2, item3 });

            // Create two ImageList objects.
            ImageList imageListSmall = new ImageList();
            ImageList imageListLarge = new ImageList();

            // Initialize the ImageList objects with bitmaps.
            imageListSmall.Images.Add(DialogTest.Properties.Resources.galaxy_gray);
            imageListSmall.Images.Add(DialogTest.Properties.Resources.galaxy_black);
            imageListLarge.Images.Add(DialogTest.Properties.Resources.galaxy_gray);
            imageListLarge.Images.Add(DialogTest.Properties.Resources.galaxy_gray);

            //Assign the ImageList objects to the ListView.
            listView1.LargeImageList = imageListLarge;
            listView1.SmallImageList = imageListSmall;

            // Add the ListView to the control
            List <string> lv = new List <string>()
            {
                "one", "two", "three", "four"
            };
            List <Image> lvimages = new List <Image>()
            {
                DialogTest.Properties.Resources.galaxy_gray, DialogTest.Properties.Resources.galaxy_black, DialogTest.Properties.Resources.galaxy_gray, DialogTest.Properties.Resources.galaxy_black
            };

            listControlCustom1.Items     = lv;
            listControlCustom1.BackColor = Color.Black;
            listControlCustom1.ForeColor = Color.Red;

            listControlCustom2.Items      = lv;
            listControlCustom2.BackColor  = Color.Black;
            listControlCustom2.ForeColor  = Color.Red;
            listControlCustom2.FlatStyle  = FlatStyle.Popup;
            listControlCustom2.ImageItems = lvimages;

            listControlCustom3.Items      = lv;
            listControlCustom3.ImageItems = lvimages;


            listBox1.Items.AddRange(lv.ToArray());
        }