コード例 #1
0
 public TabStyleRoundedProvider(CustomTabControl tabControl) : base(tabControl)
 {
     _FocusTrack = true;
     _Overlap    = 0;
     _Radius     = 12;
     Padding     = new Point(10, 3);
 }
コード例 #2
0
 public TabStyleRoundedProvider(CustomTabControl tabControl)
     : base(tabControl)
 {
     this._Radius = 10;
     //	Must set after the _Radius as this is used in the calculations of the actual padding
     this.Padding = new Point(6, 3);
 }
コード例 #3
0
        protected TabStyleProvider(CustomTabControl tabControl)
        {
            _TabControl = tabControl;

            _BorderColor         = Color.Empty;
            _BorderColorSelected = Color.Empty;
            _FocusColor          = Color.Orange;

            if (_TabControl.RightToLeftLayout)
            {
                _ImageAlign = ContentAlignment.MiddleRight;
            }
            else
            {
                _ImageAlign = ContentAlignment.MiddleLeft;
            }

            HotTrack = true;

            // Must set after the _Overlap as this is used in the calculations of the actual padding
            _Overlap    = 0;
            _FocusTrack = false;
            _Radius     = 2;
            _Opacity    = 1;
            Padding     = new Point(6, 3);
        }
コード例 #4
0
 public TabStyleVisualStudioProvider(CustomTabControl tabControl) : base(tabControl)
 {
     _FocusTrack = true;
     _Overlap    = 0;
     _Radius     = 20;
     Padding     = new Point(10, 3);
 }
コード例 #5
0
        public static TabStyleProvider CreateProvider(CustomTabControl tabControl)
        {
            TabStyleProvider provider;

            // Depending on the display style of the tabControl generate an appropriate provider
            switch (tabControl.DisplayStyle)
            {
            case TabStyle.None:
                provider = new TabStyleNoneProvider(tabControl);
                break;

            case TabStyle.Default:
                provider = new TabStyleDefaultProvider(tabControl);
                break;

            case TabStyle.Dark:
                provider = new TabStyleDarkProvider(tabControl);
                break;

            case TabStyle.Rounded:
                provider = new TabStyleRoundedProvider(tabControl);
                break;

            case TabStyle.VisualStudio:
                provider = new TabStyleVisualStudioProvider(tabControl);
                break;

            default:
                provider = new TabStyleDefaultProvider(tabControl);
                break;
            }

            provider._Style = tabControl.DisplayStyle;
            return(provider);
        }
        public TabStyleVisualStudioProvider(CustomTabControl tabControl) : base(tabControl)
        {
            this._ImageAlign = ContentAlignment.MiddleRight;
            this._Overlap    = 7;

            //	Must set after the _Radius as this is used in the calculations of the actual padding
            this.Padding = new Point(14, 1);
        }
コード例 #7
0
        public TabStyleIE8Provider(CustomTabControl tabControl) : base(tabControl)
        {
            this._Radius            = 3;
            this._ShowTabCloser     = true;
            this._CloserColorActive = Color.Red;

            //	Must set after the _Radius as this is used in the calculations of the actual padding
            this.Padding = new Point(6, 5);
        }
コード例 #8
0
        public TabStyleAngledProvider(CustomTabControl tabControl) : base(tabControl)
        {
            _ImageAlign = ContentAlignment.MiddleRight;
            _Overlap    = 7;
            _Radius     = 10;

            //	Must set after the _Radius as this is used in the calculations of the actual padding
            Padding = new Point(10, 3);
        }
コード例 #9
0
        public TabStyleVisualStudioProvider(CustomTabControl tabControl)
            : base(tabControl)
        {
            this._ImageAlign = ContentAlignment.MiddleRight;
            this._Overlap = 7;

            //	Must set after the _Radius as this is used in the calculations of the actual padding
            this.Padding = new Point(14, 1);
        }
コード例 #10
0
        public TabStyleChromeProvider(CustomTabControl tabControl) : base(tabControl)
        {
            this._Overlap           = 16;
            this._Radius            = 16;
            this._ShowTabCloser     = true;
            this._CloserColorActive = Color.White;

            //	Must set after the _Radius as this is used in the calculations of the actual padding
            this.Padding = new Point(15, 5);
        }
コード例 #11
0
 public TabStyleFlatProvider(CustomTabControl tabControl) : base(tabControl)
 {
     this._Radius    = 1;
     this._Overlap   = 1;
     this.HotTrack   = true;
     this.FocusTrack = true;
     this.Padding    = new Point(10, 3); //	Must set after the _Radius
     EventManager.AddEventHandler(this, EventType.ApplyTheme);
     this.RefreshColors();
 }
コード例 #12
0
        public TabStyleIE8Provider(CustomTabControl tabControl)
            : base(tabControl)
        {
            this._Radius = 3;
            this._ShowTabCloser = true;
            this._CloserColorActive = Color.Red;

            //	Must set after the _Radius as this is used in the calculations of the actual padding
            this.Padding = new Point(6, 5);
        }
コード例 #13
0
        public TabStyleChromeProvider(CustomTabControl tabControl)
            : base(tabControl)
        {
            this._Overlap = 16;
            this._Radius = 16;
            this._ShowTabCloser = true;
            this._CloserColorActive = Color.White;

            //	Must set after the _Radius as this is used in the calculations of the actual padding
            this.Padding = new Point(7, 5);
        }
コード例 #14
0
        public static TabStyleProvider CreateProvider(CustomTabControl tabControl)
        {
            TabStyleProvider provider;

            //	Depending on the display style of the tabControl generate an appropriate provider.
            switch (tabControl.DisplayStyle)
            {
            case TabStyle.None:
                provider = new TabStyleNoneProvider(tabControl);
                break;

            case TabStyle.Default:
                provider = new TabStyleDefaultProvider(tabControl);
                break;

            case TabStyle.Angled:
                provider = new TabStyleAngledProvider(tabControl);
                break;

            case TabStyle.Rounded:
                provider = new TabStyleRoundedProvider(tabControl);
                break;

            case TabStyle.VisualStudio:
                provider = new TabStyleVisualStudioProvider(tabControl);
                break;

            case TabStyle.Chrome:
                provider = new TabStyleChromeProvider(tabControl);
                break;

            case TabStyle.IE8:
                provider = new TabStyleIE8Provider(tabControl);
                break;

            case TabStyle.VS2010:
                provider = new TabStyleVS2010Provider(tabControl);
                break;

            // HACK: Added
            case TabStyle.Flat:
                provider = new TabStyleFlatProvider(tabControl);
                break;

            default:
                provider = new TabStyleDefaultProvider(tabControl);
                break;
            }

            provider._Style = tabControl.DisplayStyle;
            return(provider);
        }
コード例 #15
0
        public TabStyleVS2010Provider(CustomTabControl tabControl) : base(tabControl)
        {
            this._Radius            = 3;
            this._ShowTabCloser     = true;
            this._CloserColorActive = Color.Black;
            this._CloserColor       = Color.FromArgb(117, 99, 61);
            this._TextColor         = Color.White;
            this._TextColorDisabled = Color.WhiteSmoke;
            this._BorderColor       = Color.Transparent;
            this._BorderColorHot    = Color.FromArgb(155, 167, 183);

            //	Must set after the _Radius as this is used in the calculations of the actual padding
            this.Padding = new Point(6, 5);
        }
コード例 #16
0
        public TabStyleVS2010Provider(CustomTabControl tabControl)
            : base(tabControl)
        {
            this._Radius = 3;
            this._ShowTabCloser = true;
            this._CloserColorActive = Color.Black;
            this._CloserColor = Color.FromArgb(117, 99, 61);
            this._TextColor = Color.White;
            this._TextColorDisabled = Color.WhiteSmoke;
            this._BorderColor = Color.Transparent;
            this._BorderColorHot = Color.FromArgb(155, 167, 183);

            //	Must set after the _Radius as this is used in the calculations of the actual padding
            this.Padding = new Point(6, 5);
        }
コード例 #17
0
ファイル: TabStyleProvider.cs プロジェクト: svn2github/eztx
        protected TabStyleProvider(CustomTabControl tabControl)
        {
            this._TabControl = tabControl;

            this._BorderColor = Color.Empty;
            this._BorderColorSelected = Color.Empty;
            this._FocusColor = Color.Orange;

            if (this._TabControl.RightToLeftLayout){
                this._ImageAlign = ContentAlignment.MiddleRight;
            } else {
                this._ImageAlign = ContentAlignment.MiddleLeft;
            }

            this.HotTrack = true;

            //	Must set after the _Overlap as this is used in the calculations of the actual padding
            this.Padding = new Point(6,3);
        }
コード例 #18
0
        public TabStyleDarkProvider(CustomTabControl tabControl) : base(tabControl)
        {
            _BorderColor         = Color.FromArgb(96, 96, 96);
            _BorderColorHot      = Color.FromArgb(96, 96, 96);
            _BorderColorSelected = Color.FromArgb(96, 96, 96);
            _TextColor           = Color.FromArgb(153, 153, 153);
            _TextColorSelected   = Color.FromArgb(152, 196, 232);
            _TextColorDisabled   = Color.FromArgb(96, 96, 96);
            _CloserColor         = Color.White;
            _CloserColorActive   = Color.FromArgb(152, 196, 232);

            _HotTrack   = false;
            _FocusTrack = false;

            _Radius  = 10;
            _Overlap = 0;
            _Opacity = 1F;

            _Padding = new Point(6, 3);
        }
コード例 #19
0
        protected TabStyleProvider(CustomTabControl tabControl)
        {
            this._TabControl = tabControl;

            this._BorderColor         = Color.Empty;
            this._BorderColorSelected = Color.Empty;
            this._FocusColor          = Color.Orange;

            if (this._TabControl.RightToLeftLayout)
            {
                this._ImageAlign = ContentAlignment.MiddleRight;
            }
            else
            {
                this._ImageAlign = ContentAlignment.MiddleLeft;
            }

            this.HotTrack = true;

            //	Must set after the _Overlap as this is used in the calculations of the actual padding
            this.Padding = new Point(6, 3);
        }
コード例 #20
0
 public TabStyleDefaultProvider(CustomTabControl tabControl) : base(tabControl)
 {
     _FocusTrack = true;
     _Radius     = 2;
 }
コード例 #21
0
ファイル: MultiplayerHandler.cs プロジェクト: Jecral/Football
 /// <summary>
 /// Creates the CustomTabControl.
 /// </summary>
 /// <returns></returns>
 private void CreateChatTabControl()
 {
     CustomTabControl customTabControl = new CustomTabControl();
     customTabControl.DisplayStyle = TabStyle.VS2010;
     customTabControl.TabClosing += customTabControl_TabClosing;
     CurrentChats = customTabControl;
 }
コード例 #22
0
 public TabStyleRoundedProvider(CustomTabControl tabControl) : base(tabControl)
 {
     _Radius = 10;
     //	Must set after the _Radius as this is used in the calculations of the actual padding
     Padding = new Point(6, 3);
 }
コード例 #23
0
        private void BuildView()
        {
            this.SuspendLayout();
            var tabs = new CustomTabControl() { Dock = DockStyle.Fill };
            tabs.DisplayStyleProvider = new TabStyleVisualStudioProvider(tabs) { ShowTabCloser = true };
            tabs.TabClosing += (sender, args) => ((CustomTab)args.TabPage).RaiseClosingSafe(args);

            var startTab = new CustomTab() { Text = "Classifiers " }; // the ending space is necessary for some reason
            startTab.Closing += (sender, args) =>
            {
                args.Cancel = true;
                if (GUIUtils.IsUserSure("Reset classifiers?"))
                {
                    this.classifierTabs.Clear();
                    this.Controls.Remove(tabs);
                    tabs.Dispose();
                    this.BuildView();
                    this.OnSizeChanged(EventArgs.Empty);
                }
            };

            // classifier list
            var classifierList = new CheckedListBox() { Dock = DockStyle.Fill, CheckOnClick = true };
            classifierList.AddContextMenu();
            Action<ClassificationScheme> addClassifier = (scheme) =>
            {
                // get unique name if necessary
                string baseName = string.IsNullOrWhiteSpace(scheme.Settings.Name)
                    ? "new classifier"
                    : scheme.Settings.Name;
                if (!this.classifierTabs.Select(ct => ct.Text).Contains(baseName))
                    scheme.Settings.Name = baseName;
                else
                {
                    int i = 1;
                    while (this.classifierTabs
                        .Select(ct => ct.Text.ToLower())
                        .Contains(string.Format("{0} {1}", baseName, i)))
                        i++;
                    scheme.Settings.Name = string.Format("{0} {1}", baseName, i);
                }

                // create the tab
                var classifierTab = new ClassificationSchemeTab(scheme);
                classifierTab.TextChanged += (sender, args) => classifierList.Invalidate();
                classifierTab.Closing += (sender, args) =>
                {
                    this.classifierTabs.Remove(classifierTab);
                    classifierList.Items.Remove(classifierTab);
                };

                this.classifierTabs.Add(classifierTab);
                tabs.TabPages.Add(classifierTab);
                classifierList.Items.Add(classifierTab, true);
            };
            this.getSelectedClassifiers = () => classifierList.CheckedItems.Cast<ClassificationSchemeTab>().Select(cst => cst.ClassificationScheme).ToIArray();

            // buttons
            var buttonTable = GUIUtils.CreateButtonTable(Direction.Horizontal, DockStyle.Bottom,
            GUIUtils.CreateFlatButton("New", (b) =>
            {
                var classifier = classifierList.Items.Count > 0
                    ? ((ClassificationSchemeTab)(classifierList.SelectedItem ?? classifierList.Items[0])).ClassificationScheme
                    : new ClassificationScheme();

                classifier.Settings.Name = string.Empty;
                addClassifier(classifier);
            }, startTab.ToolTip, "Create a new classifier"),
            GUIUtils.CreateFlatButton("Load", (b) =>
            {
                if (this.openDialog.ShowDialog() != DialogResult.OK)
                    return;

                ClassificationScheme scheme;
                foreach (var path in this.openDialog.FileNames)
                {
                    if (Utils.TryDeserializeFile(this.openDialog.FileName, out scheme))
                        addClassifier(scheme);
                    else
                        GUIUtils.Alert("Failed to load classifier info from " + path, MessageBoxIcon.Error);
                }
            }, startTab.ToolTip, "Load a previously saved classifier settings file"));

            // artifact detection config
            var artifactDetectionPanel = new ConfigurationPanel(this.artifactDetection);
            artifactDetectionPanel.PropertyChanged += args => this.artifactDetection.SetProperty(args.Property, args.Getter());

            // artifact detection label
            var artifactDetectionLabel = new Label() { Dock = DockStyle.Bottom, TextAlign = ContentAlignment.MiddleCenter, Visible = false };
            IEnumerable<EEGDataEntry> empty = new EEGDataEntry[0], entries = empty;
            var listener = new EEGDataListener(GUIUtils.GUIInvoker,
                source => artifactDetectionLabel.Visible = true,
                data =>
                {
                    if (!this.artifactDetection.UseArtifactDetection)
                    {
                        artifactDetectionLabel.Visible = false;
                        entries = empty;
                        return;
                    }

                    artifactDetectionLabel.Visible = true;
                    entries = entries.Concat(data);
                    if (data.LastItem().TimeStamp - entries.First().TimeStamp >= 500)
                    {
                        if (this.artifactDetection.HasMotionArtifact(entries))
                        {
                            artifactDetectionLabel.Text = "Motion artifact detected!";
                            artifactDetectionLabel.BackColor = Color.Red;
                            artifactDetectionLabel.ForeColor = Color.White;
                            if (this.artifactDetection.Beep)
                                GUIUtils.GUIInvoker.BeginInvoke(SystemSounds.Beep.Play);
                        }
                        else
                        {
                            artifactDetectionLabel.Text = "No artifacts detected";
                            artifactDetectionLabel.BackColor = Color.Green;
                            artifactDetectionLabel.ForeColor = Color.Black;
                        }

                        entries = empty;
                    }
                },
                source => artifactDetectionLabel.Visible = false);
            // avoid using the gui invoker before the handle has been created
            this.HandleCreated += (sender, args) => EmotivDataSource.Instance.AddListener(listener);
            artifactDetectionLabel.Disposed += (sender, args) => { EmotivDataSource.Instance.RemoveListener(listener); listener.Dispose(); };

            // right half
            var rightPanel = new Panel() { Dock = DockStyle.Fill };
            rightPanel.Controls.Add(classifierList);
            rightPanel.Controls.Add(buttonTable);

            // left half
            var leftPanel = new Panel() { Dock = DockStyle.Fill };
            leftPanel.Controls.Add(artifactDetectionPanel);
            leftPanel.Controls.Add(artifactDetectionLabel);

            var cols = GUIUtils.CreateTable(new double[] { .5, .5 }, Direction.Horizontal);
            cols.Controls.Add(rightPanel, 0, 0);
            cols.Controls.Add(leftPanel, 1, 0);
            startTab.Controls.Add(cols);

            tabs.TabPages.Add(startTab);
            this.Controls.Add(tabs);
            this.ResumeLayout(false);
        }
コード例 #24
0
 public TabStyleNoneProvider(CustomTabControl tabControl) : base(tabControl)
 {
 }
コード例 #25
0
ファイル: TabStyleProvider.cs プロジェクト: svn2github/eztx
        public static TabStyleProvider CreateProvider(CustomTabControl tabControl)
        {
            TabStyleProvider provider;

            //	Depending on the display style of the tabControl generate an appropriate provider.
            switch (tabControl.DisplayStyle) {
                case TabStyle.None:
                    provider = new TabStyleNoneProvider(tabControl);
                    break;

                case TabStyle.Default:
                    provider = new TabStyleDefaultProvider(tabControl);
                    break;

                case TabStyle.Angled:
                    provider = new TabStyleAngledProvider(tabControl);
                    break;

                case TabStyle.Rounded:
                    provider = new TabStyleRoundedProvider(tabControl);
                    break;

                case TabStyle.VisualStudio:
                    provider = new TabStyleVisualStudioProvider(tabControl);
                    break;

                case TabStyle.Chrome:
                    provider = new TabStyleChromeProvider(tabControl);
                    break;

                case TabStyle.IE8:
                    provider = new TabStyleIE8Provider(tabControl);
                    break;

                case TabStyle.VS2010:
                    provider = new TabStyleVS2010Provider(tabControl);
                    break;

                default:
                    provider = new TabStyleDefaultProvider(tabControl);
                    break;
            }

            provider._Style = tabControl.DisplayStyle;
            return provider;
        }
コード例 #26
0
        void InitTabs()
        {
            m_TabControl = new CustomTabControl();
            m_TabControl.DisplayStyle = TabStyle.VS2010;
            m_TabControl.DisplayStyleProvider.ShowTabCloser = false;
            m_TabControl.DisplayStyleProvider.Padding = new Point(10,8);
            m_TabControl.DisplayStyleProvider.BorderColorHot = Color.FromArgb(100, 100,255);
            m_TabControl.Font = new Font(Constants.FONTNAME, 8,FontStyle.Bold);
            m_TabControl.Location = new Point(0, 0);
            //m_TabControl.Appearance = TabAppearance.Buttons;
            //m_TabControl.Alignment = TabAlignment.Bottom;
            TabPage page1 = new TabPage("New Payment");
            TabPage page2 = new TabPage("History");
            TabPage page3 = new TabPage("Address Book");
            TabPage page4 = new TabPage("Exchange");
            TabPage page5 = new TabPage("Options");
            TabPage page6 = new TabPage("Help");
            m_TabControl.TabPages.Add(page1);
            m_TabControl.TabPages.Add(page2);
            m_TabControl.TabPages.Add(page3);
            m_TabControl.TabPages.Add(page4);
            m_TabControl.TabPages.Add(page5);
            m_TabControl.TabPages.Add(page6);

            DoExchangePage();

            m_SendButton = new Button();
            m_SendButton.Text = "Send";
            m_SendButton.Font = new Font(Constants.FONTNAME, 8, FontStyle.Bold);
            m_SendButton.Click += sendFunds;

            m_CreatePaymentCodeButton = new Button();
            m_CreatePaymentCodeButton.Text = "Create Payment Code";
            m_CreatePaymentCodeButton.Font = new Font(Constants.FONTNAME, 8, FontStyle.Bold);
            m_CreatePaymentCodeButton.Click += createPaymentCode;

            ToolTip ToolTip1 = new System.Windows.Forms.ToolTip();
            ToolTip1.SetToolTip(m_CreatePaymentCodeButton, "Enter an address, an amount and some info then\nclick this button to create a payment code.\n\nUsing a payment code you can give exact payment\ndetails to people instead of just an address.");

            m_SendTotalLabel = new Label();
            m_SendTotalLabel.Text = "Total:";
            m_SendTotalLabel.Font = new Font(Constants.FONTNAME, 8, FontStyle.Bold);
            m_SendTotalLabel.TextAlign = ContentAlignment.MiddleRight;
            m_SendTotalAmount = new TextBox();
            m_SendTotalAmount.ReadOnly = true;
            m_SendTotalAmount.Font = new Font(Constants.FONTNAME, 8, FontStyle.Bold);
            m_SendTotalAmount.Text = "0";
            m_SendTotalAmount.TextAlign = HorizontalAlignment.Center;

            m_SendFeeLabel = new Label();
            m_SendFeeLabel.Text = "Fee:";
            m_SendFeeLabel.Font = new Font(Constants.FONTNAME, 8, FontStyle.Bold);
            m_SendFeeLabel.TextAlign = ContentAlignment.MiddleRight;
            m_SendFeeAmount = new TextBox();
            m_SendFeeAmount.ReadOnly = true;
            m_SendFeeAmount.Font = new Font(Constants.FONTNAME, 8, FontStyle.Bold);
            m_SendFeeAmount.Text = "$0.005";
            m_SendFeeAmount.TextAlign = HorizontalAlignment.Center;

            m_SendFromLabel = new Label();
            m_SendFromLabel.Text = "Send From:";
            m_SendFromLabel.Font = new Font(Constants.FONTNAME, 8, FontStyle.Bold);
            m_SendFromLabel.TextAlign = ContentAlignment.MiddleRight;

            m_SendFrom = new ComboBox();
            m_SendFrom.DropDownStyle = ComboBoxStyle.DropDownList;
            m_SendFrom.Font = new Font(Constants.FONTNAME, 8, FontStyle.Bold);
            m_SendFrom.SelectedIndexChanged += onFromChange;

            m_SendFromAmount = new TextBox();
            m_SendFromAmount.ReadOnly = true;
            m_SendFromAmount.Font = new Font(Constants.FONTNAME, 8, FontStyle.Bold);
            m_SendFromAmount.TextAlign = HorizontalAlignment.Center;

            m_TXInfoLabel = new Label();
            m_TXInfoLabel.Text = "Extra Info:";
            m_TXInfoLabel.Font = new Font(Constants.FONTNAME, 8, FontStyle.Bold);
            m_TXInfoLabel.TextAlign = ContentAlignment.MiddleRight;

            m_TXInfo = new TextBox();
            m_TXInfo.Font = new Font(Constants.FONTNAME, 8, FontStyle.Bold);
            m_TXInfo.TextAlign = HorizontalAlignment.Center;
            m_TXInfo.TextChanged += info_textchange;

            m_SendToLabel = new Label();
            m_SendToLabel.Text = "Send To:";
            m_SendToLabel.Font = new Font(Constants.FONTNAME, 8, FontStyle.Bold);
            m_SendToLabel.TextAlign = ContentAlignment.MiddleRight;

            m_SendTo = new ComboBox();
            m_SendTo.DropDownStyle = ComboBoxStyle.DropDown;
            m_SendTo.Font = new Font(Constants.FONTNAME, 8, FontStyle.Bold);
            m_SendTo.TextChanged += sendto_textchange;

            m_SendToAmount = new TextBox();
            m_SendToAmount.Font = new Font(Constants.FONTNAME, 8, FontStyle.Bold);
            m_SendToAmount.TextAlign = HorizontalAlignment.Center;
            m_SendToAmount.KeyPress += sendamount_KeyPress;

            m_TabControl.TabPages[0].Controls.Add(m_SendFromLabel);
            m_TabControl.TabPages[0].Controls.Add(m_SendFrom);
            m_TabControl.TabPages[0].Controls.Add(m_SendFromAmount);
            m_TabControl.TabPages[0].Controls.Add(m_SendToLabel);
            m_TabControl.TabPages[0].Controls.Add(m_SendTo);
            m_TabControl.TabPages[0].Controls.Add(m_SendToAmount);
            m_TabControl.TabPages[0].Controls.Add(m_TXInfoLabel);
            m_TabControl.TabPages[0].Controls.Add(m_TXInfo);

            m_TabControl.TabPages[0].Controls.Add(m_CreatePaymentCodeButton);
            m_TabControl.TabPages[0].Controls.Add(m_SendButton);
            m_TabControl.TabPages[0].Controls.Add(m_SendTotalLabel);
            m_TabControl.TabPages[0].Controls.Add(m_SendTotalAmount);
            m_TabControl.TabPages[0].Controls.Add(m_SendFeeLabel);
            m_TabControl.TabPages[0].Controls.Add(m_SendFeeAmount);

            //GradientPanel aboutbg = new GradientPanel(Color.FromArgb(96, 96, 96), Color.FromArgb(0, 0, 0),2);
            //aboutbg.Dock = DockStyle.Fill;

            Bitmap bmp = new Bitmap(System.Reflection.Assembly.GetEntryAssembly().GetManifestResourceStream("MicroCash.Client.Thin.pngs.logo.png"));
            m_AboutLogo = new PictureBox();
            m_AboutLogo.BackColor = Color.Transparent;
            m_AboutLogo.Location = new Point(20, 20);
            m_AboutLogo.Size = new Size(450, 114);
            m_AboutLogo.Image = bmp;
            page6.Controls.Add(m_AboutLogo);
            //page5.Controls.Add(aboutbg);

            m_TXDetails = new ListView();
            m_TXDetails.Size = new Size(0, 0);
            m_TXDetails.View = System.Windows.Forms.View.Details;
            m_TXDetails.FullRowSelect = true;
            //m_TXDetails.Anchor = AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top | AnchorStyles.Bottom;
            m_TXDetails.Dock = DockStyle.Fill;
            m_TXDetails.Columns.Add("Account");
            m_TXDetails.Columns.Add("Amount");
            m_TXDetails.Columns.Add("Info");
            m_TXDetails.Columns.Add("Time");

            m_TXDetails.Columns[0].Width = 170;
            m_TXDetails.Columns[1].Width = 130;
            m_TXDetails.Columns[2].Width = 200;
            m_TXDetails.Columns[3].Width = 200;
            page2.Controls.Add(m_TXDetails);

            m_AddressBook = new ListView();
            m_AddressBook.Size = new Size(0, 0);
            m_AddressBook.View = System.Windows.Forms.View.Details;
            m_AddressBook.FullRowSelect = true;
            m_AddressBook.Dock = DockStyle.Fill;
            m_AddressBook.Columns.Add("Name");
            m_AddressBook.Columns.Add("Address");

            m_AddressBook.Columns[0].Width = 250;
            m_AddressBook.Columns[1].Width = 250;
            page3.Controls.Add(m_AddressBook);

            //m_HelpBrowse = new WebBrowser();
            //m_HelpBrowse.Dock = DockStyle.Fill;
            //m_HelpBrowse.Navigate("http://microcash.org");
            //page5.Controls.Add(m_HelpBrowse);

            m_RightPanel.Controls.Add(m_TabControl);
        }
コード例 #27
0
ファイル: ChopperForm.cs プロジェクト: duncanwerner/chopper
        void Form1_Load(object sender, EventArgs e)
        {
            labelImage.Width = MAIN_IMAGE_WIDTH;
            labelImage.Height = MAIN_IMAGE_HEIGHT;

            ctc = new CustomTabControl();
            tabControl1.Parent.Controls.Add(ctc);

            ctc.Left = tabControl1.Left;
            ctc.Top = tabControl1.Top;
            ctc.Width = tabControl1.Width;
            ctc.Height = tabControl1.Height;
            ctc.Anchor = tabControl1.Anchor;
            ctc.Alignment = tabControl1.Alignment;

            foreach (TabPage tp in tabControl1.TabPages)
            {
                ctc.TabPages.Add(tp);
            }

            tabControl1.Parent.Controls.Remove(tabControl1);

            editor = new Scintilla();
            panelEditor.Controls.Add(editor);
            editor.Top = 1;
            editor.Left = 1;
            editor.Size = new System.Drawing.Size(panelEditor.Size.Width - 2, panelEditor.Size.Height - 2);
            editor.Anchor = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top;

            editor.ConfigurationManager.CustomLocation = "EditorConfig.xml";

            editor.Margins[0].Width = 20; // show line numbers
            editor.ConfigurationManager.Language = "js";
            editor.Commands.RemoveBinding(Keys.T, Keys.Control);
            editor.Commands.RemoveBinding(Keys.D, Keys.Control);

            // editor.TextChanged += new EventHandler(editor_TextChanged);

            //            editor.DocumentChange += new EventHandler<NativeScintillaEventArgs>(editor_DocumentChange);

            //editor.KeyDown += editor_KeyDown;
            //editor.Text = Chop1.Properties.Settings.Default.Text;

            //editor.MouseWheel += new MouseEventHandler(editor_MouseWheel);

            lVRuler.Height = bmpVRuler.Height;
            lHRuler.Width = bmpHRuler.Width;

            lVRuler.Paint += new PaintEventHandler(lVRuler_Paint);
            lHRuler.Paint += new PaintEventHandler(lHRuler_Paint);
            LoadPreferences();

            fDirty = false;
            UpdateFormTitle();
            editor.TextInserted += new EventHandler<TextModifiedEventArgs>(editor_TextInserted);
            editor.TextDeleted += new EventHandler<TextModifiedEventArgs>(editor_TextDeleted);

            RedrawImage();
            labelImage.Invalidate();

            panel1.Scroll += new ScrollEventHandler(panel1_Scroll);
            panel1.PerformLayout();

            if (panel1.VerticalScroll.Maximum > 100 && panel1.HorizontalScroll.Maximum > 100)
            {
                panel1.VerticalScroll.Value = (int)(.5 * (panel1.VerticalScroll.Maximum - panel1.VerticalScroll.Minimum - panel1.VerticalScroll.LargeChange));
                panel1.HorizontalScroll.Value = (int)(.5 * (panel1.HorizontalScroll.Maximum - panel1.HorizontalScroll.Minimum - panel1.HorizontalScroll.LargeChange));
                //panel1.Layout -= panel1_Layout;
                panel1.Invalidate(true);
            }

            labelImage.MouseDown += new MouseEventHandler(labelImage_MouseDown);
            labelImage.MouseUp += new MouseEventHandler(labelImage_MouseUp);

            labelImage.MouseEnter += new EventHandler(labelImage_MouseEnter);
            labelImage.MouseLeave += new EventHandler(labelImage_MouseLeave);

            labelImage.MouseMove += new MouseEventHandler(labelImage_MousePosition);

            // for capturing wheel events
            mfilter.form = this;
            Application.AddMessageFilter( mfilter );

            tlabelZoom.MouseDown += new MouseEventHandler(tlabelZoom_MouseDown);
            tlabelPosition.MouseDown += new MouseEventHandler(tlabelPosition_MouseDown);

            scrollRulers();
        }
コード例 #28
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     System.Windows.Forms.ListViewGroup listViewGroup7 = new System.Windows.Forms.ListViewGroup("First Group", System.Windows.Forms.HorizontalAlignment.Left);
     System.Windows.Forms.ListViewGroup listViewGroup8 = new System.Windows.Forms.ListViewGroup("Second Group", System.Windows.Forms.HorizontalAlignment.Left);
     System.Windows.Forms.ListViewItem  listViewItem61 = new System.Windows.Forms.ListViewItem("Hello Item 1");
     System.Windows.Forms.ListViewItem  listViewItem62 = new System.Windows.Forms.ListViewItem("Hello Item 2");
     System.Windows.Forms.ListViewItem  listViewItem63 = new System.Windows.Forms.ListViewItem("Hello Item 3");
     System.Windows.Forms.ListViewItem  listViewItem64 = new System.Windows.Forms.ListViewItem("Hello Item 4");
     System.Windows.Forms.ListViewItem  listViewItem65 = new System.Windows.Forms.ListViewItem("Hello Item 5");
     System.Windows.Forms.ListViewItem  listViewItem66 = new System.Windows.Forms.ListViewItem("Hello Item 6");
     System.Windows.Forms.ListViewItem  listViewItem67 = new System.Windows.Forms.ListViewItem("Hello Item 7");
     System.Windows.Forms.ListViewItem  listViewItem68 = new System.Windows.Forms.ListViewItem("Hello Item 8");
     System.Windows.Forms.ListViewItem  listViewItem69 = new System.Windows.Forms.ListViewItem("Hello Item 9");
     System.Windows.Forms.ListViewItem  listViewItem70 = new System.Windows.Forms.ListViewItem("Hello Item 10");
     System.Windows.Forms.ListViewItem  listViewItem71 = new System.Windows.Forms.ListViewItem("Hello Item 11");
     System.Windows.Forms.ListViewItem  listViewItem72 = new System.Windows.Forms.ListViewItem("Hello Item 12");
     System.Windows.Forms.ListViewItem  listViewItem73 = new System.Windows.Forms.ListViewItem("Hello Item 13");
     System.Windows.Forms.ListViewItem  listViewItem74 = new System.Windows.Forms.ListViewItem("Hello Item 14");
     System.Windows.Forms.ListViewItem  listViewItem75 = new System.Windows.Forms.ListViewItem("Hello Item 15");
     System.Windows.Forms.ListViewItem  listViewItem76 = new System.Windows.Forms.ListViewItem("Hello Item 16");
     System.Windows.Forms.ListViewItem  listViewItem77 = new System.Windows.Forms.ListViewItem("Hello Item 17");
     System.Windows.Forms.ListViewItem  listViewItem78 = new System.Windows.Forms.ListViewItem("Hello Item 18");
     System.Windows.Forms.ListViewItem  listViewItem79 = new System.Windows.Forms.ListViewItem("Hello Item 19");
     System.Windows.Forms.ListViewItem  listViewItem80 = new System.Windows.Forms.ListViewItem("Hello Item 20, Filler, Filler, Filler, Filler, Filler, Filler, Filler, Filler, Fi" +
                                                                                               "ller, Filler, Filler, Filler, Filler, Filler, Filler, Filler");
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ControlDialog));
     System.Windows.Forms.TreeNode treeNode70 = new System.Windows.Forms.TreeNode("Node1");
     System.Windows.Forms.TreeNode treeNode71 = new System.Windows.Forms.TreeNode("Node2");
     System.Windows.Forms.TreeNode treeNode72 = new System.Windows.Forms.TreeNode("Node3");
     System.Windows.Forms.TreeNode treeNode73 = new System.Windows.Forms.TreeNode("Node4");
     System.Windows.Forms.TreeNode treeNode74 = new System.Windows.Forms.TreeNode("Node5");
     System.Windows.Forms.TreeNode treeNode75 = new System.Windows.Forms.TreeNode("Node0", new System.Windows.Forms.TreeNode[] {
         treeNode70,
         treeNode71,
         treeNode72,
         treeNode73,
         treeNode74
     });
     System.Windows.Forms.TreeNode treeNode76 = new System.Windows.Forms.TreeNode("Node7");
     System.Windows.Forms.TreeNode treeNode77 = new System.Windows.Forms.TreeNode("Node8");
     System.Windows.Forms.TreeNode treeNode78 = new System.Windows.Forms.TreeNode("Node9");
     System.Windows.Forms.TreeNode treeNode79 = new System.Windows.Forms.TreeNode("Node10");
     System.Windows.Forms.TreeNode treeNode80 = new System.Windows.Forms.TreeNode("Node11");
     System.Windows.Forms.TreeNode treeNode81 = new System.Windows.Forms.TreeNode("Node12");
     System.Windows.Forms.TreeNode treeNode82 = new System.Windows.Forms.TreeNode("Node6", new System.Windows.Forms.TreeNode[] {
         treeNode76,
         treeNode77,
         treeNode78,
         treeNode79,
         treeNode80,
         treeNode81
     });
     System.Windows.Forms.TreeNode treeNode83 = new System.Windows.Forms.TreeNode("Node14");
     System.Windows.Forms.TreeNode treeNode84 = new System.Windows.Forms.TreeNode("Node15");
     System.Windows.Forms.TreeNode treeNode85 = new System.Windows.Forms.TreeNode("Node16");
     System.Windows.Forms.TreeNode treeNode86 = new System.Windows.Forms.TreeNode("Node17");
     System.Windows.Forms.TreeNode treeNode87 = new System.Windows.Forms.TreeNode("Node18");
     System.Windows.Forms.TreeNode treeNode88 = new System.Windows.Forms.TreeNode("Node19");
     System.Windows.Forms.TreeNode treeNode89 = new System.Windows.Forms.TreeNode("Node20");
     System.Windows.Forms.TreeNode treeNode90 = new System.Windows.Forms.TreeNode("Node21");
     System.Windows.Forms.TreeNode treeNode91 = new System.Windows.Forms.TreeNode("Node22, Filler, Filler, Filler, Filler, Filler, Filler, Filler, Filler, Filler, F" +
                                                                                  "iller, Filler, Filler, Filler, Filler, Filler, Filler");
     System.Windows.Forms.TreeNode treeNode92 = new System.Windows.Forms.TreeNode("Node13", new System.Windows.Forms.TreeNode[] {
         treeNode83,
         treeNode84,
         treeNode85,
         treeNode86,
         treeNode87,
         treeNode88,
         treeNode89,
         treeNode90,
         treeNode91
     });
     this.statusBarEx      = new System.Windows.Forms.StatusBarEx();
     this.customTabControl = new System.Windows.Forms.CustomTabControl();
     this.tabPage2         = new System.Windows.Forms.TabPage();
     this.dataGridViewEx   = new System.Windows.Forms.DataGridViewEx();
     this.Column1          = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.Column2          = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.tabPage1         = new System.Windows.Forms.TabPage();
     this.propertyGridEx   = new System.Windows.Forms.PropertyGridEx();
     this.groupBoxEx       = new System.Windows.Forms.GroupBoxEx();
     this.pictureBoxEx     = new System.Windows.Forms.PictureBoxEx();
     this.progressBarEx    = new System.Windows.Forms.ProgressBarEx();
     this.buttonEx3        = new System.Windows.Forms.ButtonEx();
     this.checkBoxEx4      = new System.Windows.Forms.CheckBoxEx();
     this.checkBoxEx3      = new System.Windows.Forms.CheckBoxEx();
     this.checkBoxEx2      = new System.Windows.Forms.CheckBoxEx();
     this.buttonEx         = new System.Windows.Forms.ButtonEx();
     this.checkBoxEx       = new System.Windows.Forms.CheckBoxEx();
     this.buttonEx2        = new System.Windows.Forms.ButtonEx();
     this.listBoxEx        = new System.Windows.Forms.ListBoxEx();
     this.listViewEx       = new System.Windows.Forms.ListViewEx();
     this.columnHeader     = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
     this.columnHeader1    = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
     this.textBoxEx        = new System.Windows.Forms.TextBoxEx();
     this.treeViewEx       = new System.Windows.Forms.TreeViewEx();
     this.richTextBoxEx    = new System.Windows.Forms.RichTextBoxEx();
     this.customTabControl.SuspendLayout();
     this.tabPage2.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.dataGridViewEx)).BeginInit();
     this.groupBoxEx.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.pictureBoxEx)).BeginInit();
     this.SuspendLayout();
     //
     // statusBarEx
     //
     this.statusBarEx.Location = new System.Drawing.Point(0, 769);
     this.statusBarEx.Name     = "statusBarEx";
     this.statusBarEx.Size     = new System.Drawing.Size(1132, 22);
     this.statusBarEx.TabIndex = 9;
     this.statusBarEx.Text     = "StatusBar";
     this.statusBarEx.UseTheme = true;
     //
     // customTabControl
     //
     this.customTabControl.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
                                                                          | System.Windows.Forms.AnchorStyles.Right)));
     this.customTabControl.Controls.Add(this.tabPage2);
     this.customTabControl.Controls.Add(this.tabPage1);
     //
     //
     //
     this.customTabControl.DisplayStyleProvider.BorderColor         = System.Drawing.SystemColors.ControlDark;
     this.customTabControl.DisplayStyleProvider.BorderColorHot      = System.Drawing.SystemColors.ControlDark;
     this.customTabControl.DisplayStyleProvider.BorderColorSelected = System.Drawing.Color.FromArgb(((int)(((byte)(127)))), ((int)(((byte)(157)))), ((int)(((byte)(185)))));
     this.customTabControl.DisplayStyleProvider.CloserColor         = System.Drawing.Color.DarkGray;
     this.customTabControl.DisplayStyleProvider.FocusTrack          = true;
     this.customTabControl.DisplayStyleProvider.HotTrack            = true;
     this.customTabControl.DisplayStyleProvider.ImageAlign          = System.Drawing.ContentAlignment.MiddleLeft;
     this.customTabControl.DisplayStyleProvider.Opacity             = 1F;
     this.customTabControl.DisplayStyleProvider.Overlap             = 0;
     this.customTabControl.DisplayStyleProvider.Padding             = new System.Drawing.Point(6, 3);
     this.customTabControl.DisplayStyleProvider.Radius            = 2;
     this.customTabControl.DisplayStyleProvider.ShowTabCloser     = false;
     this.customTabControl.DisplayStyleProvider.TextColor         = System.Drawing.SystemColors.ControlText;
     this.customTabControl.DisplayStyleProvider.TextColorDisabled = System.Drawing.SystemColors.ControlDark;
     this.customTabControl.DisplayStyleProvider.TextColorSelected = System.Drawing.SystemColors.ControlText;
     this.customTabControl.HotTrack      = true;
     this.customTabControl.Location      = new System.Drawing.Point(413, 528);
     this.customTabControl.Name          = "customTabControl";
     this.customTabControl.SelectedIndex = 0;
     this.customTabControl.Size          = new System.Drawing.Size(711, 233);
     this.customTabControl.TabIndex      = 8;
     //
     // tabPage2
     //
     this.tabPage2.Controls.Add(this.dataGridViewEx);
     this.tabPage2.Location = new System.Drawing.Point(4, 23);
     this.tabPage2.Name     = "tabPage2";
     this.tabPage2.Size     = new System.Drawing.Size(703, 206);
     this.tabPage2.TabIndex = 1;
     this.tabPage2.Text     = "tabPage2";
     this.tabPage2.UseVisualStyleBackColor = true;
     //
     // dataGridViewEx
     //
     this.dataGridViewEx.AllowUserToAddRows          = false;
     this.dataGridViewEx.AutoSizeColumnsMode         = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
     this.dataGridViewEx.BorderColor                 = System.Drawing.SystemColors.ControlDark;
     this.dataGridViewEx.BorderStyle                 = System.Windows.Forms.BorderStyle.None;
     this.dataGridViewEx.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
     this.dataGridViewEx.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
         this.Column1,
         this.Column2
     });
     this.dataGridViewEx.Dock              = System.Windows.Forms.DockStyle.Fill;
     this.dataGridViewEx.Location          = new System.Drawing.Point(0, 0);
     this.dataGridViewEx.Name              = "dataGridViewEx";
     this.dataGridViewEx.RowHeadersVisible = false;
     this.dataGridViewEx.Size              = new System.Drawing.Size(703, 206);
     this.dataGridViewEx.TabIndex          = 0;
     this.dataGridViewEx.UseTheme          = true;
     //
     // Column1
     //
     this.Column1.HeaderText = "Column1";
     this.Column1.Name       = "Column1";
     //
     // Column2
     //
     this.Column2.HeaderText = "Column2";
     this.Column2.Name       = "Column2";
     //
     // tabPage1
     //
     this.tabPage1.Location = new System.Drawing.Point(4, 23);
     this.tabPage1.Name     = "tabPage1";
     this.tabPage1.Padding  = new System.Windows.Forms.Padding(3);
     this.tabPage1.Size     = new System.Drawing.Size(703, 206);
     this.tabPage1.TabIndex = 2;
     this.tabPage1.Text     = "tabPage1";
     this.tabPage1.UseVisualStyleBackColor = true;
     //
     // propertyGridEx
     //
     this.propertyGridEx.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                                                                        | System.Windows.Forms.AnchorStyles.Right)));
     this.propertyGridEx.LineColor      = System.Drawing.SystemColors.ControlDark;
     this.propertyGridEx.Location       = new System.Drawing.Point(822, 13);
     this.propertyGridEx.Name           = "propertyGridEx";
     this.propertyGridEx.Size           = new System.Drawing.Size(298, 506);
     this.propertyGridEx.TabIndex       = 7;
     this.propertyGridEx.ToolbarVisible = false;
     this.propertyGridEx.UseTheme       = true;
     //
     // groupBoxEx
     //
     this.groupBoxEx.Anchor      = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
     this.groupBoxEx.BorderColor = System.Drawing.SystemColors.ControlDark;
     this.groupBoxEx.Controls.Add(this.pictureBoxEx);
     this.groupBoxEx.Controls.Add(this.progressBarEx);
     this.groupBoxEx.Controls.Add(this.buttonEx3);
     this.groupBoxEx.Controls.Add(this.checkBoxEx4);
     this.groupBoxEx.Controls.Add(this.checkBoxEx3);
     this.groupBoxEx.Controls.Add(this.checkBoxEx2);
     this.groupBoxEx.Controls.Add(this.buttonEx);
     this.groupBoxEx.Controls.Add(this.checkBoxEx);
     this.groupBoxEx.Controls.Add(this.buttonEx2);
     this.groupBoxEx.Location = new System.Drawing.Point(12, 523);
     this.groupBoxEx.Name     = "groupBoxEx";
     this.groupBoxEx.Size     = new System.Drawing.Size(396, 235);
     this.groupBoxEx.TabIndex = 6;
     this.groupBoxEx.TabStop  = false;
     this.groupBoxEx.Text     = "GroupBox";
     this.groupBoxEx.UseTheme = true;
     //
     // pictureBoxEx
     //
     this.pictureBoxEx.BorderColor = System.Drawing.SystemColors.ControlDark;
     this.pictureBoxEx.Location    = new System.Drawing.Point(221, 28);
     this.pictureBoxEx.Name        = "pictureBoxEx";
     this.pictureBoxEx.Size        = new System.Drawing.Size(153, 63);
     this.pictureBoxEx.TabIndex    = 13;
     this.pictureBoxEx.TabStop     = false;
     this.pictureBoxEx.UseTheme    = true;
     //
     // progressBarEx
     //
     this.progressBarEx.BorderColor = System.Drawing.SystemColors.ControlDark;
     this.progressBarEx.Location    = new System.Drawing.Point(25, 80);
     this.progressBarEx.Name        = "progressBarEx";
     this.progressBarEx.Size        = new System.Drawing.Size(175, 11);
     this.progressBarEx.TabIndex    = 12;
     this.progressBarEx.UseTheme    = true;
     this.progressBarEx.Value       = 40;
     //
     // buttonEx3
     //
     this.buttonEx3.DisabledBackColor = System.Drawing.SystemColors.Control;
     this.buttonEx3.DisabledTextColor = System.Drawing.SystemColors.ControlDark;
     this.buttonEx3.Enabled           = false;
     this.buttonEx3.Location          = new System.Drawing.Point(25, 104);
     this.buttonEx3.Name     = "buttonEx3";
     this.buttonEx3.Size     = new System.Drawing.Size(92, 30);
     this.buttonEx3.TabIndex = 11;
     this.buttonEx3.Text     = "Button3";
     this.buttonEx3.UseTheme = true;
     this.buttonEx3.UseVisualStyleBackColor = true;
     //
     // checkBoxEx4
     //
     this.checkBoxEx4.AutoSize          = true;
     this.checkBoxEx4.BorderColor       = System.Drawing.SystemColors.ControlDark;
     this.checkBoxEx4.DisabledTextColor = System.Drawing.SystemColors.ControlDark;
     this.checkBoxEx4.FlatStyle         = System.Windows.Forms.FlatStyle.Flat;
     this.checkBoxEx4.Location          = new System.Drawing.Point(123, 51);
     this.checkBoxEx4.Name                    = "checkBoxEx4";
     this.checkBoxEx4.RightToLeft             = System.Windows.Forms.RightToLeft.Yes;
     this.checkBoxEx4.Size                    = new System.Drawing.Size(78, 17);
     this.checkBoxEx4.TabIndex                = 10;
     this.checkBoxEx4.Text                    = "Check Me4";
     this.checkBoxEx4.ThreeState              = true;
     this.checkBoxEx4.UseTheme                = true;
     this.checkBoxEx4.UseVisualStyleBackColor = false;
     //
     // checkBoxEx3
     //
     this.checkBoxEx3.AutoSize          = true;
     this.checkBoxEx3.BorderColor       = System.Drawing.SystemColors.ControlDark;
     this.checkBoxEx3.DisabledTextColor = System.Drawing.SystemColors.ControlDark;
     this.checkBoxEx3.FlatStyle         = System.Windows.Forms.FlatStyle.Flat;
     this.checkBoxEx3.Location          = new System.Drawing.Point(123, 28);
     this.checkBoxEx3.Name                    = "checkBoxEx3";
     this.checkBoxEx3.RightToLeft             = System.Windows.Forms.RightToLeft.Yes;
     this.checkBoxEx3.Size                    = new System.Drawing.Size(78, 17);
     this.checkBoxEx3.TabIndex                = 9;
     this.checkBoxEx3.Text                    = "Check Me3";
     this.checkBoxEx3.ThreeState              = true;
     this.checkBoxEx3.UseTheme                = true;
     this.checkBoxEx3.UseVisualStyleBackColor = false;
     //
     // checkBoxEx2
     //
     this.checkBoxEx2.AutoSize          = true;
     this.checkBoxEx2.BorderColor       = System.Drawing.SystemColors.ControlDark;
     this.checkBoxEx2.DisabledTextColor = System.Drawing.SystemColors.ControlDark;
     this.checkBoxEx2.FlatStyle         = System.Windows.Forms.FlatStyle.Flat;
     this.checkBoxEx2.Location          = new System.Drawing.Point(25, 51);
     this.checkBoxEx2.Name       = "checkBoxEx2";
     this.checkBoxEx2.Size       = new System.Drawing.Size(78, 17);
     this.checkBoxEx2.TabIndex   = 8;
     this.checkBoxEx2.Text       = "Check Me2";
     this.checkBoxEx2.ThreeState = true;
     this.checkBoxEx2.UseTheme   = true;
     this.checkBoxEx2.UseVisualStyleBackColor = false;
     //
     // buttonEx
     //
     this.buttonEx.DisabledBackColor = System.Drawing.SystemColors.Control;
     this.buttonEx.DisabledTextColor = System.Drawing.SystemColors.ControlDark;
     this.buttonEx.Location          = new System.Drawing.Point(25, 180);
     this.buttonEx.Name     = "buttonEx";
     this.buttonEx.Size     = new System.Drawing.Size(92, 30);
     this.buttonEx.TabIndex = 7;
     this.buttonEx.Text     = "Button1";
     this.buttonEx.UseTheme = true;
     this.buttonEx.UseVisualStyleBackColor = true;
     //
     // checkBoxEx
     //
     this.checkBoxEx.AutoSize          = true;
     this.checkBoxEx.BorderColor       = System.Drawing.SystemColors.ControlDark;
     this.checkBoxEx.DisabledTextColor = System.Drawing.SystemColors.ControlDark;
     this.checkBoxEx.FlatStyle         = System.Windows.Forms.FlatStyle.Flat;
     this.checkBoxEx.Location          = new System.Drawing.Point(25, 28);
     this.checkBoxEx.Name     = "checkBoxEx";
     this.checkBoxEx.Size     = new System.Drawing.Size(78, 17);
     this.checkBoxEx.TabIndex = 6;
     this.checkBoxEx.Text     = "Check Me1";
     this.checkBoxEx.UseTheme = true;
     this.checkBoxEx.UseVisualStyleBackColor = false;
     //
     // buttonEx2
     //
     this.buttonEx2.DisabledBackColor = System.Drawing.SystemColors.Control;
     this.buttonEx2.DisabledTextColor = System.Drawing.SystemColors.ControlDark;
     this.buttonEx2.Location          = new System.Drawing.Point(25, 142);
     this.buttonEx2.Name     = "buttonEx2";
     this.buttonEx2.Size     = new System.Drawing.Size(92, 30);
     this.buttonEx2.TabIndex = 5;
     this.buttonEx2.Text     = "Button2";
     this.buttonEx2.UseTheme = true;
     this.buttonEx2.UseVisualStyleBackColor = true;
     //
     // listBoxEx
     //
     this.listBoxEx.Anchor            = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
     this.listBoxEx.BorderColor       = System.Drawing.SystemColors.ControlDark;
     this.listBoxEx.FormattingEnabled = true;
     this.listBoxEx.IntegralHeight    = false;
     this.listBoxEx.Location          = new System.Drawing.Point(553, 13);
     this.listBoxEx.Name     = "listBoxEx";
     this.listBoxEx.Size     = new System.Drawing.Size(261, 280);
     this.listBoxEx.TabIndex = 4;
     this.listBoxEx.UseTheme = true;
     //
     // listViewEx
     //
     this.listViewEx.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                                                                    | System.Windows.Forms.AnchorStyles.Left)));
     this.listViewEx.BorderColor = System.Drawing.SystemColors.ControlDark;
     this.listViewEx.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
         this.columnHeader,
         this.columnHeader1
     });
     this.listViewEx.GridLineColor = System.Drawing.SystemColors.Control;
     listViewGroup7.Header         = "First Group";
     listViewGroup7.Name           = "listViewGroup";
     listViewGroup8.Header         = "Second Group";
     listViewGroup8.Name           = "listViewGroup2";
     this.listViewEx.Groups.AddRange(new System.Windows.Forms.ListViewGroup[] {
         listViewGroup7,
         listViewGroup8
     });
     listViewItem61.Group = listViewGroup7;
     listViewItem62.Group = listViewGroup7;
     listViewItem63.Group = listViewGroup7;
     listViewItem64.Group = listViewGroup7;
     listViewItem65.Group = listViewGroup7;
     listViewItem66.Group = listViewGroup7;
     listViewItem67.Group = listViewGroup7;
     listViewItem68.Group = listViewGroup7;
     listViewItem69.Group = listViewGroup7;
     listViewItem70.Group = listViewGroup7;
     listViewItem71.Group = listViewGroup8;
     listViewItem72.Group = listViewGroup8;
     listViewItem73.Group = listViewGroup8;
     listViewItem74.Group = listViewGroup8;
     listViewItem75.Group = listViewGroup8;
     listViewItem76.Group = listViewGroup8;
     listViewItem77.Group = listViewGroup8;
     listViewItem78.Group = listViewGroup8;
     listViewItem79.Group = listViewGroup8;
     listViewItem80.Group = listViewGroup8;
     this.listViewEx.Items.AddRange(new System.Windows.Forms.ListViewItem[] {
         listViewItem61,
         listViewItem62,
         listViewItem63,
         listViewItem64,
         listViewItem65,
         listViewItem66,
         listViewItem67,
         listViewItem68,
         listViewItem69,
         listViewItem70,
         listViewItem71,
         listViewItem72,
         listViewItem73,
         listViewItem74,
         listViewItem75,
         listViewItem76,
         listViewItem77,
         listViewItem78,
         listViewItem79,
         listViewItem80
     });
     this.listViewEx.Location  = new System.Drawing.Point(12, 301);
     this.listViewEx.Name      = "listViewEx";
     this.listViewEx.OwnerDraw = true;
     this.listViewEx.Size      = new System.Drawing.Size(396, 218);
     this.listViewEx.TabIndex  = 3;
     this.listViewEx.UseCompatibleStateImageBehavior = false;
     this.listViewEx.UseTheme = true;
     this.listViewEx.View     = System.Windows.Forms.View.Details;
     //
     // columnHeader
     //
     this.columnHeader.Text  = "Column1";
     this.columnHeader.Width = 277;
     //
     // columnHeader1
     //
     this.columnHeader1.Text  = "Column2";
     this.columnHeader1.Width = 98;
     //
     // textBoxEx
     //
     this.textBoxEx.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                                                                   | System.Windows.Forms.AnchorStyles.Right)));
     this.textBoxEx.BorderColor = System.Drawing.SystemColors.ControlDark;
     this.textBoxEx.Location    = new System.Drawing.Point(282, 12);
     this.textBoxEx.Multiline   = true;
     this.textBoxEx.Name        = "textBoxEx";
     this.textBoxEx.Size        = new System.Drawing.Size(262, 281);
     this.textBoxEx.TabIndex    = 2;
     this.textBoxEx.Text        = resources.GetString("textBoxEx.Text");
     this.textBoxEx.UseTheme    = true;
     //
     // treeViewEx
     //
     this.treeViewEx.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                                                                     | System.Windows.Forms.AnchorStyles.Left)
                                                                    | System.Windows.Forms.AnchorStyles.Right)));
     this.treeViewEx.BorderColor = System.Drawing.SystemColors.ControlDark;
     this.treeViewEx.Location    = new System.Drawing.Point(416, 301);
     this.treeViewEx.Name        = "treeViewEx";
     treeNode70.Name             = "Node1";
     treeNode70.Text             = "Node1";
     treeNode71.Name             = "Node2";
     treeNode71.Text             = "Node2";
     treeNode72.Name             = "Node3";
     treeNode72.Text             = "Node3";
     treeNode73.Name             = "Node4";
     treeNode73.Text             = "Node4";
     treeNode74.Name             = "Node5";
     treeNode74.Text             = "Node5";
     treeNode75.Name             = "Node0";
     treeNode75.Text             = "Node0";
     treeNode76.Name             = "Node7";
     treeNode76.Text             = "Node7";
     treeNode77.Name             = "Node8";
     treeNode77.Text             = "Node8";
     treeNode78.Name             = "Node9";
     treeNode78.Text             = "Node9";
     treeNode79.Name             = "Node10";
     treeNode79.Text             = "Node10";
     treeNode80.Name             = "Node11";
     treeNode80.Text             = "Node11";
     treeNode81.Name             = "Node12";
     treeNode81.Text             = "Node12";
     treeNode82.Name             = "Node6";
     treeNode82.Text             = "Node6";
     treeNode83.Name             = "Node14";
     treeNode83.Text             = "Node14";
     treeNode84.Name             = "Node15";
     treeNode84.Text             = "Node15";
     treeNode85.Name             = "Node16";
     treeNode85.Text             = "Node16";
     treeNode86.Name             = "Node17";
     treeNode86.Text             = "Node17";
     treeNode87.Name             = "Node18";
     treeNode87.Text             = "Node18";
     treeNode88.Name             = "Node19";
     treeNode88.Text             = "Node19";
     treeNode89.Name             = "Node20";
     treeNode89.Text             = "Node20";
     treeNode90.Name             = "Node21";
     treeNode90.Text             = "Node21";
     treeNode91.Name             = "Node22";
     treeNode91.Text             = "Node22, Filler, Filler, Filler, Filler, Filler, Filler, Filler, Filler, Filler, F" +
                                   "iller, Filler, Filler, Filler, Filler, Filler, Filler";
     treeNode92.Name = "Node13";
     treeNode92.Text = "Node13";
     this.treeViewEx.Nodes.AddRange(new System.Windows.Forms.TreeNode[] {
         treeNode75,
         treeNode82,
         treeNode92
     });
     this.treeViewEx.Size     = new System.Drawing.Size(398, 218);
     this.treeViewEx.TabIndex = 1;
     this.treeViewEx.UseTheme = true;
     //
     // richTextBoxEx
     //
     this.richTextBoxEx.BorderColor = System.Drawing.SystemColors.ControlDark;
     this.richTextBoxEx.Location    = new System.Drawing.Point(12, 12);
     this.richTextBoxEx.Name        = "richTextBoxEx";
     this.richTextBoxEx.Size        = new System.Drawing.Size(262, 281);
     this.richTextBoxEx.TabIndex    = 0;
     this.richTextBoxEx.Text        = resources.GetString("richTextBoxEx.Text");
     this.richTextBoxEx.UseTheme    = true;
     //
     // ControlDialog
     //
     this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
     this.AutoScaleMode       = System.Windows.Forms.AutoScaleMode.Font;
     this.ClientSize          = new System.Drawing.Size(1132, 791);
     this.Controls.Add(this.statusBarEx);
     this.Controls.Add(this.customTabControl);
     this.Controls.Add(this.propertyGridEx);
     this.Controls.Add(this.groupBoxEx);
     this.Controls.Add(this.listBoxEx);
     this.Controls.Add(this.listViewEx);
     this.Controls.Add(this.textBoxEx);
     this.Controls.Add(this.treeViewEx);
     this.Controls.Add(this.richTextBoxEx);
     this.DoubleBuffered = true;
     this.MinimumSize    = new System.Drawing.Size(1000, 700);
     this.Name           = "ControlDialog";
     this.StartPosition  = System.Windows.Forms.FormStartPosition.CenterScreen;
     this.Text           = "ControlDialog";
     this.customTabControl.ResumeLayout(false);
     this.tabPage2.ResumeLayout(false);
     ((System.ComponentModel.ISupportInitialize)(this.dataGridViewEx)).EndInit();
     this.groupBoxEx.ResumeLayout(false);
     this.groupBoxEx.PerformLayout();
     ((System.ComponentModel.ISupportInitialize)(this.pictureBoxEx)).EndInit();
     this.ResumeLayout(false);
     this.PerformLayout();
 }
コード例 #29
0
        private void InitializeRuntimeComponent() {
            _tabControl = new CustomTabControl();
            _tabControl.Name = "tabControl_Main";
            _tabControl.Dock = DockStyle.Fill;
            _tabControl.DisplayStyle = TabStyle.Angled;
            _tabControl.RightToLeftLayout = false;
            _tabControl.DrawMode = TabDrawMode.OwnerDrawFixed;
            _tabControl.BackColor = System.Drawing.Color.Transparent;
            this.tableLayoutPanel_MainGroup.Controls.Add(_tabControl);

            // add pages.
            _tabPages = new List<TabPage>();
            _tabPages.Add(new TabPage() {
                Name = "tabPage_FullTextSearch",
                Text = "Full Text Search",
                Dock = DockStyle.Fill,
                Padding = new Padding(5, 3, 5, 3),
                UseVisualStyleBackColor = true
            });
            _tabPages.Add(new TabPage() {
                Name = "tabPage_DumpUserContents",
                Text = "Download User Contents",
                Dock = DockStyle.Fill,
                Padding = new Padding(5, 3, 5, 3),
                UseVisualStyleBackColor = true
            });
            _tabPages.Add(new TabPage() {
                Name = "tabPage_Provisioning",
                Text = "Users",
                Dock = DockStyle.Fill,
                Padding = new Padding(5, 3, 5, 3),
                UseVisualStyleBackColor = true
            });
            _tabPages.Add(new TabPage()
            {
                Name = "tabPage_Groups",
                Text = "Groups",
                Dock = DockStyle.Fill,
                Padding = new Padding(5, 3, 5, 3),
                UseVisualStyleBackColor = true
            });
            _tabPages.Add(new TabPage()
            {
                Name = "tabPage_TeamFolders",
                Text = "Team Folders",
                Dock = DockStyle.Fill,
                Padding = new Padding(5, 3, 5, 3),
                UseVisualStyleBackColor = true
            });
            _tabPages.Add(new TabPage() {
                Name = "tabPage_Devices",
                Text = "Devices",
                Dock = DockStyle.Fill,
                Padding = new Padding(5, 3, 5, 3),
                UseVisualStyleBackColor = true
            });
            _tabPages.Add(new TabPage() {
                Name = "tabPage_DataMigration",
                Text = "Team Content",
                Dock = DockStyle.Fill,
                Padding = new Padding(5, 3, 3, 5),
                UseVisualStyleBackColor = true
            });
        }
コード例 #30
0
 public TabStyleDefaultProvider(CustomTabControl tabControl)
     : base(tabControl)
 {
     this._FocusTrack = true;
     this._Radius = 2;
 }
コード例 #31
0
 public TabStyleNoneProvider(CustomTabControl tabControl)
     : base(tabControl)
 {
 }
コード例 #32
0
ファイル: AdvancedPanel.cs プロジェクト: GNUtn/wimaxcu
 private void InitializeComponent()
 {
     ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof (AdvancedPanel));
       this.AdvancedPanel_HelpButtonLabelPair = new CustomHelpButtonLabelPair();
       this.AdvancedPanel_CloseBtnBox = new CustomButtonPushHorizBox();
       this.AdvancedPanel_CloseBtn = new CustomButtonPush();
       this.AdvancedPanel_TabControl = new CustomTabControl();
       this.AdvancedPanel_AdapterTabPage = new TabPage();
       this.AdvandedPanel_AdapterTabPanel = new AdapterTabPanel();
       this.AdvancedPanel_SettingsTabPage = new TabPage();
       this.AdvandedPanel_SettingsTabPanel = new SettingsTabPanel();
       this.AdvancedPanel_HeaderLbl = new Label();
       this.AdvancedPanel_CloseBtnBox.SuspendLayout();
       this.AdvancedPanel_AdapterTabPage.SuspendLayout();
       this.AdvancedPanel_SettingsTabPage.SuspendLayout();
       this.SuspendLayout();
       this.AdvancedPanel_HelpButtonLabelPair.BackColor = Color.Transparent;
       componentResourceManager.ApplyResources((object) this.AdvancedPanel_HelpButtonLabelPair, "AdvancedPanel_HelpButtonLabelPair");
       this.AdvancedPanel_HelpButtonLabelPair.Name = "AdvancedPanel_HelpButtonLabelPair";
       this.AdvancedPanel_CloseBtnBox.Controls.Add((Control) this.AdvancedPanel_CloseBtn);
       componentResourceManager.ApplyResources((object) this.AdvancedPanel_CloseBtnBox, "AdvancedPanel_CloseBtnBox");
       this.AdvancedPanel_CloseBtnBox.HorizontalJustification = HorizontalJustificationEnum.Right;
       this.AdvancedPanel_CloseBtnBox.Name = "AdvancedPanel_CloseBtnBox";
       this.AdvancedPanel_CloseBtn.BackColor = Color.White;
       this.AdvancedPanel_CloseBtn.BtnColor = PushButtonColorEnum.BlueGrey;
       this.AdvancedPanel_CloseBtn.BtnDoubleEndCaps = false;
       this.AdvancedPanel_CloseBtn.BtnEnabled = true;
       componentResourceManager.ApplyResources((object) this.AdvancedPanel_CloseBtn, "AdvancedPanel_CloseBtn");
       this.AdvancedPanel_CloseBtn.Name = "AdvancedPanel_CloseBtn";
       componentResourceManager.ApplyResources((object) this.AdvancedPanel_TabControl, "AdvancedPanel_TabControl");
       this.AdvancedPanel_TabControl.Name = "AdvancedPanel_TabControl";
       this.AdvancedPanel_TabControl.SelectedIndex = 0;
       this.AdvancedPanel_AdapterTabPage.BackColor = Color.White;
       this.AdvancedPanel_AdapterTabPage.Controls.Add((Control) this.AdvandedPanel_AdapterTabPanel);
       componentResourceManager.ApplyResources((object) this.AdvancedPanel_AdapterTabPage, "AdvancedPanel_AdapterTabPage");
       this.AdvancedPanel_AdapterTabPage.Name = "AdvancedPanel_AdapterTabPage";
       this.AdvancedPanel_AdapterTabPage.UseVisualStyleBackColor = true;
       componentResourceManager.ApplyResources((object) this.AdvandedPanel_AdapterTabPanel, "AdvandedPanel_AdapterTabPanel");
       this.AdvandedPanel_AdapterTabPanel.BackColor = Color.White;
       this.AdvandedPanel_AdapterTabPanel.Name = "AdvandedPanel_AdapterTabPanel";
       this.AdvandedPanel_AdapterTabPanel.ParentPanel = (AdvancedPanel) null;
       this.AdvancedPanel_SettingsTabPage.BackColor = Color.White;
       this.AdvancedPanel_SettingsTabPage.Controls.Add((Control) this.AdvandedPanel_SettingsTabPanel);
       componentResourceManager.ApplyResources((object) this.AdvancedPanel_SettingsTabPage, "AdvancedPanel_SettingsTabPage");
       this.AdvancedPanel_SettingsTabPage.Name = "AdvancedPanel_SettingsTabPage";
       this.AdvancedPanel_SettingsTabPage.UseVisualStyleBackColor = true;
       componentResourceManager.ApplyResources((object) this.AdvandedPanel_SettingsTabPanel, "AdvandedPanel_SettingsTabPanel");
       this.AdvandedPanel_SettingsTabPanel.BackColor = Color.White;
       this.AdvandedPanel_SettingsTabPanel.Name = "AdvandedPanel_SettingsTabPanel";
       this.AdvandedPanel_SettingsTabPanel.ParentPanel = (AdvancedPanel) null;
       this.AdvancedPanel_HeaderLbl.BackColor = Color.Transparent;
       componentResourceManager.ApplyResources((object) this.AdvancedPanel_HeaderLbl, "AdvancedPanel_HeaderLbl");
       this.AdvancedPanel_HeaderLbl.Name = "AdvancedPanel_HeaderLbl";
       this.AutoScaleMode = AutoScaleMode.None;
       this.BackColor = Color.White;
       this.Controls.Add((Control) this.AdvancedPanel_HeaderLbl);
       this.Controls.Add((Control) this.AdvancedPanel_TabControl);
       this.Controls.Add((Control) this.AdvancedPanel_HelpButtonLabelPair);
       this.Controls.Add((Control) this.AdvancedPanel_CloseBtnBox);
       componentResourceManager.ApplyResources((object) this, "$this");
       this.Name = "AdvancedPanel";
       this.AdvancedPanel_CloseBtnBox.ResumeLayout(false);
       this.AdvancedPanel_AdapterTabPage.ResumeLayout(false);
       this.AdvancedPanel_SettingsTabPage.ResumeLayout(false);
       this.ResumeLayout(false);
 }
コード例 #33
0
        private void BuildView()
        {
            this.SuspendLayout();
            this.StimulusClass1 = this.StimulusClass2 = null;

            // tab control
            var tabs = new CustomTabControl() { Dock = DockStyle.Fill };
            tabs.DisplayStyleProvider = new TabStyleVisualStudioProvider(tabs) { ShowTabCloser = true };
            tabs.TabClosing += (sender, args) => ((CustomTab)args.TabPage).RaiseClosingSafe(args);

            // start tab
            var startTab = new CustomTab() { Text = "Classes" };

            // columns
            var cols = GUIUtils.CreateTable(new double[] { .33, .33, .33 }, Direction.Horizontal);

            // image config
            var imageConfig = ConfigurationPanel.Create<ImageDisplaySettings>();

            // image panel
            var imagePanel = new ImagePanel() { Dock = DockStyle.Fill, UseNativeSize = false };
            bool cycle = true;
            var rand = new Random();
            Func<StimulusClass, string> getImageForClass = stimulusClass =>
            {
                var tab = this.stimulusClassTabs.First(t => t.StimulusClass == stimulusClass);
                if (tab.StimulusClass.Stimuli.Count == 0)
                    return null;
                if (!((ImageDisplaySettings)imageConfig.GetConfiguredObject()).CycleThroughImages)
                    return (tab.SelectedStimulus ?? tab.StimulusClass.Stimuli.First()).PathOrText;
                return tab.StimulusClass.Stimuli.ElementAt(rand.Next(tab.StimulusClass.Stimuli.Count)).PathOrText;
            };
            Action setImage = () =>
            {
                imagePanel.ImagePath = this.StimulusClass1 == null
                    ? null
                    : getImageForClass(this.StimulusClass1);
                imagePanel.SecondaryImagePath = this.StimulusClass2 == null
                    ? null
                    : getImageForClass(this.StimulusClass2);
            };
            setImage();
            var timer = new Timer() { Interval = 2500, Enabled = true };
            timer.Tick += (sender, args) =>
            {
                // just return if we're not cycling to avoid flicker
                if (!cycle && !timer.Enabled)
                    return;

                // if the form is valid, set a new image
                var activeTextBox = this.FindForm().ActiveControl as TextBox;
                if (activeTextBox == null || activeTextBox.IsValid())
                    setImage();
            };
            Action<ImageDisplaySettings> configurePanel = settings =>
            {
                imagePanel.Configure(settings);
                if (settings.CycleThroughImages != cycle)
                {
                    cycle = settings.CycleThroughImages;
                    setImage();
                }
                this.ImageDisplaySettings = settings;
            };
            configurePanel((ImageDisplaySettings)imageConfig.GetConfiguredObject());
            imageConfig.PropertyChanged += args => configurePanel((ImageDisplaySettings)imageConfig.GetConfiguredObject());

            // class list
            var classList = new CheckedListBox() { Dock = DockStyle.Fill, AllowDrop = true, CheckOnClick = true };
            classList.AddContextMenu();
            ItemCheckEventHandler refreshSelectedClasses = (sender, args) =>
            {
                // get the list of checked indices, including the possibly not-yet-changed item
                List<int> checkedIndices = classList.CheckedIndices.Cast<int>().ToList();
                if (args != null)
                {
                    if (args.NewValue == CheckState.Checked)
                    {
                        checkedIndices.Add(args.Index);
                        checkedIndices.Sort();
                    }
                    else
                        checkedIndices.Remove(args.Index);
                }

                this.StimulusClass1 = this.StimulusClass2 = null;
                if (checkedIndices.Count > 0)
                {
                    this.StimulusClass1 = ((StimulusClassTab)classList.Items[checkedIndices[0]]).StimulusClass;
                    if (checkedIndices.Count > 1)
                        this.StimulusClass2 = ((StimulusClassTab)classList.Items[checkedIndices[1]]).StimulusClass;
                }
                setImage();
            };
            Action<string> addClass = path =>
            {
                StimulusClass stimulusClass;
                if (!StimulusClass.TryLoad(path, out stimulusClass))
                    GUIUtils.Alert("Failed to load stimulus class from " + path, MessageBoxIcon.Error);
                else if (this.stimulusClassTabs
                    .Count(tp => tp.StimulusClass.SourceFolder.Equals(path, StringComparison.OrdinalIgnoreCase)
                        || tp.StimulusClass.SavePath.Equals(path, StringComparison.OrdinalIgnoreCase)) > 0)
                    GUIUtils.Alert("A class from " + path + " is already loaded!", MessageBoxIcon.Exclamation);
                else
                {
                    // get a unique marker unless this was the load of a saved class
                    if (!File.Exists(stimulusClass.SavePath))
                        stimulusClass.Settings.Marker = this.stimulusClassTabs.Count == 0
                            ? 1
                            : this.stimulusClassTabs.Max(s => s.StimulusClass.Settings.Marker) + 1;
                    var classTab = new StimulusClassTab(stimulusClass);
                    classTab.TextChanged += (sender, args) => classList.Invalidate();
                    classTab.Closing += (sender, args) =>
                    {
                        this.stimulusClassTabs.Remove(classTab);
                        classList.Items.Remove(classTab);
                        refreshSelectedClasses(classList, null);
                    };

                    this.stimulusClassTabs.Add(classTab);
                    tabs.TabPages.Add(classTab);
                    classList.Items.Add(classTab, true);
                    refreshSelectedClasses(classList, null);
                }
            };
            classList.ItemCheck += refreshSelectedClasses;
            classList.DragEnter += (sender, args) =>
            {
                if (args.Data.GetDataPresent(DataFormats.FileDrop, false)
                    && ((string[])args.Data.GetData(DataFormats.FileDrop)).Where(StimulusClass.IsValidLoadPath).Count() > 0)
                    args.Effect = DragDropEffects.All;
            };
            classList.DragDrop += (sender, args) =>
            {
                // check that the form is in a valid state
                var activeTextBox = this.FindForm().ActiveControl as TextBox;
                if (activeTextBox != null && !activeTextBox.IsValid())
                {
                    GUIUtils.Alert("All entered data must be valid in order for drag and drop to be enabled", MessageBoxIcon.Error);
                    return;
                }

                string[] data = (string[])args.Data.GetData(DataFormats.FileDrop);

                foreach (string path in data.Where(StimulusClass.IsValidLoadPath))
                    addClass(path);
            };

            // button table
            var buttonTable = GUIUtils.CreateButtonTable(Direction.Horizontal, DockStyle.Bottom,
            GUIUtils.CreateFlatButton("New", b =>
            {
                if (this.folderDialog.ShowDialog() == DialogResult.OK)
                    addClass(this.folderDialog.SelectedPath);
            }, startTab.ToolTip, "Create a new stimulus class from a folder of images"),
            GUIUtils.CreateFlatButton("Load", b =>
            {
                if (this.fileDialog.ShowDialog() == DialogResult.OK)
                    addClass(this.fileDialog.FileName);
            }, startTab.ToolTip, "Load a previously saved stimulus class settings file"));

            startTab.Closing += (sender, args) =>
            {
                args.Cancel = true;
                if (GUIUtils.IsUserSure("Reset stimulus classes?"))
                {
                    this.stimulusClassTabs.Clear();
                    this.Controls.Remove(tabs);
                    tabs.Dispose();
                    timer.Enabled = false;
                    timer.Dispose();
                    this.BuildView();
                    this.OnSizeChanged(EventArgs.Empty);
                }
            };

            // add all controls

            // left column
            var panel = new Panel() { Dock = DockStyle.Fill };
            panel.Controls.Add(classList);
            panel.Controls.Add(buttonTable);
            cols.Controls.Add(panel, 0, 0);

            // middle column
            cols.Controls.Add(imageConfig, 1, 0);

            // right column
            cols.Controls.Add(imagePanel, 2, 0);

            startTab.Controls.Add(cols);
            tabs.Controls.Add(startTab);
            this.Controls.Add(tabs);

            this.ResumeLayout(false);
        }