Example #1
0
        public MainWindow()
            : base("MD", 640, 480)
        {
            this.WindowState = WindowState.Maximized;

            // Client area
            VariableContainer clientarea = new VariableContainer();

            // Menu items
            MenuItem[] menuitems = new MenuItem[]
            {
                MenuItem.Create("File", new MenuItem[]
                {
                    MenuItem.Create("Import", delegate
                    {
                        using(var fd = new WinForms.OpenFileDialog())
                        {
                            fd.Filter = "MP3 Files |*.mp3";
                            if (fd.ShowDialog() == WinForms.DialogResult.OK)
                            {
                                string file = fd.FileName;
                                AudioContext ac = new AudioContext();
                                MemoryAudioSource mas = new MP3AudioFeed(file).Copy(4096, 4096 * 100);

                                SpectrogramView sp = new SpectrogramView(mas);
                                clientarea.Client = sp;

                                AudioOutput ao = new AudioOutput(mas.Play);
                                ao.Play();
                            }
                            else
                            {
                                return;
                            }
                        }
                    }),
                    MenuItem.Create("Exit", delegate
                    {
                        this.Close();
                    })
                })
            };

            // Menu and splitter
            Menu menu = new Menu(menuitems);
            SplitContainer sc = new SplitContainer(Axis.Vertical, menu.WithBorder(0.0, 0.0, 0.0, 1.0), clientarea);
            sc.NearSize = 30.0;

            // Main layer container
            LayerContainer lc = new LayerContainer(sc);

            this.Control = lc;
        }
Example #2
0
        public CharacterSheet()
        {
            Resizable = true;
            Size = new Point(400, 300);
            Position = new Point(100, 100);
            Titlebar.Text = "Character";

            split = new SplitContainer();
            split.Dock = DockStyle.Fill;
            Controls.Add(split);

            stats = new ScrollView();
            stats.Dock = DockStyle.Fill;
            split.SplitFrame1.Controls.Add(stats);

            paperdoll = new Frame();
            paperdoll.Dock = DockStyle.Fill;
            split.SplitFrame2.Controls.Add(paperdoll);

            ImageControl image = new ImageControl { Texture = "paperdoll.jpg" };
            image.Dock = DockStyle.Fill;
            paperdoll.Controls.Add(image);

            //top = new Frame { Size = new Point(44, 44), Dock = DockStyle.Top }; paperdoll.Controls.Add(top);
            //bottom = new Frame { Size = new Point(44, 44), Dock = DockStyle.Bottom }; paperdoll.Controls.Add(bottom);
            left = new Frame { Size = new Point(44, 44), Dock = DockStyle.Left }; paperdoll.Controls.Add(left);
            right = new Frame { Size = new Point(44, 44), Dock = DockStyle.Right }; paperdoll.Controls.Add(right);

            int i = 0;
            foreach (KeyValuePair<ItemSlotType, ItemSlot> pair in GameLogic.Player.ItemSlots)
            {
                ActionButton button = new ActionButton();
                button.Size = new Point(40, 40);
                button.Style = "button";
                button.Dock = DockStyle.Top;
                button.Margin = new Squid.Margin(2);
                button.AllowDrop = true;
                button.DragDrop += button_DragDrop;
                button.Tooltip = pair.Key.ToString();
                button.Tag = pair.Value;

                if (i < 6)
                    left.Controls.Add(button);
                else
                    right.Controls.Add(button);

                i++;
            }
        }
    /// <summary>
    /// # Will take the controls list and setup the multi split
    /// </summary>
    public void Init()
    {
        int controlCount = _controls.Count;

        this.Panel1.Controls.Add(_controls[0]);
        this.Panel2.Controls.Add(_controls[1]);

        SplitContainer prevContainer = this;

        for (int i = 2; i < controlCount; i++)
        {
            SplitContainer container = new SplitContainer();
            container.Dock = DockStyle.Fill;
            container.Orientation = this.Orientation;
            container.SplitterWidth = this.SplitterWidth;
            container.Panel1.Controls.Add(prevContainer.Panel2.Controls[0]);
            container.Panel2.Controls.Add(_controls[i]);
            prevContainer.Panel2.Controls.Clear();
            prevContainer.Panel2.Controls.Add(container);
            prevContainer = container;
            childContainers.Add(container);
        }
    }
Example #4
0
        private void toolStripSplitPanel2_Click(object sender, EventArgs e)
        {
            SplitContainer sc = MakeSplitContainer(currentsplitter.Orientation == Orientation.Vertical ? Orientation.Horizontal : Orientation.Vertical, (currentsplitter.Name.Substring(3).InvariantParseIntNull() ?? 1000) + 1);

            currentsplitter.Split(1, sc, MakeNode(GetFreeTag().ToStringInvariant()));
        }
Example #5
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.components = new System.ComponentModel.Container();
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormWinSMTP));
     this.panelTop        = new System.Windows.Forms.Panel();
     this.lblPwd          = new System.Windows.Forms.Label();
     this.txtPassword     = new System.Windows.Forms.TextBox();
     this.txtUser         = new System.Windows.Forms.TextBox();
     this.lblUser         = new System.Windows.Forms.Label();
     this.btnOpen         = new System.Windows.Forms.Button();
     this.txtServerPort   = new System.Windows.Forms.TextBox();
     this.lblServerPort   = new System.Windows.Forms.Label();
     this.label1          = new System.Windows.Forms.Label();
     this.txtServerSMTP   = new System.Windows.Forms.TextBox();
     this.cmLstResponse   = new System.Windows.Forms.ContextMenu();
     this.miCopy          = new System.Windows.Forms.MenuItem();
     this.miClear         = new System.Windows.Forms.MenuItem();
     this.menuItem5       = new System.Windows.Forms.MenuItem();
     this.miSaveLog       = new System.Windows.Forms.MenuItem();
     this.menuItem7       = new System.Windows.Forms.MenuItem();
     this.miWriteLog      = new System.Windows.Forms.MenuItem();
     this.mainMenu1       = new System.Windows.Forms.MainMenu(this.components);
     this.mmiFile         = new System.Windows.Forms.MenuItem();
     this.mmiDefaultModel = new System.Windows.Forms.MenuItem();
     this.menuItem3       = new System.Windows.Forms.MenuItem();
     this.mmiOpenModel    = new System.Windows.Forms.MenuItem();
     this.mmiSaveModel    = new System.Windows.Forms.MenuItem();
     this.menuItem4       = new System.Windows.Forms.MenuItem();
     this.mmiExit         = new System.Windows.Forms.MenuItem();
     this.mmiConnection   = new System.Windows.Forms.MenuItem();
     this.mmiOpenClose    = new System.Windows.Forms.MenuItem();
     this.mmiSend         = new System.Windows.Forms.MenuItem();
     this.mmiLog          = new System.Windows.Forms.MenuItem();
     this.mmiCopy         = new System.Windows.Forms.MenuItem();
     this.mmiClear        = new System.Windows.Forms.MenuItem();
     this.menuItem9       = new System.Windows.Forms.MenuItem();
     this.mmiSaveLog      = new System.Windows.Forms.MenuItem();
     this.menuItem1       = new System.Windows.Forms.MenuItem();
     this.mmiWriteLog     = new System.Windows.Forms.MenuItem();
     this.mmiHelp         = new System.Windows.Forms.MenuItem();
     this.mmiAbout        = new System.Windows.Forms.MenuItem();
     this.splitContainer1 = new System.Windows.Forms.SplitContainer();
     this.lstResponse     = new System.Windows.Forms.ListBox();
     this.lblSgart        = new System.Windows.Forms.LinkLabel();
     this.btnHelp         = new System.Windows.Forms.Button();
     this.btnSend         = new System.Windows.Forms.Button();
     this.txtCommand      = new System.Windows.Forms.TextBox();
     this.panelTop.SuspendLayout();
     this.splitContainer1.Panel1.SuspendLayout();
     this.splitContainer1.Panel2.SuspendLayout();
     this.splitContainer1.SuspendLayout();
     this.SuspendLayout();
     //
     // panelTop
     //
     this.panelTop.Controls.Add(this.lblPwd);
     this.panelTop.Controls.Add(this.txtPassword);
     this.panelTop.Controls.Add(this.txtUser);
     this.panelTop.Controls.Add(this.lblUser);
     this.panelTop.Controls.Add(this.btnOpen);
     this.panelTop.Controls.Add(this.txtServerPort);
     this.panelTop.Controls.Add(this.lblServerPort);
     this.panelTop.Controls.Add(this.txtServerSMTP);
     this.panelTop.Controls.Add(this.label1);
     this.panelTop.Dock     = System.Windows.Forms.DockStyle.Top;
     this.panelTop.Location = new System.Drawing.Point(0, 0);
     this.panelTop.Name     = "panelTop";
     this.panelTop.Size     = new System.Drawing.Size(384, 58);
     this.panelTop.TabIndex = 10;
     //
     // lblPwd
     //
     this.lblPwd.AutoSize = true;
     this.lblPwd.Location = new System.Drawing.Point(163, 35);
     this.lblPwd.Name     = "lblPwd";
     this.lblPwd.Size     = new System.Drawing.Size(53, 13);
     this.lblPwd.TabIndex = 10;
     this.lblPwd.Text     = "Password";
     //
     // txtPassword
     //
     this.txtPassword.Location = new System.Drawing.Point(222, 32);
     this.txtPassword.Name     = "txtPassword";
     this.txtPassword.Size     = new System.Drawing.Size(90, 20);
     this.txtPassword.TabIndex = 3;
     this.txtPassword.UseSystemPasswordChar = true;
     //
     // txtUser
     //
     this.txtUser.Location = new System.Drawing.Point(48, 32);
     this.txtUser.Name     = "txtUser";
     this.txtUser.Size     = new System.Drawing.Size(108, 20);
     this.txtUser.TabIndex = 2;
     //
     // lblUser
     //
     this.lblUser.AutoSize = true;
     this.lblUser.Location = new System.Drawing.Point(3, 35);
     this.lblUser.Name     = "lblUser";
     this.lblUser.Size     = new System.Drawing.Size(29, 13);
     this.lblUser.TabIndex = 7;
     this.lblUser.Text     = "User";
     //
     // btnOpen
     //
     this.btnOpen.Dock     = System.Windows.Forms.DockStyle.Right;
     this.btnOpen.Location = new System.Drawing.Point(320, 0);
     this.btnOpen.Name     = "btnOpen";
     this.btnOpen.Size     = new System.Drawing.Size(64, 58);
     this.btnOpen.TabIndex = 4;
     this.btnOpen.Text     = "Open";
     this.btnOpen.Click   += new System.EventHandler(this.btnOpen_Click);
     //
     // txtServerPort
     //
     this.txtServerPort.Location = new System.Drawing.Point(264, 8);
     this.txtServerPort.Name     = "txtServerPort";
     this.txtServerPort.Size     = new System.Drawing.Size(48, 20);
     this.txtServerPort.TabIndex = 1;
     //
     // lblServerPort
     //
     this.lblServerPort.Location = new System.Drawing.Point(230, 11);
     this.lblServerPort.Name     = "lblServerPort";
     this.lblServerPort.Size     = new System.Drawing.Size(32, 16);
     this.lblServerPort.TabIndex = 6;
     this.lblServerPort.Text     = "Port";
     //
     // label1
     //
     this.label1.Location = new System.Drawing.Point(3, 10);
     this.label1.Name     = "label1";
     this.label1.Size     = new System.Drawing.Size(48, 16);
     this.label1.TabIndex = 5;
     this.label1.Text     = "Server";
     //
     // txtServerSMTP
     //
     this.txtServerSMTP.Location = new System.Drawing.Point(48, 7);
     this.txtServerSMTP.Name     = "txtServerSMTP";
     this.txtServerSMTP.Size     = new System.Drawing.Size(176, 20);
     this.txtServerSMTP.TabIndex = 0;
     //
     // cmLstResponse
     //
     this.cmLstResponse.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
         this.miCopy,
         this.miClear,
         this.menuItem5,
         this.miSaveLog,
         this.menuItem7,
         this.miWriteLog
     });
     //
     // miCopy
     //
     this.miCopy.Index  = 0;
     this.miCopy.Text   = "&Copy";
     this.miCopy.Click += new System.EventHandler(this.miCopy_Click);
     //
     // miClear
     //
     this.miClear.Index  = 1;
     this.miClear.Text   = "Clear";
     this.miClear.Click += new System.EventHandler(this.miClear_Click);
     //
     // menuItem5
     //
     this.menuItem5.Index = 2;
     this.menuItem5.Text  = "-";
     //
     // miSaveLog
     //
     this.miSaveLog.Index  = 3;
     this.miSaveLog.Text   = "&Save";
     this.miSaveLog.Click += new System.EventHandler(this.miSaveLog_Click);
     //
     // menuItem7
     //
     this.menuItem7.Index = 4;
     this.menuItem7.Text  = "-";
     //
     // miWriteLog
     //
     this.miWriteLog.Index  = 5;
     this.miWriteLog.Text   = "&Write to file";
     this.miWriteLog.Click += new System.EventHandler(this.miWriteLog_Click);
     //
     // mainMenu1
     //
     this.mainMenu1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
         this.mmiFile,
         this.mmiConnection,
         this.mmiLog,
         this.mmiHelp
     });
     //
     // mmiFile
     //
     this.mmiFile.Index = 0;
     this.mmiFile.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
         this.mmiDefaultModel,
         this.menuItem3,
         this.mmiOpenModel,
         this.mmiSaveModel,
         this.menuItem4,
         this.mmiExit
     });
     this.mmiFile.Text = "&File";
     //
     // mmiDefaultModel
     //
     this.mmiDefaultModel.Index  = 0;
     this.mmiDefaultModel.Text   = "&Default";
     this.mmiDefaultModel.Click += new System.EventHandler(this.mmiDefaultModel_Click);
     //
     // menuItem3
     //
     this.menuItem3.Index = 1;
     this.menuItem3.Text  = "-";
     //
     // mmiOpenModel
     //
     this.mmiOpenModel.Index  = 2;
     this.mmiOpenModel.Text   = "&Open";
     this.mmiOpenModel.Click += new System.EventHandler(this.mmiOpenModel_Click);
     //
     // mmiSaveModel
     //
     this.mmiSaveModel.Index  = 3;
     this.mmiSaveModel.Text   = "&Save";
     this.mmiSaveModel.Click += new System.EventHandler(this.mmiSaveModel_Click);
     //
     // menuItem4
     //
     this.menuItem4.Index = 4;
     this.menuItem4.Text  = "-";
     //
     // mmiExit
     //
     this.mmiExit.Index  = 5;
     this.mmiExit.Text   = "E&xit";
     this.mmiExit.Click += new System.EventHandler(this.mmiExit_Click);
     //
     // mmiConnection
     //
     this.mmiConnection.Index = 1;
     this.mmiConnection.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
         this.mmiOpenClose,
         this.mmiSend
     });
     this.mmiConnection.Text   = "&Connection";
     this.mmiConnection.Popup += new System.EventHandler(this.mmiConnection_Popup);
     //
     // mmiOpenClose
     //
     this.mmiOpenClose.Index  = 0;
     this.mmiOpenClose.Text   = "&Open";
     this.mmiOpenClose.Click += new System.EventHandler(this.mmiOpenClose_Click);
     //
     // mmiSend
     //
     this.mmiSend.Index  = 1;
     this.mmiSend.Text   = "&Send";
     this.mmiSend.Click += new System.EventHandler(this.mmiSend_Click);
     //
     // mmiLog
     //
     this.mmiLog.Index = 2;
     this.mmiLog.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
         this.mmiCopy,
         this.mmiClear,
         this.menuItem9,
         this.mmiSaveLog,
         this.menuItem1,
         this.mmiWriteLog
     });
     this.mmiLog.Text = "&Log";
     //
     // mmiCopy
     //
     this.mmiCopy.Index  = 0;
     this.mmiCopy.Text   = "&Copy";
     this.mmiCopy.Click += new System.EventHandler(this.mmiCopy_Click);
     //
     // mmiClear
     //
     this.mmiClear.Index  = 1;
     this.mmiClear.Text   = "Clear";
     this.mmiClear.Click += new System.EventHandler(this.mmiClear_Click);
     //
     // menuItem9
     //
     this.menuItem9.Index = 2;
     this.menuItem9.Text  = "-";
     //
     // mmiSaveLog
     //
     this.mmiSaveLog.Index  = 3;
     this.mmiSaveLog.Text   = "&Save";
     this.mmiSaveLog.Click += new System.EventHandler(this.mmiSaveLog_Click);
     //
     // menuItem1
     //
     this.menuItem1.Index = 4;
     this.menuItem1.Text  = "-";
     //
     // mmiWriteLog
     //
     this.mmiWriteLog.Index  = 5;
     this.mmiWriteLog.Text   = "&Write to file";
     this.mmiWriteLog.Click += new System.EventHandler(this.mmiWriteLog_Click);
     //
     // mmiHelp
     //
     this.mmiHelp.Index = 3;
     this.mmiHelp.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
         this.mmiAbout
     });
     this.mmiHelp.Text = "&Help";
     //
     // mmiAbout
     //
     this.mmiAbout.Index  = 0;
     this.mmiAbout.Text   = "&About";
     this.mmiAbout.Click += new System.EventHandler(this.mmiAbout_Click);
     //
     // splitContainer1
     //
     this.splitContainer1.Dock        = System.Windows.Forms.DockStyle.Fill;
     this.splitContainer1.Location    = new System.Drawing.Point(0, 58);
     this.splitContainer1.Name        = "splitContainer1";
     this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
     //
     // splitContainer1.Panel1
     //
     this.splitContainer1.Panel1.Controls.Add(this.lstResponse);
     this.splitContainer1.Panel1MinSize = 80;
     //
     // splitContainer1.Panel2
     //
     this.splitContainer1.Panel2.Controls.Add(this.lblSgart);
     this.splitContainer1.Panel2.Controls.Add(this.btnHelp);
     this.splitContainer1.Panel2.Controls.Add(this.btnSend);
     this.splitContainer1.Panel2.Controls.Add(this.txtCommand);
     this.splitContainer1.Panel2MinSize    = 80;
     this.splitContainer1.Size             = new System.Drawing.Size(384, 235);
     this.splitContainer1.SplitterDistance = 117;
     this.splitContainer1.SplitterWidth    = 6;
     this.splitContainer1.TabIndex         = 12;
     //
     // lstResponse
     //
     this.lstResponse.ContextMenu         = this.cmLstResponse;
     this.lstResponse.Dock                = System.Windows.Forms.DockStyle.Fill;
     this.lstResponse.HorizontalScrollbar = true;
     this.lstResponse.Location            = new System.Drawing.Point(0, 0);
     this.lstResponse.Name                = "lstResponse";
     this.lstResponse.Size                = new System.Drawing.Size(384, 117);
     this.lstResponse.TabIndex            = 5;
     //
     // lblSgart
     //
     this.lblSgart.Anchor       = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
     this.lblSgart.Location     = new System.Drawing.Point(320, 93);
     this.lblSgart.Name         = "lblSgart";
     this.lblSgart.Size         = new System.Drawing.Size(64, 16);
     this.lblSgart.TabIndex     = 9;
     this.lblSgart.TabStop      = true;
     this.lblSgart.Text         = "by Sgart.it";
     this.lblSgart.TextAlign    = System.Drawing.ContentAlignment.MiddleCenter;
     this.lblSgart.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.lblSgart_LinkClicked);
     //
     // btnHelp
     //
     this.btnHelp.Anchor   = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
     this.btnHelp.Location = new System.Drawing.Point(320, 42);
     this.btnHelp.Name     = "btnHelp";
     this.btnHelp.Size     = new System.Drawing.Size(64, 24);
     this.btnHelp.TabIndex = 8;
     this.btnHelp.Text     = "Help";
     this.btnHelp.Click   += new System.EventHandler(this.btnHelp_Click);
     //
     // btnSend
     //
     this.btnSend.Anchor   = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
     this.btnSend.Location = new System.Drawing.Point(320, 2);
     this.btnSend.Name     = "btnSend";
     this.btnSend.Size     = new System.Drawing.Size(64, 32);
     this.btnSend.TabIndex = 7;
     this.btnSend.Text     = "Send";
     this.btnSend.Click   += new System.EventHandler(this.btnSend_Click);
     //
     // txtCommand
     //
     this.txtCommand.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.txtCommand.Location   = new System.Drawing.Point(0, 3);
     this.txtCommand.MaxLength  = 0;
     this.txtCommand.Multiline  = true;
     this.txtCommand.Name       = "txtCommand";
     this.txtCommand.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
     this.txtCommand.Size       = new System.Drawing.Size(312, 106);
     this.txtCommand.TabIndex   = 6;
     //
     // FormWinSMTP
     //
     this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
     this.ClientSize        = new System.Drawing.Size(384, 293);
     this.Controls.Add(this.splitContainer1);
     this.Controls.Add(this.panelTop);
     this.Icon        = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
     this.Menu        = this.mainMenu1;
     this.MinimumSize = new System.Drawing.Size(400, 300);
     this.Name        = "FormWinSMTP";
     this.Text        = "WinSMTPTest";
     this.Load       += new System.EventHandler(this.Form1_Load);
     this.panelTop.ResumeLayout(false);
     this.panelTop.PerformLayout();
     this.splitContainer1.Panel1.ResumeLayout(false);
     this.splitContainer1.Panel2.ResumeLayout(false);
     this.splitContainer1.Panel2.PerformLayout();
     this.splitContainer1.ResumeLayout(false);
     this.ResumeLayout(false);
 }
 private void InitializeComponent()
 {
     this.components         = new System.ComponentModel.Container();
     this.split2             = new SplitContainer();
     this.propertyList       = new ObjectPropertyBox();
     this.referenceList      = new PropertyGrid.PropertyGrid();
     this.contextMenu        = new System.Windows.Forms.ContextMenuStrip(this.components);
     this.bOpenReference     = new ToolStripMenuItem();
     this.bRemoveReference   = new ToolStripMenuItem();
     this.bReplaceWithCopy   = new ToolStripMenuItem();
     this.bRemoveSection     = new ToolStripMenuItem();
     this.additionalCommands = new Button();
     this.bAddReference      = new Button();
     this.referenceTypes     = new ComboBox();
     this.tooltips           = new ToolTip(this.components);
     this.split1             = new SplitContainer();
     this.description        = new Label();
     this.selected           = new Label();
     this.commandMenu        = new System.Windows.Forms.ContextMenuStrip(this.components);
     this.showReferences     = new ToolStripMenuItem();
     this.copyData           = new ToolStripMenuItem();
     this.addTodo            = new ToolStripMenuItem();
     this.importScene        = new ToolStripMenuItem();
     this.duplicateItem      = new ToolStripMenuItem();
     this.addMissingFields   = new ToolStripMenuItem();
     this.cleanItem          = new ToolStripMenuItem();
     ((ISupportInitialize)this.split2).BeginInit();
     this.split2.Panel1.SuspendLayout();
     this.split2.Panel2.SuspendLayout();
     this.split2.SuspendLayout();
     this.contextMenu.SuspendLayout();
     ((ISupportInitialize)this.split1).BeginInit();
     this.split1.Panel1.SuspendLayout();
     this.split1.Panel2.SuspendLayout();
     this.split1.SuspendLayout();
     this.commandMenu.SuspendLayout();
     base.SuspendLayout();
     this.split2.Dock     = DockStyle.Fill;
     this.split2.Location = new Point(0, 0);
     this.split2.Name     = "split2";
     this.split2.Panel1.Controls.Add(this.propertyList);
     this.split2.Panel2.Controls.Add(this.referenceList);
     this.split2.Panel2.Controls.Add(this.additionalCommands);
     this.split2.Panel2.Controls.Add(this.bAddReference);
     this.split2.Panel2.Controls.Add(this.referenceTypes);
     this.split2.Size                     = new System.Drawing.Size(529, 498);
     this.split2.SplitterDistance         = 297;
     this.split2.TabIndex                 = 1;
     this.split2.TabStop                  = false;
     this.propertyList.BackColor          = SystemColors.ControlDark;
     this.propertyList.Dock               = DockStyle.Fill;
     this.propertyList.Item               = null;
     this.propertyList.Location           = new Point(0, 0);
     this.propertyList.Margin             = new System.Windows.Forms.Padding(4);
     this.propertyList.Name               = "propertyList";
     this.propertyList.ShowDescription    = false;
     this.propertyList.Size               = new System.Drawing.Size(297, 498);
     this.propertyList.TabIndex           = 0;
     this.propertyList.Load              += new EventHandler(this.objectPropertyBox1_Load);
     this.referenceList.Anchor            = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
     this.referenceList.AutoScroll        = true;
     this.referenceList.AutoScrollMinSize = new System.Drawing.Size(0, 100);
     this.referenceList.BackColor         = SystemColors.ControlDark;
     this.referenceList.ContextMenuStrip  = this.contextMenu;
     this.referenceList.Location          = new Point(3, 50);
     this.referenceList.Name              = "referenceList";
     this.referenceList.Size              = new System.Drawing.Size(224, 447);
     this.referenceList.TabIndex          = 1;
     this.referenceList.Text              = "propertyGrid1";
     this.referenceList.PreviewKeyDown   += new PreviewKeyDownEventHandler(this.referenceList_PreviewKeyDown);
     this.contextMenu.Items.AddRange(new ToolStripItem[] { this.bOpenReference, this.bRemoveReference, this.bReplaceWithCopy, this.bRemoveSection });
     this.contextMenu.Name            = "contextMenuStrip1";
     this.contextMenu.Size            = new System.Drawing.Size(180, 92);
     this.contextMenu.Opening        += new CancelEventHandler(this.contextMenu_Opening);
     this.bOpenReference.Name         = "bOpenReference";
     this.bOpenReference.Size         = new System.Drawing.Size(179, 22);
     this.bOpenReference.Text         = "打开";
     this.bOpenReference.Click       += new EventHandler(this.openReference_Click);
     this.bRemoveReference.Name       = "bRemoveReference";
     this.bRemoveReference.Size       = new System.Drawing.Size(179, 22);
     this.bRemoveReference.Text       = "从列表中删除";
     this.bRemoveReference.Click     += new EventHandler(this.bRemoveReference_Click);
     this.bReplaceWithCopy.Name       = "bReplaceWithCopy";
     this.bReplaceWithCopy.Size       = new System.Drawing.Size(179, 22);
     this.bReplaceWithCopy.Text       = "替换并复制";
     this.bReplaceWithCopy.Click     += new EventHandler(this.replaceWithCopyToolStripMenuItem_Click);
     this.bRemoveSection.Name         = "bRemoveSection";
     this.bRemoveSection.Size         = new System.Drawing.Size(179, 22);
     this.bRemoveSection.Text         = "从列表中移除所有";
     this.bRemoveSection.Visible      = false;
     this.bRemoveSection.Click       += new EventHandler(this.bRemoveSection_Click);
     this.additionalCommands.Anchor   = AnchorStyles.Top | AnchorStyles.Right;
     this.additionalCommands.Location = new Point(200, 12);
     this.additionalCommands.Name     = "additionalCommands";
     this.additionalCommands.Size     = new System.Drawing.Size(25, 23);
     this.additionalCommands.TabIndex = 4;
     this.additionalCommands.Text     = "...";
     this.tooltips.SetToolTip(this.additionalCommands, "列出所有引用这个项目的游戏对象");
     this.additionalCommands.UseVisualStyleBackColor = true;
     this.additionalCommands.MouseDown += new MouseEventHandler(this.additionalCommands_MouseDown);
     this.bAddReference.Anchor          = AnchorStyles.Top | AnchorStyles.Right;
     this.bAddReference.Location        = new Point(135, 11);
     this.bAddReference.Name            = "bAddReference";
     this.bAddReference.Size            = new System.Drawing.Size(58, 23);
     this.bAddReference.TabIndex        = 3;
     this.bAddReference.Text            = "添加";
     this.tooltips.SetToolTip(this.bAddReference, "向列出的部分添加引用");
     this.bAddReference.UseVisualStyleBackColor = true;
     this.bAddReference.Click                 += new EventHandler(this.bAddReference_Click);
     this.referenceTypes.Anchor                = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
     this.referenceTypes.DropDownStyle         = ComboBoxStyle.DropDownList;
     this.referenceTypes.FormattingEnabled     = true;
     this.referenceTypes.Location              = new Point(13, 12);
     this.referenceTypes.Name                  = "referenceTypes";
     this.referenceTypes.Size                  = new System.Drawing.Size(122, 21);
     this.referenceTypes.TabIndex              = 2;
     this.referenceTypes.SelectedIndexChanged += new EventHandler(this.referenceTypes_SelectedIndexChanged);
     this.referenceTypes.Enter                += new EventHandler(this.referenceTypes_Enter);
     this.split1.Dock        = DockStyle.Fill;
     this.split1.Location    = new Point(0, 0);
     this.split1.Name        = "split1";
     this.split1.Orientation = Orientation.Horizontal;
     this.split1.Panel1.Controls.Add(this.split2);
     this.split1.Panel2.Controls.Add(this.description);
     this.split1.Panel2.Controls.Add(this.selected);
     this.split1.Size             = new System.Drawing.Size(529, 559);
     this.split1.SplitterDistance = 498;
     this.split1.TabIndex         = 2;
     this.split1.TabStop          = false;
     this.description.Anchor      = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
     this.description.Location    = new Point(12, 13);
     this.description.Name        = "description";
     this.description.Size        = new System.Drawing.Size(517, 44);
     this.description.TabIndex    = 1;
     this.description.Text        = "描述";
     this.selected.AutoSize       = true;
     this.selected.Font           = new System.Drawing.Font("Microsoft Sans Serif", 8.25f, FontStyle.Bold, GraphicsUnit.Point, 0);
     this.selected.Location       = new Point(3, 0);
     this.selected.Name           = "selected";
     this.selected.Size           = new System.Drawing.Size(85, 13);
     this.selected.TabIndex       = 0;
     this.selected.Text           = "选择的项目";
     this.commandMenu.Items.AddRange(new ToolStripItem[] { this.showReferences, this.copyData, this.addTodo, this.importScene, this.duplicateItem, this.addMissingFields, this.cleanItem });
     this.commandMenu.Name        = "commandMenu";
     this.commandMenu.Size        = new System.Drawing.Size(201, 180);
     this.showReferences.Name     = "showReferences";
     this.showReferences.Size     = new System.Drawing.Size(200, 22);
     this.showReferences.Text     = "显示引用";
     this.showReferences.Click   += new EventHandler(this.showReferences_Click);
     this.copyData.Name           = "copyData";
     this.copyData.Size           = new System.Drawing.Size(200, 22);
     this.copyData.Text           = "从项中复制数据";
     this.copyData.Click         += new EventHandler(this.copyData_Click);
     this.addTodo.Name            = "addTodo";
     this.addTodo.Size            = new System.Drawing.Size(200, 22);
     this.addTodo.Text            = "添加一个待办项目";
     this.addTodo.Click          += new EventHandler(this.addTodo_Click);
     this.importScene.Name        = "importScene";
     this.importScene.Size        = new System.Drawing.Size(200, 22);
     this.importScene.Text        = "导入场景";
     this.importScene.Click      += new EventHandler(this.importScene_Click);
     this.duplicateItem.Name      = "duplicateItem";
     this.duplicateItem.Size      = new System.Drawing.Size(200, 22);
     this.duplicateItem.Text      = "克隆本项目";
     this.duplicateItem.Click    += new EventHandler(this.duplicateItem_Click);
     this.addMissingFields.Name   = "addMissingFields";
     this.addMissingFields.Size   = new System.Drawing.Size(200, 22);
     this.addMissingFields.Text   = "添加丢失的字段";
     this.addMissingFields.Click += new EventHandler(this.addMissingFields_Click);
     this.cleanItem.Name          = "cleanItem";
     this.cleanItem.Size          = new System.Drawing.Size(200, 22);
     this.cleanItem.Text          = "删除过时的字段";
     this.cleanItem.Click        += new EventHandler(this.cleanItem_Click);
     this.AllowDrop           = true;
     base.AutoScaleDimensions = new SizeF(6f, 13f);
     base.AutoScaleMode       = System.Windows.Forms.AutoScaleMode.Font;
     base.ClientSize          = new System.Drawing.Size(529, 559);
     base.Controls.Add(this.split1);
     base.Name       = "itemproperties";
     this.Text       = "itemproperties";
     base.Activated += new EventHandler(this.itemproperties_Activated);
     this.split2.Panel1.ResumeLayout(false);
     this.split2.Panel2.ResumeLayout(false);
     ((ISupportInitialize)this.split2).EndInit();
     this.split2.ResumeLayout(false);
     this.contextMenu.ResumeLayout(false);
     this.split1.Panel1.ResumeLayout(false);
     this.split1.Panel2.ResumeLayout(false);
     this.split1.Panel2.PerformLayout();
     ((ISupportInitialize)this.split1).EndInit();
     this.split1.ResumeLayout(false);
     this.commandMenu.ResumeLayout(false);
     base.ResumeLayout(false);
 }
Example #7
0
 public void TrackSplitContainer(SplitContainer container, string key)
 {
     _memory.TrackSplitContainer(container, key);
 }
            private void InitializeComponent()
            {
                _addRootButton  = new Button();
                _addChildButton = new Button();
                _deleteButton   = new Button();
                _dialogBlock    = new NuGenCollectionEditorDialogBlock();
                _mainBlock      = new NuGenCollectionEditorMainBlock();
                _moveDownButton = _mainBlock.GetMoveDownButton();
                _moveUpButton   = _mainBlock.GetMoveUpButton();
                _propertyBlock  = new NuGenCollectionEditorPropertyBlock();
                _splitContainer = new SplitContainer();
                _treeView       = new NodesEditorTreeView();

                this.SuspendLayout();

                /* DialogBlock */

                _dialogBlock.Dock     = DockStyle.Bottom;
                _dialogBlock.Parent   = this;
                _dialogBlock.TabIndex = 10;

                Button okButton     = _dialogBlock.GetOkButton();
                Button cancelButton = _dialogBlock.GetCancelButton();

                okButton.Click     += _okButton_Click;
                cancelButton.Click += _cancelButton_Click;

                /* SplitContainer */

                _splitContainer.Dock          = DockStyle.Fill;
                _splitContainer.Panel1MinSize = 250;
                _splitContainer.Panel2MinSize = 100;
                _splitContainer.Parent        = this;
                _splitContainer.BringToFront();

                /* MainBlock */

                _mainBlock.Dock     = DockStyle.Fill;
                _mainBlock.Parent   = _splitContainer.Panel1;
                _mainBlock.TabIndex = 20;
                _mainBlock.SetTitle(Resources.Text_TreeNodeCollectionEditor_mainTitle);

                /* Action buttons */

                _moveDownButton.Click += _moveDownButton_Click;
                _moveUpButton.Click   += _moveUpButton_Click;

                _deleteButton.Dock   = DockStyle.Top;
                _deleteButton.Image  = Resources.Delete;
                _deleteButton.Click += _deleteButton_Click;

                Control.ControlCollection actionControls = _mainBlock.GetActionControls();
                actionControls.Add(_deleteButton);
                _deleteButton.BringToFront();

                /* Populate buttons */

                _addRootButton.Dock     = DockStyle.Left;
                _addRootButton.TabIndex = 10;
                _addRootButton.Text     = Resources.Text_TreeNodeCollectionEditor_addRootButton;
                _addRootButton.Click   += _addRootButton_Click;

                _addChildButton.Dock     = DockStyle.Left;
                _addChildButton.TabIndex = 20;
                _addChildButton.Text     = Resources.Text_TreeNodeCollectionEditor_addChildButton;
                _addChildButton.Click   += _addChildButton_Click;

                Control.ControlCollection populateControls = _mainBlock.GetPopulateControls();
                populateControls.Add(_addChildButton);
                populateControls.Add(_addRootButton);

                /* PropertyBlock */

                _propertyBlock.Dock     = DockStyle.Fill;
                _propertyBlock.Parent   = _splitContainer.Panel2;
                _propertyBlock.TabIndex = 30;
                _propertyBlock.SetTitle(Resources.Text_TreeNodeCollectionEditor_propertyTitleNone);
                _propertyBlock.SelectedObjectsChanged += _propertyBlock_SelectedObjectsChanged;

                /* TreeView */

                _treeView.Dock   = DockStyle.Fill;
                _treeView.Parent = _mainBlock;
                _treeView.BringToFront();
                _treeView.AfterSelect += _treeView_AfterSelect;

                /* Form */

                NuGenCollectionEditorInitializer.InitializeEditorForm(this);
                this.AcceptButton = okButton;
                this.CancelButton = cancelButton;
                this.Size         = new Size(580, 480);
                this.MinimumSize  = this.Size;
                this.Text         = Resources.Text_TreeNodeCollectionEditor_EditorForm;
                base.ResumeLayout(false);
            }
 private void InitializeComponent()
 {
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SSHTransfer));
     this.grpFiles = new System.Windows.Forms.GroupBox();
     this.tabControl1 = new System.Windows.Forms.TabControl();
     this.tpSimple = new System.Windows.Forms.TabPage();
     this.lblLocalFile = new System.Windows.Forms.Label();
     this.btnBrowse = new System.Windows.Forms.Button();
     this.txtLocalFile = new System.Windows.Forms.TextBox();
     this.lblRemoteFile = new System.Windows.Forms.Label();
     this.txtRemoteFile = new System.Windows.Forms.TextBox();
     this.tpFull = new System.Windows.Forms.TabPage();
     this.splitContainer1 = new System.Windows.Forms.SplitContainer();
     this.splitContainer2 = new System.Windows.Forms.SplitContainer();
     this.btnLocalBrowserGo = new System.Windows.Forms.Button();
     this.txtLocalBrowserPath = new System.Windows.Forms.TextBox();
     this.lvLocalBrowser = new EXControls.EXListView();
     this.clmLFBIcon = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
     this.clmName = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
     this.clSize = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
     this.splitContainer3 = new System.Windows.Forms.SplitContainer();
     this.btnRemoteList = new System.Windows.Forms.Button();
     this.txtRemoteFolderPath = new System.Windows.Forms.TextBox();
     this.lvSSHFileBrowser = new EXControls.EXListView();
     this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
     this.columnHeader2 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
     this.columnHeader3 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
     this.grpConnection = new System.Windows.Forms.GroupBox();
     this.radProtSFTP = new System.Windows.Forms.RadioButton();
     this.radProtSCP = new System.Windows.Forms.RadioButton();
     this.lblProtocol = new System.Windows.Forms.Label();
     this.lblPassword = new System.Windows.Forms.Label();
     this.lblUser = new System.Windows.Forms.Label();
     this.lblPort = new System.Windows.Forms.Label();
     this.lblHost = new System.Windows.Forms.Label();
     this.txtPort = new System.Windows.Forms.TextBox();
     this.txtHost = new System.Windows.Forms.TextBox();
     this.txtPassword = new System.Windows.Forms.TextBox();
     this.txtUser = new System.Windows.Forms.TextBox();
     this.btnTransfer = new System.Windows.Forms.Button();
     this.pbStatus = new System.Windows.Forms.ProgressBar();
     this.grpFiles.SuspendLayout();
     this.tabControl1.SuspendLayout();
     this.tpSimple.SuspendLayout();
     this.tpFull.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
     this.splitContainer1.Panel1.SuspendLayout();
     this.splitContainer1.Panel2.SuspendLayout();
     this.splitContainer1.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit();
     this.splitContainer2.Panel1.SuspendLayout();
     this.splitContainer2.Panel2.SuspendLayout();
     this.splitContainer2.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.splitContainer3)).BeginInit();
     this.splitContainer3.Panel1.SuspendLayout();
     this.splitContainer3.Panel2.SuspendLayout();
     this.splitContainer3.SuspendLayout();
     this.grpConnection.SuspendLayout();
     this.SuspendLayout();
     //
     // grpFiles
     //
     this.grpFiles.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.grpFiles.Controls.Add(this.tabControl1);
     this.grpFiles.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
     this.grpFiles.Location = new System.Drawing.Point(12, 153);
     this.grpFiles.Name = "grpFiles";
     this.grpFiles.Size = new System.Drawing.Size(976, 480);
     this.grpFiles.TabIndex = 2000;
     this.grpFiles.TabStop = false;
     this.grpFiles.Text = "Files";
     //
     // tabControl1
     //
     this.tabControl1.Controls.Add(this.tpSimple);
     this.tabControl1.Controls.Add(this.tpFull);
     this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill;
     this.tabControl1.Location = new System.Drawing.Point(3, 16);
     this.tabControl1.Name = "tabControl1";
     this.tabControl1.SelectedIndex = 0;
     this.tabControl1.Size = new System.Drawing.Size(970, 461);
     this.tabControl1.TabIndex = 51;
     this.tabControl1.SelectedIndexChanged += new System.EventHandler(this.tabControl1_SelectedIndexChanged);
     //
     // tpSimple
     //
     this.tpSimple.Controls.Add(this.lblLocalFile);
     this.tpSimple.Controls.Add(this.btnBrowse);
     this.tpSimple.Controls.Add(this.txtLocalFile);
     this.tpSimple.Controls.Add(this.lblRemoteFile);
     this.tpSimple.Controls.Add(this.txtRemoteFile);
     this.tpSimple.Location = new System.Drawing.Point(4, 22);
     this.tpSimple.Name = "tpSimple";
     this.tpSimple.Padding = new System.Windows.Forms.Padding(3);
     this.tpSimple.Size = new System.Drawing.Size(962, 435);
     this.tpSimple.TabIndex = 0;
     this.tpSimple.Text = Language.SSHTransfer_ApplyLanguage_Simple;
     this.tpSimple.UseVisualStyleBackColor = true;
     //
     // lblLocalFile
     //
     this.lblLocalFile.AutoSize = true;
     this.lblLocalFile.Location = new System.Drawing.Point(6, 28);
     this.lblLocalFile.Name = "lblLocalFile";
     this.lblLocalFile.Size = new System.Drawing.Size(52, 13);
     this.lblLocalFile.TabIndex = 10;
     this.lblLocalFile.Text = "Local file:";
     //
     // btnBrowse
     //
     this.btnBrowse.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
     this.btnBrowse.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
     this.btnBrowse.Location = new System.Drawing.Point(800, 24);
     this.btnBrowse.Name = "btnBrowse";
     this.btnBrowse.Size = new System.Drawing.Size(81, 23);
     this.btnBrowse.TabIndex = 30;
     this.btnBrowse.Text = "Browse";
     this.btnBrowse.UseVisualStyleBackColor = true;
     this.btnBrowse.Click += new System.EventHandler(this.btnBrowse_Click);
     //
     // txtLocalFile
     //
     this.txtLocalFile.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
     | System.Windows.Forms.AnchorStyles.Right)));
     this.txtLocalFile.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
     this.txtLocalFile.Location = new System.Drawing.Point(91, 26);
     this.txtLocalFile.Name = "txtLocalFile";
     this.txtLocalFile.Size = new System.Drawing.Size(703, 20);
     this.txtLocalFile.TabIndex = 20;
     //
     // lblRemoteFile
     //
     this.lblRemoteFile.AutoSize = true;
     this.lblRemoteFile.Location = new System.Drawing.Point(6, 54);
     this.lblRemoteFile.Name = "lblRemoteFile";
     this.lblRemoteFile.Size = new System.Drawing.Size(63, 13);
     this.lblRemoteFile.TabIndex = 40;
     this.lblRemoteFile.Text = "Remote file:";
     //
     // txtRemoteFile
     //
     this.txtRemoteFile.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
     | System.Windows.Forms.AnchorStyles.Right)));
     this.txtRemoteFile.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
     this.txtRemoteFile.Location = new System.Drawing.Point(91, 52);
     this.txtRemoteFile.Name = "txtRemoteFile";
     this.txtRemoteFile.Size = new System.Drawing.Size(790, 20);
     this.txtRemoteFile.TabIndex = 50;
     //
     // tpFull
     //
     this.tpFull.Controls.Add(this.splitContainer1);
     this.tpFull.Location = new System.Drawing.Point(4, 22);
     this.tpFull.Name = "tpFull";
     this.tpFull.Padding = new System.Windows.Forms.Padding(3);
     this.tpFull.Size = new System.Drawing.Size(962, 435);
     this.tpFull.TabIndex = 1;
     this.tpFull.Text = Language.SSHTransfer_ApplyLanguage_Full;
     this.tpFull.UseVisualStyleBackColor = true;
     //
     // splitContainer1
     //
     this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
     this.splitContainer1.Location = new System.Drawing.Point(3, 3);
     this.splitContainer1.Name = "splitContainer1";
     //
     // splitContainer1.Panel1
     //
     this.splitContainer1.Panel1.Controls.Add(this.splitContainer2);
     //
     // splitContainer1.Panel2
     //
     this.splitContainer1.Panel2.Controls.Add(this.splitContainer3);
     this.splitContainer1.Size = new System.Drawing.Size(956, 429);
     this.splitContainer1.SplitterDistance = 455;
     this.splitContainer1.TabIndex = 0;
     //
     // splitContainer2
     //
     this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
     this.splitContainer2.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
     this.splitContainer2.Location = new System.Drawing.Point(0, 0);
     this.splitContainer2.Name = "splitContainer2";
     this.splitContainer2.Orientation = System.Windows.Forms.Orientation.Horizontal;
     //
     // splitContainer2.Panel1
     //
     this.splitContainer2.Panel1.Controls.Add(this.btnLocalBrowserGo);
     this.splitContainer2.Panel1.Controls.Add(this.txtLocalBrowserPath);
     //
     // splitContainer2.Panel2
     //
     this.splitContainer2.Panel2.Controls.Add(this.lvLocalBrowser);
     this.splitContainer2.Size = new System.Drawing.Size(455, 429);
     this.splitContainer2.SplitterDistance = 31;
     this.splitContainer2.TabIndex = 0;
     //
     // btnLocalBrowserGo
     //
     this.btnLocalBrowserGo.Anchor = System.Windows.Forms.AnchorStyles.Right;
     this.btnLocalBrowserGo.Location = new System.Drawing.Point(384, 2);
     this.btnLocalBrowserGo.Name = "btnLocalBrowserGo";
     this.btnLocalBrowserGo.Size = new System.Drawing.Size(68, 27);
     this.btnLocalBrowserGo.TabIndex = 1;
     this.btnLocalBrowserGo.Text = "List";
     this.btnLocalBrowserGo.UseVisualStyleBackColor = true;
     this.btnLocalBrowserGo.Click += new System.EventHandler(this.btnLocalBrowserGo_Click);
     //
     // txtLocalBrowserPath
     //
     this.txtLocalBrowserPath.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
     this.txtLocalBrowserPath.Location = new System.Drawing.Point(3, 6);
     this.txtLocalBrowserPath.Name = "txtLocalBrowserPath";
     this.txtLocalBrowserPath.Size = new System.Drawing.Size(375, 20);
     this.txtLocalBrowserPath.TabIndex = 0;
     //
     // lvLocalBrowser
     //
     this.lvLocalBrowser.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
     this.clmLFBIcon,
     this.clmName,
     this.clSize});
     this.lvLocalBrowser.ControlPadding = 4;
     this.lvLocalBrowser.Dock = System.Windows.Forms.DockStyle.Fill;
     this.lvLocalBrowser.FullRowSelect = true;
     this.lvLocalBrowser.Location = new System.Drawing.Point(0, 0);
     this.lvLocalBrowser.Name = "lvLocalBrowser";
     this.lvLocalBrowser.OwnerDraw = true;
     this.lvLocalBrowser.Size = new System.Drawing.Size(455, 394);
     this.lvLocalBrowser.TabIndex = 0;
     this.lvLocalBrowser.UseCompatibleStateImageBehavior = false;
     this.lvLocalBrowser.View = System.Windows.Forms.View.Details;
     this.lvLocalBrowser.ItemActivate += new System.EventHandler(this.lvLocalBrowser_ItemActivate);
     this.lvLocalBrowser.SelectedIndexChanged += new System.EventHandler(this.lvLocalBrowser_SelectedIndexChanged);
     this.lvLocalBrowser.Click += new System.EventHandler(this.lvLocalBrowser_Click);
     this.lvLocalBrowser.MouseClick += new System.Windows.Forms.MouseEventHandler(this.lvLocalBrowser_MouseClick);
     this.lvLocalBrowser.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.lvLocalBrowser_MouseDoubleClick);
     //
     // clmLFBIcon
     //
     this.clmLFBIcon.Text = "";
     this.clmLFBIcon.Width = 20;
     //
     // clmName
     //
     this.clmName.Text = "Name";
     //
     // clSize
     //
     this.clSize.Text = "Size";
     //
     // splitContainer3
     //
     this.splitContainer3.Dock = System.Windows.Forms.DockStyle.Fill;
     this.splitContainer3.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
     this.splitContainer3.Location = new System.Drawing.Point(0, 0);
     this.splitContainer3.Name = "splitContainer3";
     this.splitContainer3.Orientation = System.Windows.Forms.Orientation.Horizontal;
     //
     // splitContainer3.Panel1
     //
     this.splitContainer3.Panel1.Controls.Add(this.btnRemoteList);
     this.splitContainer3.Panel1.Controls.Add(this.txtRemoteFolderPath);
     //
     // splitContainer3.Panel2
     //
     this.splitContainer3.Panel2.Controls.Add(this.lvSSHFileBrowser);
     this.splitContainer3.Size = new System.Drawing.Size(497, 429);
     this.splitContainer3.SplitterDistance = 32;
     this.splitContainer3.TabIndex = 1;
     //
     // btnRemoteList
     //
     this.btnRemoteList.Anchor = System.Windows.Forms.AnchorStyles.Right;
     this.btnRemoteList.Location = new System.Drawing.Point(426, 2);
     this.btnRemoteList.Name = "btnRemoteList";
     this.btnRemoteList.Size = new System.Drawing.Size(68, 27);
     this.btnRemoteList.TabIndex = 3;
     this.btnRemoteList.Text = "List";
     this.btnRemoteList.UseVisualStyleBackColor = true;
     this.btnRemoteList.Click += new System.EventHandler(this.button1_Click);
     //
     // txtRemoteFolderPath
     //
     this.txtRemoteFolderPath.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
     this.txtRemoteFolderPath.Location = new System.Drawing.Point(3, 6);
     this.txtRemoteFolderPath.Name = "txtRemoteFolderPath";
     this.txtRemoteFolderPath.Size = new System.Drawing.Size(417, 20);
     this.txtRemoteFolderPath.TabIndex = 2;
     this.txtRemoteFolderPath.Text = "/";
     //
     // lvSSHFileBrowser
     //
     this.lvSSHFileBrowser.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
     this.columnHeader1,
     this.columnHeader2,
     this.columnHeader3});
     this.lvSSHFileBrowser.ControlPadding = 4;
     this.lvSSHFileBrowser.Dock = System.Windows.Forms.DockStyle.Fill;
     this.lvSSHFileBrowser.FullRowSelect = true;
     this.lvSSHFileBrowser.Location = new System.Drawing.Point(0, 0);
     this.lvSSHFileBrowser.Name = "lvSSHFileBrowser";
     this.lvSSHFileBrowser.OwnerDraw = true;
     this.lvSSHFileBrowser.Size = new System.Drawing.Size(497, 393);
     this.lvSSHFileBrowser.TabIndex = 1;
     this.lvSSHFileBrowser.UseCompatibleStateImageBehavior = false;
     this.lvSSHFileBrowser.View = System.Windows.Forms.View.Details;
     this.lvSSHFileBrowser.ItemActivate += new System.EventHandler(this.lvSSHFileBrowser_ItemActivate);
     this.lvSSHFileBrowser.Click += new System.EventHandler(this.lvSSHFileBrowser_Click);
     this.lvSSHFileBrowser.MouseClick += new System.Windows.Forms.MouseEventHandler(this.lvSSHFileBrowser_MouseClick_1);
     this.lvSSHFileBrowser.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.lvSSHFileBrowser_MouseClick);
     //
     // columnHeader1
     //
     this.columnHeader1.Text = "";
     this.columnHeader1.Width = 20;
     //
     // columnHeader2
     //
     this.columnHeader2.Text = "Name";
     //
     // columnHeader3
     //
     this.columnHeader3.Text = "Size";
     //
     // grpConnection
     //
     this.grpConnection.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
     | System.Windows.Forms.AnchorStyles.Right)));
     this.grpConnection.Controls.Add(this.radProtSFTP);
     this.grpConnection.Controls.Add(this.radProtSCP);
     this.grpConnection.Controls.Add(this.lblProtocol);
     this.grpConnection.Controls.Add(this.lblPassword);
     this.grpConnection.Controls.Add(this.lblUser);
     this.grpConnection.Controls.Add(this.lblPort);
     this.grpConnection.Controls.Add(this.lblHost);
     this.grpConnection.Controls.Add(this.txtPort);
     this.grpConnection.Controls.Add(this.txtHost);
     this.grpConnection.Controls.Add(this.txtPassword);
     this.grpConnection.Controls.Add(this.txtUser);
     this.grpConnection.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
     this.grpConnection.Location = new System.Drawing.Point(12, 12);
     this.grpConnection.Name = "grpConnection";
     this.grpConnection.Size = new System.Drawing.Size(976, 135);
     this.grpConnection.TabIndex = 1000;
     this.grpConnection.TabStop = false;
     this.grpConnection.Text = "Connection";
     //
     // radProtSFTP
     //
     this.radProtSFTP.AutoSize = true;
     this.radProtSFTP.Checked = true;
     this.radProtSFTP.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
     this.radProtSFTP.Location = new System.Drawing.Point(153, 103);
     this.radProtSFTP.Name = "radProtSFTP";
     this.radProtSFTP.Size = new System.Drawing.Size(51, 17);
     this.radProtSFTP.TabIndex = 110;
     this.radProtSFTP.TabStop = true;
     this.radProtSFTP.Text = "SFTP";
     this.radProtSFTP.UseVisualStyleBackColor = true;
     this.radProtSFTP.CheckedChanged += new System.EventHandler(this.radProtSFTP_CheckedChanged);
     //
     // radProtSCP
     //
     this.radProtSCP.AutoSize = true;
     this.radProtSCP.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
     this.radProtSCP.Location = new System.Drawing.Point(92, 103);
     this.radProtSCP.Name = "radProtSCP";
     this.radProtSCP.Size = new System.Drawing.Size(45, 17);
     this.radProtSCP.TabIndex = 100;
     this.radProtSCP.Text = "SCP";
     this.radProtSCP.UseVisualStyleBackColor = true;
     //
     // lblProtocol
     //
     this.lblProtocol.AutoSize = true;
     this.lblProtocol.Location = new System.Drawing.Point(20, 105);
     this.lblProtocol.Name = "lblProtocol";
     this.lblProtocol.Size = new System.Drawing.Size(49, 13);
     this.lblProtocol.TabIndex = 90;
     this.lblProtocol.Text = "Protocol:";
     //
     // lblPassword
     //
     this.lblPassword.AutoSize = true;
     this.lblPassword.Location = new System.Drawing.Point(20, 79);
     this.lblPassword.Name = "lblPassword";
     this.lblPassword.Size = new System.Drawing.Size(56, 13);
     this.lblPassword.TabIndex = 70;
     this.lblPassword.Text = "Password:"******"lblUser";
     this.lblUser.Size = new System.Drawing.Size(32, 13);
     this.lblUser.TabIndex = 50;
     this.lblUser.Text = "User:"******"lblPort";
     this.lblPort.Size = new System.Drawing.Size(29, 13);
     this.lblPort.TabIndex = 30;
     this.lblPort.Text = "Port:";
     //
     // lblHost
     //
     this.lblHost.AutoSize = true;
     this.lblHost.Location = new System.Drawing.Point(20, 27);
     this.lblHost.Name = "lblHost";
     this.lblHost.Size = new System.Drawing.Size(32, 13);
     this.lblHost.TabIndex = 10;
     this.lblHost.Text = "Host:";
     //
     // txtPort
     //
     this.txtPort.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
     this.txtPort.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
     this.txtPort.Location = new System.Drawing.Point(925, 25);
     this.txtPort.Name = "txtPort";
     this.txtPort.Size = new System.Drawing.Size(30, 20);
     this.txtPort.TabIndex = 40;
     //
     // txtHost
     //
     this.txtHost.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
     | System.Windows.Forms.AnchorStyles.Right)));
     this.txtHost.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
     this.txtHost.Location = new System.Drawing.Point(105, 25);
     this.txtHost.Name = "txtHost";
     this.txtHost.Size = new System.Drawing.Size(779, 20);
     this.txtHost.TabIndex = 20;
     //
     // txtPassword
     //
     this.txtPassword.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
     | System.Windows.Forms.AnchorStyles.Right)));
     this.txtPassword.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
     this.txtPassword.Location = new System.Drawing.Point(105, 77);
     this.txtPassword.Name = "txtPassword";
     this.txtPassword.PasswordChar = '*';
     this.txtPassword.Size = new System.Drawing.Size(779, 20);
     this.txtPassword.TabIndex = 80;
     //
     // txtUser
     //
     this.txtUser.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
     | System.Windows.Forms.AnchorStyles.Right)));
     this.txtUser.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
     this.txtUser.Location = new System.Drawing.Point(105, 51);
     this.txtUser.Name = "txtUser";
     this.txtUser.Size = new System.Drawing.Size(779, 20);
     this.txtUser.TabIndex = 60;
     //
     // btnTransfer
     //
     this.btnTransfer.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
     this.btnTransfer.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
     this.btnTransfer.Image = global::My.Resources.Resources.SSHTransfer;
     this.btnTransfer.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
     this.btnTransfer.Location = new System.Drawing.Point(905, 668);
     this.btnTransfer.Name = "btnTransfer";
     this.btnTransfer.Size = new System.Drawing.Size(83, 29);
     this.btnTransfer.TabIndex = 10000;
     this.btnTransfer.Text = Language.SSHTransfer_Upload_Transfer;
     this.btnTransfer.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
     this.btnTransfer.UseVisualStyleBackColor = true;
     this.btnTransfer.Click += new System.EventHandler(this.btnTransfer_Click);
     //
     // pbStatus
     //
     this.pbStatus.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
     | System.Windows.Forms.AnchorStyles.Right)));
     this.pbStatus.Location = new System.Drawing.Point(12, 639);
     this.pbStatus.Name = "pbStatus";
     this.pbStatus.Size = new System.Drawing.Size(976, 23);
     this.pbStatus.TabIndex = 3000;
     //
     // SSHTransfer
     //
     this.ClientSize = new System.Drawing.Size(1000, 709);
     this.Controls.Add(this.grpFiles);
     this.Controls.Add(this.grpConnection);
     this.Controls.Add(this.btnTransfer);
     this.Controls.Add(this.pbStatus);
     this.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
     this.Name = "SSHTransfer";
     this.TabText = "SSH File Transfer";
     this.Text = "SSH File Transfer";
     this.Load += new System.EventHandler(this.SSHTransfer_Load);
     this.grpFiles.ResumeLayout(false);
     this.tabControl1.ResumeLayout(false);
     this.tpSimple.ResumeLayout(false);
     this.tpSimple.PerformLayout();
     this.tpFull.ResumeLayout(false);
     this.splitContainer1.Panel1.ResumeLayout(false);
     this.splitContainer1.Panel2.ResumeLayout(false);
     ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
     this.splitContainer1.ResumeLayout(false);
     this.splitContainer2.Panel1.ResumeLayout(false);
     this.splitContainer2.Panel1.PerformLayout();
     this.splitContainer2.Panel2.ResumeLayout(false);
     ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit();
     this.splitContainer2.ResumeLayout(false);
     this.splitContainer3.Panel1.ResumeLayout(false);
     this.splitContainer3.Panel1.PerformLayout();
     this.splitContainer3.Panel2.ResumeLayout(false);
     ((System.ComponentModel.ISupportInitialize)(this.splitContainer3)).EndInit();
     this.splitContainer3.ResumeLayout(false);
     this.grpConnection.ResumeLayout(false);
     this.grpConnection.PerformLayout();
     this.ResumeLayout(false);
 }
Example #10
0
        //////////////////////////////////////////////////////////////////////////
        protected void LoadControls(Control ParentControl, SettingsNode RootNode)
        {
            foreach (Control C in ParentControl.Controls)
            {
                if (C is ILayoutAwareControl)
                {
                    ((ILayoutAwareControl)C).LoadControlLayout(RootNode);
                }
                else
                {
                    if (C is SplitContainer)
                    {
                        SplitContainer Ctrl = C as SplitContainer;
                        if (!Ctrl.IsSplitterFixed)
                        {
                            SettingsNode Node = RootNode.GetNode(Ctrl.Name);
                            if (Node != null)
                            {
                                try
                                {
                                    Ctrl.SplitterDistance = Node.GetInt("SplitterDistance", Ctrl.SplitterDistance);
                                }
                                catch
                                {
                                }
                            }
                        }
                    }

                    if (C is ListView)
                    {
                        ListView     Ctrl = C as ListView;
                        SettingsNode Node = RootNode.GetNode(Ctrl.Name, false, true);
                        if (Node != null)
                        {
                            for (int i = 0; i < Ctrl.Columns.Count; i++)
                            {
                                ColumnHeader Col = Ctrl.Columns[i];
                                Col.Width = Node.GetInt("Col" + i.ToString() + "Width", Col.Width);
                            }
                        }
                    }

                    if (C is TabControl)
                    {
                        TabControl   Ctrl = C as TabControl;
                        SettingsNode Node = RootNode.GetNode(Ctrl.Name, false, true);
                        if (Node != null)
                        {
                            int SelIndex = Node.GetInt("SelectedIndex", Ctrl.SelectedIndex);
                            if (SelIndex >= 0 && SelIndex < Ctrl.TabCount)
                            {
                                Ctrl.SelectedIndex = SelIndex;
                            }
                        }
                    }
                }

                if (C.Controls.Count > 0)
                {
                    LoadControls(C, RootNode);
                }
            }
        }
 public SplitterPanel(SplitContainer owner)
 {
     this.owner = owner;
 }
Example #12
0
 private void InitializeComponent()
 {
     this.components                = new Container();
     this.listView                  = new ListView();
     this.columnItem                = new ColumnHeader();
     this.columnType                = new ColumnHeader();
     this.columnState               = new ColumnHeader();
     this.columnPriority            = new ColumnHeader();
     this.columnAssigned            = new ColumnHeader();
     this.columnDesc                = new ColumnHeader();
     this.contextMenu               = new ContextMenuStrip(this.components);
     this.openItemToolStripMenuItem = new ToolStripMenuItem();
     this.stateToolStripMenuItem    = new ToolStripMenuItem();
     this.newToolStripMenuItem      = new ToolStripMenuItem();
     this.updatedToolStripMenuItem  = new ToolStripMenuItem();
     this.completeToolStripMenuItem = new ToolStripMenuItem();
     this.priorityToolStripMenuItem = new ToolStripMenuItem();
     this.highToolStripMenuItem     = new ToolStripMenuItem();
     this.mediumToolStripMenuItem   = new ToolStripMenuItem();
     this.lowToolStripMenuItem      = new ToolStripMenuItem();
     this.assignToToolStripMenuItem = new ToolStripMenuItem();
     this.meToolStripMenuItem       = new ToolStripMenuItem();
     this.toolStripSeparator1       = new ToolStripSeparator();
     this.allMods           = new ToolStripMenuItem();
     this.completedItems    = new ToolStripMenuItem();
     this.editDescription   = new TextBox();
     this.lockedDescription = new TextBox();
     this.splitContainer1   = new SplitContainer();
     this.contextMenu.SuspendLayout();
     ((ISupportInitialize)this.splitContainer1).BeginInit();
     this.splitContainer1.Panel1.SuspendLayout();
     this.splitContainer1.Panel2.SuspendLayout();
     this.splitContainer1.SuspendLayout();
     base.SuspendLayout();
     this.listView.AllowColumnReorder = true;
     this.listView.Columns.AddRange(new ColumnHeader[] { this.columnItem, this.columnType, this.columnState, this.columnPriority, this.columnAssigned, this.columnDesc });
     this.listView.ContextMenuStrip = this.contextMenu;
     this.listView.Dock             = DockStyle.Fill;
     this.listView.FullRowSelect    = true;
     this.listView.HideSelection    = false;
     this.listView.Location         = new Point(0, 0);
     this.listView.Name             = "listView";
     this.listView.ShowItemToolTips = true;
     this.listView.Size             = new Size(924, 312);
     this.listView.TabIndex         = 0;
     this.listView.UseCompatibleStateImageBehavior = false;
     this.listView.View                  = View.Details;
     this.listView.ColumnClick          += new ColumnClickEventHandler(this.listView_ColumnClick);
     this.listView.SelectedIndexChanged += new EventHandler(this.listView_SelectedIndexChanged);
     this.listView.SizeChanged          += new EventHandler(this.listView_SizeChanged);
     this.listView.DoubleClick          += new EventHandler(this.openItemToolStripMenuItem_Click);
     this.columnItem.Text                = "项目";
     this.columnItem.Width               = 120;
     this.columnType.Text                = "类型";
     this.columnType.Width               = 80;
     this.columnState.Text               = "状态";
     this.columnPriority.Text            = "优先级";
     this.columnAssigned.Text            = "指派给";
     this.columnAssigned.Width           = 80;
     this.columnDesc.Text                = "描述";
     this.columnDesc.Width               = 500;
     this.contextMenu.Items.AddRange(new ToolStripItem[] { this.openItemToolStripMenuItem, this.stateToolStripMenuItem, this.priorityToolStripMenuItem, this.assignToToolStripMenuItem, this.toolStripSeparator1, this.allMods, this.completedItems });
     this.contextMenu.Name                 = "contextMenu";
     this.contextMenu.Size                 = new Size(170, 142);
     this.contextMenu.Opening             += new CancelEventHandler(this.contextMenu_Opening);
     this.openItemToolStripMenuItem.Name   = "openItemToolStripMenuItem";
     this.openItemToolStripMenuItem.Size   = new Size(169, 22);
     this.openItemToolStripMenuItem.Text   = "打开项目";
     this.openItemToolStripMenuItem.Click += new EventHandler(this.openItemToolStripMenuItem_Click);
     this.stateToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { this.newToolStripMenuItem, this.updatedToolStripMenuItem, this.completeToolStripMenuItem });
     this.stateToolStripMenuItem.Name      = "stateToolStripMenuItem";
     this.stateToolStripMenuItem.Size      = new Size(169, 22);
     this.stateToolStripMenuItem.Text      = "状态";
     this.newToolStripMenuItem.Name        = "newToolStripMenuItem";
     this.newToolStripMenuItem.Size        = new Size(126, 22);
     this.newToolStripMenuItem.Text        = "新增";
     this.newToolStripMenuItem.Click      += new EventHandler(this.newToolStripMenuItem_Click);
     this.updatedToolStripMenuItem.Name    = "updatedToolStripMenuItem";
     this.updatedToolStripMenuItem.Size    = new Size(126, 22);
     this.updatedToolStripMenuItem.Text    = "更新";
     this.updatedToolStripMenuItem.Click  += new EventHandler(this.updatedToolStripMenuItem_Click);
     this.completeToolStripMenuItem.Name   = "completeToolStripMenuItem";
     this.completeToolStripMenuItem.Size   = new Size(126, 22);
     this.completeToolStripMenuItem.Text   = "完成";
     this.completeToolStripMenuItem.Click += new EventHandler(this.completeToolStripMenuItem_Click);
     this.priorityToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { this.highToolStripMenuItem, this.mediumToolStripMenuItem, this.lowToolStripMenuItem });
     this.priorityToolStripMenuItem.Name = "priorityToolStripMenuItem";
     this.priorityToolStripMenuItem.Size = new Size(169, 22);
     this.priorityToolStripMenuItem.Text = "优先级";
     this.highToolStripMenuItem.Name     = "highToolStripMenuItem";
     this.highToolStripMenuItem.Size     = new Size(119, 22);
     this.highToolStripMenuItem.Text     = "高";
     this.highToolStripMenuItem.Click   += new EventHandler(this.highToolStripMenuItem_Click);
     this.mediumToolStripMenuItem.Name   = "mediumToolStripMenuItem";
     this.mediumToolStripMenuItem.Size   = new Size(119, 22);
     this.mediumToolStripMenuItem.Text   = "中";
     this.mediumToolStripMenuItem.Click += new EventHandler(this.mediumToolStripMenuItem_Click);
     this.lowToolStripMenuItem.Name      = "lowToolStripMenuItem";
     this.lowToolStripMenuItem.Size      = new Size(119, 22);
     this.lowToolStripMenuItem.Text      = "低";
     this.lowToolStripMenuItem.Click    += new EventHandler(this.lowToolStripMenuItem_Click);
     this.assignToToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { this.meToolStripMenuItem });
     this.assignToToolStripMenuItem.Name = "assignToToolStripMenuItem";
     this.assignToToolStripMenuItem.Size = new Size(169, 22);
     this.assignToToolStripMenuItem.Text = "指派给";
     this.meToolStripMenuItem.Name       = "meToolStripMenuItem";
     this.meToolStripMenuItem.Size       = new Size(91, 22);
     this.meToolStripMenuItem.Text       = "我";
     this.meToolStripMenuItem.Click     += new EventHandler(this.assignToolStripMenuItem_Click);
     this.toolStripSeparator1.Name       = "toolStripSeparator1";
     this.toolStripSeparator1.Size       = new Size(166, 6);
     this.allMods.CheckOnClick           = true;
     this.allMods.Name   = "allMods";
     this.allMods.Size   = new Size(169, 22);
     this.allMods.Text   = "项目用于所有MOD";
     this.allMods.Click += new EventHandler(this.allMods_Click);
     this.completedItems.CheckOnClick         = true;
     this.completedItems.Name                 = "completedItems";
     this.completedItems.Size                 = new Size(169, 22);
     this.completedItems.Text                 = "已完成的项目";
     this.completedItems.Click               += new EventHandler(this.completedItems_Click);
     this.editDescription.Anchor              = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
     this.editDescription.Location            = new Point(3, 33);
     this.editDescription.Multiline           = true;
     this.editDescription.Name                = "editDescription";
     this.editDescription.ScrollBars          = ScrollBars.Vertical;
     this.editDescription.Size                = new Size(918, 161);
     this.editDescription.TabIndex            = 3;
     this.editDescription.TextChanged        += new EventHandler(this.editDescription_TextChanged);
     this.editDescription.MouseDoubleClick   += new MouseEventHandler(this.lockedDescription_MouseDoubleClick);
     this.lockedDescription.Anchor            = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
     this.lockedDescription.Location          = new Point(3, 3);
     this.lockedDescription.Multiline         = true;
     this.lockedDescription.Name              = "lockedDescription";
     this.lockedDescription.ReadOnly          = true;
     this.lockedDescription.Size              = new Size(918, 24);
     this.lockedDescription.TabIndex          = 4;
     this.lockedDescription.MouseDoubleClick += new MouseEventHandler(this.lockedDescription_MouseDoubleClick);
     this.splitContainer1.Dock                = DockStyle.Fill;
     this.splitContainer1.Location            = new Point(0, 0);
     this.splitContainer1.Name                = "splitContainer1";
     this.splitContainer1.Orientation         = Orientation.Horizontal;
     this.splitContainer1.Panel1.Controls.Add(this.listView);
     this.splitContainer1.Panel2.Controls.Add(this.editDescription);
     this.splitContainer1.Panel2.Controls.Add(this.lockedDescription);
     this.splitContainer1.Size             = new Size(924, 513);
     this.splitContainer1.SplitterDistance = 312;
     this.splitContainer1.TabIndex         = 5;
     base.AutoScaleDimensions = new SizeF(6f, 13f);
     base.AutoScaleMode       = AutoScaleMode.Font;
     base.ClientSize          = new Size(924, 513);
     base.Controls.Add(this.splitContainer1);
     base.FormBorderStyle = FormBorderStyle.SizableToolWindow;
     base.Name            = "ToDo";
     this.Text            = "待办项目列表";
     base.FormClosing    += new FormClosingEventHandler(this.ToDo_FormClosing);
     base.Shown          += new EventHandler(this.ToDo_Shown);
     this.contextMenu.ResumeLayout(false);
     this.splitContainer1.Panel1.ResumeLayout(false);
     this.splitContainer1.Panel2.ResumeLayout(false);
     this.splitContainer1.Panel2.PerformLayout();
     ((ISupportInitialize)this.splitContainer1).EndInit();
     this.splitContainer1.ResumeLayout(false);
     base.ResumeLayout(false);
 }
Example #13
0
        public HistoryPanel()
        {
            InitializeComponent();

            #region ToolStrip
            var toolStrip = new ToolStrip
            {
                GripStyle = ToolStripGripStyle.Hidden,
                BackColor = LookAndFeel.Color.ToolStrip,
                Renderer  = new ToolStripRenderer()
            };


            _clearButton = new ToolStripButton
            {
                Image = Properties.Resources.Clear,
                ImageTransparentColor = Color.Magenta,
                ToolTipText           = "Clear all session messages"
            };
            _clearButton.Click += ClearButtonClick;

            _resendButton = new ToolStripButton
            {
                Image = Properties.Resources.Send,
                ImageTransparentColor = Color.White,
                ToolTipText           = "Resend the selected message"
            };
            _resendButton.Click += ResendButtonClick;

            _exportButton = new ToolStripButton
            {
                Image = Properties.Resources.Export,
                ImageTransparentColor = Color.Magenta,
                ToolTipText           = "Export the message history to a text file"
            };
            _exportButton.Click += ExportButtonClick;

            _tailMessagesCheckBox = new ToolStripCheckBox();
            _tailMessagesCheckBox.CheckChanged += TailMessagesCheckBoxCheckChanged;

            toolStrip.Items.AddRange(new ToolStripItem[]
            {
                _clearButton,
                _resendButton,
                _exportButton,
                new ToolStripLabel("Tail Messages"),
                _tailMessagesCheckBox
            });

            TopToolStripPanel.Join(toolStrip);

            #endregion

            #region MenuStrip
            var menu = new ToolStripMenuItem("Action");
            SetMenuStrip(menu);

            _clearMenuItem        = new ToolStripMenuItem("Clear", _clearButton.Image);
            _clearMenuItem.Click += ClearButtonClick;
            menu.DropDownItems.Add(_clearMenuItem);

            _resendMenuItem        = new ToolStripMenuItem("Resend", _resendButton.Image);
            _resendMenuItem.Click += ResendButtonClick;
            menu.DropDownItems.Add(_resendMenuItem);

            _exportMenuItem        = new ToolStripMenuItem("Export", _exportButton.Image);
            _exportMenuItem.Click += ExportButtonClick;
            menu.DropDownItems.Add(_exportMenuItem);
            #endregion

            _messageSearchTextBox = new SearchTextBox
            {
                Dock = DockStyle.Top,
            };
            _messageSearchTextBox.TextChanged += MessageSearchTextBoxTextChanged;
            _fieldSearchTextBox = new SearchTextBox
            {
                Dock = DockStyle.Top,
            };
            _fieldSearchTextBox.TextChanged += FieldSearchTextBoxTextChanged;

            var container = new SplitContainer
            {
                Dock        = DockStyle.Fill,
                Orientation = Orientation.Vertical
            };

            _messageGrid = new HistoryMessageDataGridView
            {
                Dock        = DockStyle.Fill,
                VirtualMode = true
            };
            _messageGrid.SelectionChanged += MessageGridSelectionChanged;
            _messageGrid.CellValueNeeded  += MessageGridCellValueNeeded;
            _messageGrid.CellFormatting   += MessageGridCellFormatting;

            _messageTable             = new MessageDataTable("Messages");
            _messageView              = new DataView(_messageTable);
            _messageView.ListChanged += ViewListChanged;

            _fieldTable = new FieldDataTable("Fields");
            _fieldView  = new DataView(_fieldTable);

            _fieldGrid = new FieldDataGridView
            {
                Dock       = DockStyle.Fill,
                DataSource = _fieldView
            };
            _fieldGrid.SelectionChanged += FieldGridSelectionChanged;

            _inspectorPanel = new InspectorPanel {
                Dock = DockStyle.Fill
            };

            var rightSplitter = new SplitContainer
            {
                Dock             = DockStyle.Fill,
                Orientation      = Orientation.Vertical,
                SplitterDistance = 110
            };

            var messageSplitter = new SplitContainer
            {
                Dock             = DockStyle.Fill,
                Orientation      = Orientation.Horizontal,
                SplitterDistance = ClientRectangle.Height
            };

            _rawMessage = new TextBox
            {
                Dock        = DockStyle.Fill,
                Multiline   = true,
                ReadOnly    = true,
                Font        = new Font("Consolas", 10),
                BackColor   = LookAndFeel.Color.GridCellBackground,
                ForeColor   = LookAndFeel.Color.GridCellForeground,
                BorderStyle = BorderStyle.None
            };

            _statusMessage = new TextBox
            {
                Dock     = DockStyle.Bottom,
                ReadOnly = true
            };

            messageSplitter.Panel1.Controls.Add(_fieldGrid);
            messageSplitter.Panel1.Controls.Add(_fieldSearchTextBox);
            messageSplitter.Panel2.Controls.Add(_rawMessage);
            messageSplitter.Panel2.Controls.Add(_statusMessage);

            rightSplitter.Panel1.Controls.Add(messageSplitter);
            rightSplitter.Panel2.Controls.Add(_inspectorPanel);

            container.Panel1.Controls.Add(_messageGrid);
            container.Panel1.Controls.Add(_messageSearchTextBox);
            container.Panel2.Controls.Add(rightSplitter);

            ContentPanel.Controls.Add(container);

            IntPtr h = Handle;

            UpdateUiState();
        }
Example #14
0
        public SampleDesktop()
        {
            #region cursors

            Point cursorSize = new Point(32, 32);
            Point halfSize = cursorSize / 2;

            AddCursor(Cursors.Default, new Cursor { Texture = "cursors\\Arrow.png", Size = cursorSize, HotSpot = Point.Zero });
            AddCursor(Cursors.Link, new Cursor { Texture = "cursors\\Link.png", Size = cursorSize, HotSpot = Point.Zero });
            AddCursor(Cursors.Move, new Cursor { Texture = "cursors\\Move.png", Size = cursorSize, HotSpot = halfSize });
            AddCursor(Cursors.Select, new Cursor { Texture = "cursors\\Select.png", Size = cursorSize, HotSpot = halfSize });
            AddCursor(Cursors.SizeNS, new Cursor { Texture = "cursors\\SizeNS.png", Size = cursorSize, HotSpot = halfSize });
            AddCursor(Cursors.SizeWE, new Cursor { Texture = "cursors\\SizeWE.png", Size = cursorSize, HotSpot = halfSize });
            AddCursor(Cursors.HSplit, new Cursor { Texture = "cursors\\SizeNS.png", Size = cursorSize, HotSpot = halfSize });
            AddCursor(Cursors.VSplit, new Cursor { Texture = "cursors\\SizeWE.png", Size = cursorSize, HotSpot = halfSize });
            AddCursor(Cursors.SizeNESW, new Cursor { Texture = "cursors\\SizeNESW.png", Size = cursorSize, HotSpot = halfSize });
            AddCursor(Cursors.SizeNWSE, new Cursor { Texture = "cursors\\SizeNWSE.png", Size = cursorSize, HotSpot = halfSize });

            #endregion

            #region styles

            ControlStyle baseStyle = new ControlStyle();
            baseStyle.Tiling = TextureMode.Grid;
            baseStyle.Grid = new Margin(3);
            baseStyle.Texture = "button_hot.dds";
            baseStyle.Default.Texture = "button_default.dds";
            baseStyle.Pressed.Texture = "button_down.dds";
            baseStyle.SelectedPressed.Texture = "button_down.dds";
            baseStyle.Focused.Texture = "button_down.dds";
            baseStyle.SelectedFocused.Texture = "button_down.dds";
            baseStyle.Selected.Texture = "button_down.dds";
            baseStyle.SelectedHot.Texture = "button_down.dds";

            ControlStyle itemStyle = new ControlStyle(baseStyle);
            itemStyle.TextPadding = new Margin(10, 0, 0, 0);
            itemStyle.TextAlign = Alignment.MiddleLeft;

            ControlStyle buttonStyle = new ControlStyle(baseStyle);
            buttonStyle.TextPadding = new Margin(0);
            buttonStyle.TextAlign = Alignment.MiddleCenter;

            ControlStyle tooltipStyle = new ControlStyle(buttonStyle);
            tooltipStyle.TextPadding = new Margin(8);
            tooltipStyle.TextAlign = Alignment.TopLeft;

            ControlStyle inputStyle = new ControlStyle();
            inputStyle.Texture = "input_default.dds";
            inputStyle.Hot.Texture = "input_focused.dds";
            inputStyle.Focused.Texture = "input_focused.dds";
            inputStyle.TextPadding = new Margin(8);
            inputStyle.Tiling = TextureMode.Grid;
            inputStyle.Focused.Tint = ColorInt.RGBA(1, 0, 0, 1);
            inputStyle.Grid = new Margin(3);

            ControlStyle windowStyle = new ControlStyle();
            windowStyle.Tiling = TextureMode.Grid;
            windowStyle.Grid = new Margin(9);
            windowStyle.Texture = "window.dds";

            ControlStyle frameStyle = new ControlStyle();
            frameStyle.Tiling = TextureMode.Grid;
            frameStyle.Grid = new Margin(4);
            frameStyle.Texture = "frame.dds";
            frameStyle.TextPadding = new Margin(8);

            ControlStyle vscrollTrackStyle = new ControlStyle();
            vscrollTrackStyle.Tiling = TextureMode.Grid;
            vscrollTrackStyle.Grid = new Margin(3);
            vscrollTrackStyle.Texture = "vscroll_track.dds";

            ControlStyle vscrollButtonStyle = new ControlStyle();
            vscrollButtonStyle.Tiling = TextureMode.Grid;
            vscrollButtonStyle.Grid = new Margin(3);
            vscrollButtonStyle.Texture = "vscroll_button.dds";
            vscrollButtonStyle.Hot.Texture = "vscroll_button_hot.dds";
            vscrollButtonStyle.Pressed.Texture = "vscroll_button_down.dds";

            ControlStyle vscrollUp = new ControlStyle();
            vscrollUp.Default.Texture = "vscrollUp_default.dds";
            vscrollUp.Hot.Texture = "vscrollUp_hot.dds";
            vscrollUp.Pressed.Texture = "vscrollUp_down.dds";
            vscrollUp.Focused.Texture = "vscrollUp_hot.dds";

            ControlStyle hscrollTrackStyle = new ControlStyle();
            hscrollTrackStyle.Tiling = TextureMode.Grid;
            hscrollTrackStyle.Grid = new Margin(3);
            hscrollTrackStyle.Texture = "hscroll_track.dds";

            ControlStyle hscrollButtonStyle = new ControlStyle();
            hscrollButtonStyle.Tiling = TextureMode.Grid;
            hscrollButtonStyle.Grid = new Margin(3);
            hscrollButtonStyle.Texture = "hscroll_button.dds";
            hscrollButtonStyle.Hot.Texture = "hscroll_button_hot.dds";
            hscrollButtonStyle.Pressed.Texture = "hscroll_button_down.dds";

            ControlStyle hscrollUp = new ControlStyle();
            hscrollUp.Default.Texture = "hscrollUp_default.dds";
            hscrollUp.Hot.Texture = "hscrollUp_hot.dds";
            hscrollUp.Pressed.Texture = "hscrollUp_down.dds";
            hscrollUp.Focused.Texture = "hscrollUp_hot.dds";

            ControlStyle checkButtonStyle = new ControlStyle();
            checkButtonStyle.Default.Texture = "checkbox_default.dds";
            checkButtonStyle.Hot.Texture = "checkbox_hot.dds";
            checkButtonStyle.Pressed.Texture = "checkbox_down.dds";
            checkButtonStyle.Checked.Texture = "checkbox_checked.dds";
            checkButtonStyle.CheckedFocused.Texture = "checkbox_checked_hot.dds";
            checkButtonStyle.CheckedHot.Texture = "checkbox_checked_hot.dds";
            checkButtonStyle.CheckedPressed.Texture = "checkbox_down.dds";

            ControlStyle comboLabelStyle = new ControlStyle();
            comboLabelStyle.TextPadding = new Margin(10, 0, 0, 0);
            comboLabelStyle.Default.Texture = "combo_default.dds";
            comboLabelStyle.Hot.Texture = "combo_hot.dds";
            comboLabelStyle.Pressed.Texture = "combo_down.dds";
            comboLabelStyle.Focused.Texture = "combo_hot.dds";
            comboLabelStyle.Tiling = TextureMode.Grid;
            comboLabelStyle.Grid = new Margin(3, 0, 0, 0);

            ControlStyle comboButtonStyle = new ControlStyle();
            comboButtonStyle.Default.Texture = "combo_button_default.dds";
            comboButtonStyle.Hot.Texture = "combo_button_hot.dds";
            comboButtonStyle.Pressed.Texture = "combo_button_down.dds";
            comboButtonStyle.Focused.Texture = "combo_button_hot.dds";

            ControlStyle labelStyle = new ControlStyle();
            labelStyle.TextAlign = Alignment.TopLeft;
            labelStyle.TextPadding = new Margin(8);

            Skin skin = new Skin();

            skin.Styles.Add("item", itemStyle);
            skin.Styles.Add("textbox", inputStyle);
            skin.Styles.Add("button", buttonStyle);
            skin.Styles.Add("window", windowStyle);
            skin.Styles.Add("frame", frameStyle);
            skin.Styles.Add("checkBox", checkButtonStyle);
            skin.Styles.Add("comboLabel", comboLabelStyle);
            skin.Styles.Add("comboButton", comboButtonStyle);
            skin.Styles.Add("vscrollTrack", vscrollTrackStyle);
            skin.Styles.Add("vscrollButton", vscrollButtonStyle);
            skin.Styles.Add("vscrollUp", vscrollUp);
            skin.Styles.Add("hscrollTrack", hscrollTrackStyle);
            skin.Styles.Add("hscrollButton", hscrollButtonStyle);
            skin.Styles.Add("hscrollUp", hscrollUp);
            skin.Styles.Add("multiline", labelStyle);
            skin.Styles.Add("tooltip", tooltipStyle);

            GuiHost.SetSkin(skin);

            #endregion

            #region main

            TooltipControl = new SimpleTooltip();

            #region sample window 1 - Anchoring, DropDown, Modal Dialog

            SampleWindow window1 = new SampleWindow();
            window1.Size = new Squid.Point(440, 340);
            window1.Position = new Squid.Point(40, 40);
            window1.Titlebar.Text = "Anchoring, [color=ffffff00]DropDown, Modal Dialog[/color]";
            window1.Resizable = true;
            window1.Parent = this;

            Label label1 = new Label();
            label1.Text = "username:"******"textbox" };
            textbox1.Text = "username";
            textbox1.Size = new Squid.Point(222, 35);
            textbox1.Position = new Squid.Point(180, 100);
            textbox1.Style = "textbox";
            textbox1.Parent = window1;
            textbox1.Anchor = AnchorStyles.Left | AnchorStyles.Top | AnchorStyles.Right;

            Label label2 = new Label();
            label2.Text = "password:"******"textbox" };
            textbox2.PasswordChar = char.Parse("*");
            textbox2.IsPassword = true;
            textbox2.Text = "password";
            textbox2.Size = new Squid.Point(222, 35);
            textbox2.Position = new Squid.Point(180, 140);
            textbox2.Style = "textbox";
            textbox2.Parent = window1;
            textbox2.Anchor = AnchorStyles.Left | AnchorStyles.Top | AnchorStyles.Right;

            Button button = new Button();
            button.Size = new Squid.Point(157, 35);
            button.Position = new Squid.Point(437 - 192, 346 - 52);
            button.Text = "login";
            button.Style = "button";
            button.Parent = window1;
            button.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
            button.Cursor = Cursors.Link;
            button.MouseClick += button_OnMouseClick;

            DropDownList combo = new DropDownList();
            combo.Size = new Squid.Point(222, 35);
            combo.Position = new Squid.Point(180, 180);
            combo.Parent = window1;
            combo.Label.Style = "comboLabel";
            combo.Button.Style = "comboButton";
            combo.Listbox.Margin = new Margin(0, 6, 0, 0);
            combo.Listbox.Style = "frame";
            combo.Listbox.ClipFrame.Margin = new Margin(8, 8, 8, 8);
            combo.Listbox.Scrollbar.Margin = new Margin(0, 4, 4, 4);
            combo.Listbox.Scrollbar.Size = new Squid.Point(14, 10);
            combo.Listbox.Scrollbar.ButtonUp.Style = "vscrollUp";
            combo.Listbox.Scrollbar.ButtonUp.Size = new Squid.Point(10, 20);
            combo.Listbox.Scrollbar.ButtonDown.Style = "vscrollUp";
            combo.Listbox.Scrollbar.ButtonDown.Size = new Squid.Point(10, 20);
            combo.Listbox.Scrollbar.Slider.Margin = new Margin(0, 2, 0, 2);
            combo.Listbox.Scrollbar.Slider.Style = "vscrollTrack";
            combo.Listbox.Scrollbar.Slider.Button.Style = "vscrollButton";
            combo.Anchor = AnchorStyles.Left | AnchorStyles.Top | AnchorStyles.Right;

            for (int i = 0; i < 10; i++)
            {
                ListBoxItem item = new ListBoxItem();
                item.Text = "listboxitem";
                item.Size = new Squid.Point(100, 35);
                item.Margin = new Margin(0, 0, 0, 4);
                item.Style = "item";

                //if (i == 3)
                //    item.Selected = true;

                combo.Items.Add(item);

                // if (i == 3)
                //     combo.SelectedItem = item;
                if (i == 3)
                    item.Selected = true;
            }

            CheckBox box = new CheckBox();
            box.Size = new Squid.Point(157, 26);
            box.Position = new Squid.Point(180, 220);
            box.Text = "remember me";
            box.Parent = window1;
            box.Button.Style = "checkBox";
            box.Button.Size = new Squid.Point(26, 26);
            box.Button.Cursor = Cursors.Link;

            #endregion

            #region sample window 2 - SplitContainer, TreeView, ListBox

            SampleWindow window2 = new SampleWindow();
            window2.Size = new Squid.Point(440, 340);
            window2.Position = new Squid.Point(500, 40);
            window2.Titlebar.Text = "SplitContainer, TreeView, ListBox";
            window2.Resizable = true;
            window2.Parent = this;

            SplitContainer split = new SplitContainer();
            split.Dock = DockStyle.Fill;
            split.Parent = window2;
            split.SplitButton.Style = "button";
            split.SplitFrame1.Size = new Point(10, 10);
            split.SplitFrame2.Size = new Point(30, 10);

            Squid.Panel pnl = new Squid.Panel();
            pnl.Dock = Squid.DockStyle.Fill;
            pnl.ClipFrame.Margin = new Squid.Margin(8);
            pnl.ClipFrame.Style = "textbox";

            pnl.VScroll.Margin = new Squid.Margin(0, 8, 8, 8);
            pnl.VScroll.Size = new Squid.Point(14, 10);
            pnl.VScroll.Slider.Style = "vscrollTrack";
            pnl.VScroll.Slider.Button.Style = "vscrollButton";
            pnl.VScroll.ButtonUp.Style = "vscrollUp";
            pnl.VScroll.ButtonUp.Size = new Squid.Point(10, 20);
            pnl.VScroll.ButtonDown.Style = "vscrollUp";
            pnl.VScroll.ButtonDown.Size = new Squid.Point(10, 20);
            pnl.VScroll.Slider.Margin = new Squid.Margin(0, 2, 0, 2);
            pnl.Parent = split.SplitFrame2;

            ListBox listbox1 = new ListBox();
            listbox1.Dock = DockStyle.Fill;
            listbox1.Size = new Squid.Point(200, 290);
            listbox1.Style = "frame";
            listbox1.ClipFrame.Margin = new Margin(8, 8, 8, 8);
            listbox1.Scrollbar.Margin = new Margin(0, 8, 8, 8);
            listbox1.Scrollbar.Size = new Squid.Point(14, 10);
            listbox1.Scrollbar.Slider.Style = "vscrollTrack";
            listbox1.Scrollbar.Slider.Button.Style = "vscrollButton";
            listbox1.Scrollbar.ButtonUp.Style = "vscrollUp";
            listbox1.Scrollbar.ButtonUp.Size = new Squid.Point(10, 20);
            listbox1.Scrollbar.ButtonDown.Style = "vscrollUp";
            listbox1.Scrollbar.ButtonDown.Size = new Squid.Point(10, 20);
            listbox1.Scrollbar.Slider.Margin = new Margin(0, 2, 0, 2);
            listbox1.Parent = split.SplitFrame2;
            listbox1.Multiselect = true;
            listbox1.MaxSelected = 4;
            listbox1.Scrollbar.Steps = 30;

            for (int i = 0; i < 30; i++)
            {
                ListBoxItem item = new ListBoxItem();
                item.Text = "listboxitem";
                item.Size = new Squid.Point(100, 70);
                item.Margin = new Margin(0, 0, 0, 4);
                item.Style = "item";
                //item.AutoSize = AutoSize.Vertical;
                item.Tooltip = "This is a multine tooltip.\nThe second line begins here.\n[color=ff00ee55]The third line is even colored.[/color]";
                item.MouseEnter += item_OnMouseEnter;
                item.MouseLeave += item_OnMouseLeave;
                listbox1.Items.Add(item);
            }

            TreeView treeview = new TreeView();
            treeview.Size = new Squid.Point(200, 330);
            treeview.Dock = DockStyle.Fill;
            treeview.Style = "frame";
            treeview.Parent = split.SplitFrame1;
            treeview.ClipFrame.Margin = new Margin(8, 8, 8, 8);
            treeview.Scrollbar.Margin = new Margin(0, 8, 8, 8);
            treeview.Scrollbar.Size = new Squid.Point(14, 10);
            treeview.Scrollbar.Slider.Style = "vscrollTrack";
            treeview.Scrollbar.Slider.Button.Style = "vscrollButton";
            treeview.Scrollbar.ButtonUp.Style = "vscrollUp";
            treeview.Scrollbar.ButtonUp.Size = new Squid.Point(10, 20);
            treeview.Scrollbar.ButtonDown.Style = "vscrollUp";
            treeview.Scrollbar.ButtonDown.Size = new Squid.Point(10, 20);
            treeview.Scrollbar.Slider.Margin = new Margin(0, 2, 0, 2);
            treeview.Indent = 10;

            for (int i = 0; i < 30; i++)
            {
                TreeNodeLabel node = new TreeNodeLabel();
                node.Button.Style = "item";
                node.Label.Text = "node level 1";
                node.Size = new Squid.Point(100, 35);
                //node.Margin = new Margin(0, 0, 0, 4);
                node.Style = "item";
                node.Tooltip = node.Label.Text;
                treeview.Nodes.Add(node);

                for (int i2 = 0; i2 < 3; i2++)
                {
                    TreeNodeLabel sub1 = new TreeNodeLabel();
                    sub1.Button.Style = "item";
                    sub1.Label.Text = "node level 2";
                    sub1.Size = new Squid.Point(100, 35);
                    //sub1.Margin = new Margin(8, 0, 0, 4);
                    sub1.Style = "item";
                    sub1.Tooltip = sub1.Label.Text;
                    node.Nodes.Add(sub1);

                    for (int i3 = 0; i3 < 3; i3++)
                    {
                        TreeNodeLabel sub2 = new TreeNodeLabel();
                        sub2.Button.Style = "item";
                        sub2.Label.Text = "node level 3";
                        sub2.Size = new Squid.Point(100, 35);
                        //sub2.Margin = new Margin(16, 0, 0, 4);
                        sub2.Style = "item";
                        sub2.Tooltip = sub2.Label.Text;
                        sub1.Nodes.Add(sub2);
                    }
                }
            }

            #endregion

            #region sample window 3 - Custom Control (Inheritance)

            SampleWindow window3 = new SampleWindow();
            window3.Size = new Point(440, 340);
            window3.Position = new Point(40, 400);
            window3.Resizable = true;
            window3.Titlebar.Text = "Custom Control (Inheritance)";
            window3.Parent = this;

            ChatBox chatbox = new ChatBox();
            chatbox.Dock = DockStyle.Fill;
            window3.Controls.Add(chatbox);

            chatbox.Style = "frame";
            chatbox.Input.Style = "textbox";
            chatbox.Input.Margin = new Margin(8, 0, 8, 8);
            chatbox.Output.Margin = new Margin(8, 8, 8, 8);
            chatbox.Scrollbar.Margin = new Margin(0, 8, 8, 8);
            chatbox.Scrollbar.Size = new Squid.Point(14, 10);
            chatbox.Scrollbar.Slider.Style = "vscrollTrack";
            chatbox.Scrollbar.Slider.Button.Style = "vscrollButton";
            chatbox.Scrollbar.ButtonUp.Style = "vscrollUp";
            chatbox.Scrollbar.ButtonUp.Size = new Squid.Point(10, 20);
            chatbox.Scrollbar.ButtonDown.Style = "vscrollUp";
            chatbox.Scrollbar.ButtonDown.Size = new Squid.Point(10, 20);
            chatbox.Scrollbar.Slider.Margin = new Margin(0, 2, 0, 2);

            #endregion

            #region sample window 4 - TabControl, TextAlign

            SampleWindow window4 = new SampleWindow();
            window4.Size = new Point(440, 340);
            window4.Position = new Point(500, 400);
            window4.Resizable = true;
            window4.Titlebar.Text = "TabControl, TextAlign";
            window4.Parent = this;

            TabControl tabcontrol = new TabControl();
            tabcontrol.Dock = DockStyle.Fill;
            tabcontrol.Parent = window4;

            for (int i = 0; i < 6; i++)
            {
                TabPage tabPage = new TabPage();
                tabPage.Style = "frame";
                tabPage.Margin = new Margin(0, -1, 0, 0);
                tabPage.Button.Style = "button";
                tabPage.Button.Text = "page" + i;
                tabPage.Button.Tooltip = "Click to change active tab";
                tabPage.Button.Margin = new Margin(0, 0, -1, 0);
                tabcontrol.TabPages.Add(tabPage);

                Label lbl = new Label();
                lbl.Dock = DockStyle.Fill;
                lbl.Parent = tabPage;
                lbl.TextWrap = true;
                lbl.Text = "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam\r\n nonumy eirmod tempor invidunt ut labore [color=ff0088ff][url=testurl]click \r\n meh![/url][/color] et dolore magna aliquyam erat, sed diam voluptua.\r\n At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.";
                lbl.Style = "multiline";
                lbl.BBCodeEnabled = true;
                lbl.LinkClicked += lbl_OnLinkClicked;
            }

            #endregion

            #region sample window 5 - Panel, TextBox

            SampleWindow window5 = new SampleWindow();
            window5.Size = new Point(440, 340);
            window5.Position = new Point(960, 40);
            window5.Resizable = true;
            window5.Titlebar.Text = "Panel, TextBox";
            window5.Parent = this;

            Panel panel = new Panel();
            panel.Style = "frame";
            panel.Dock = DockStyle.Fill;
            panel.Parent = window5;

            panel.ClipFrame.Margin = new Margin(8);
            panel.ClipFrame.Style = "textbox";

            panel.VScroll.Margin = new Margin(0, 8, 8, 8);
            panel.VScroll.Size = new Squid.Point(14, 10);
            panel.VScroll.Slider.Style = "vscrollTrack";
            panel.VScroll.Slider.Button.Style = "vscrollButton";
            panel.VScroll.ButtonUp.Style = "vscrollUp";
            panel.VScroll.ButtonUp.Size = new Squid.Point(10, 20);
            panel.VScroll.ButtonDown.Style = "vscrollUp";
            panel.VScroll.ButtonDown.Size = new Squid.Point(10, 20);
            panel.VScroll.Slider.Margin = new Margin(0, 2, 0, 2);

            panel.HScroll.Margin = new Margin(8, 0, 8, 8);
            panel.HScroll.Size = new Squid.Point(10, 14);
            panel.HScroll.Slider.Style = "hscrollTrack";
            panel.HScroll.Slider.Button.Style = "hscrollButton";
            panel.HScroll.ButtonUp.Style = "hscrollUp";
            panel.HScroll.ButtonUp.Size = new Squid.Point(20, 10);
            panel.HScroll.ButtonDown.Style = "hscrollUp";
            panel.HScroll.ButtonDown.Size = new Squid.Point(20, 10);
            panel.HScroll.Slider.Margin = new Margin(2, 0, 2, 0);

            for (int i = 0; i < 10; i++)
            {
                Label label = new Label();
                label.Text = "label control:";
                label.Size = new Point(100, 35);
                label.Position = new Point(10, 10 + 45 * i);
                panel.Content.Controls.Add(label);

                TextBox txt = new TextBox();
                txt.Text = "lorem ipsum";
                txt.Size = new Squid.Point(222, 35);
                txt.Position = new Point(110, 10 + 45 * i);
                txt.Style = "textbox";
                txt.AllowDrop = true;
                txt.TabIndex = 1 + i;
                txt.DragDrop += txt_OnDragDrop;
                txt.GotFocus += txt_OnGotFocus;
                panel.Content.Controls.Add(txt);
            }

            #endregion

            #region sample window 6 - ListView

            SampleWindow window6 = new SampleWindow();
            window6.Size = new Point(440, 340);
            window6.Position = new Point(960, 400);
            window6.Resizable = true;
            window6.Titlebar.Text = "Misc";
            window6.Parent = this;

            Random rnd = new Random();
            List<MyData> models = new List<MyData>();
            for (int i = 0; i < 32; i++)
            {
                MyData data = new MyData();
                data.Name = rnd.Next().ToString();
                data.Date = DateTime.Now.AddMilliseconds(rnd.Next());
                data.Rating = rnd.Next();
                models.Add(data);
            }

            ListView olv = new ListView();
            olv.Dock = DockStyle.Fill;
            olv.Columns.Add(new ListView.Column { Text = "Name", Aspect = "Name", Width = 120 });
            olv.Columns.Add(new ListView.Column { Text = "Date", Aspect = "Date", Width = 120 });
            olv.Columns.Add(new ListView.Column { Text = "Rating", Aspect = "Rating", Width = 120 });
            olv.StretchLastColumn = false;
            olv.FullRowSelect = true;

            olv.CreateHeader = delegate(object sender, ListView.FormatHeaderEventArgs args)
            {
                Button header = new Button
                {
                    Dock = DockStyle.Fill,
                    Text = args.Column.Text,
                    AllowDrop = true
                };

                header.MouseClick += delegate(Control snd, MouseEventArgs e)
                {
                    if (args.Column.Aspect == "Name")
                        olv.Sort<MyData>((a, b) => a.Name.CompareTo(b.Name));
                    else if (args.Column.Aspect == "Date")
                        olv.Sort<MyData>((a, b) => a.Date.CompareTo(b.Date));
                    else if (args.Column.Aspect == "Rating")
                        olv.Sort<MyData>((a, b) => a.Rating.CompareTo(b.Rating));
                };

                header.MouseDrag += delegate(Control snd, MouseEventArgs e)
                {
                    Label drag = new Label();
                    drag.Size = snd.Size;
                    drag.Position = snd.Location;
                    drag.Style = snd.Style;
                    drag.Text = ((Button)snd).Text;

                    DoDragDrop(drag);
                };

                header.DragDrop += delegate(Control snd, DragDropEventArgs e)
                {

                };

                return header;
            };

            olv.CreateCell = delegate(object sender, ListView.FormatCellEventArgs args)
            {
                return new Button
                {
                    Size = new Point(28, 28),
                    Dock = DockStyle.Top,
                    Text = olv.GetAspectValue(args.Model, args.Column),
                    Tooltip = args.Column.Text
                };
            };

            olv.SetObjects(models);

            window6.Controls.Add(olv);

            #endregion

            #endregion
        }
Example #15
0
        private void Initialize()
        {
            #region [declare new]

            components      = new Container();
            splitTimer      = new Timer(components);
            split_container = new SplitContainer();
            fpanel          = new XShadowPanel();
            finner_panel    = new Panel();
            btn_list        = new OfficeButton();
            btn_new         = new OfficeButton();
            btn_edit        = new OfficeButton();
            btn_delete      = new OfficeButton();
            btn_print       = new OfficeButton();
            btn_splitter    = new OfficeButton();
            lbl_header      = new Header();
            btn_close       = new CloseButton();

            txt_acy_name  = new XTextBox();
            lbl_acy_name  = new XLabel();
            txt_from_date = new xDatepicker();
            lbl_from_date = new XLabel();
            txt_to_date   = new xDatepicker();
            lbl_to_date   = new XLabel();

            txt_notes  = new RichTextBox();
            lbl_notes  = new XLabel();
            btn_save   = new OfficeButton();
            btn_active = new OfficeButton();

            #endregion [declare new]

            #region [container suspend]

            ((ISupportInitialize)(split_container)).BeginInit();
            split_container.Panel1.SuspendLayout();
            split_container.Panel2.SuspendLayout();
            split_container.SuspendLayout();
            fpanel.SuspendLayout();
            finner_panel.SuspendLayout();
            SuspendLayout();

            #endregion [container suspend]

            #region [splitTimer]

            splitTimer.Interval = 2;
            splitTimer.Tick    += new EventHandler(SplitTimer_Tick);

            #endregion [splitTimer]

            #region [split_container]

            split_container.Dock             = DockStyle.Fill;
            split_container.Location         = new Point(0, 0);
            split_container.Name             = "split_container";
            split_container.BackColor        = XTheme.Splitcontainer_colour;
            split_container.Size             = XSize.FSplitcontainer;
            split_container.SplitterDistance = XSize.Screen_Width;
            split_container.TabIndex         = XTab.Splitcontainer;

            // split_container.Panel1

            split_container.Panel1.Controls.Add(fpanel);

            #region [split_container.Panel2]

            split_container.Panel2.Controls.Add(btn_print);
            split_container.Panel2.Controls.Add(btn_delete);
            split_container.Panel2.Controls.Add(btn_edit);
            split_container.Panel2.Controls.Add(btn_new);
            split_container.Panel2.Controls.Add(btn_list);
            split_container.Panel2.Controls.Add(btn_splitter);

            btn_list.Font     = XFont.BtnFont;
            btn_list.Location = XLayout.FormFirstBtn;
            btn_list.Size     = XSize.BtnOne;
            btn_list.TabIndex = 1;
            btn_list.Name     = "btn_list";
            btn_list.Text     = "&List";
            btn_list.Themes   = XTheme.BlueBtn;
            btn_list.Click   += Btn_list_Click;

            btn_new.Font     = XFont.BtnFont;
            btn_new.Location = XLayout.BtnLocation(btn_list.Location);
            btn_new.Size     = XSize.BtnOne;
            btn_new.TabIndex = XTab.Index(btn_list.TabIndex);
            btn_new.Name     = "btn_new";
            btn_new.Text     = "&New";
            btn_new.Themes   = XTheme.BlueBtn;
            btn_new.Click   += Btn_new_Click;

            btn_edit.Font     = XFont.BtnFont;
            btn_edit.Location = XLayout.BtnLocation(btn_new.Location);
            btn_edit.Size     = XSize.BtnOne;
            btn_edit.TabIndex = XTab.Index(btn_new.TabIndex);
            btn_edit.Name     = "btn_edit";
            btn_edit.Text     = "&Edit";
            btn_edit.Themes   = XTheme.BlueBtn;
            btn_edit.Click   += Btn_edit_Click;

            btn_delete.Font     = XFont.BtnFont;
            btn_delete.Location = XLayout.BtnLocation(btn_edit.Location);
            btn_delete.Size     = XSize.BtnOne;
            btn_delete.TabIndex = XTab.Index(btn_edit.TabIndex);
            btn_delete.Name     = "btn_delete";
            btn_delete.Text     = "&Delete";
            btn_delete.Themes   = XTheme.BlueBtn;
            btn_delete.Click   += Btn_delete_Click;

            btn_print.Font     = XFont.BtnFont;
            btn_print.Location = XLayout.BtnLocation(btn_delete.Location);
            btn_print.Size     = XSize.BtnOne;
            btn_print.TabIndex = XTab.Index(btn_delete.TabIndex);
            btn_print.Name     = "btn_print";
            btn_print.Text     = "&Print";
            btn_print.Themes   = XTheme.BlueBtn;
            btn_print.Click   += Btn_print_Click;

            btn_splitter.Font     = XFont.BtnFont;
            btn_splitter.Location = XLayout.Splitter;
            btn_splitter.Size     = XSize.Splitter;
            btn_splitter.TabIndex = XTab.Index(btn_print.TabIndex);
            btn_splitter.Name     = "btn_splitter";
            btn_splitter.Text     = "⁞⁞";
            btn_splitter.Themes   = XTheme.WhiteBtn;
            btn_splitter.Click   += new EventHandler(Btn_splitter_Click);

            #endregion [split_container.Panel2]

            #endregion [split_container]

            #region [fpanel]

            fpanel.Name      = "fpanel";
            fpanel.Anchor    = XAnchor.LTR;
            fpanel.Size      = XSize.FPanel;
            fpanel.Location  = XLayout.FPanel;
            fpanel.BackColor = XTheme.FPanel;
            fpanel.Controls.Add(finner_panel);
            fpanel.Controls.Add(btn_close);
            fpanel.Controls.Add(lbl_header);

            #endregion [fpanel]

            #region [finner_panel]

            finner_panel.Anchor     = XAnchor.LTR;
            finner_panel.Cursor     = Cursors.Default;
            finner_panel.Name       = "finner_panel";
            finner_panel.Size       = XSize.FInnerPanel;
            finner_panel.Location   = XLayout.FInnerPanel;
            finner_panel.BackColor  = XTheme.FInnerpanel;
            finner_panel.AutoScroll = true;

            #region [adding controls]

            finner_panel.Controls.Add(txt_notes);
            finner_panel.Controls.Add(lbl_notes);
            finner_panel.Controls.Add(txt_acy_name);
            finner_panel.Controls.Add(lbl_acy_name);
            finner_panel.Controls.Add(txt_from_date);
            finner_panel.Controls.Add(lbl_from_date);
            finner_panel.Controls.Add(txt_to_date);
            finner_panel.Controls.Add(lbl_to_date);
            finner_panel.Controls.Add(btn_save);
            finner_panel.Controls.Add(btn_active);

            #endregion [adding controls]

            #region [Header]

            btn_close.Click += new EventHandler(Btn_close_Click);

            lbl_header.Text = "Acy tbl";

            #endregion [Header]

            #region [Properties of control]

            lbl_acy_name.Font      = XFont.Font_10B;
            lbl_acy_name.Name      = "lbl_acy_name";
            lbl_acy_name.Text      = "   Acy name";
            lbl_acy_name.Anchor    = XAnchor.LT;
            lbl_acy_name.TextAlign = ContentAlignment.MiddleLeft;
            lbl_acy_name.ForeColor = XFontColor.Lbl_ForeColor;
            lbl_acy_name.Size      = XSize.OneLabel;
            lbl_acy_name.Location  = XLayout.FirstLabel;

            txt_acy_name.Font              = XFont.TxtFont;
            txt_acy_name.ForeColor         = XFontColor.TxtFontColor;
            txt_acy_name.BackColor         = XTheme.TxtBackcolor;
            txt_acy_name.Name              = "txt_acy_name";
            txt_acy_name.ReadOnlyBackColor = XTheme.TxtReadonlyBackcolor;
            txt_acy_name.Size              = XSize.OneText;
            txt_acy_name.Anchor            = XAnchor.LTR;
            txt_acy_name.Location          = XLayout.FirstText;
            txt_acy_name.TabIndex          = XTab.Txt_TabIndex;
            txt_acy_name.Enter            += new EventHandler(Txt_acy_name_Enter);


            lbl_from_date.Font      = XFont.Font_10B;
            lbl_from_date.Name      = "lbl_from_date";
            lbl_from_date.Text      = "   From date";
            lbl_from_date.Anchor    = XAnchor.LT;
            lbl_from_date.TextAlign = ContentAlignment.MiddleLeft;
            lbl_from_date.ForeColor = XFontColor.Lbl_ForeColor;
            lbl_from_date.Size      = XSize.OneLabel;
            lbl_from_date.Location  = XLayout.R1_Label(lbl_acy_name.Location);

            txt_from_date.Font         = XFont.TxtFont;
            txt_from_date.ForeColor    = XFontColor.TxtFontColor;
            txt_from_date.BackColor    = XTheme.TxtBackcolor;
            txt_from_date.Name         = "txt_from_date";
            txt_from_date.CustomFormat = "dd-MM-yyyy";
            txt_from_date.Format       = DateTimePickerFormat.Custom;
            txt_from_date.Size         = XSize.OneText;
            txt_from_date.Anchor       = XAnchor.LTR;
            txt_from_date.Location     = XLayout.R1_Text(txt_acy_name.Location);
            txt_from_date.TabIndex     = XTab.Index(txt_acy_name.TabIndex);
            txt_from_date.Enter       += new EventHandler(Txt_from_date_Enter);


            lbl_to_date.Font      = XFont.Font_10B;
            lbl_to_date.Name      = "lbl_to_date";
            lbl_to_date.Text      = "   To date";
            lbl_to_date.Anchor    = XAnchor.LT;
            lbl_to_date.TextAlign = ContentAlignment.MiddleLeft;
            lbl_to_date.ForeColor = XFontColor.Lbl_ForeColor;
            lbl_to_date.Size      = XSize.OneLabel;
            lbl_to_date.Location  = XLayout.R1_Label(lbl_from_date.Location);

            txt_to_date.Font         = XFont.TxtFont;
            txt_to_date.ForeColor    = XFontColor.TxtFontColor;
            txt_to_date.BackColor    = XTheme.TxtBackcolor;
            txt_to_date.Name         = "txt_to_date";
            txt_to_date.CustomFormat = "dd-MM-yyyy";
            txt_to_date.Format       = DateTimePickerFormat.Custom;
            txt_to_date.Size         = XSize.OneText;
            txt_to_date.Anchor       = XAnchor.LTR;
            txt_to_date.Location     = XLayout.R1_Text(txt_from_date.Location);
            txt_to_date.TabIndex     = XTab.Index(txt_from_date.TabIndex);
            txt_to_date.Enter       += new EventHandler(Txt_to_date_Enter);


            lbl_notes.Font      = XFont.Font_10B;
            lbl_notes.ForeColor = XFontColor.Lbl_ForeColor;
            lbl_notes.Location  = XLayout.LblNotes;
            lbl_notes.Size      = XSize.LblNotes;
            lbl_notes.Anchor    = XAnchor.LB;
            lbl_notes.Name      = "lbl_notes";
            lbl_notes.Text      = "   Notes";
            lbl_notes.TextAlign = ContentAlignment.MiddleLeft;
            lbl_notes.Click    += new EventHandler(Lbl_notes_Click);

            txt_notes.Font      = Theme.txtFont;
            txt_notes.ForeColor = Theme.txtForeColor;
            txt_notes.BackColor = Theme.White;
            txt_notes.Location  = XLayout.TxtNotes;
            txt_notes.Size      = XSize.TxtNotes;
            txt_notes.Name      = "txt_notes";
            txt_notes.Anchor    = XAnchor.LRB;
            txt_notes.TabIndex  = XTab.Index(txt_notes.TabIndex);
            txt_notes.Enter    += new EventHandler(Txt_notes_Enter);

            #endregion [Properties of control]

            #region [Properties of btn]

            btn_save.Anchor   = XAnchor.RB;
            btn_save.Font     = XFont.BtnFont;
            btn_save.Size     = XSize.BtnOne;
            btn_save.Location = XLayout.BtnSave;
            btn_save.TabIndex = XTab.Index(txt_to_date.TabIndex);
            btn_save.Name     = "btn_save";
            btn_save.Text     = "&SAVE";
            btn_save.Themes   = XTheme.BlueBtn;
            btn_save.Click   += new EventHandler(Btn_save_click);

            btn_active.Anchor   = XAnchor.RB;
            btn_active.Font     = XFont.BtnFont;
            btn_active.Size     = XSize.BtnOne;
            btn_active.Location = XLayout.BtnActive;
            btn_active.TabIndex = XTab.Index(btn_save.TabIndex);
            btn_active.Name     = "btn_active";
            btn_active.Text     = "&Active";
            btn_active.Click   += new EventHandler(Btn_active_Click);

            txt_notes.TabIndex = btn_active.TabIndex + 1;

            #endregion [Properties of btn]

            #endregion [finner_panel]

            #region [FAcy]

            this.AutoScaleDimensions = new SizeF(6F, 13F);
            this.AutoScaleMode       = AutoScaleMode.Font;
            this.Controls.Add(this.split_container);
            this.Name = "fAcy";
            this.Size = new Size(Screen.PrimaryScreen.Bounds.Width, ClientSize.Height);

            this.split_container.Panel1.ResumeLayout(false);
            this.split_container.Panel2.ResumeLayout(false);
            ((ISupportInitialize)(this.split_container)).EndInit();
            this.split_container.ResumeLayout(false);
            this.fpanel.ResumeLayout(false);
            this.finner_panel.ResumeLayout(false);
            this.finner_panel.PerformLayout();
            this.ResumeLayout(false);

            #endregion [Fpost]
        }
Example #16
0
        /// <summary>
        /// 加载节点并显示数据
        /// (根据节点深度判断加载哪部分节点)
        /// </summary>
        /// <param name="xNode"></param>
        public void Init(TreeNode xNode, SplitContainer sc, out string flag, ref Form tmpForm, int deptID)
        {
            flag = "";
            int     topClassID;
            int     Level = xNode.Level;
            Control c     = sc.Panel2;

            int secondTypeNumID;
            int projectTypeID;

            int ShowType = InputMain.ShowType;

            switch (Level)
            {
            case 0:
                flag = xNode.Text;
                //装载目录节点
                topClassID = int.Parse(xNode.Tag.ToString());
                typeNum.getTopTypeNumNodesData(xNode, topClassID, ShowType);
                c.Visible = false;
                LoadContentForm(xNode, sc, ref tmpForm, topClassID, 1);
                c.Visible = true;
                break;

            case 1:
                flag = "分类号 " + xNode.Text + " 的目录";
                //装载目录节点
                topClassID = int.Parse(xNode.Parent.Tag.ToString());
                string TopTypeNum = xNode.Text;
                typeNum.getSecondTypeNumNodesData(xNode, topClassID, TopTypeNum, ShowType);
                c.Visible = false;
                LoadContentForm(xNode, sc, ref tmpForm, topClassID, 2);
                c.Visible = true;
                break;

            case 2:
                secondTypeNumID = int.Parse(xNode.Tag.ToString());
                projectTypeID   = typeNum.getProjectTypeID(secondTypeNumID);  //项目类型

                //判断是否为综合类
                if (projectTypeID == 0)
                {
                    flag = xNode.Text + " 目录下的案卷级数据";
                    //装载案卷节点
                    //int ProjectID = int.Parse(xNode.Tag.ToString());
                    int ProjectID = pro_zh.getProjectID(secondTypeNumID);
                    if (ProjectID == 0)
                    {
                        //添加一个默认的项目(虚拟项目)
                        ProjectID = pro_zh.Add(secondTypeNumID, "00001");
                    }
                    file.GetZhNodesData(xNode, ProjectID);
                    c.Visible = false;
                    LoadZhFileForm(ProjectID, xNode, sc, ref tmpForm, deptID);
                    c.Visible = true;
                }
                else
                {
                    flag = xNode.Text + " 目录下的项目级数据";
                    //装载项目节点
                    getProjectNodeData(secondTypeNumID, xNode, ShowType, ref flag);
                    c.Visible = false;
                    LoadProjectForm(secondTypeNumID, xNode, sc, ref tmpForm, deptID);
                    c.Visible = true;
                }
                break;

            case 3:
                secondTypeNumID = int.Parse(xNode.Parent.Tag.ToString());
                projectTypeID   = typeNum.getProjectTypeID(secondTypeNumID);  //项目类型

                //判断是否为综合类
                if (projectTypeID == 0)
                {
                    flag = xNode.Parent.Text + "-" + xNode.Text + " 案卷下的文件级数据";
                    //加载用户控件显示文件列表
                    int FileID = int.Parse(xNode.Tag.ToString());
                    //验证是否有原件管理的权限
                    if (SystemPermission.PermissionInfo.checkPermission(
                            Archives.UI.Input_CJ.InputMain.TopClassID, SystemPermission.PermissionType.原件管理))
                    {
                        doc.GetNodesData(xNode, ShowType);
                    }
                    c.Visible = false;
                    LoadDocForm(FileID, xNode, sc, ref tmpForm, deptID);
                    c.Visible = true;
                }
                else
                {
                    flag = xNode.Text + " 项目下的案卷级数据";
                    //装载案卷节点
                    int ProjectID = int.Parse(xNode.Tag.ToString());
                    file.GetNodesData(xNode, ProjectID);
                    c.Visible = false;
                    LoadFileForm(ProjectID, xNode, sc, ref tmpForm, deptID);
                    c.Visible = true;
                }
                break;

            case 4:
                secondTypeNumID = int.Parse(xNode.Parent.Parent.Tag.ToString());
                projectTypeID   = typeNum.getProjectTypeID(secondTypeNumID);  //项目类型
                //判断是否为综合类
                if (projectTypeID == 0)
                {
                    flag = xNode.Parent.Parent.Text + "-" + xNode.Parent.Text + xNode.Text + " 文件下的原件";
                    //加载用户控件显示文件列表
                    int DocID = int.Parse(xNode.Tag.ToString());
                    c.Visible = false;
                    LoadFjForm(DocID, xNode, sc, ref tmpForm);
                    c.Visible = true;
                }
                else
                {
                    flag = xNode.Parent.Text + "-" + xNode.Text + " 案卷下的文件级数据";
                    //加载用户控件显示文件列表
                    int FileID = int.Parse(xNode.Tag.ToString());
                    //验证是否有原件管理的权限
                    if (SystemPermission.PermissionInfo.checkPermission(
                            Archives.UI.Input_CJ.InputMain.TopClassID, SystemPermission.PermissionType.原件管理))
                    {
                        doc.GetNodesData(xNode, ShowType);
                    }
                    c.Visible = false;
                    LoadDocForm(FileID, xNode, sc, ref tmpForm, deptID);
                    c.Visible = true;
                }
                break;

            case 5:
                flag = xNode.Parent.Parent.Text + "-" + xNode.Parent.Text + xNode.Text + " 文件下的原件";
                //加载用户控件显示文件列表
                int docID = int.Parse(xNode.Tag.ToString());
                c.Visible = false;
                LoadFjForm(docID, xNode, sc, ref tmpForm);
                c.Visible = true;
                break;

            default:
                break;
            }
        }
Example #17
0
        void SplitContainerMap_SplitterMoved(object sender, SplitterEventArgs e)
        {
            SplitContainer splitter = (SplitContainer)sender;

            Application.UserAppDataRegistry.SetValue("Places Map Splitter Distance", splitter.SplitterDistance);
        }
Example #18
0
        private void FormSplitContainer_Load(object sender, EventArgs e)
        {
            splitContainer1 = new SplitContainer();
            treeView1       = new TreeView();
            splitContainer2 = new SplitContainer();
            listView1       = new ListView();
            listView2       = new ListView();
            splitContainer1.SuspendLayout();
            splitContainer2.SuspendLayout();
            SuspendLayout();

            // Basic SplitContainer properties.
            // This is a vertical splitter that moves in 10-pixel increments.
            // This splitter needs no explicit Orientation property because Vertical is the default.
            splitContainer1.Dock      = DockStyle.Fill;
            splitContainer1.ForeColor = System.Drawing.SystemColors.Control;
            splitContainer1.Location  = new System.Drawing.Point(0, 0);
            splitContainer1.Name      = "splitContainer1";
            // You can drag the splitter no nearer than 30 pixels from the left edge of the container.
            splitContainer1.Panel1MinSize = 30;
            // You can drag the splitter no nearer than 20 pixels from the right edge of the container.
            splitContainer1.Panel2MinSize    = 20;
            splitContainer1.Size             = new System.Drawing.Size(292, 273);
            splitContainer1.SplitterDistance = 79;
            // This splitter moves in 10-pixel increments.
            splitContainer1.SplitterIncrement = 10;
            splitContainer1.SplitterWidth     = 6;
            // splitContainer1 is the first control in the tab order.
            splitContainer1.TabIndex = 0;
            splitContainer1.Text     = "splitContainer1";

            // When the splitter moves, the cursor changes shape.
            splitContainer1.SplitterMoved  += new SplitterEventHandler(splitContainer1_SplitterMoved);
            splitContainer1.SplitterMoving += new SplitterCancelEventHandler(splitContainer1_SplitterMoving);

            // Add a TreeView control to the left panel.
            splitContainer1.Panel1.BackColor = System.Drawing.SystemColors.Control;
            // Add a TreeView control to Panel1.
            splitContainer1.Panel1.Controls.Add(treeView1);
            splitContainer1.Panel1.Name = "splitterPanel1";
            // Controls placed on Panel1 support right-to-left fonts.
            splitContainer1.Panel1.RightToLeft = RightToLeft.Yes;

            // Add a SplitContainer to the right panel.
            splitContainer1.Panel2.Controls.Add(splitContainer2);
            splitContainer1.Panel2.Name = "splitterPanel2";

            // This TreeView control is in Panel1 of splitContainer1.
            treeView1.Dock               = DockStyle.Fill;
            treeView1.ForeColor          = System.Drawing.SystemColors.InfoText;
            treeView1.ImageIndex         = -1;
            treeView1.Location           = new System.Drawing.Point(0, 0);
            treeView1.Name               = "treeView1";
            treeView1.SelectedImageIndex = -1;
            treeView1.Size               = new System.Drawing.Size(79, 273);
            // treeView1 is the second control in the tab order.
            treeView1.TabIndex = 1;

            // Basic SplitContainer properties.
            // This is a horizontal splitter whose top and bottom panels are ListView controls. The top panel is fixed.
            splitContainer2.Dock = DockStyle.Fill;
            // The top panel remains the same size when the form is resized.
            splitContainer2.FixedPanel = FixedPanel.Panel1;
            splitContainer2.Location   = new System.Drawing.Point(0, 0);
            splitContainer2.Name       = "splitContainer2";
            // Create the horizontal splitter.
            splitContainer2.Orientation      = Orientation.Horizontal;
            splitContainer2.Size             = new System.Drawing.Size(207, 273);
            splitContainer2.SplitterDistance = 125;
            splitContainer2.SplitterWidth    = 6;
            // splitContainer2 is the third control in the tab order.
            splitContainer2.TabIndex = 2;
            splitContainer2.Text     = "splitContainer2";

            // This splitter panel contains the top ListView control.
            splitContainer2.Panel1.Controls.Add(listView1);
            splitContainer2.Panel1.Name = "splitterPanel3";

            // This splitter panel contains the bottom ListView control.
            splitContainer2.Panel2.Controls.Add(listView2);
            splitContainer2.Panel2.Name = "splitterPanel4";

            // This ListView control is in the top panel of splitContainer2.
            listView1.Dock     = DockStyle.Fill;
            listView1.Location = new System.Drawing.Point(0, 0);
            listView1.Name     = "listView1";
            listView1.Size     = new System.Drawing.Size(207, 125);
            // listView1 is the fourth control in the tab order.
            listView1.TabIndex = 3;

            // This ListView control is in the bottom panel of splitContainer2.
            listView2.Dock     = DockStyle.Fill;
            listView2.Location = new System.Drawing.Point(0, 0);
            listView2.Name     = "listView2";
            listView2.Size     = new System.Drawing.Size(207, 142);
            // listView2 is the fifth control in the tab order.
            listView2.TabIndex = 4;

            // These are basic properties of the form.
            this.ClientSize = new System.Drawing.Size(292, 273);
            this.Controls.Add(splitContainer1);
            this.Name = "FormSplitContainer";
            this.Text = "SplitContainer Demo";
            splitContainer1.ResumeLayout(false);
            splitContainer2.ResumeLayout(false);
            ResumeLayout(false);
        }
Example #19
0
    private void buildSplitContainer(Control workingArea, Control workingAreaBottom, Control rightSideContainer)
    {
        //working area cannot be null.
        if (workingArea == null) { workingArea = new Control(); }

        //clean out all controls for the current split container
        p_WorkingArea.Visible = false;
        p_WorkingArea.Controls.Clear();

        //do we add a split container for the right side?
        Panel bodyContainer = p_WorkingArea;
        if (rightSideContainer != null) {
            //initialize the container which would have the right side
            SplitContainer container = new SplitContainer() {
                FixedPanel = FixedPanel.Panel2,
                Dock = DockStyle.Fill,
                SplitterDistance = p_MainBodySplitDistance,
                Panel2MinSize = 0
            };

            container.SplitterMoved += delegate(object sender, SplitterEventArgs e) {
                p_MainBodySplitDistance = container.Panel1.Width;
            };
            p_WorkingArea.Controls.Add(container);

            //add the right side container
            rightSideContainer.Dock = DockStyle.Fill;
            container.Panel2.Controls.Add(rightSideContainer);
            bodyContainer = container.Panel1;
        }

        //do we add the split container for the bottom side?
        if (workingAreaBottom != null) {
            //initialize the container which would have the bottom side
            SplitContainer container = new SplitContainer() {
                FixedPanel = FixedPanel.Panel2,
                Dock = DockStyle.Fill,
                Orientation = Orientation.Horizontal,
                SplitterDistance = p_BodySplitDistance
            };
            container.SplitterMoved += delegate(object sender, SplitterEventArgs e) {
                p_BodySplitDistance = e.SplitY;
            };
            bodyContainer.Controls.Add(container);

            //add the bottom side container
            workingAreaBottom.Dock = DockStyle.Fill;
            container.Panel2.Controls.Add(workingAreaBottom);
            bodyContainer = container.Panel1;
        }

        //add the main working area
        workingArea.Dock = DockStyle.Fill;
        bodyContainer.Controls.Add(workingArea);
        p_WorkingArea.Visible=true;//.ResumeLayout();
    }
Example #20
0
 private void InitializeComponent()
 {
     this.dataGridView1      = new DataGridView();
     this.splitContainer1    = new SplitContainer();
     this.btnReload          = new Button();
     this.btnAdd             = new Button();
     this.cmbRepeatBehaviour = new ComboBox();
     this.btnSave            = new Button();
     this.btnStopRecord      = new Button();
     this.bntStartRecord     = new Button();
     this.cmbMacros          = new ComboBox();
     this.btnStop            = new Button();
     this.btnPlay            = new Button();
     ((ISupportInitialize)this.dataGridView1).BeginInit();
     this.splitContainer1.Panel1.SuspendLayout();
     this.splitContainer1.Panel2.SuspendLayout();
     this.splitContainer1.SuspendLayout();
     this.SuspendLayout();
     this.dataGridView1.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
     this.dataGridView1.Dock          = DockStyle.Fill;
     this.dataGridView1.Location      = new Point(0, 0);
     this.dataGridView1.Name          = "dataGridView1";
     this.dataGridView1.Size          = new Size(1152, 722);
     this.dataGridView1.TabIndex      = 0;
     this.splitContainer1.Dock        = DockStyle.Fill;
     this.splitContainer1.Location    = new Point(0, 0);
     this.splitContainer1.Name        = "splitContainer1";
     this.splitContainer1.Orientation = Orientation.Horizontal;
     this.splitContainer1.Panel1.Controls.Add((Control)this.btnReload);
     this.splitContainer1.Panel1.Controls.Add((Control)this.btnAdd);
     this.splitContainer1.Panel1.Controls.Add((Control)this.cmbRepeatBehaviour);
     this.splitContainer1.Panel1.Controls.Add((Control)this.btnSave);
     this.splitContainer1.Panel1.Controls.Add((Control)this.btnStopRecord);
     this.splitContainer1.Panel1.Controls.Add((Control)this.bntStartRecord);
     this.splitContainer1.Panel1.Controls.Add((Control)this.cmbMacros);
     this.splitContainer1.Panel1.Controls.Add((Control)this.btnStop);
     this.splitContainer1.Panel1.Controls.Add((Control)this.btnPlay);
     this.splitContainer1.Panel2.Controls.Add((Control)this.dataGridView1);
     this.splitContainer1.Size             = new Size(1152, 790);
     this.splitContainer1.SplitterDistance = 64;
     this.splitContainer1.TabIndex         = 1;
     this.btnReload.Location = new Point(1026, 17);
     this.btnReload.Name     = "btnReload";
     this.btnReload.Size     = new Size(92, 30);
     this.btnReload.TabIndex = 1;
     this.btnReload.Text     = "Reload";
     this.btnReload.UseVisualStyleBackColor = true;
     this.btnReload.Click += new EventHandler(this.btnReload_Click);
     this.btnAdd.Enabled   = false;
     this.btnAdd.Location  = new Point(734, 18);
     this.btnAdd.Name      = "btnAdd";
     this.btnAdd.Size      = new Size(92, 30);
     this.btnAdd.TabIndex  = 7;
     this.btnAdd.Text      = "Add";
     this.btnAdd.UseVisualStyleBackColor = true;
     this.btnAdd.Click += new EventHandler(this.btnAdd_Click);
     this.cmbRepeatBehaviour.FormattingEnabled = true;
     this.cmbRepeatBehaviour.Location          = new Point(607, 24);
     this.cmbRepeatBehaviour.Name     = "cmbRepeatBehaviour";
     this.cmbRepeatBehaviour.Size     = new Size(121, 21);
     this.cmbRepeatBehaviour.TabIndex = 6;
     this.btnSave.Location            = new Point(928, 17);
     this.btnSave.Name     = "btnSave";
     this.btnSave.Size     = new Size(92, 30);
     this.btnSave.TabIndex = 5;
     this.btnSave.Text     = "Save";
     this.btnSave.UseVisualStyleBackColor = true;
     this.btnSave.Click         += new EventHandler(this.btnSave_Click);
     this.btnStopRecord.Enabled  = false;
     this.btnStopRecord.Location = new Point(509, 18);
     this.btnStopRecord.Name     = "btnStopRecord";
     this.btnStopRecord.Size     = new Size(92, 30);
     this.btnStopRecord.TabIndex = 4;
     this.btnStopRecord.Text     = "Stop Record";
     this.btnStopRecord.UseVisualStyleBackColor = true;
     this.btnStopRecord.Click    += new EventHandler(this.btnStopRecord_Click);
     this.bntStartRecord.Location = new Point(411, 18);
     this.bntStartRecord.Name     = "bntStartRecord";
     this.bntStartRecord.Size     = new Size(92, 30);
     this.bntStartRecord.TabIndex = 3;
     this.bntStartRecord.Text     = "StartRecord";
     this.bntStartRecord.UseVisualStyleBackColor = true;
     this.bntStartRecord.Click       += new EventHandler(this.bntStartRecord_Click);
     this.cmbMacros.FormattingEnabled = true;
     this.cmbMacros.Location          = new Point(32, 23);
     this.cmbMacros.Name                  = "cmbMacros";
     this.cmbMacros.Size                  = new Size(121, 21);
     this.cmbMacros.TabIndex              = 2;
     this.cmbMacros.SelectedValueChanged += new EventHandler(this.cmbMacros_SelectedValueChanged);
     this.btnStop.Enabled                 = false;
     this.btnStop.Location                = new Point(268, 17);
     this.btnStop.Name     = "btnStop";
     this.btnStop.Size     = new Size(92, 30);
     this.btnStop.TabIndex = 1;
     this.btnStop.Text     = "Stop";
     this.btnStop.UseVisualStyleBackColor = true;
     this.btnStop.Click   += new EventHandler(this.btnStop_Click);
     this.btnPlay.Location = new Point(159, 17);
     this.btnPlay.Name     = "btnPlay";
     this.btnPlay.Size     = new Size(92, 30);
     this.btnPlay.TabIndex = 0;
     this.btnPlay.Text     = "Play";
     this.btnPlay.UseVisualStyleBackColor = true;
     this.btnPlay.Click      += new EventHandler(this.btnPlay_Click);
     this.AutoScaleDimensions = new SizeF(6f, 13f);
     this.AutoScaleMode       = AutoScaleMode.Font;
     this.ClientSize          = new Size(1152, 790);
     this.Controls.Add((Control)this.splitContainer1);
     this.Name         = nameof(MacroForm);
     this.Text         = nameof(MacroForm);
     this.FormClosing += new FormClosingEventHandler(this.MacroForm_FormClosing);
     ((ISupportInitialize)this.dataGridView1).EndInit();
     this.splitContainer1.Panel1.ResumeLayout(false);
     this.splitContainer1.Panel2.ResumeLayout(false);
     this.splitContainer1.ResumeLayout(false);
     this.ResumeLayout(false);
 }
 private void InitializeComponent()
 {
     this.components = new System.ComponentModel.Container();
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(dialogCollection));
     this.treeView1           = new TreeView();
     this.contextMenu         = new System.Windows.Forms.ContextMenuStrip(this.components);
     this.editItem            = new ToolStripMenuItem();
     this.addNew              = new ToolStripMenuItem();
     this.addItem             = new ToolStripMenuItem();
     this.removeItem          = new ToolStripMenuItem();
     this.toolStripSeparator1 = new ToolStripSeparator();
     this.expandDialogue      = new ToolStripMenuItem();
     this.collapseDialogue    = new ToolStripMenuItem();
     this.packageName         = new TextBox();
     this.label1              = new Label();
     this.eventsList          = new ListViewTrans();
     this.EventsColumn        = new ColumnHeader();
     this.groupBox1           = new GroupBox();
     this.splitContainer1     = new SplitContainer();
     this.splitContainer4     = new SplitContainer();
     this.splitContainer2     = new SplitContainer();
     this.buttonAddNew        = new Button();
     this.buttonAddItem       = new Button();
     this.splitContainer3     = new SplitContainer();
     this.referenceList1      = new ReferenceList();
     this.conditionControl1   = new ConditionControl();
     this.objectPropertyBox1  = new ObjectPropertyBox();
     this.contextMenu.SuspendLayout();
     this.groupBox1.SuspendLayout();
     ((ISupportInitialize)this.splitContainer1).BeginInit();
     this.splitContainer1.Panel1.SuspendLayout();
     this.splitContainer1.Panel2.SuspendLayout();
     this.splitContainer1.SuspendLayout();
     ((ISupportInitialize)this.splitContainer4).BeginInit();
     this.splitContainer4.Panel1.SuspendLayout();
     this.splitContainer4.Panel2.SuspendLayout();
     this.splitContainer4.SuspendLayout();
     ((ISupportInitialize)this.splitContainer2).BeginInit();
     this.splitContainer2.Panel1.SuspendLayout();
     this.splitContainer2.Panel2.SuspendLayout();
     this.splitContainer2.SuspendLayout();
     ((ISupportInitialize)this.splitContainer3).BeginInit();
     this.splitContainer3.Panel1.SuspendLayout();
     this.splitContainer3.Panel2.SuspendLayout();
     this.splitContainer3.SuspendLayout();
     base.SuspendLayout();
     this.treeView1.ContextMenuStrip = this.contextMenu;
     this.treeView1.Dock             = DockStyle.Fill;
     this.treeView1.HideSelection    = false;
     this.treeView1.Location         = new Point(0, 0);
     this.treeView1.Name             = "treeView1";
     this.treeView1.Size             = new System.Drawing.Size(436, 532);
     this.treeView1.TabIndex         = 0;
     this.treeView1.AfterSelect     += new TreeViewEventHandler(this.treeView1_AfterSelect);
     this.treeView1.NodeMouseClick  += new TreeNodeMouseClickEventHandler(this.treeView1_NodeMouseClick);
     this.contextMenu.Items.AddRange(new ToolStripItem[] { this.editItem, this.addNew, this.addItem, this.removeItem, this.toolStripSeparator1, this.expandDialogue, this.collapseDialogue });
     this.contextMenu.Name         = "contextMenuStrip1";
     this.contextMenu.Size         = new System.Drawing.Size(140, 142);
     this.editItem.Name            = "editItem";
     this.editItem.Size            = new System.Drawing.Size(139, 22);
     this.editItem.Text            = "编辑";
     this.editItem.Click          += new EventHandler(this.editItem_Click);
     this.addNew.Name              = "addNew";
     this.addNew.Size              = new System.Drawing.Size(139, 22);
     this.addNew.Text              = "新增";
     this.addNew.Click            += new EventHandler(this.addNew_Click);
     this.addItem.Name             = "addItem";
     this.addItem.Size             = new System.Drawing.Size(139, 22);
     this.addItem.Text             = "添加已存在的";
     this.addItem.Click           += new EventHandler(this.addItem_Click);
     this.removeItem.Name          = "removeItem";
     this.removeItem.Size          = new System.Drawing.Size(139, 22);
     this.removeItem.Text          = "删除";
     this.removeItem.Click        += new EventHandler(this.removeItem_Click);
     this.toolStripSeparator1.Name = "toolStripSeparator1";
     this.toolStripSeparator1.Size = new System.Drawing.Size(136, 6);
     this.expandDialogue.Name      = "expandDialogue";
     this.expandDialogue.Size      = new System.Drawing.Size(139, 22);
     this.expandDialogue.Text      = "展开";
     this.expandDialogue.Click    += new EventHandler(this.expandDialogue_Click);
     this.collapseDialogue.Name    = "collapseDialogue";
     this.collapseDialogue.Size    = new System.Drawing.Size(139, 22);
     this.collapseDialogue.Text    = "折叠";
     this.collapseDialogue.Click  += new EventHandler(this.collapseDialogue_Click);
     this.packageName.Anchor       = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
     this.packageName.Location     = new Point(60, 18);
     this.packageName.Margin       = new System.Windows.Forms.Padding(2);
     this.packageName.Name         = "packageName";
     this.packageName.Size         = new System.Drawing.Size(250, 20);
     this.packageName.TabIndex     = 0;
     this.packageName.TextChanged += new EventHandler(this.packageName_TextChanged);
     this.label1.AutoSize          = true;
     this.label1.Location          = new Point(14, 18);
     this.label1.Margin            = new System.Windows.Forms.Padding(2, 0, 2, 0);
     this.label1.Name              = "label1";
     this.label1.Size              = new System.Drawing.Size(35, 13);
     this.label1.TabIndex          = 10;
     this.label1.Text              = "名称";
     this.eventsList.Anchor        = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
     this.eventsList.Columns.AddRange(new ColumnHeader[] { this.EventsColumn });
     this.eventsList.FullRowSelect = true;
     this.eventsList.GridLines     = true;
     this.eventsList.HideSelection = false;
     this.eventsList.Location      = new Point(0, 0);
     this.eventsList.Name          = "eventsList";
     this.eventsList.Size          = new System.Drawing.Size(270, 532);
     this.eventsList.TabIndex      = 71;
     this.eventsList.UseCompatibleStateImageBehavior = false;
     this.eventsList.View = View.Details;
     this.eventsList.SelectedIndexChanged += new EventHandler(this.eventsList_SelectedIndexChanged);
     this.EventsColumn.Text  = "事件";
     this.EventsColumn.Width = 263;
     this.groupBox1.Controls.Add(this.referenceList1);
     this.groupBox1.Controls.Add(this.packageName);
     this.groupBox1.Controls.Add(this.label1);
     this.groupBox1.Dock              = DockStyle.Fill;
     this.groupBox1.Location          = new Point(0, 0);
     this.groupBox1.Name              = "groupBox1";
     this.groupBox1.Size              = new System.Drawing.Size(343, 250);
     this.groupBox1.TabIndex          = 75;
     this.groupBox1.TabStop           = false;
     this.groupBox1.Text              = "包";
     this.splitContainer1.Dock        = DockStyle.Fill;
     this.splitContainer1.Location    = new Point(0, 0);
     this.splitContainer1.Name        = "splitContainer1";
     this.splitContainer1.Orientation = Orientation.Horizontal;
     this.splitContainer1.Panel1.Controls.Add(this.splitContainer4);
     this.splitContainer1.Panel2.Controls.Add(this.splitContainer2);
     this.splitContainer1.Size             = new System.Drawing.Size(1031, 786);
     this.splitContainer1.SplitterDistance = 250;
     this.splitContainer1.TabIndex         = 76;
     this.splitContainer4.Dock             = DockStyle.Fill;
     this.splitContainer4.Location         = new Point(0, 0);
     this.splitContainer4.Name             = "splitContainer4";
     this.splitContainer4.Panel1.Controls.Add(this.groupBox1);
     this.splitContainer4.Panel2.Controls.Add(this.conditionControl1);
     this.splitContainer4.Size             = new System.Drawing.Size(1031, 250);
     this.splitContainer4.SplitterDistance = 343;
     this.splitContainer4.TabIndex         = 76;
     this.splitContainer2.Dock             = DockStyle.Fill;
     this.splitContainer2.Location         = new Point(0, 0);
     this.splitContainer2.Name             = "splitContainer2";
     this.splitContainer2.Panel1.Controls.Add(this.buttonAddNew);
     this.splitContainer2.Panel1.Controls.Add(this.buttonAddItem);
     this.splitContainer2.Panel1.Controls.Add(this.eventsList);
     this.splitContainer2.Panel2.Controls.Add(this.splitContainer3);
     this.splitContainer2.Size             = new System.Drawing.Size(1031, 532);
     this.splitContainer2.SplitterDistance = 343;
     this.splitContainer2.TabIndex         = 0;
     this.buttonAddNew.Anchor   = AnchorStyles.Top | AnchorStyles.Right;
     this.buttonAddNew.Location = new Point(276, 3);
     this.buttonAddNew.Name     = "buttonAddNew";
     this.buttonAddNew.Size     = new System.Drawing.Size(60, 48);
     this.buttonAddNew.TabIndex = 77;
     this.buttonAddNew.Text     = "新增";
     this.buttonAddNew.UseVisualStyleBackColor = true;
     this.buttonAddNew.Click    += new EventHandler(this.addNew_Click);
     this.buttonAddItem.Anchor   = AnchorStyles.Top | AnchorStyles.Right;
     this.buttonAddItem.Location = new Point(276, 57);
     this.buttonAddItem.Name     = "buttonAddItem";
     this.buttonAddItem.Size     = new System.Drawing.Size(60, 61);
     this.buttonAddItem.TabIndex = 74;
     this.buttonAddItem.Text     = "添加对话";
     this.buttonAddItem.UseVisualStyleBackColor = true;
     this.buttonAddItem.Click     += new EventHandler(this.addItem_Click);
     this.splitContainer3.Dock     = DockStyle.Fill;
     this.splitContainer3.Location = new Point(0, 0);
     this.splitContainer3.Name     = "splitContainer3";
     this.splitContainer3.Panel1.Controls.Add(this.treeView1);
     this.splitContainer3.Panel2.Controls.Add(this.objectPropertyBox1);
     this.splitContainer3.Size             = new System.Drawing.Size(684, 532);
     this.splitContainer3.SplitterDistance = 436;
     this.splitContainer3.TabIndex         = 0;
     this.referenceList1.Anchor            = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
     this.referenceList1.Exclusions        = (ArrayList)resources.GetObject("referenceList1.Exclusions");
     this.referenceList1.Location          = new Point(6, 43);
     this.referenceList1.Name                = "referenceList1";
     this.referenceList1.ReadOnly            = false;
     this.referenceList1.ShowDescription     = true;
     this.referenceList1.Size                = new System.Drawing.Size(330, 201);
     this.referenceList1.TabIndex            = 11;
     this.conditionControl1.CurrentLine      = null;
     this.conditionControl1.Dock             = DockStyle.Fill;
     this.conditionControl1.Item             = null;
     this.conditionControl1.Location         = new Point(0, 0);
     this.conditionControl1.Name             = "conditionControl1";
     this.conditionControl1.Size             = new System.Drawing.Size(684, 250);
     this.conditionControl1.TabIndex         = 67;
     this.objectPropertyBox1.Dock            = DockStyle.Fill;
     this.objectPropertyBox1.Item            = null;
     this.objectPropertyBox1.Location        = new Point(0, 0);
     this.objectPropertyBox1.Name            = "objectPropertyBox1";
     this.objectPropertyBox1.ShowDescription = true;
     this.objectPropertyBox1.Size            = new System.Drawing.Size(244, 532);
     this.objectPropertyBox1.TabIndex        = 74;
     base.AutoScaleDimensions                = new SizeF(6f, 13f);
     base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
     base.ClientSize    = new System.Drawing.Size(1031, 786);
     base.Controls.Add(this.splitContainer1);
     base.Name       = "dialogCollection";
     base.ShowIcon   = false;
     this.Text       = "对话包";
     base.Activated += new EventHandler(this.dialogCollection_Activated);
     this.contextMenu.ResumeLayout(false);
     this.groupBox1.ResumeLayout(false);
     this.groupBox1.PerformLayout();
     this.splitContainer1.Panel1.ResumeLayout(false);
     this.splitContainer1.Panel2.ResumeLayout(false);
     ((ISupportInitialize)this.splitContainer1).EndInit();
     this.splitContainer1.ResumeLayout(false);
     this.splitContainer4.Panel1.ResumeLayout(false);
     this.splitContainer4.Panel2.ResumeLayout(false);
     ((ISupportInitialize)this.splitContainer4).EndInit();
     this.splitContainer4.ResumeLayout(false);
     this.splitContainer2.Panel1.ResumeLayout(false);
     this.splitContainer2.Panel2.ResumeLayout(false);
     ((ISupportInitialize)this.splitContainer2).EndInit();
     this.splitContainer2.ResumeLayout(false);
     this.splitContainer3.Panel1.ResumeLayout(false);
     this.splitContainer3.Panel2.ResumeLayout(false);
     ((ISupportInitialize)this.splitContainer3).EndInit();
     this.splitContainer3.ResumeLayout(false);
     base.ResumeLayout(false);
 }
Example #22
0
        public CustomManager(string varFilePath, Control customControl, WatchVariableFlowLayoutPanel variableTable)
            : base(varFilePath, variableTable)
        {
            EnableCustomization();

            SplitContainer splitContainerCustom         = customControl.Controls["splitContainerCustom"] as SplitContainer;
            SplitContainer splitContainerCustomControls = splitContainerCustom.Panel1.Controls["splitContainerCustomControls"] as SplitContainer;

            // Panel 1 controls

            Button buttonOpenVars = splitContainerCustomControls.Panel1.Controls["buttonOpenVars"] as Button;

            buttonOpenVars.Click += (sender, e) => _variablePanel.OpenVariables();

            Button buttonSaveVars = splitContainerCustomControls.Panel1.Controls["buttonSaveVars"] as Button;

            buttonSaveVars.Click += (sender, e) => _variablePanel.SaveVariables();

            Button buttonClearVars = splitContainerCustomControls.Panel1.Controls["buttonClearVars"] as Button;

            buttonClearVars.Click += (sender, e) => _variablePanel.ClearVariables();
            ControlUtilities.AddContextMenuStripFunctions(
                buttonClearVars,
                new List <string>()
            {
                "Clear All Vars", "Clear Default Vars"
            },
                new List <Action>()
            {
                () => _variablePanel.ClearVariables(),
                () => _variablePanel.RemoveVariableGroup(VariableGroup.NoGroup),
            });

            _checkBoxCustomRecordValues        = splitContainerCustomControls.Panel1.Controls["checkBoxCustomRecordValues"] as CheckBox;
            _checkBoxCustomRecordValues.Click += (sender, e) => ToggleRecording();

            _textBoxRecordValuesCount = splitContainerCustomControls.Panel1.Controls["textBoxRecordValuesCount"] as BetterTextbox;

            _buttonCustomShowValues        = splitContainerCustomControls.Panel1.Controls["buttonCustomShowValues"] as Button;
            _buttonCustomShowValues.Click += (sender, e) => ShowRecordedValues();

            _buttonCustomClearValues        = splitContainerCustomControls.Panel1.Controls["buttonCustomClearValues"] as Button;
            _buttonCustomClearValues.Click += (sender, e) => ClearRecordedValues();

            _checkBoxUseValueAtStartOfGlobalTimer = splitContainerCustomControls.Panel1.Controls["checkBoxUseValueAtStartOfGlobalTimer"] as CheckBox;

            _labelCustomRecordingFrequencyValue = splitContainerCustomControls.Panel1.Controls["labelCustomRecordingFrequencyValue"] as Label;

            _labelCustomRecordingGapsValue = splitContainerCustomControls.Panel1.Controls["labelCustomRecordingGapsValue"] as Label;

            _recordedValues = new Dictionary <int, List <object> >();
            _lastTimer      = null;
            _numGaps        = 0;
            _recordFreq     = 1;

            // Panel 2 controls

            Button buttonResetVariableSizeToDefault = splitContainerCustomControls.Panel2.Controls["buttonResetVariableSizeToDefault"] as Button;

            buttonResetVariableSizeToDefault.Click += (sender, e) =>
            {
                WatchVariableControl.VariableNameWidth  = WatchVariableControl.DEFAULT_VARIABLE_NAME_WIDTH;
                WatchVariableControl.VariableValueWidth = WatchVariableControl.DEFAULT_VARIABLE_VALUE_WIDTH;
                WatchVariableControl.VariableHeight     = WatchVariableControl.DEFAULT_VARIABLE_HEIGHT;
            };

            GroupBox groupBoxVarNameWidth = splitContainerCustomControls.Panel2.Controls["groupBoxVarNameWidth"] as GroupBox;

            InitializeAddSubtractGetSetFuncionality(
                groupBoxVarNameWidth.Controls["buttonVarNameWidthSubtract"] as Button,
                groupBoxVarNameWidth.Controls["buttonVarNameWidthAdd"] as Button,
                groupBoxVarNameWidth.Controls["buttonVarNameWidthGet"] as Button,
                groupBoxVarNameWidth.Controls["buttonVarNameWidthSet"] as Button,
                groupBoxVarNameWidth.Controls["betterTextboxVarNameWidthAddSubtract"] as TextBox,
                groupBoxVarNameWidth.Controls["betterTextboxVarNameWidthGetSet"] as TextBox,
                (int value) => { WatchVariableControl.VariableNameWidth = value; },
                () => WatchVariableControl.VariableNameWidth);

            GroupBox groupBoxVarValueWidth = splitContainerCustomControls.Panel2.Controls["groupBoxVarValueWidth"] as GroupBox;

            InitializeAddSubtractGetSetFuncionality(
                groupBoxVarValueWidth.Controls["buttonVarValueWidthSubtract"] as Button,
                groupBoxVarValueWidth.Controls["buttonVarValueWidthAdd"] as Button,
                groupBoxVarValueWidth.Controls["buttonVarValueWidthGet"] as Button,
                groupBoxVarValueWidth.Controls["buttonVarValueWidthSet"] as Button,
                groupBoxVarValueWidth.Controls["betterTextboxVarValueWidthAddSubtract"] as TextBox,
                groupBoxVarValueWidth.Controls["betterTextboxVarValueWidthGetSet"] as TextBox,
                (int value) => { WatchVariableControl.VariableValueWidth = value; },
                () => WatchVariableControl.VariableValueWidth);

            GroupBox groupBoxVarHeight = splitContainerCustomControls.Panel2.Controls["groupBoxVarHeight"] as GroupBox;

            InitializeAddSubtractGetSetFuncionality(
                groupBoxVarHeight.Controls["buttonVarHeightSubtract"] as Button,
                groupBoxVarHeight.Controls["buttonVarHeightAdd"] as Button,
                groupBoxVarHeight.Controls["buttonVarHeightGet"] as Button,
                groupBoxVarHeight.Controls["buttonVarHeightSet"] as Button,
                groupBoxVarHeight.Controls["betterTextboxVarHeightAddSubtract"] as TextBox,
                groupBoxVarHeight.Controls["betterTextboxVarHeightGetSet"] as TextBox,
                (int value) => { WatchVariableControl.VariableHeight = value; },
                () => WatchVariableControl.VariableHeight);
        }
Example #23
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.components = new System.ComponentModel.Container();
     System.Windows.Forms.ToolStripMenuItem         mnuDummyDrive;
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
     this.Tree               = new System.Windows.Forms.TreeView();
     this.TreeCtxMenu        = new System.Windows.Forms.ContextMenuStrip(this.components);
     this.mnuRefreshBranch2  = new System.Windows.Forms.ToolStripMenuItem();
     this.mnuOpenFolder2     = new System.Windows.Forms.ToolStripMenuItem();
     this.Images             = new System.Windows.Forms.ImageList(this.components);
     this.FormSave           = new Menees.Windows.Forms.FormSaver(this.components);
     this.Menustrip          = new System.Windows.Forms.MenuStrip();
     this.mnuFile            = new System.Windows.Forms.ToolStripMenuItem();
     this.mnuDrives          = new System.Windows.Forms.ToolStripMenuItem();
     this.mnuChoosePath      = new System.Windows.Forms.ToolStripMenuItem();
     this.mnuRecentPaths     = new System.Windows.Forms.ToolStripMenuItem();
     this.toolStripMenuItem4 = new System.Windows.Forms.ToolStripSeparator();
     this.mnuCancel          = new System.Windows.Forms.ToolStripMenuItem();
     this.toolStripMenuItem2 = new System.Windows.Forms.ToolStripSeparator();
     this.mnuRefreshBranch   = new System.Windows.Forms.ToolStripMenuItem();
     this.mnuOpenFolder      = new System.Windows.Forms.ToolStripMenuItem();
     this.toolStripMenuItem3 = new System.Windows.Forms.ToolStripSeparator();
     this.mnuExit            = new System.Windows.Forms.ToolStripMenuItem();
     this.mnuHelp            = new System.Windows.Forms.ToolStripMenuItem();
     this.mnuAbout           = new System.Windows.Forms.ToolStripMenuItem();
     this.Status             = new System.Windows.Forms.StatusStrip();
     this.lblStatus          = new System.Windows.Forms.ToolStripStatusLabel();
     this.lblProgressImage   = new System.Windows.Forms.ToolStripStatusLabel();
     this.Progress           = new System.Windows.Forms.ToolStripProgressBar();
     this.MainWorker         = new System.ComponentModel.BackgroundWorker();
     this.RefreshWorker      = new System.ComponentModel.BackgroundWorker();
     this.Splitter           = new System.Windows.Forms.SplitContainer();
     this.DetailSplitter     = new System.Windows.Forms.SplitContainer();
     this.Map          = new Microsoft.Research.CommunityTechnologies.Treemap.TreemapControl();
     this.BrowserPanel = new System.Windows.Forms.Panel();
     this.Browser      = new System.Windows.Forms.WebBrowser();
     this.RecentPaths  = new Menees.Windows.Forms.RecentItemList(this.components);
     mnuDummyDrive     = new System.Windows.Forms.ToolStripMenuItem();
     this.TreeCtxMenu.SuspendLayout();
     this.Menustrip.SuspendLayout();
     this.Status.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.Splitter)).BeginInit();
     this.Splitter.Panel1.SuspendLayout();
     this.Splitter.Panel2.SuspendLayout();
     this.Splitter.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.DetailSplitter)).BeginInit();
     this.DetailSplitter.Panel1.SuspendLayout();
     this.DetailSplitter.Panel2.SuspendLayout();
     this.DetailSplitter.SuspendLayout();
     this.BrowserPanel.SuspendLayout();
     this.SuspendLayout();
     //
     // mnuDummyDrive
     //
     mnuDummyDrive.Enabled = false;
     mnuDummyDrive.Name    = "mnuDummyDrive";
     mnuDummyDrive.Size    = new System.Drawing.Size(133, 22);
     mnuDummyDrive.Text    = "<Dummy>";
     //
     // Tree
     //
     this.Tree.ContextMenuStrip   = this.TreeCtxMenu;
     this.Tree.Dock               = System.Windows.Forms.DockStyle.Fill;
     this.Tree.HideSelection      = false;
     this.Tree.ImageIndex         = 0;
     this.Tree.ImageList          = this.Images;
     this.Tree.Location           = new System.Drawing.Point(0, 0);
     this.Tree.Name               = "Tree";
     this.Tree.SelectedImageIndex = 0;
     this.Tree.Size               = new System.Drawing.Size(213, 388);
     this.Tree.TabIndex           = 0;
     this.Tree.BeforeCollapse    += new System.Windows.Forms.TreeViewCancelEventHandler(this.Tree_BeforeCollapse);
     this.Tree.BeforeExpand      += new System.Windows.Forms.TreeViewCancelEventHandler(this.Tree_BeforeExpand);
     this.Tree.AfterSelect       += new System.Windows.Forms.TreeViewEventHandler(this.Tree_AfterSelect);
     this.Tree.MouseDown         += new System.Windows.Forms.MouseEventHandler(this.Tree_MouseDown);
     //
     // TreeCtxMenu
     //
     this.TreeCtxMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
         this.mnuRefreshBranch2,
         this.mnuOpenFolder2
     });
     this.TreeCtxMenu.Name = "TreeCtxMenu";
     this.TreeCtxMenu.Size = new System.Drawing.Size(154, 48);
     //
     // mnuRefreshBranch2
     //
     this.mnuRefreshBranch2.Image = global::DiskUsage.Properties.Resources.Refresh;
     this.mnuRefreshBranch2.ImageTransparentColor = System.Drawing.Color.Fuchsia;
     this.mnuRefreshBranch2.Name   = "mnuRefreshBranch2";
     this.mnuRefreshBranch2.Size   = new System.Drawing.Size(153, 22);
     this.mnuRefreshBranch2.Text   = "&Refresh Branch";
     this.mnuRefreshBranch2.Click += new System.EventHandler(this.RefreshBranch_Click);
     //
     // mnuOpenFolder2
     //
     this.mnuOpenFolder2.Image = global::DiskUsage.Properties.Resources.OpenFolder2;
     this.mnuOpenFolder2.ImageTransparentColor = System.Drawing.Color.Fuchsia;
     this.mnuOpenFolder2.Name   = "mnuOpenFolder2";
     this.mnuOpenFolder2.Size   = new System.Drawing.Size(153, 22);
     this.mnuOpenFolder2.Text   = "&Open Folder";
     this.mnuOpenFolder2.Click += new System.EventHandler(this.OpenFolder_Click);
     //
     // Images
     //
     this.Images.ImageStream      = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("Images.ImageStream")));
     this.Images.TransparentColor = System.Drawing.Color.Magenta;
     this.Images.Images.SetKeyName(0, "Error.bmp");
     this.Images.Images.SetKeyName(1, "Files.bmp");
     this.Images.Images.SetKeyName(2, "OpenFolder2.bmp");
     //
     // FormSave
     //
     this.FormSave.ContainerControl = this;
     this.FormSave.SettingsNodeName = "Form Save";
     //
     // Menustrip
     //
     this.Menustrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
         this.mnuFile,
         this.mnuHelp
     });
     this.Menustrip.Location = new System.Drawing.Point(0, 0);
     this.Menustrip.Name     = "Menustrip";
     this.Menustrip.Size     = new System.Drawing.Size(542, 24);
     this.Menustrip.TabIndex = 1;
     this.Menustrip.Text     = "menuStrip1";
     //
     // mnuFile
     //
     this.mnuFile.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
         this.mnuDrives,
         this.mnuChoosePath,
         this.mnuRecentPaths,
         this.toolStripMenuItem4,
         this.mnuCancel,
         this.toolStripMenuItem2,
         this.mnuRefreshBranch,
         this.mnuOpenFolder,
         this.toolStripMenuItem3,
         this.mnuExit
     });
     this.mnuFile.Name = "mnuFile";
     this.mnuFile.Size = new System.Drawing.Size(37, 20);
     this.mnuFile.Text = "&File";
     //
     // mnuDrives
     //
     this.mnuDrives.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
         mnuDummyDrive
     });
     this.mnuDrives.Name             = "mnuDrives";
     this.mnuDrives.Size             = new System.Drawing.Size(193, 22);
     this.mnuDrives.Text             = "&Drives";
     this.mnuDrives.DropDownOpening += new System.EventHandler(this.Drives_DropDownOpening);
     //
     // mnuChoosePath
     //
     this.mnuChoosePath.Image = global::DiskUsage.Properties.Resources.ChoosePath;
     this.mnuChoosePath.ImageTransparentColor = System.Drawing.Color.Fuchsia;
     this.mnuChoosePath.Name         = "mnuChoosePath";
     this.mnuChoosePath.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.N)));
     this.mnuChoosePath.Size         = new System.Drawing.Size(193, 22);
     this.mnuChoosePath.Text         = "Choose &Path...";
     this.mnuChoosePath.Click       += new System.EventHandler(this.ChoosePath_Click);
     //
     // mnuRecentPaths
     //
     this.mnuRecentPaths.Name = "mnuRecentPaths";
     this.mnuRecentPaths.Size = new System.Drawing.Size(193, 22);
     this.mnuRecentPaths.Text = "R&ecent Paths";
     //
     // toolStripMenuItem4
     //
     this.toolStripMenuItem4.Name = "toolStripMenuItem4";
     this.toolStripMenuItem4.Size = new System.Drawing.Size(190, 6);
     //
     // mnuCancel
     //
     this.mnuCancel.Image = global::DiskUsage.Properties.Resources.Cancel;
     this.mnuCancel.ImageTransparentColor = System.Drawing.Color.Fuchsia;
     this.mnuCancel.Name   = "mnuCancel";
     this.mnuCancel.Size   = new System.Drawing.Size(193, 22);
     this.mnuCancel.Text   = "&Cancel";
     this.mnuCancel.Click += new System.EventHandler(this.Cancel_Click);
     //
     // toolStripMenuItem2
     //
     this.toolStripMenuItem2.Name = "toolStripMenuItem2";
     this.toolStripMenuItem2.Size = new System.Drawing.Size(190, 6);
     //
     // mnuRefreshBranch
     //
     this.mnuRefreshBranch.Image = global::DiskUsage.Properties.Resources.Refresh;
     this.mnuRefreshBranch.ImageTransparentColor = System.Drawing.Color.Fuchsia;
     this.mnuRefreshBranch.Name         = "mnuRefreshBranch";
     this.mnuRefreshBranch.ShortcutKeys = System.Windows.Forms.Keys.F5;
     this.mnuRefreshBranch.Size         = new System.Drawing.Size(193, 22);
     this.mnuRefreshBranch.Text         = "&Refresh Branch";
     this.mnuRefreshBranch.Click       += new System.EventHandler(this.RefreshBranch_Click);
     //
     // mnuOpenFolder
     //
     this.mnuOpenFolder.Image = global::DiskUsage.Properties.Resources.OpenFolder2;
     this.mnuOpenFolder.ImageTransparentColor = System.Drawing.Color.Fuchsia;
     this.mnuOpenFolder.Name         = "mnuOpenFolder";
     this.mnuOpenFolder.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.O)));
     this.mnuOpenFolder.Size         = new System.Drawing.Size(193, 22);
     this.mnuOpenFolder.Text         = "&Open Folder";
     this.mnuOpenFolder.Click       += new System.EventHandler(this.OpenFolder_Click);
     //
     // toolStripMenuItem3
     //
     this.toolStripMenuItem3.Name = "toolStripMenuItem3";
     this.toolStripMenuItem3.Size = new System.Drawing.Size(190, 6);
     //
     // mnuExit
     //
     this.mnuExit.Name   = "mnuExit";
     this.mnuExit.Size   = new System.Drawing.Size(193, 22);
     this.mnuExit.Text   = "E&xit";
     this.mnuExit.Click += new System.EventHandler(this.Exit_Click);
     //
     // mnuHelp
     //
     this.mnuHelp.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
         this.mnuAbout
     });
     this.mnuHelp.Name = "mnuHelp";
     this.mnuHelp.Size = new System.Drawing.Size(44, 20);
     this.mnuHelp.Text = "&Help";
     //
     // mnuAbout
     //
     this.mnuAbout.Name   = "mnuAbout";
     this.mnuAbout.Size   = new System.Drawing.Size(180, 22);
     this.mnuAbout.Text   = "&About...";
     this.mnuAbout.Click += new System.EventHandler(this.About_Click);
     //
     // Status
     //
     this.Status.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
         this.lblStatus,
         this.lblProgressImage,
         this.Progress
     });
     this.Status.Location = new System.Drawing.Point(0, 412);
     this.Status.Name     = "Status";
     this.Status.Size     = new System.Drawing.Size(542, 22);
     this.Status.TabIndex = 2;
     //
     // lblStatus
     //
     this.lblStatus.Name      = "lblStatus";
     this.lblStatus.Size      = new System.Drawing.Size(527, 17);
     this.lblStatus.Spring    = true;
     this.lblStatus.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
     //
     // lblProgressImage
     //
     this.lblProgressImage.AutoSize = false;
     this.lblProgressImage.Image    = global::DiskUsage.Properties.Resources.FileSearch;
     this.lblProgressImage.Name     = "lblProgressImage";
     this.lblProgressImage.Size     = new System.Drawing.Size(30, 17);
     this.lblProgressImage.Visible  = false;
     //
     // Progress
     //
     this.Progress.Name    = "Progress";
     this.Progress.Size    = new System.Drawing.Size(200, 16);
     this.Progress.Visible = false;
     //
     // MainWorker
     //
     this.MainWorker.WorkerReportsProgress      = true;
     this.MainWorker.WorkerSupportsCancellation = true;
     this.MainWorker.DoWork             += new System.ComponentModel.DoWorkEventHandler(this.MainWorker_DoWork);
     this.MainWorker.ProgressChanged    += new System.ComponentModel.ProgressChangedEventHandler(this.Worker_ProgressChanged);
     this.MainWorker.RunWorkerCompleted += new System.ComponentModel.RunWorkerCompletedEventHandler(this.MainWorker_RunWorkerCompleted);
     //
     // RefreshWorker
     //
     this.RefreshWorker.WorkerReportsProgress      = true;
     this.RefreshWorker.WorkerSupportsCancellation = true;
     this.RefreshWorker.DoWork             += new System.ComponentModel.DoWorkEventHandler(this.RefreshWorker_DoWork);
     this.RefreshWorker.ProgressChanged    += new System.ComponentModel.ProgressChangedEventHandler(this.Worker_ProgressChanged);
     this.RefreshWorker.RunWorkerCompleted += new System.ComponentModel.RunWorkerCompletedEventHandler(this.RefreshWorker_RunWorkerCompleted);
     //
     // Splitter
     //
     this.Splitter.Dock     = System.Windows.Forms.DockStyle.Fill;
     this.Splitter.Location = new System.Drawing.Point(0, 24);
     this.Splitter.Name     = "Splitter";
     //
     // Splitter.Panel1
     //
     this.Splitter.Panel1.Controls.Add(this.Tree);
     //
     // Splitter.Panel2
     //
     this.Splitter.Panel2.Controls.Add(this.DetailSplitter);
     this.Splitter.Size             = new System.Drawing.Size(542, 388);
     this.Splitter.SplitterDistance = 213;
     this.Splitter.TabIndex         = 0;
     //
     // DetailSplitter
     //
     this.DetailSplitter.Dock        = System.Windows.Forms.DockStyle.Fill;
     this.DetailSplitter.Location    = new System.Drawing.Point(0, 0);
     this.DetailSplitter.Name        = "DetailSplitter";
     this.DetailSplitter.Orientation = System.Windows.Forms.Orientation.Horizontal;
     //
     // DetailSplitter.Panel1
     //
     this.DetailSplitter.Panel1.Controls.Add(this.Map);
     //
     // DetailSplitter.Panel2
     //
     this.DetailSplitter.Panel2.Controls.Add(this.BrowserPanel);
     this.DetailSplitter.Size             = new System.Drawing.Size(325, 388);
     this.DetailSplitter.SplitterDistance = 194;
     this.DetailSplitter.TabIndex         = 0;
     //
     // Map
     //
     this.Map.AllowDrag              = false;
     this.Map.BorderColor            = System.Drawing.SystemColors.WindowFrame;
     this.Map.BorderStyle            = System.Windows.Forms.BorderStyle.Fixed3D;
     this.Map.DiscreteNegativeColors = 20;
     this.Map.DiscretePositiveColors = 20;
     this.Map.Dock = System.Windows.Forms.DockStyle.Fill;
     this.Map.EmptySpaceLocation = Microsoft.Research.CommunityTechnologies.Treemap.EmptySpaceLocation.DeterminedByLayoutAlgorithm;
     this.Map.FontFamily         = "Arial";
     this.Map.FontSolidColor     = System.Drawing.Color.Black;
     this.Map.IsZoomable         = false;
     this.Map.LayoutAlgorithm    = Microsoft.Research.CommunityTechnologies.Treemap.LayoutAlgorithm.BottomWeightedSquarified;
     this.Map.Location           = new System.Drawing.Point(0, 0);
     this.Map.MaxColor           = System.Drawing.Color.DeepSkyBlue;
     this.Map.MaxColorMetric     = 100F;
     this.Map.MinColor           = System.Drawing.Color.ForestGreen;
     this.Map.MinColorMetric     = -100F;
     this.Map.Name = "Map";
     this.Map.NodeColorAlgorithm         = Microsoft.Research.CommunityTechnologies.Treemap.NodeColorAlgorithm.UseColorMetric;
     this.Map.NodeLevelsWithText         = Microsoft.Research.CommunityTechnologies.Treemap.NodeLevelsWithText.All;
     this.Map.PaddingDecrementPerLevelPx = 1;
     this.Map.PaddingPx = 5;
     this.Map.PenWidthDecrementPerLevelPx = 1;
     this.Map.PenWidthPx        = 3;
     this.Map.SelectedBackColor = System.Drawing.SystemColors.Highlight;
     this.Map.SelectedFontColor = System.Drawing.SystemColors.HighlightText;
     this.Map.ShowToolTips      = true;
     this.Map.Size                 = new System.Drawing.Size(325, 194);
     this.Map.TabIndex             = 0;
     this.Map.TextLocation         = Microsoft.Research.CommunityTechnologies.Treemap.TextLocation.Top;
     this.Map.NodeDoubleClick     += new Microsoft.Research.CommunityTechnologies.Treemap.TreemapControl.NodeEventHandler(this.Map_NodeDoubleClick);
     this.Map.SelectedNodeChanged += new System.EventHandler(this.Map_SelectedNodeChanged);
     //
     // BrowserPanel
     //
     this.BrowserPanel.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
     this.BrowserPanel.Controls.Add(this.Browser);
     this.BrowserPanel.Dock     = System.Windows.Forms.DockStyle.Fill;
     this.BrowserPanel.Location = new System.Drawing.Point(0, 0);
     this.BrowserPanel.Name     = "BrowserPanel";
     this.BrowserPanel.Size     = new System.Drawing.Size(325, 190);
     this.BrowserPanel.TabIndex = 0;
     //
     // Browser
     //
     this.Browser.AllowWebBrowserDrop = false;
     this.Browser.Dock                       = System.Windows.Forms.DockStyle.Fill;
     this.Browser.Location                   = new System.Drawing.Point(0, 0);
     this.Browser.MinimumSize                = new System.Drawing.Size(20, 20);
     this.Browser.Name                       = "Browser";
     this.Browser.ScriptErrorsSuppressed     = true;
     this.Browser.Size                       = new System.Drawing.Size(321, 186);
     this.Browser.TabIndex                   = 0;
     this.Browser.WebBrowserShortcutsEnabled = false;
     //
     // RecentPaths
     //
     this.RecentPaths.FormSaver        = this.FormSave;
     this.RecentPaths.Items            = new string[0];
     this.RecentPaths.MenuItem         = this.mnuRecentPaths;
     this.RecentPaths.SettingsNodeName = "Recent Paths";
     this.RecentPaths.ItemClick       += new System.EventHandler <Menees.Windows.Forms.RecentItemClickEventArgs>(this.RecentPaths_ItemClick);
     //
     // MainForm
     //
     this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
     this.ClientSize          = new System.Drawing.Size(542, 434);
     this.Controls.Add(this.Splitter);
     this.Controls.Add(this.Menustrip);
     this.Controls.Add(this.Status);
     this.Font          = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.Icon          = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
     this.MainMenuStrip = this.Menustrip;
     this.Name          = "MainForm";
     this.Text          = "Disk Usage";
     this.TreeCtxMenu.ResumeLayout(false);
     this.Menustrip.ResumeLayout(false);
     this.Menustrip.PerformLayout();
     this.Status.ResumeLayout(false);
     this.Status.PerformLayout();
     this.Splitter.Panel1.ResumeLayout(false);
     this.Splitter.Panel2.ResumeLayout(false);
     ((System.ComponentModel.ISupportInitialize)(this.Splitter)).EndInit();
     this.Splitter.ResumeLayout(false);
     this.DetailSplitter.Panel1.ResumeLayout(false);
     this.DetailSplitter.Panel2.ResumeLayout(false);
     ((System.ComponentModel.ISupportInitialize)(this.DetailSplitter)).EndInit();
     this.DetailSplitter.ResumeLayout(false);
     this.BrowserPanel.ResumeLayout(false);
     this.ResumeLayout(false);
     this.PerformLayout();
 }
        public JiraIssueTree(SplitContainer splitter, StatusLabel status, JiraIssueListModel model, int itemHeight, Font font)
        {
            parent      = splitter.Panel2;
            this.status = status;
            this.model  = model;

            Dock             = DockStyle.Fill;
            SelectionMode    = TreeSelectionMode.Single;
            FullRowSelect    = true;
            GridLineStyle    = GridLineStyle.None;
            UseColumns       = true;
            RowHeight        = itemHeight;
            Font             = font;
            ShowNodeToolTips = true;

            colName.Header     = "Summary";
            colStatus.Header   = "Status";
            colPriority.Header = "P";
            colUpdated.Header  = "Updated";

            int i = 0;

            controlIcon.ParentColumn     = colName;
            controlIcon.DataPropertyName = "Icon";
            controlIcon.LeftMargin       = i++;
            controlIcon.ToolTipProvider  = toolTipProvider;

            controlName.ParentColumn               = colName;
            controlName.DataPropertyName           = "Name";
            controlName.Trimming                   = StringTrimming.EllipsisCharacter;
            controlName.UseCompatibleTextRendering = true;
            controlName.ToolTipProvider            = toolTipProvider;
            controlName.LeftMargin                 = i++;

            controlPriorityIcon.ParentColumn     = colPriority;
            controlPriorityIcon.DataPropertyName = "PriorityIcon";
            controlPriorityIcon.ToolTipProvider  = toolTipProvider;
            controlPriorityIcon.LeftMargin       = i++;

            controlStatusIcon.ParentColumn     = colStatus;
            controlStatusIcon.DataPropertyName = "StatusIcon";
            controlStatusIcon.ToolTipProvider  = toolTipProvider;
            controlStatusIcon.LeftMargin       = i++;

            controlStatusText.ParentColumn               = colStatus;
            controlStatusText.DataPropertyName           = "StatusText";
            controlStatusText.Trimming                   = StringTrimming.EllipsisCharacter;
            controlStatusText.UseCompatibleTextRendering = true;
            controlStatusText.ToolTipProvider            = toolTipProvider;
            controlStatusText.LeftMargin                 = i++;

            controlUpdated.ParentColumn               = colUpdated;
            controlUpdated.DataPropertyName           = "Updated";
            controlUpdated.Trimming                   = StringTrimming.EllipsisCharacter;
            controlUpdated.UseCompatibleTextRendering = true;
            controlUpdated.TextAlign                  = HorizontalAlignment.Right;
            controlUpdated.ToolTipProvider            = toolTipProvider;
            controlUpdated.LeftMargin                 = i;

            Columns.Add(colName);
            Columns.Add(colPriority);
            Columns.Add(colStatus);
            Columns.Add(colUpdated);

            NodeControls.Add(controlIcon);
            NodeControls.Add(controlName);
            NodeControls.Add(controlPriorityIcon);
            NodeControls.Add(controlStatusIcon);
            NodeControls.Add(controlStatusText);
            NodeControls.Add(controlUpdated);

            loadColumnWidths();

            parent.SizeChanged     += parentSizeChanged;
            splitter.SizeChanged   += parentSizeChanged;
            splitter.SplitterMoved += parentSizeChanged;

            colPriority.TextAlign      = HorizontalAlignment.Left;
            colPriority.Width          = PRIORITY_WIDTH;
            colPriority.MinColumnWidth = PRIORITY_WIDTH;
            colPriority.MaxColumnWidth = PRIORITY_WIDTH;

            colStatus.Width          = statusWidth;
            colStatus.MinColumnWidth = STATUS_MIN;

            colUpdated.Width          = updatedWidth;
            colUpdated.MinColumnWidth = UPDATED_MIN;

            colName.TextAlign       = HorizontalAlignment.Left;
            colPriority.TooltipText = "Priority";
            colStatus.TextAlign     = HorizontalAlignment.Left;
            colPriority.TextAlign   = HorizontalAlignment.Left;
            colUpdated.TextAlign    = HorizontalAlignment.Right;

            setSummaryColumnWidth();

            ItemDrag += jiraIssueTreeItemDrag;

            Expanded  += jiraIssueTreeExpanded;
            Collapsed += jiraIssueTreeCollapsed;

            colUpdated.WidthChanged += columnWidthChanged;
            colStatus.WidthChanged  += columnWidthChanged;
        }
Example #25
0
        private void CustomerScreen_Load(object sender, EventArgs e)
        {
            //FullScreenMode
            //if (Properties.Settings.Default.SettingsAdFullScreenMode)
            this.WindowState = FormWindowState.Maximized;
            //else
            //    this.WindowState = FormWindowState.Normal;

            splitContainerCustomerScreen = splitContainer1;
            panelQuantityCustomerScreen  = panelQuantity;
            panelAmountCustomerScreen    = panelAmount;

            int paddingQuantity = 25;   // 45;

            // Create a new ListView control.
            listViewReturns = new ListView();
            //listView1.Bounds = new Rectangle(new Point(10, 10), new Size(300, 200));

            listViewReturns.Font = new System.Drawing.Font("Arial", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));


            // Set the view to show details.
            listViewReturns.View = View.Details;
            // Allow the user to edit item text.
            listViewReturns.LabelEdit = false;
            // Allow the user to rearrange columns.
            listViewReturns.AllowColumnReorder = false;
            // Display check boxes.
            listViewReturns.CheckBoxes = false;
            // Select the item and subitems when selection is made.
            listViewReturns.FullRowSelect = false;
            // Display grid lines.
            listViewReturns.GridLines = true;
            // Sort the items in the list in ascending order.
            //listView1.Sorting = SortOrder.Ascending;
            //Colors
            listViewReturns.BackColor = Color.FromArgb(235, 247, 255);
            listViewReturns.ForeColor = Color.FromArgb(0, 114, 187);

            //listview with headers
            //listView1.Columns.Add("Quantity", 90, HorizontalAlignment.Left);
            //listView1.Columns.Add("Description", 250, HorizontalAlignment.Left);
            //listView1.Columns.Add("Price", 80, HorizontalAlignment.Left);
            //listView1.Columns.Add("Amount", 110, HorizontalAlignment.Left);


            listViewReturns.Columns.Add("Qty", 80 + paddingQuantity, HorizontalAlignment.Left);
            listViewReturns.Columns.Add("Description", 154 + paddingQuantity, HorizontalAlignment.Center);
            listViewReturns.Columns.Add("Price", 100 + paddingQuantity, HorizontalAlignment.Right);
            listViewReturns.Columns.Add("Amount", 125 + paddingQuantity, HorizontalAlignment.Right);
            //listViewReturns.Columns.Add("", 1000, HorizontalAlignment.Right);


            //listViewReturns.HeaderStyle = ColumnHeaderStyle.None;
            listViewReturns.BorderStyle = BorderStyle.None;


            for (int i = 0; i < listViewReturns.Items.Count; i++)
            {
                listViewReturns.Items[i].UseItemStyleForSubItems = false;
                //listViewReturns.Items[i].
            }

            listViewReturns.Dock      = DockStyle.Fill;
            listViewReturns.OwnerDraw = true;

            //listView1.Scrollable = false;
            listViewReturns.DrawColumnHeader += new DrawListViewColumnHeaderEventHandler(listViewReturns_DrawColumnHeader);
            //listViewReturns.DrawItem += new DrawListViewItemEventHandler(listViewReturns_DrawItem);
            listViewReturns.DrawSubItem += new DrawListViewSubItemEventHandler(listViewReturns_DrawSubItem);

            // Add the ListView to the control collection.
            this.splitContainer1.Panel2.Controls.Add(listViewReturns);
            listViewReturns.Columns[1].Width = listViewReturns.Width -
                                               (listViewReturns.Columns[0].Width +
                                                listViewReturns.Columns[2].Width +
                                                listViewReturns.Columns[3].Width);
            //
            // labelTotalQty
            //
            labelTotalQty             = new Label();
            labelTotalQty.BorderStyle = System.Windows.Forms.BorderStyle.None;
            labelTotalQty.Font        = new System.Drawing.Font("Arial", 20F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            labelTotalQty.ForeColor   = Color.FromArgb(0, 114, 187);
            labelTotalQty.Location    = new System.Drawing.Point(17, 4);
            labelTotalQty.Name        = "labelTotalQty";
            labelTotalQty.Size        = new System.Drawing.Size(142, 74);
            labelTotalQty.TabIndex    = 0;
            labelTotalQty.Text        = "Quantity:";
            labelTotalQty.Dock        = DockStyle.Fill;

            panelQuantity.Controls.Add(labelTotalQty);

            //
            // labelTotalAmt
            //
            labelTotalAmt             = new Label();
            labelTotalAmt.BackColor   = System.Drawing.Color.FromArgb(0, 114, 187);
            labelTotalAmt.BorderStyle = System.Windows.Forms.BorderStyle.None;
            labelTotalAmt.Font        = new System.Drawing.Font("Arial", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            labelTotalAmt.ForeColor   = System.Drawing.Color.FromArgb(235, 247, 255);
            labelTotalAmt.Location    = new System.Drawing.Point(176, 4);
            labelTotalAmt.Name        = "labelTotalAmt";
            labelTotalAmt.Size        = new System.Drawing.Size(142, 74);
            labelTotalAmt.TabIndex    = 1;
            labelTotalAmt.Text        = "Total:";
            labelTotalAmt.Dock        = DockStyle.Fill;

            panelAmount.Controls.Add(labelTotalAmt);


            //Screen Refresh
            //this.timer1.Interval = Properties.Settings.Default.SettingsAdCustomerScreenRefresh*1000;
            //this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
            //timer1.Enabled = true;


            ReadFolderFiles();

            if (MaxIndex > 0)
            {
                string fn = Properties.Settings.Default.SettingsAdCustomerScreenImagesFolder + "\\" + FolderImageFiles[index++].ToString();
                //fileInfo = new System.IO.FileInfo(fn);
                //fileStream = fileInfo.OpenRead();
                //pictureBox1.Image = System.Drawing.Image.FromStream(fileStream);
                //Application.DoEvents();
                //fileStream.Close();
                //Image fastImage = ImageFast.FromFile(fn);
                //pictureBox1.Image = fastImage;
                pictureBox1.Image = Funciones.LoadBitmap(fn);

                if (MaxIndex > 1)
                {
                    //slide
                    this.timer2.Interval = Properties.Settings.Default.SettingsAdCustomerScreenImageInterval * 1000;
                    this.timer2.Tick    += new System.EventHandler(this.timer2_Tick);
                    timer2.Enabled       = true;
                }
            }

            //for a slide show

            //clock
            //this.timer3.Interval = 1000;
            //this.timer3.Tick += new System.EventHandler(this.timer3_Tick);
            //timer3.Enabled = true;

            //object obj1 = toolStripStatusLabelDate;
            //object obj2 = toolStripStatusLabelTime;
            //Main.rc.CambiarControlFecha(ref obj1);
            //Main.rc.CambiarControlHora(ref obj2);


            //DateTimePicker dtp = null;
            //object lb1 = toolStripStatusLabelDate;
            //object lb2 = toolStripStatusLabelTime;
            //rc1 = new RelojCalendario(Properties.Settings.Default.FechaActual, "Short", "", ref dtp, ref lb1, ref lb2);

            //own date and time
            this.timer1.Interval = 1000;
            this.timer1.Tick    += new System.EventHandler(this.timer1_Tick);
            timer1.Enabled       = true;


            //blinking timer
            tslCntr             = labelNextCustomer;
            timerBlink          = new System.Windows.Forms.Timer();
            timerBlink.Enabled  = false;
            timerBlink.Interval = 350;
            timerBlink.Tick    += new System.EventHandler(timerBlink_Tick);
        }
Example #26
0
 private void InitializeComponent()
 {
     this.txtScript       = new System.Windows.Forms.RichTextBox();
     this.txtLog          = new System.Windows.Forms.RichTextBox();
     this.splitContainer1 = new System.Windows.Forms.SplitContainer();
     this.txtCode         = new System.Windows.Forms.RichTextBox();
     this.splitContainer2 = new System.Windows.Forms.SplitContainer();
     this.splitContainer1.Panel1.SuspendLayout();
     this.splitContainer1.Panel2.SuspendLayout();
     this.splitContainer1.SuspendLayout();
     this.splitContainer2.Panel1.SuspendLayout();
     this.splitContainer2.Panel2.SuspendLayout();
     this.splitContainer2.SuspendLayout();
     this.SuspendLayout();
     //
     // txtScript
     //
     this.txtScript.Dock         = System.Windows.Forms.DockStyle.Fill;
     this.txtScript.Font         = new System.Drawing.Font("Consolas", 8.25F);
     this.txtScript.Location     = new System.Drawing.Point(0, 0);
     this.txtScript.Name         = "txtScript";
     this.txtScript.Size         = new System.Drawing.Size(589, 165);
     this.txtScript.TabIndex     = 0;
     this.txtScript.Text         = "";
     this.txtScript.TextChanged += new System.EventHandler(this.txtScript_TextChanged);
     //
     // txtLog
     //
     this.txtLog.Dock     = System.Windows.Forms.DockStyle.Fill;
     this.txtLog.Font     = new System.Drawing.Font("Consolas", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.txtLog.Location = new System.Drawing.Point(0, 0);
     this.txtLog.Name     = "txtLog";
     this.txtLog.ReadOnly = true;
     this.txtLog.Size     = new System.Drawing.Size(585, 180);
     this.txtLog.TabIndex = 1;
     this.txtLog.Text     = "";
     //
     // splitContainer1
     //
     this.splitContainer1.Dock        = System.Windows.Forms.DockStyle.Fill;
     this.splitContainer1.Location    = new System.Drawing.Point(0, 0);
     this.splitContainer1.Name        = "splitContainer1";
     this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
     //
     // splitContainer1.Panel1
     //
     this.splitContainer1.Panel1.Controls.Add(this.txtScript);
     //
     // splitContainer1.Panel2
     //
     this.splitContainer1.Panel2.Controls.Add(this.splitContainer2);
     this.splitContainer1.Size             = new System.Drawing.Size(589, 349);
     this.splitContainer1.SplitterDistance = 165;
     this.splitContainer1.TabIndex         = 2;
     //
     // txtCode
     //
     this.txtCode.Dock     = System.Windows.Forms.DockStyle.Fill;
     this.txtCode.Font     = new System.Drawing.Font("Consolas", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.txtCode.Location = new System.Drawing.Point(0, 0);
     this.txtCode.Name     = "txtCode";
     this.txtCode.ReadOnly = true;
     this.txtCode.Size     = new System.Drawing.Size(0, 180);
     this.txtCode.TabIndex = 2;
     this.txtCode.Text     = "";
     //
     // splitContainer2
     //
     this.splitContainer2.Dock       = System.Windows.Forms.DockStyle.Fill;
     this.splitContainer2.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
     this.splitContainer2.Location   = new System.Drawing.Point(0, 0);
     this.splitContainer2.Name       = "splitContainer2";
     //
     // splitContainer2.Panel1
     //
     this.splitContainer2.Panel1.Controls.Add(this.txtLog);
     //
     // splitContainer2.Panel2
     //
     this.splitContainer2.Panel2.Controls.Add(this.txtCode);
     this.splitContainer2.Panel2MinSize    = 0;
     this.splitContainer2.Size             = new System.Drawing.Size(589, 180);
     this.splitContainer2.SplitterDistance = 585;
     this.splitContainer2.TabIndex         = 3;
     //
     // ScriptBox
     //
     this.Controls.Add(this.splitContainer1);
     this.Name = "ScriptBox";
     this.Size = new System.Drawing.Size(589, 349);
     this.splitContainer1.Panel1.ResumeLayout(false);
     this.splitContainer1.Panel2.ResumeLayout(false);
     this.splitContainer1.ResumeLayout(false);
     this.splitContainer2.Panel1.ResumeLayout(false);
     this.splitContainer2.Panel2.ResumeLayout(false);
     this.splitContainer2.ResumeLayout(false);
     this.ResumeLayout(false);
 }
Example #27
0
        private void Form1_Load(object sender, EventArgs e)
        {
            const int cols = 5;
            const int rows = 6;

            // setup layout
            var tlp = new TableLayoutPanel
            {
                ColumnCount = cols,
                RowCount    = rows,
                Dock        = DockStyle.Fill,
                GrowStyle   = TableLayoutPanelGrowStyle.FixedSize
            };

            for (var i = 0; i < cols; i++)
            {
                tlp.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100.0f / cols));
            }

            // add header
            var label = new Label
            {
                Text      = @"My Header",
                BackColor = Color.Red,
                Dock      = DockStyle.Fill,
                TextAlign = ContentAlignment.MiddleCenter
            };

            tlp.Controls.Add(label);
            tlp.SetColumn(label, 0);
            tlp.SetRow(label, 0);
            tlp.SetColumnSpan(label, cols);

            // add some cells
            var yMin = 1;
            var yMax = 5;
            var xMin = 0;
            var xMax = cols;

            for (var y = yMin; y < yMax; y++)
            {
                for (var x = xMin; x < xMax; x++)
                {
                    var color = Color.FromArgb(
                        255 / (xMax - xMin) * (x - xMin),
                        128,
                        255 / (yMax - yMin) * (y - yMin)
                        );
                    var label1 = new Label
                    {
                        Text      = $@"X = {x}, Y = {y}",
                        BackColor = color,
                        ForeColor = Color.White,
                        Dock      = DockStyle.Fill,
                        TextAlign = ContentAlignment.MiddleCenter,
                        Margin    = DefaultMargin
                    };
                    tlp.Controls.Add(label1, x, y);
                }
            }

            // add swapper
            var button = new Button
            {
                Text = @"Clicky !",
                Dock = DockStyle.Fill
            };

            button.Click += (o, args) =>
            {
                var srcRow   = 2;
                var tgtRow   = 3;
                var controls = tlp.Controls.Cast <Control>().ToArray();
                var array1   = controls.Where(s => tlp.GetRow(s) == srcRow).ToArray();
                var array2   = controls.Where(s => tlp.GetRow(s) == tgtRow).ToArray();

                foreach (var control in array1)
                {
                    tlp.SetCellPosition(control, new TableLayoutPanelCellPosition(tlp.GetColumn(control), tgtRow));
                }

                foreach (var control in array2)
                {
                    tlp.SetCellPosition(control, new TableLayoutPanelCellPosition(tlp.GetColumn(control), srcRow));
                }
            };

            // pack things up
            var sc = new SplitContainer
            {
                Orientation = Orientation.Horizontal,
                BorderStyle = BorderStyle.Fixed3D,
                Dock        = DockStyle.Fill
            };

            sc.Panel1.Controls.Add(tlp);
            sc.Panel2.Controls.Add(button);
            Controls.Add(sc);
        }
Example #28
0
 //
 #endregion [Private Declar]
 private void Initialize()
 {
     #region [declare new]
     components              = new Container();
     splitTimer              = new Timer(components);
     split_container         = new SplitContainer();
     fpanel                  = new XShadowPanel();
     f_inner_panel           = new Panel();
     btn_list                = new OfficeButton();
     btn_new                 = new OfficeButton();
     btn_edit                = new OfficeButton();
     btn_delete              = new OfficeButton();
     btn_print               = new OfficeButton();
     btn_splitter            = new OfficeButton();
     lbl_header              = new Label();
     btn_close               = new Button();
     txt_servers_name        = new XTextBox();
     lbl_servers_name        = new XLabel();
     txt_servers_version     = new XTextBox();
     lbl_servers_version     = new XLabel();
     txt_servers_path        = new XTextBox();
     lbl_servers_path        = new XLabel();
     txt_servers_backup_path = new XTextBox();
     lbl_servers_backup_path = new XLabel();
     txt_notes               = new RichTextBox();
     lbl_notes               = new XLabel();
     btn_save                = new OfficeButton();
     btn_cancel              = new OfficeButton();
     btn_not_active          = new OfficeButton();
     btn_active              = new OfficeButton();
     #endregion [declare new]
     //
     #region [container suspend]
     //
     ((ISupportInitialize)(split_container)).BeginInit();
     split_container.Panel1.SuspendLayout();
     split_container.Panel2.SuspendLayout();
     split_container.SuspendLayout();
     fpanel.SuspendLayout();
     f_inner_panel.SuspendLayout();
     SuspendLayout();
     //
     #endregion [container suspend]
     //
     #region [splitTimer]
     //
     splitTimer.Interval = 2;
     splitTimer.Tick    += new EventHandler(SplitTimer_Tick);
     //
     #endregion [splitTimer]
     //
     #region [split_container]
     //
     split_container.Dock             = DockStyle.Fill;
     split_container.Location         = new Point(0, 0);
     split_container.Name             = "split_container";
     split_container.Size             = new Size(Theme.Screen_Width, Theme.Screen_Heigth);
     split_container.SplitterDistance = Theme.Screen_Width;
     split_container.TabIndex         = 0;
     //
     // split_container.Panel1
     //
     split_container.Panel1.Controls.Add(fpanel);
     split_container.Panel1.BackColor = Theme.Fpanel1_Backcolor;
     //
     #region [split_container.Panel2]
     //
     split_container.Panel2.BackColor = Theme.Fpanel2_Backcolor;
     split_container.Panel2.Controls.Add(btn_print);
     split_container.Panel2.Controls.Add(btn_delete);
     split_container.Panel2.Controls.Add(btn_edit);
     split_container.Panel2.Controls.Add(btn_new);
     split_container.Panel2.Controls.Add(btn_list);
     split_container.Panel2.Controls.Add(btn_splitter);
     //
     btn_list.Font     = Theme.btnFont;
     btn_list.Location = new Point(Theme.F_btn_list_left, Theme.F_btn_list_top);
     btn_list.Size     = new Size(Theme.F_btn_list_width, Theme.F_btn_list_height);
     btn_list.TabIndex = 1;
     btn_list.Name     = "btn_list";
     btn_list.Text     = "&List";
     btn_list.Themes   = Theme.BlueBtn;
     btn_list.Click   += Btn_list_Click;
     //
     btn_new.Font     = Theme.btnFont;
     btn_new.Location = new Point(Theme.F_btn_list_left, (btn_list.Bottom + Theme.F_btn_gap));
     btn_new.Size     = new Size(Theme.F_btn_list_width, Theme.F_btn_list_height);
     btn_new.TabIndex = btn_list.TabIndex + 1;
     btn_new.Name     = "btn_new";
     btn_new.Text     = "&New";
     btn_new.Themes   = Theme.BlueBtn;
     btn_new.Click   += Btn_new_Click;
     //
     btn_edit.Font     = Theme.btnFont;
     btn_edit.Location = new Point(Theme.F_btn_list_left, (btn_new.Bottom + Theme.F_btn_gap));
     btn_edit.Size     = new Size(Theme.F_btn_list_width, Theme.F_btn_list_height);
     btn_edit.TabIndex = btn_new.TabIndex + 1;
     btn_edit.Name     = "btn_edit";
     btn_edit.Text     = "&Edit";
     btn_edit.Themes   = Theme.BlueBtn;
     btn_edit.Click   += Btn_edit_Click;
     //
     btn_delete.Font     = Theme.btnFont;
     btn_delete.Location = new Point(Theme.F_btn_list_left, (btn_edit.Bottom + Theme.F_btn_gap));
     btn_delete.Size     = new Size(Theme.F_btn_list_width, Theme.F_btn_list_height);
     btn_delete.TabIndex = btn_edit.TabIndex + 1;
     btn_delete.Name     = "btn_delete";
     btn_delete.Text     = "&Delete";
     btn_delete.Themes   = Theme.BlueBtn;
     btn_delete.Click   += Btn_delete_Click;
     //
     btn_print.Font     = Theme.btnFont;
     btn_print.Location = new Point(Theme.F_btn_list_left, (btn_delete.Bottom + Theme.F_btn_gap));
     btn_print.Size     = new Size(Theme.F_btn_list_width, Theme.F_btn_list_height);
     btn_print.TabIndex = btn_delete.TabIndex + 1;
     btn_print.Name     = "btn_print";
     btn_print.Text     = "&Print";
     btn_print.Themes   = Theme.BlueBtn;
     btn_print.Click   += Btn_print_Click;
     //
     btn_splitter.Font     = Theme.btnFont;
     btn_splitter.Location = new Point(Theme.F_btn_list_left - 30, Theme.F_btn_list_top);
     btn_splitter.Size     = new Size(Theme.F_btn_spliter_width, btn_print.Bottom - btn_list.Top);
     btn_splitter.TabIndex = btn_print.TabIndex + 1;
     btn_splitter.Name     = "btn_splitter";
     btn_splitter.Text     = "⁞⁞";
     btn_splitter.Themes   = Theme.WhiteBtn;
     btn_splitter.Click   += new EventHandler(Btn_splitter_Click);
     //
     #endregion [split_container.Panel2]
     //
     #endregion [split_container]
     //
     #region [fpanel]
     //
     fpanel.Name   = "fpanel";
     fpanel.Anchor = ((AnchorStyles)((AnchorStyles.Top)) | ((AnchorStyles.Right)) | ((AnchorStyles.Left)));
     fpanel.Controls.Add(f_inner_panel);
     fpanel.Size      = new Size(Theme.Fpanel_width, Theme.Fpanel_height);
     fpanel.Location  = new Point(Theme.Fpanel_left, Theme.Fpanel_top);
     fpanel.BackColor = Theme.Fpanel_Backcolor;
     fpanel.TabIndex  = 1;
     //
     #endregion [fpanel]
     //
     #region [f_inner_panel]
     //
     f_inner_panel.Anchor     = ((AnchorStyles)((AnchorStyles.Top)) | ((AnchorStyles.Right)) | ((AnchorStyles.Left)));
     f_inner_panel.Cursor     = Cursors.Default;
     f_inner_panel.Name       = "f_inner_panel";
     f_inner_panel.Size       = new Size(Theme.Fpanel_width - 11, Theme.Fpanel_height - 11);
     f_inner_panel.Location   = new Point(6, 0);
     f_inner_panel.BackColor  = Theme.F_inner_panel_Backcolor;
     f_inner_panel.AutoScroll = true;
     f_inner_panel.TabIndex   = 2;
     //
     #region [adding controls]
     //
     f_inner_panel.Controls.Add(btn_close);
     f_inner_panel.Controls.Add(lbl_header);
     f_inner_panel.Controls.Add(txt_notes);
     f_inner_panel.Controls.Add(lbl_notes);
     f_inner_panel.Controls.Add(txt_servers_name);
     f_inner_panel.Controls.Add(lbl_servers_name);
     f_inner_panel.Controls.Add(txt_servers_version);
     f_inner_panel.Controls.Add(lbl_servers_version);
     f_inner_panel.Controls.Add(txt_servers_path);
     f_inner_panel.Controls.Add(lbl_servers_path);
     f_inner_panel.Controls.Add(txt_servers_backup_path);
     f_inner_panel.Controls.Add(lbl_servers_backup_path);
     f_inner_panel.Controls.Add(btn_save);
     f_inner_panel.Controls.Add(btn_cancel);
     f_inner_panel.Controls.Add(btn_not_active);
     f_inner_panel.Controls.Add(btn_active);
     //
     #endregion [adding controls]
     //
     #region [Header]
     //
     btn_close.Anchor    = AnchorStyles.Top | AnchorStyles.Right;
     btn_close.BackColor = Color.FromArgb(0, 97, 168);
     btn_close.Cursor    = Cursors.Default;
     btn_close.FlatAppearance.BorderSize         = 0;
     btn_close.FlatAppearance.MouseDownBackColor = Color.OrangeRed;
     btn_close.FlatAppearance.MouseOverBackColor = Color.Crimson;
     btn_close.FlatStyle = FlatStyle.Flat;
     btn_close.Font      = new Font("Arial", 9.75F, FontStyle.Bold, GraphicsUnit.Point, 0);
     btn_close.ForeColor = Color.FromArgb(217, 237, 255);
     btn_close.Location  = new Point(Theme.F_btn_close_left, Theme.F_btn_close_top);
     btn_close.Name      = "btn_close";
     btn_close.Size      = new Size(Theme.btn_close_width, Theme.btn_close_height);
     btn_close.TabIndex  = 30;
     btn_close.Text      = "X";
     btn_close.UseVisualStyleBackColor = false;
     btn_close.Click += new EventHandler(Btn_close_Click);
     //
     lbl_header.Anchor    = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
     lbl_header.BackColor = Theme.F_header_Backcolor;
     lbl_header.Cursor    = Cursors.Default;
     lbl_header.Font      = Theme.F_header_Font;
     lbl_header.ForeColor = Theme.F_headerText_Fontcolor;
     lbl_header.Location  = new Point(-5, 0);
     lbl_header.Name      = "lbl_header";
     lbl_header.Size      = new Size(Theme.F_header_width, Theme.F_header_height);
     lbl_header.Text      = "Servers";
     lbl_header.TextAlign = ContentAlignment.MiddleCenter;
     //
     #endregion [Header]
     //
     #region [Properties of control]
     //
     lbl_servers_name.Font      = Theme.Font_10B;
     lbl_servers_name.ForeColor = Theme.lbl_ForeColor;
     lbl_servers_name.Location  = new Point(Theme.lbl_left, Theme.lbl_top);
     lbl_servers_name.Size      = new Size(Theme.OneLabelColumn, Theme.OneLabelHeight);
     lbl_servers_name.Name      = "lbl_servers_name";
     lbl_servers_name.Text      = "   Servers Name";
     lbl_servers_name.Anchor    = (AnchorStyles)(AnchorStyles.Top | AnchorStyles.Left);
     lbl_servers_name.TextAlign = ContentAlignment.MiddleLeft;
     lbl_servers_name.TabIndex  = Theme.lbl_TabIndex;
     //
     txt_servers_name.Font              = Theme.txtFont;
     txt_servers_name.ForeColor         = Theme.txtForeColor;
     txt_servers_name.BackColor         = Theme.txt_Backcolor;
     txt_servers_name.ReadOnlyBackColor = Theme.txt_Readonly_Backcolor;
     txt_servers_name.Location          = new Point(Theme.txt_left, Theme.txt_top);
     txt_servers_name.Size              = new Size(Theme.OneTextColumn, Theme.txt_Height);
     txt_servers_name.Name              = "txt_servers_name";
     txt_servers_name.Anchor            = (AnchorStyles)(AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right);
     txt_servers_name.TabIndex          = Theme.txt_TabIndex;
     txt_servers_name.Enter            += new EventHandler(Txt_servers_name_Enter);
     //
     lbl_servers_version.Font      = Theme.Font_10B;
     lbl_servers_version.ForeColor = Theme.lbl_ForeColor;
     lbl_servers_version.Location  = new Point(Theme.lbl_left, lbl_servers_name.Top + Theme.RowGap);
     lbl_servers_version.Size      = new Size(Theme.OneLabelColumn, Theme.OneLabelHeight);
     lbl_servers_version.Name      = "lbl_servers_version";
     lbl_servers_version.Text      = "   Servers Version";
     lbl_servers_version.Anchor    = (AnchorStyles)(AnchorStyles.Top | AnchorStyles.Left);
     lbl_servers_version.TextAlign = ContentAlignment.MiddleLeft;
     lbl_servers_version.TabIndex  = lbl_servers_name.TabIndex + 1;
     //
     txt_servers_version.Font              = Theme.txtFont;
     txt_servers_version.ForeColor         = Theme.txtForeColor;
     txt_servers_version.BackColor         = Theme.txt_Backcolor;
     txt_servers_version.ReadOnlyBackColor = Theme.txt_Readonly_Backcolor;
     txt_servers_version.Location          = new Point(Theme.txt_left, txt_servers_name.Top + Theme.RowGap);
     txt_servers_version.Size              = new Size(Theme.OneTextColumn, Theme.txt_Height);
     txt_servers_version.Name              = "txt_servers_version";
     txt_servers_version.Anchor            = (AnchorStyles)(AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right);
     txt_servers_version.TabIndex          = txt_servers_name.TabIndex + 1;
     txt_servers_version.Enter            += new EventHandler(Txt_servers_version_Enter);
     //
     lbl_servers_path.Font      = Theme.Font_10B;
     lbl_servers_path.ForeColor = Theme.lbl_ForeColor;
     lbl_servers_path.Location  = new Point(Theme.lbl_left, lbl_servers_version.Top + Theme.RowGap);
     lbl_servers_path.Size      = new Size(Theme.OneLabelColumn, Theme.OneLabelHeight);
     lbl_servers_path.Name      = "lbl_servers_path";
     lbl_servers_path.Text      = "   Servers Path";
     lbl_servers_path.Anchor    = (AnchorStyles)(AnchorStyles.Top | AnchorStyles.Left);
     lbl_servers_path.TextAlign = ContentAlignment.MiddleLeft;
     lbl_servers_path.TabIndex  = lbl_servers_version.TabIndex + 1;
     //
     txt_servers_path.Font              = Theme.txtFont;
     txt_servers_path.ForeColor         = Theme.txtForeColor;
     txt_servers_path.BackColor         = Theme.txt_Backcolor;
     txt_servers_path.ReadOnlyBackColor = Theme.txt_Readonly_Backcolor;
     txt_servers_path.Location          = new Point(Theme.txt_left, txt_servers_version.Top + Theme.RowGap);
     txt_servers_path.Size              = new Size(Theme.OneTextColumn, Theme.txt_Height);
     txt_servers_path.Name              = "txt_servers_path";
     txt_servers_path.Anchor            = (AnchorStyles)(AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right);
     txt_servers_path.TabIndex          = txt_servers_version.TabIndex + 1;
     txt_servers_path.Enter            += new EventHandler(Txt_servers_path_Enter);
     //
     lbl_servers_backup_path.Font      = Theme.Font_10B;
     lbl_servers_backup_path.ForeColor = Theme.lbl_ForeColor;
     lbl_servers_backup_path.Location  = new Point(Theme.lbl_left, lbl_servers_path.Top + Theme.RowGap);
     lbl_servers_backup_path.Size      = new Size(Theme.OneLabelColumn, Theme.OneLabelHeight);
     lbl_servers_backup_path.Name      = "lbl_servers_backup_path";
     lbl_servers_backup_path.Text      = "   Servers Backup Path";
     lbl_servers_backup_path.Anchor    = (AnchorStyles)(AnchorStyles.Top | AnchorStyles.Left);
     lbl_servers_backup_path.TextAlign = ContentAlignment.MiddleLeft;
     lbl_servers_backup_path.TabIndex  = lbl_servers_path.TabIndex + 1;
     //
     txt_servers_backup_path.Font              = Theme.txtFont;
     txt_servers_backup_path.ForeColor         = Theme.txtForeColor;
     txt_servers_backup_path.BackColor         = Theme.txt_Backcolor;
     txt_servers_backup_path.ReadOnlyBackColor = Theme.txt_Readonly_Backcolor;
     txt_servers_backup_path.Location          = new Point(Theme.txt_left, txt_servers_path.Top + Theme.RowGap);
     txt_servers_backup_path.Size              = new Size(Theme.OneTextColumn, Theme.txt_Height);
     txt_servers_backup_path.Name              = "txt_servers_backup_path";
     txt_servers_backup_path.Anchor            = (AnchorStyles)(AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right);
     txt_servers_backup_path.TabIndex          = txt_servers_path.TabIndex + 1;
     txt_servers_backup_path.Enter            += new EventHandler(Txt_servers_backup_path_Enter);
     //
     lbl_notes.Font      = Theme.Font_10B;
     lbl_notes.ForeColor = Theme.lbl_ForeColor;
     lbl_notes.Location  = new Point(Theme.lbl_left, Theme.Fpanel_height - 75);
     lbl_notes.Size      = new Size(Theme.F_lbl_notes_width, Theme.F_lbl_notes_height);
     lbl_notes.Anchor    = (AnchorStyles)(AnchorStyles.Left | AnchorStyles.Bottom);
     lbl_notes.Name      = "lbl_notes";
     lbl_notes.Text      = "   Notes";
     lbl_notes.TextAlign = ContentAlignment.MiddleLeft;
     lbl_notes.TabIndex  = lbl_servers_backup_path.TabIndex + 1;
     lbl_notes.Click    += new EventHandler(Lbl_notes_Click);
     //
     txt_notes.Font      = Theme.txtFont;
     txt_notes.ForeColor = Theme.txtForeColor;
     txt_notes.BackColor = Theme.White;
     txt_notes.Location  = new Point(Theme.txt_left, Theme.Fpanel_height - 75);
     txt_notes.Size      = new Size(Theme.F_txt_notes_width, Theme.F_txt_notes_height);
     txt_notes.Name      = "txt_notes";
     txt_notes.Anchor    = (AnchorStyles)(AnchorStyles.Left | AnchorStyles.Bottom | AnchorStyles.Right);
     txt_notes.Enter    += new EventHandler(Txt_notes_Enter);
     //
     #endregion [Properties of control]
     //
     #region [Properties of btn]
     //
     btn_save.Anchor   = (AnchorStyles.Bottom | AnchorStyles.Right);
     btn_save.Font     = Theme.btnFont;
     btn_save.Size     = new Size(Theme.F_btn_width, Theme.F_btn_height);
     btn_save.Location = new Point(Theme.F_btn_save_left, Theme.F_btn_save_top);
     btn_save.TabIndex = txt_servers_backup_path.TabIndex + 1;
     btn_save.Name     = "btn_save";
     btn_save.Text     = "&SAVE";
     btn_save.Themes   = Theme.BlueBtn;
     btn_save.Click   += new EventHandler(Btn_save_click);
     //
     btn_cancel.Anchor   = (AnchorStyles.Bottom | AnchorStyles.Right);
     btn_cancel.Font     = Theme.btnFont;
     btn_cancel.Size     = new Size(Theme.F_btn_width, Theme.F_btn_height);
     btn_cancel.Location = new Point(Theme.F_btn_cancel_left, Theme.F_btn_cancel_top);
     btn_cancel.TabIndex = btn_save.TabIndex + 1;
     btn_cancel.Name     = "btn_cancel";
     btn_cancel.Text     = "&CANCEL";
     btn_cancel.Themes   = Theme.BlueBtn;
     btn_cancel.Click   += new EventHandler(Btn_cancel_Click);
     //
     btn_not_active.Anchor   = (AnchorStyles.Bottom | AnchorStyles.Right);
     btn_not_active.Font     = Theme.btnFont;
     btn_not_active.Size     = new Size(Theme.F_btn_width, Theme.F_btn_height);
     btn_not_active.Location = new Point(Theme.F_btn_notactive_left, Theme.F_btn_notactive_top);
     btn_not_active.TabIndex = btn_cancel.TabIndex + 1;
     btn_not_active.Name     = "btn_not_active";
     btn_not_active.Text     = "&Not Active";
     btn_not_active.Click   += new EventHandler(Btn_not_active_Click);
     //
     btn_active.Anchor   = (AnchorStyles.Bottom | AnchorStyles.Right);
     btn_active.Font     = Theme.btnFont;
     btn_active.Size     = new Size(Theme.F_btn_width, Theme.F_btn_height);
     btn_active.Location = new Point(Theme.F_btn_active_left, Theme.F_btn_active_top);
     btn_active.TabIndex = btn_not_active.TabIndex + 1;
     btn_active.Name     = "btn_active";
     btn_active.Text     = "&Active";
     btn_active.Click   += new EventHandler(Btn_active_Click);
     //
     txt_notes.TabIndex = btn_active.TabIndex + 1;
     //
     #endregion [Properties of btn]
     //
     #endregion [f_inner_panel]
     //
     #region [FServers]
     //
     this.AutoScaleDimensions = new SizeF(6F, 13F);
     this.AutoScaleMode       = AutoScaleMode.Font;
     this.Controls.Add(this.split_container);
     this.Name = "fServers";
     this.Size = new Size(Screen.PrimaryScreen.Bounds.Width, ClientSize.Height);
     //
     this.split_container.Panel1.ResumeLayout(false);
     this.split_container.Panel2.ResumeLayout(false);
     ((ISupportInitialize)(this.split_container)).EndInit();
     this.split_container.ResumeLayout(false);
     this.fpanel.ResumeLayout(false);
     this.f_inner_panel.ResumeLayout(false);
     this.f_inner_panel.PerformLayout();
     this.ResumeLayout(false);
     //
     #endregion [Fpost]
 }
Example #29
0
 private void InitializeComponent()
 {
     this.OKBtn         = new Button();
     this.ChallengeList = new ListView();
     this.NameHdr       = new ColumnHeader();
     this.InfoHdr       = new ColumnHeader();
     this.CancelBtn     = new Button();
     this.Splitter      = new SplitContainer();
     this.BrowserPanel  = new Panel();
     this.Browser       = new WebBrowser();
     this.Splitter.Panel1.SuspendLayout();
     this.Splitter.Panel2.SuspendLayout();
     this.Splitter.SuspendLayout();
     this.BrowserPanel.SuspendLayout();
     base.SuspendLayout();
     this.OKBtn.Anchor                  = AnchorStyles.Bottom | AnchorStyles.Right;
     this.OKBtn.DialogResult            = System.Windows.Forms.DialogResult.OK;
     this.OKBtn.Location                = new Point(549, 354);
     this.OKBtn.Name                    = "OKBtn";
     this.OKBtn.Size                    = new System.Drawing.Size(75, 23);
     this.OKBtn.TabIndex                = 1;
     this.OKBtn.Text                    = "OK";
     this.OKBtn.UseVisualStyleBackColor = true;
     ListView.ColumnHeaderCollection columns = this.ChallengeList.Columns;
     ColumnHeader[] nameHdr = new ColumnHeader[] { this.NameHdr, this.InfoHdr };
     columns.AddRange(nameHdr);
     this.ChallengeList.Dock          = DockStyle.Fill;
     this.ChallengeList.FullRowSelect = true;
     this.ChallengeList.HideSelection = false;
     this.ChallengeList.Location      = new Point(0, 0);
     this.ChallengeList.MultiSelect   = false;
     this.ChallengeList.Name          = "ChallengeList";
     this.ChallengeList.Size          = new System.Drawing.Size(330, 336);
     this.ChallengeList.Sorting       = SortOrder.Ascending;
     this.ChallengeList.TabIndex      = 0;
     this.ChallengeList.UseCompatibleStateImageBehavior = false;
     this.ChallengeList.View = View.Details;
     this.ChallengeList.SelectedIndexChanged += new EventHandler(this.ChallengeList_SelectedIndexChanged);
     this.ChallengeList.DoubleClick          += new EventHandler(this.TileList_DoubleClick);
     this.NameHdr.Text                      = "Skill Challenge";
     this.NameHdr.Width                     = 150;
     this.InfoHdr.Text                      = "Info";
     this.InfoHdr.Width                     = 150;
     this.CancelBtn.Anchor                  = AnchorStyles.Bottom | AnchorStyles.Right;
     this.CancelBtn.DialogResult            = System.Windows.Forms.DialogResult.Cancel;
     this.CancelBtn.Location                = new Point(630, 354);
     this.CancelBtn.Name                    = "CancelBtn";
     this.CancelBtn.Size                    = new System.Drawing.Size(75, 23);
     this.CancelBtn.TabIndex                = 2;
     this.CancelBtn.Text                    = "Cancel";
     this.CancelBtn.UseVisualStyleBackColor = true;
     this.Splitter.Anchor                   = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
     this.Splitter.Location                 = new Point(12, 12);
     this.Splitter.Name                     = "Splitter";
     this.Splitter.Panel1.Controls.Add(this.ChallengeList);
     this.Splitter.Panel2.Controls.Add(this.BrowserPanel);
     this.Splitter.Size             = new System.Drawing.Size(693, 336);
     this.Splitter.SplitterDistance = 330;
     this.Splitter.TabIndex         = 3;
     this.BrowserPanel.BorderStyle  = BorderStyle.FixedSingle;
     this.BrowserPanel.Controls.Add(this.Browser);
     this.BrowserPanel.Dock           = DockStyle.Fill;
     this.BrowserPanel.Location       = new Point(0, 0);
     this.BrowserPanel.Name           = "BrowserPanel";
     this.BrowserPanel.Size           = new System.Drawing.Size(359, 336);
     this.BrowserPanel.TabIndex       = 0;
     this.Browser.AllowWebBrowserDrop = false;
     this.Browser.Dock = DockStyle.Fill;
     this.Browser.IsWebBrowserContextMenuEnabled = false;
     this.Browser.Location                   = new Point(0, 0);
     this.Browser.MinimumSize                = new System.Drawing.Size(20, 20);
     this.Browser.Name                       = "Browser";
     this.Browser.ScriptErrorsSuppressed     = true;
     this.Browser.Size                       = new System.Drawing.Size(357, 334);
     this.Browser.TabIndex                   = 0;
     this.Browser.WebBrowserShortcutsEnabled = false;
     base.AcceptButton                       = this.OKBtn;
     base.AutoScaleDimensions                = new SizeF(6f, 13f);
     base.AutoScaleMode                      = System.Windows.Forms.AutoScaleMode.Font;
     base.CancelButton                       = this.CancelBtn;
     base.ClientSize = new System.Drawing.Size(717, 389);
     base.Controls.Add(this.Splitter);
     base.Controls.Add(this.CancelBtn);
     base.Controls.Add(this.OKBtn);
     base.MaximizeBox   = false;
     base.MinimizeBox   = false;
     base.Name          = "SkillChallengeSelectForm";
     base.ShowIcon      = false;
     base.ShowInTaskbar = false;
     base.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
     base.StartPosition = FormStartPosition.CenterParent;
     this.Text          = "Select a Skill Challenge";
     this.Splitter.Panel1.ResumeLayout(false);
     this.Splitter.Panel2.ResumeLayout(false);
     this.Splitter.ResumeLayout(false);
     this.BrowserPanel.ResumeLayout(false);
     base.ResumeLayout(false);
 }
Example #30
0
        public static void RestoreWindowState(Form Frm)
        {
            try
            {
                //private void MyForm_Load(object sender, EventArgs e)
                //{
                //    if (Properties.Settings.Default.IsMaximized)
                //        WindowState = FormWindowState.Maximized;
                //    else if (Screen.AllScreens.Any(screen => screen.WorkingArea.IntersectsWith(Properties.Settings.Default.WindowPosition)))
                //    {
                //        StartPosition = FormStartPosition.Manual;
                //        DesktopBounds = Properties.Settings.Default.WindowPosition;
                //        WindowState = FormWindowState.Normal;
                //    }
                //}
                //
                //private void MyForm_FormClosing(object sender, FormClosingEventArgs e)
                //{
                //    Properties.Settings.Default.IsMaximized = WindowState == FormWindowState.Maximized;
                //    Properties.Settings.Default.WindowPosition = DesktopBounds;
                //    Properties.Settings.Default.Save();
                //}

                Point SavLocation = (Point)(Global.GetSetting(Frm.Name + "_Location", new Point())); //Frm.RestoreBounds.Location

                if (SavLocation.IsEmpty)
                {
                    goto endOfTry; //we did not previously save settings
                }
                bool   SavMaximized = System.Convert.ToBoolean(Global.GetSetting(Frm.Name + "_Maximized", false));
                bool   SavMinimized = System.Convert.ToBoolean(Global.GetSetting(Frm.Name + "_Minimized", false));
                object ObjSize      = Global.GetSetting(Frm.Name + "_Size", Frm.RestoreBounds.Size);
                Size   SavSize      = (Size)ObjSize; //CType(ObjSize, System.Drawing.Size)

                //Debug.Print("Size before: " & Me.Size.ToString)
                //Debug.Print("Loc before: " & Me.Location.ToString)
                //Debug.Print("WindowState Before: " & Me.WindowState.ToString)
                //DetectScreenName()

                //============================================================================================================
                //No reliable way of detecting if a screen has been turned off!   This will only detect if fully disconnected
                //============================================================================================================

                Rectangle tstrect = new Rectangle(SavLocation, SavSize);
                if (!SavLocation.IsEmpty && SavLocation.X > 0 && IsVisibleOnAnyScreen(tstrect))
                {
                    Frm.Location = SavLocation;
                    if (!SavSize.IsEmpty && SavSize.Width > 5 && SavSize.Height > 5)
                    {
                        Frm.Size = SavSize;
                    }
                    //else
                    //Debug.Print("Saved size not valid.");
                }
                //else
                //Debug.Print("Saved location not valid.");


                if (SavMaximized)
                {
                    Frm.WindowState = FormWindowState.Maximized;
                }
                else if (SavMinimized)
                {
                    Frm.WindowState = FormWindowState.Normal; //FormWindowState.Minimized
                }
                if (Frm.Tag != null && string.Equals(Frm.Tag.ToString(), "SAVE", StringComparison.OrdinalIgnoreCase))
                {
                    List <Control> ctls = GetControls(Frm);

                    foreach (Control ctl in ctls)
                    {
                        if (ctl is SplitContainer)
                        {
                            SplitContainer sc = (SplitContainer)ctl;
                            sc.SplitterDistance = System.Convert.ToInt32(Global.GetSetting($"{Frm.Name}.SplitContainer.{sc.Name}.SplitterDistance", sc.SplitterDistance));
                        }
                        else if (ctl is TabControl)
                        {
                            TabControl tc = (TabControl)ctl;
                            tc.SelectedIndex = System.Convert.ToInt32(Global.GetSetting($"{Frm.Name}.TabControl.{tc.Name}.SelectedIndex", tc.SelectedIndex));
                        }
                    }
                    //else if (ctl is ComboBox)
                    //{
                    //	ComboBox cc = (ComboBox)ctl;
                    //	if (cc.Items.Count == 0 && string.IsNullOrEmpty(System.Convert.ToString(cc.Text)))
                    //	{
                    //		List<string> lst = new List<string>();
                    //		lst = (List<string>)(GetSetting($"{Frm.Name}.ComboBox.{cc.Name}.Items", lst));
                    //		foreach (string st in lst)
                    //			cc.Items.Add(st);
                    //		cc.Text = System.Convert.ToString(GetSetting($"{Frm.Name}.ComboBox.{cc.Name}.Text", cc.Text));
                    //	}
                    //}
                    //else if (ctl is TextBox)
                    //{
                    //	TextBox tc = (TextBox)ctl;
                    //	if (string.IsNullOrEmpty(System.Convert.ToString(tc.Text)))
                    //		tc.Text = System.Convert.ToString(GetSetting($"{Frm.Name}.TextBox.{tc.Name}.Text", tc.Text));
                    //}
                    //else if (ctl is CheckBox)
                    //{
                    //	CheckBox tc = (CheckBox)ctl;
                    //	if (tc.CheckState == CheckState.Indeterminate)
                    //	{
                    //		tc.Checked = System.Convert.ToBoolean(GetSetting($"{Frm.Name}.CheckBox.{tc.Name}.Checked", tc.Checked));
                    //		tc.CheckState = (CheckState)(tc.Checked ? CheckState.Checked : CheckState.Unchecked);
                    //	}
                    //}
                }
                //If Screen.AllScreens.Any(Function(screen__1) screen__1.WorkingArea.IntersectsWith(Properties.Settings.[Default].WindowPosition)) Then
                //    StartPosition = FormStartPosition.Manual
                //    DesktopBounds = Properties.Settings.[Default].WindowPosition
                //    Frm.WindowState = FormWindowState.Normal
                //End If

                //Debug.Print("Size After: " & Me.Size.ToString)
                //Debug.Print("Loc After: " & Me.Location.ToString)
                //Debug.Print("WindowState After: " & Me.WindowState.ToString)
            }
            catch (Exception)
            {
            }
            finally
            {
            }
endOfTry:
            1.GetHashCode(); //VBConversions note: C# requires an executable line here, so a dummy line was added.
        }
Example #31
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this._splitContainer1       = new System.Windows.Forms.SplitContainer();
     this._rtbSourceScript       = new ICSharpCode.TextEditor.TextEditorControl();
     this._cboSources            = new System.Windows.Forms.ComboBox();
     this._lblSource             = new System.Windows.Forms.Label();
     this._cmdCompare            = new System.Windows.Forms.Button();
     this._rtbDestinationScript  = new ICSharpCode.TextEditor.TextEditorControl();
     this._cboDestinations       = new System.Windows.Forms.ComboBox();
     this._lblDestination        = new System.Windows.Forms.Label();
     this._pnlSearchCommands     = new System.Windows.Forms.Panel();
     this._cmdDifferenceNext     = new System.Windows.Forms.Button();
     this._cmdDifferencePrevious = new System.Windows.Forms.Button();
     ((System.ComponentModel.ISupportInitialize)(this._splitContainer1)).BeginInit();
     this._splitContainer1.Panel1.SuspendLayout();
     this._splitContainer1.Panel2.SuspendLayout();
     this._splitContainer1.SuspendLayout();
     this._pnlSearchCommands.SuspendLayout();
     this.SuspendLayout();
     //
     // splitContainer1
     //
     this._splitContainer1.Dock     = System.Windows.Forms.DockStyle.Fill;
     this._splitContainer1.Location = new System.Drawing.Point(0, 0);
     this._splitContainer1.Name     = "_splitContainer1";
     //
     // splitContainer1.Panel1
     //
     this._splitContainer1.Panel1.Controls.Add(this._rtbSourceScript);
     this._splitContainer1.Panel1.Controls.Add(this._cboSources);
     this._splitContainer1.Panel1.Controls.Add(this._lblSource);
     //
     // splitContainer1.Panel2
     //
     this._splitContainer1.Panel2.Controls.Add(this._cmdCompare);
     this._splitContainer1.Panel2.Controls.Add(this._rtbDestinationScript);
     this._splitContainer1.Panel2.Controls.Add(this._cboDestinations);
     this._splitContainer1.Panel2.Controls.Add(this._lblDestination);
     this._splitContainer1.Size             = new System.Drawing.Size(862, 531);
     this._splitContainer1.SplitterDistance = 425;
     this._splitContainer1.TabIndex         = 3;
     //
     // rtbSourceScript
     //
     this._rtbSourceScript.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._rtbSourceScript.AutoScroll        = true;
     this._rtbSourceScript.AutoScrollMinSize = new System.Drawing.Size(25, 15);
     this._rtbSourceScript.Cursor            = System.Windows.Forms.Cursors.IBeam;
     this._rtbSourceScript.IsReadOnly        = false;
     this._rtbSourceScript.Location          = new System.Drawing.Point(6, 34);
     this._rtbSourceScript.Name     = "_rtbSourceScript";
     this._rtbSourceScript.Size     = new System.Drawing.Size(409, 493);
     this._rtbSourceScript.TabIndex = 5;
     //
     // cboSources
     //
     this._cboSources.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                                                                     | System.Windows.Forms.AnchorStyles.Right)));
     this._cboSources.DisplayMember     = "Key";
     this._cboSources.DropDownStyle     = System.Windows.Forms.ComboBoxStyle.DropDownList;
     this._cboSources.FormattingEnabled = true;
     this._cboSources.Location          = new System.Drawing.Point(90, 9);
     this._cboSources.Name                  = "_cboSources";
     this._cboSources.Size                  = new System.Drawing.Size(325, 20);
     this._cboSources.TabIndex              = 4;
     this._cboSources.ValueMember           = "Value";
     this._cboSources.SelectedIndexChanged += new System.EventHandler(this.OnSourcesSelectedIndexChanged);
     //
     // lblSource
     //
     this._lblSource.AutoSize = true;
     this._lblSource.Location = new System.Drawing.Point(4, 11);
     this._lblSource.Name     = "_lblSource";
     this._lblSource.Size     = new System.Drawing.Size(47, 12);
     this._lblSource.TabIndex = 3;
     this._lblSource.Text     = "&Source:";
     //
     // cmdCompare
     //
     this._cmdCompare.Anchor   = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
     this._cmdCompare.Location = new System.Drawing.Point(347, 9);
     this._cmdCompare.Name     = "_cmdCompare";
     this._cmdCompare.Size     = new System.Drawing.Size(78, 22);
     this._cmdCompare.TabIndex = 8;
     this._cmdCompare.Text     = "&Compare";
     this._cmdCompare.UseVisualStyleBackColor = true;
     this._cmdCompare.Click += new System.EventHandler(this.OnCompareClick);
     //
     // rtbDestinationScript
     //
     this._rtbDestinationScript.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._rtbDestinationScript.AutoScroll        = true;
     this._rtbDestinationScript.AutoScrollMinSize = new System.Drawing.Size(25, 15);
     this._rtbDestinationScript.Cursor            = System.Windows.Forms.Cursors.IBeam;
     this._rtbDestinationScript.IsReadOnly        = false;
     this._rtbDestinationScript.Location          = new System.Drawing.Point(6, 34);
     this._rtbDestinationScript.Name     = "_rtbDestinationScript";
     this._rtbDestinationScript.Size     = new System.Drawing.Size(424, 493);
     this._rtbDestinationScript.TabIndex = 7;
     //
     // cboDestinations
     //
     this._cboDestinations.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                                                                          | System.Windows.Forms.AnchorStyles.Right)));
     this._cboDestinations.DisplayMember     = "Key";
     this._cboDestinations.DropDownStyle     = System.Windows.Forms.ComboBoxStyle.DropDownList;
     this._cboDestinations.FormattingEnabled = true;
     this._cboDestinations.Location          = new System.Drawing.Point(92, 9);
     this._cboDestinations.Name                  = "_cboDestinations";
     this._cboDestinations.Size                  = new System.Drawing.Size(247, 20);
     this._cboDestinations.TabIndex              = 6;
     this._cboDestinations.ValueMember           = "Value";
     this._cboDestinations.SelectedIndexChanged += new System.EventHandler(this.OnDestinationsSelectedIndexChanged);
     //
     // lblDestination
     //
     this._lblDestination.AutoSize = true;
     this._lblDestination.Location = new System.Drawing.Point(6, 11);
     this._lblDestination.Name     = "_lblDestination";
     this._lblDestination.Size     = new System.Drawing.Size(77, 12);
     this._lblDestination.TabIndex = 5;
     this._lblDestination.Text     = "&Destination:";
     //
     // pnlSearchCommands
     //
     this._pnlSearchCommands.BackColor = System.Drawing.Color.WhiteSmoke;
     this._pnlSearchCommands.Controls.Add(this._cmdDifferenceNext);
     this._pnlSearchCommands.Controls.Add(this._cmdDifferencePrevious);
     this._pnlSearchCommands.Dock     = System.Windows.Forms.DockStyle.Bottom;
     this._pnlSearchCommands.Location = new System.Drawing.Point(0, 531);
     this._pnlSearchCommands.Name     = "_pnlSearchCommands";
     this._pnlSearchCommands.Size     = new System.Drawing.Size(862, 29);
     this._pnlSearchCommands.TabIndex = 5;
     //
     // cmdDifferenceNext
     //
     this._cmdDifferenceNext.Location = new System.Drawing.Point(102, 5);
     this._cmdDifferenceNext.Name     = "_cmdDifferenceNext";
     this._cmdDifferenceNext.Size     = new System.Drawing.Size(90, 21);
     this._cmdDifferenceNext.TabIndex = 4;
     this._cmdDifferenceNext.Text     = "&Next";
     this._cmdDifferenceNext.UseVisualStyleBackColor = true;
     this._cmdDifferenceNext.Click += new System.EventHandler(this.OnDifferenceNextClick);
     //
     // cmdDifferencePrevious
     //
     this._cmdDifferencePrevious.Enabled  = false;
     this._cmdDifferencePrevious.Location = new System.Drawing.Point(5, 4);
     this._cmdDifferencePrevious.Name     = "_cmdDifferencePrevious";
     this._cmdDifferencePrevious.Size     = new System.Drawing.Size(90, 21);
     this._cmdDifferencePrevious.TabIndex = 3;
     this._cmdDifferencePrevious.Text     = "&Previous";
     this._cmdDifferencePrevious.UseVisualStyleBackColor = true;
     this._cmdDifferencePrevious.Click += new System.EventHandler(this.OnDifferencePreviousClick);
     //
     // DiffResults
     //
     this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
     this.ClientSize        = new System.Drawing.Size(862, 560);
     this.Controls.Add(this._splitContainer1);
     this.Controls.Add(this._pnlSearchCommands);
     this.KeyPreview    = true;
     this.MinimizeBox   = false;
     this.Name          = "DiffResults";
     this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
     this.Text          = "Diff Results";
     this.KeyDown      += new System.Windows.Forms.KeyEventHandler(this.OnFormKeyDown);
     this._splitContainer1.Panel1.ResumeLayout(false);
     this._splitContainer1.Panel1.PerformLayout();
     this._splitContainer1.Panel2.ResumeLayout(false);
     this._splitContainer1.Panel2.PerformLayout();
     ((System.ComponentModel.ISupportInitialize)(this._splitContainer1)).EndInit();
     this._splitContainer1.ResumeLayout(false);
     this._pnlSearchCommands.ResumeLayout(false);
     this.ResumeLayout(false);
 }
Example #32
0
        public static void SaveWindowState(Form Frm)
        {
            try
            {
                if (Frm.WindowState == FormWindowState.Maximized)
                {
                    Global.SaveSetting(Frm.Name + "_Location", Frm.RestoreBounds.Location);
                    Global.SaveSetting(Frm.Name + "_Size", Frm.RestoreBounds.Size);
                    Global.SaveSetting(Frm.Name + "_Maximized", true);
                    Global.SaveSetting(Frm.Name + "_Minimized", false);
                }
                else if (Frm.WindowState == FormWindowState.Normal)
                {
                    Global.SaveSetting(Frm.Name + "_Location", Frm.Location);
                    Global.SaveSetting(Frm.Name + "_Size", Frm.Size);
                    Global.SaveSetting(Frm.Name + "_Maximized", false);
                    Global.SaveSetting(Frm.Name + "_Minimized", false);
                }
                else
                {
                    Global.SaveSetting(Frm.Name + "_Location", Frm.RestoreBounds.Location);
                    Global.SaveSetting(Frm.Name + "_Size", Frm.RestoreBounds.Size);
                    Global.SaveSetting(Frm.Name + "_Maximized", false);
                    Global.SaveSetting(Frm.Name + "_Minimized", true);
                }

                if (Frm.Tag != null && string.Equals(Frm.Tag.ToString(), "SAVE", StringComparison.OrdinalIgnoreCase))
                {
                    List <Control> ctls = GetControls(Frm);

                    foreach (Control ctl in ctls)
                    {
                        if (ctl is SplitContainer)
                        {
                            SplitContainer sc = (SplitContainer)ctl;
                            Global.SaveSetting($"{Frm.Name}.SplitContainer.{sc.Name}.SplitterDistance", sc.SplitterDistance);
                        }
                        else if (ctl is TabControl)
                        {
                            TabControl tc = (TabControl)ctl;
                            Global.SaveSetting($"{Frm.Name}.TabControl.{tc.Name}.SelectedIndex", tc.SelectedIndex);
                        }
                        else if (ctl is FastObjectListView)
                        {
                            FastObjectListView folv = (FastObjectListView)ctl;
                            FOLVSaveState(folv);
                        }
                    }

                    //else if (ctl is ComboBox)
                    //{
                    //	ComboBox cc = (ComboBox)ctl;
                    //	List<string> lst = new List<string>();
                    //	foreach (object cbi in cc.Items)
                    //		lst.Add(cbi.ToString());
                    //	SaveSetting($"{Frm.Name}.ComboBox.{cc.Name}.Items", lst);
                    //	SaveSetting($"{Frm.Name}.ComboBox.{cc.Name}.Text", cc.Text);
                    //}
                    //else if (ctl is TextBox)
                    //{
                    //	TextBox tc = (TextBox)ctl;
                    //	SaveSetting($"{Frm.Name}.TextBox.{tc.Name}.Text", tc.Text);
                    //}
                    //else if (ctl is CheckBox)
                    //{
                    //	CheckBox tc = (CheckBox)ctl;
                    //	SaveSetting($"{Frm.Name}.CheckBox.{tc.Name}.Checked", tc.Checked);
                    //}
                }
            }
            catch (Exception)
            {
            }
            finally
            {
            }
        }
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.panel1          = new System.Windows.Forms.Panel();
     this.bCancel         = new System.Windows.Forms.Button();
     this.bOK             = new System.Windows.Forms.Button();
     this.splitContainer1 = new System.Windows.Forms.SplitContainer();
     this.tvOp            = new System.Windows.Forms.TreeView();
     this.bCopy           = new System.Windows.Forms.Button();
     this.lOp             = new System.Windows.Forms.Label();
     this.tbExpr          = new System.Windows.Forms.TextBox();
     this.lExpr           = new System.Windows.Forms.Label();
     this.panel1.SuspendLayout();
     this.splitContainer1.Panel1.SuspendLayout();
     this.splitContainer1.Panel2.SuspendLayout();
     this.splitContainer1.SuspendLayout();
     this.SuspendLayout();
     //
     // panel1
     //
     this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
                                                                | System.Windows.Forms.AnchorStyles.Right)));
     this.panel1.Controls.Add(this.bCancel);
     this.panel1.Controls.Add(this.bOK);
     this.panel1.Location = new System.Drawing.Point(0, 267);
     this.panel1.Name     = "panel1";
     this.panel1.Size     = new System.Drawing.Size(511, 40);
     this.panel1.TabIndex = 15;
     //
     // bCancel
     //
     this.bCancel.Anchor       = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
     this.bCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
     this.bCancel.Location     = new System.Drawing.Point(422, 9);
     this.bCancel.Name         = "bCancel";
     this.bCancel.Size         = new System.Drawing.Size(75, 23);
     this.bCancel.TabIndex     = 5;
     this.bCancel.Text         = "Cancel";
     //
     // bOK
     //
     this.bOK.Anchor       = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
     this.bOK.DialogResult = System.Windows.Forms.DialogResult.OK;
     this.bOK.Location     = new System.Drawing.Point(341, 9);
     this.bOK.Name         = "bOK";
     this.bOK.Size         = new System.Drawing.Size(75, 23);
     this.bOK.TabIndex     = 4;
     this.bOK.Text         = "OK";
     //
     // splitContainer1
     //
     this.splitContainer1.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.splitContainer1.Location = new System.Drawing.Point(0, 0);
     this.splitContainer1.Name     = "splitContainer1";
     //
     // splitContainer1.Panel1
     //
     this.splitContainer1.Panel1.Controls.Add(this.tvOp);
     this.splitContainer1.Panel1.Controls.Add(this.bCopy);
     this.splitContainer1.Panel1.Controls.Add(this.lOp);
     //
     // splitContainer1.Panel2
     //
     this.splitContainer1.Panel2.Controls.Add(this.tbExpr);
     this.splitContainer1.Panel2.Controls.Add(this.lExpr);
     this.splitContainer1.Size             = new System.Drawing.Size(511, 262);
     this.splitContainer1.SplitterDistance = 169;
     this.splitContainer1.TabIndex         = 14;
     //
     // tvOp
     //
     this.tvOp.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.tvOp.Location = new System.Drawing.Point(0, 29);
     this.tvOp.Name     = "tvOp";
     this.tvOp.Size     = new System.Drawing.Size(166, 230);
     this.tvOp.TabIndex = 1;
     //Josh: Added to allow double clicking
     this.tvOp.DoubleClick += new System.EventHandler(this.bCopy_Click);
     //
     // bCopy
     //
     this.bCopy.Anchor   = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
     this.bCopy.Location = new System.Drawing.Point(134, 0);
     this.bCopy.Name     = "bCopy";
     this.bCopy.Size     = new System.Drawing.Size(32, 23);
     this.bCopy.TabIndex = 2;
     this.bCopy.Text     = ">>";
     this.bCopy.Click   += new System.EventHandler(this.bCopy_Click);
     //
     // lOp
     //
     this.lOp.Location = new System.Drawing.Point(0, 0);
     this.lOp.Name     = "lOp";
     this.lOp.Size     = new System.Drawing.Size(106, 23);
     this.lOp.TabIndex = 14;
     this.lOp.Text     = "Select and hit \'>>\'";
     //
     // tbExpr
     //
     this.tbExpr.AcceptsReturn = true;
     this.tbExpr.AcceptsTab    = true;
     this.tbExpr.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.tbExpr.Location   = new System.Drawing.Point(6, 32);
     this.tbExpr.Multiline  = true;
     this.tbExpr.Name       = "tbExpr";
     this.tbExpr.ScrollBars = System.Windows.Forms.ScrollBars.Both;
     this.tbExpr.Size       = new System.Drawing.Size(329, 227);
     this.tbExpr.TabIndex   = 0;
     this.tbExpr.WordWrap   = true;
     //
     // lExpr
     //
     this.lExpr.Location = new System.Drawing.Point(3, 3);
     this.lExpr.Name     = "lExpr";
     this.lExpr.Size     = new System.Drawing.Size(134, 20);
     this.lExpr.TabIndex = 13;
     this.lExpr.Text     = "Expressions start with \'=\'";
     //
     // DialogExprEditor
     //
     this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
     this.CancelButton      = this.bCancel;
     this.ClientSize        = new System.Drawing.Size(511, 307);
     this.Controls.Add(this.splitContainer1);
     this.Controls.Add(this.panel1);
     this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow;
     this.MaximizeBox     = false;
     this.MinimizeBox     = false;
     this.Name            = "DialogExprEditor";
     this.ShowInTaskbar   = false;
     this.SizeGripStyle   = System.Windows.Forms.SizeGripStyle.Show;
     this.StartPosition   = System.Windows.Forms.FormStartPosition.CenterParent;
     this.Text            = "Edit Expression";
     this.panel1.ResumeLayout(false);
     this.splitContainer1.Panel1.ResumeLayout(false);
     this.splitContainer1.Panel2.ResumeLayout(false);
     this.splitContainer1.Panel2.PerformLayout();
     this.splitContainer1.ResumeLayout(false);
     this.ResumeLayout(false);
 }
        /// <summary>
        /// Called as soon as Configure(...) ends.  Gets rid of the "Scanning" page on
        /// the form and replaces it with tabs and buttons and context menus, etc.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void GenerateForm(object sender, System.ComponentModel.RunWorkerCompletedEventArgs e)
        {
            /* Get rid of the "Scanning" page */
            this.mPanel.Controls.Remove(this.mScanLabel);
            this.mPanel.Controls.Remove(this.mFakeProgressBar);

            this.mScanLabel.Hide();
            this.mFakeProgressBar.Hide();

            /* Set up the Splitter */
            this.mSplitter                  = new SplitContainer();
            this.mSplitter.Name             = "mSplitter";
            this.mSplitter.Orientation      = Orientation.Horizontal;
            this.mSplitter.Dock             = DockStyle.Fill;
            this.mSplitter.SplitterDistance = 200;
            this.mSplitter.IsSplitterFixed  = true;
            this.mSplitter.Show();

            /* Setup the TabControl */
            this.mTabControl      = new TabControl();
            this.mTabControl.Name = "mTabControl";

            /* Setup the Button */
            this.mSaveButton        = new Button();
            this.mSaveButton.Text   = "Save && Quit";
            this.mSaveButton.Name   = "mSaveButton";
            this.mSaveButton.Click += new EventHandler(mSaveButton_Click);

            /* Setup the rescan button */
            this.mRescanButton        = new Button();
            this.mRescanButton.Text   = "Rescan";
            this.mRescanButton.Name   = "mRescanButton";
            this.mRescanButton.Click += new EventHandler(mRescanButton_Click);

            /* Add things to the splitter */
            this.mSplitter.Panel1.Controls.Add(this.mTabControl);
            this.mSplitter.Panel2.Padding = new Padding(2, 2, 2, 2);
            this.mTabControl.Dock         = DockStyle.Fill;

            this.mSplitter.Panel2.Controls.Add(this.mSaveButton);
            this.mSaveButton.Dock = DockStyle.Left; // None; //DockStyle.Top | DockStyle.Left;

            this.mSplitter.Panel2.Controls.Add(this.mRescanButton);
            this.mRescanButton.Dock = DockStyle.Right; // None; //DockStyle.Top | DockStyle.Left;


            /* Add the splitter */
            this.mPanel.Controls.Add(this.mSplitter);

            this.mSaveButton.Height = this.mSplitter.Panel2.Height / 2 - this.mSplitter.Panel2.Padding.Vertical;
            this.mSaveButton.Width  = this.mSplitter.Panel2.Width / 2 - this.mSplitter.Panel2.Padding.Horizontal;

            this.mRescanButton.Height = this.mSplitter.Panel2.Height / 2 - this.mSplitter.Panel2.Padding.Vertical;
            this.mRescanButton.Width  = this.mSplitter.Panel2.Width / 2 - this.mSplitter.Panel2.Padding.Horizontal;

            this.mPanel.Show();
            foreach (Control child in this.mPanel.Controls)
            {
                child.Show();
            }


            /* Enumerate a letter for each sensor */
            mPossibleIds = new List <Char>();
            int limit = this.mbScanForPort ? mWmiCOMData.Length : mNexus.mSensorIDDict.Count;

            if (limit < 4)
            {
                limit = 4;
            }
            for (int i = 0; i < limit; ++i)
            {
                mPossibleIds.Add(Convert.ToChar(65 + i));
            }

            if (this.mbScanForPort)
            {
                foreach (ManagementObject obj in mWmiCOMData)
                {
                    String pnpDeviceID = obj["PNPDeviceID"] as String;
                    String deviceID    = obj["DeviceID"]    as String;

                    /** Parse the pnpDeviceID to get the MAC address */
                    int    index      = pnpDeviceID.LastIndexOf('_');
                    String MacAddress = pnpDeviceID.Substring(index - MAC_ADDRESS_LENGTH, MAC_ADDRESS_LENGTH);

                    GenerateControls(MacAddress, deviceID, this.mPossibleIds);
                }
            }
            else
            {
                Logger.Info("Reading from Config file");

                foreach (SensorIdentification id in mNexus.mSensorIDDict.Values)
                {
                    GenerateControls(id, this.mPossibleIds);
                }
            }
            this.mTabControl.Show();
        }
 // Constructors
 public SplitterPanel(SplitContainer owner)
 {
 }
Example #36
0
 private void InitializeComponent()
 {
     this.m_split                = new System.Windows.Forms.SplitContainer();
     this.m_grid_fav             = new pr.gui.DataGridView();
     this.m_grid_all             = new pr.gui.DataGridView();
     this.m_panel_add_instrument = new System.Windows.Forms.Panel();
     this.m_cb_symbols           = new pr.gui.ComboBox();
     this.m_btn_add_instrument   = new System.Windows.Forms.Button();
     ((System.ComponentModel.ISupportInitialize)(this.m_split)).BeginInit();
     this.m_split.Panel1.SuspendLayout();
     this.m_split.Panel2.SuspendLayout();
     this.m_split.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.m_grid_fav)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.m_grid_all)).BeginInit();
     this.m_panel_add_instrument.SuspendLayout();
     this.SuspendLayout();
     //
     // m_split
     //
     this.m_split.Dock        = System.Windows.Forms.DockStyle.Fill;
     this.m_split.Location    = new System.Drawing.Point(0, 0);
     this.m_split.Name        = "m_split";
     this.m_split.Orientation = System.Windows.Forms.Orientation.Horizontal;
     //
     // m_split.Panel1
     //
     this.m_split.Panel1.Controls.Add(this.m_grid_fav);
     //
     // m_split.Panel2
     //
     this.m_split.Panel2.Controls.Add(this.m_grid_all);
     this.m_split.Panel2.Controls.Add(this.m_panel_add_instrument);
     this.m_split.Size             = new System.Drawing.Size(238, 599);
     this.m_split.SplitterDistance = 283;
     this.m_split.TabIndex         = 0;
     //
     // m_grid_fav
     //
     this.m_grid_fav.AllowUserToAddRows          = false;
     this.m_grid_fav.AllowUserToDeleteRows       = false;
     this.m_grid_fav.AllowUserToResizeRows       = false;
     this.m_grid_fav.AutoSizeColumnsMode         = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
     this.m_grid_fav.AutoSizeRowsMode            = System.Windows.Forms.DataGridViewAutoSizeRowsMode.AllCells;
     this.m_grid_fav.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
     this.m_grid_fav.Dock            = System.Windows.Forms.DockStyle.Fill;
     this.m_grid_fav.Location        = new System.Drawing.Point(0, 0);
     this.m_grid_fav.Name            = "m_grid_fav";
     this.m_grid_fav.ReadOnly        = true;
     this.m_grid_fav.RowHeadersWidth = 20;
     this.m_grid_fav.SelectionMode   = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
     this.m_grid_fav.Size            = new System.Drawing.Size(238, 283);
     this.m_grid_fav.TabIndex        = 0;
     //
     // m_grid_all
     //
     this.m_grid_all.AllowUserToAddRows          = false;
     this.m_grid_all.AllowUserToDeleteRows       = false;
     this.m_grid_all.AllowUserToResizeRows       = false;
     this.m_grid_all.AutoSizeColumnsMode         = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
     this.m_grid_all.AutoSizeRowsMode            = System.Windows.Forms.DataGridViewAutoSizeRowsMode.AllCells;
     this.m_grid_all.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
     this.m_grid_all.Dock            = System.Windows.Forms.DockStyle.Fill;
     this.m_grid_all.Location        = new System.Drawing.Point(0, 24);
     this.m_grid_all.Name            = "m_grid_all";
     this.m_grid_all.ReadOnly        = true;
     this.m_grid_all.RowHeadersWidth = 20;
     this.m_grid_all.SelectionMode   = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
     this.m_grid_all.Size            = new System.Drawing.Size(238, 288);
     this.m_grid_all.TabIndex        = 1;
     //
     // m_panel_add_instrument
     //
     this.m_panel_add_instrument.Controls.Add(this.m_cb_symbols);
     this.m_panel_add_instrument.Controls.Add(this.m_btn_add_instrument);
     this.m_panel_add_instrument.Dock     = System.Windows.Forms.DockStyle.Top;
     this.m_panel_add_instrument.Location = new System.Drawing.Point(0, 0);
     this.m_panel_add_instrument.Name     = "m_panel_add_instrument";
     this.m_panel_add_instrument.Size     = new System.Drawing.Size(238, 24);
     this.m_panel_add_instrument.TabIndex = 2;
     //
     // m_cb_symbols
     //
     this.m_cb_symbols.DisplayProperty   = null;
     this.m_cb_symbols.Dock              = System.Windows.Forms.DockStyle.Fill;
     this.m_cb_symbols.Font              = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.m_cb_symbols.FormattingEnabled = true;
     this.m_cb_symbols.Location          = new System.Drawing.Point(0, 0);
     this.m_cb_symbols.Name              = "m_cb_symbols";
     this.m_cb_symbols.PreserveSelectionThruFocusChange = false;
     this.m_cb_symbols.Size     = new System.Drawing.Size(203, 23);
     this.m_cb_symbols.TabIndex = 1;
     //
     // m_btn_add_instrument
     //
     this.m_btn_add_instrument.Dock     = System.Windows.Forms.DockStyle.Right;
     this.m_btn_add_instrument.Location = new System.Drawing.Point(203, 0);
     this.m_btn_add_instrument.Name     = "m_btn_add_instrument";
     this.m_btn_add_instrument.Size     = new System.Drawing.Size(35, 24);
     this.m_btn_add_instrument.TabIndex = 0;
     this.m_btn_add_instrument.Text     = "+";
     this.m_btn_add_instrument.UseVisualStyleBackColor = true;
     //
     // InstrumentsUI
     //
     this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
     this.AutoScaleMode       = System.Windows.Forms.AutoScaleMode.Font;
     this.Controls.Add(this.m_split);
     this.Name = "InstrumentsUI";
     this.Size = new System.Drawing.Size(238, 599);
     this.m_split.Panel1.ResumeLayout(false);
     this.m_split.Panel2.ResumeLayout(false);
     ((System.ComponentModel.ISupportInitialize)(this.m_split)).EndInit();
     this.m_split.ResumeLayout(false);
     ((System.ComponentModel.ISupportInitialize)(this.m_grid_fav)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.m_grid_all)).EndInit();
     this.m_panel_add_instrument.ResumeLayout(false);
     this.ResumeLayout(false);
 }
Example #37
0
    private void initializeComponentSkeleton()
    {
        //create the main body container which will hold
        //the left and right sides of the IDE
        p_MainBodyContainer = new SplitContainer() {
            FixedPanel = FixedPanel.Panel2,
            Dock = DockStyle.Fill,
            SplitterWidth = 3
        };
        p_WorkingArea.Controls.Add(p_MainBodyContainer);

        //create the working body container which will hold
        //the top and bottom sides of the IDE (text editor, error list etc..)
        p_WorkingBodyContainer = new SplitContainer() {
            FixedPanel = FixedPanel.Panel2,
            Dock = DockStyle.Fill,
            Orientation = Orientation.Horizontal,
            SplitterWidth = 3
        };
        p_MainBodyContainer.Panel1.Controls.Add(p_WorkingBodyContainer);

        /*Load the previous view state*/
        if (RuntimeState.ObjectExists("mainIDE.viewState")) {
            CurrentViewState = (IDEViewState)(byte)
                RuntimeState.GetObject("mainIDE.viewState", typeof(byte));
        }

        /*Load previous state (note: do this once the form has loaded so
         the size of the window is correctly validated)*/
        Load += delegate(object sender, EventArgs e) {
            if (RuntimeState.ObjectExists("mainIDE.componentRightWidth")) {
                SetRightSideWidth((int)RuntimeState.GetObject("mainIDE.componentRightWidth", typeof(int)));
            }
            else {
                SetRightSideWidth(200);
            }
            if (RuntimeState.ObjectExists("mainIDE.componentBottomHeight")) {
                SetBodyBottomHeight((int)RuntimeState.GetObject("mainIDE.componentBottomHeight", typeof(int)));
            }
            else {
                SetBodyBottomHeight(100);
            }

            /*When the components have been resized, save it so that the application
             would resume that size when it's reloaded.*/
            p_MainBodyContainer.SplitterMoved += delegate(object s, SplitterEventArgs a) {
                RuntimeState.SetObject("mainIDE.componentRightWidth", (int)p_MainBodyContainer.Panel2.Width);
            };
            p_WorkingBodyContainer.SplitterMoved += delegate(object s, SplitterEventArgs a) {
                RuntimeState.SetObject("mainIDE.componentBottomHeight", (int)p_WorkingBodyContainer.Panel2.Height);
            };
        };
    }
        private void InitializeComponent()
        {
            var resources = new System.ComponentModel.ComponentResourceManager(typeof(ScrollTexEditor));

            _ListViewEx_LM_ScrollTexList = new DevComponents.DotNetBar.Controls.ListViewEx();
            _ListViewEx_LM_ScrollTexList.SelectedIndexChanged += new EventHandler(ListViewEx_LM_ScrollTexList_SelectedIndexChanged);
            _ListViewEx_LM_ScrollTexList.MouseUp += new MouseEventHandler(ListViewEx_LM_ScrollTexList_MouseClick);
            _ColumnHeader8    = new ColumnHeader();
            _ColumnHeader9    = new ColumnHeader();
            _ColumnHeader10   = new ColumnHeader();
            _ColumnHeader11   = new ColumnHeader();
            _ColumnHeader12   = new ColumnHeader();
            _ColumnHeader1    = new ColumnHeader();
            _ColumnHeader2    = new ColumnHeader();
            _AdvPropertyGrid1 = new DevComponents.DotNetBar.AdvPropertyGrid();
            _AdvPropertyGrid1.ConvertFromStringToPropertyValue += new DevComponents.DotNetBar.ConvertValueEventHandler(AdvPropertyGrid1_ConvertFromStringToPropertyValue);
            _AdvPropertyGrid1.ConvertPropertyValueToString     += new DevComponents.DotNetBar.ConvertValueEventHandler(AdvPropertyGrid1_ConvertPropertyValueToString);
            _AdvPropertyGrid1.PropertyValueChanged             += new System.ComponentModel.PropertyChangedEventHandler(AdvPropertyGrid1_PropertyValueChanged);
            _ContextMenuBar1     = new DevComponents.DotNetBar.ContextMenuBar();
            _ButtonItem_CM       = new DevComponents.DotNetBar.ButtonItem();
            _ButtonItem44        = new DevComponents.DotNetBar.ButtonItem();
            _ButtonItem44.Click += new EventHandler(ButtonItem44_Click);
            _ButtonItem43        = new DevComponents.DotNetBar.ButtonItem();
            _ButtonItem43.Click += new EventHandler(ButtonItem43_Click);
            _SplitContainer1     = new SplitContainer();
            ((System.ComponentModel.ISupportInitialize)_AdvPropertyGrid1).BeginInit();
            ((System.ComponentModel.ISupportInitialize)_ContextMenuBar1).BeginInit();
            ((System.ComponentModel.ISupportInitialize)_SplitContainer1).BeginInit();
            _SplitContainer1.Panel1.SuspendLayout();
            _SplitContainer1.Panel2.SuspendLayout();
            _SplitContainer1.SuspendLayout();
            SuspendLayout();
            //
            // ListViewEx_LM_ScrollTexList
            //
            _ListViewEx_LM_ScrollTexList.BackColor = Color.White;
            //
            //
            //
            _ListViewEx_LM_ScrollTexList.Border.Class      = "ListViewBorder";
            _ListViewEx_LM_ScrollTexList.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
            _ListViewEx_LM_ScrollTexList.Columns.AddRange(new ColumnHeader[] { _ColumnHeader8, _ColumnHeader9, _ColumnHeader10, _ColumnHeader11, _ColumnHeader12, _ColumnHeader1, _ColumnHeader2 });
            _ListViewEx_LM_ScrollTexList.DisabledBackColor = Color.Empty;
            _ListViewEx_LM_ScrollTexList.Dock             = DockStyle.Fill;
            _ListViewEx_LM_ScrollTexList.FocusCuesEnabled = false;
            _ListViewEx_LM_ScrollTexList.ForeColor        = Color.Black;
            _ListViewEx_LM_ScrollTexList.FullRowSelect    = true;
            _ListViewEx_LM_ScrollTexList.GridLines        = true;
            _ListViewEx_LM_ScrollTexList.HeaderStyle      = ColumnHeaderStyle.Nonclickable;
            _ListViewEx_LM_ScrollTexList.HideSelection    = false;
            _ListViewEx_LM_ScrollTexList.Location         = new Point(0, 0);
            _ListViewEx_LM_ScrollTexList.MultiSelect      = false;
            _ListViewEx_LM_ScrollTexList.Name             = "ListViewEx_LM_ScrollTexList";
            _ListViewEx_LM_ScrollTexList.Size             = new Size(583, 633);
            _ListViewEx_LM_ScrollTexList.TabIndex         = 2;
            _ListViewEx_LM_ScrollTexList.UseCompatibleStateImageBehavior = false;
            _ListViewEx_LM_ScrollTexList.View = View.Details;
            //
            // ColumnHeader8
            //
            _ColumnHeader8.Text  = "#";
            _ColumnHeader8.Width = 30;
            //
            // ColumnHeader9
            //
            _ColumnHeader9.Text  = "Behavior";
            _ColumnHeader9.Width = 100;
            //
            // ColumnHeader10
            //
            _ColumnHeader10.Text  = "Type";
            _ColumnHeader10.Width = 100;
            //
            // ColumnHeader11
            //
            _ColumnHeader11.Text = "Duration";
            //
            // ColumnHeader12
            //
            _ColumnHeader12.Text = "Speed";
            //
            // ColumnHeader1
            //
            _ColumnHeader1.Text  = "Vertex Pointer";
            _ColumnHeader1.Width = 100;
            //
            // ColumnHeader2
            //
            _ColumnHeader2.Text  = "Vertices";
            _ColumnHeader2.Width = 100;
            //
            // AdvPropertyGrid1
            //
            _AdvPropertyGrid1.Dock           = DockStyle.Fill;
            _AdvPropertyGrid1.GridLinesColor = Color.WhiteSmoke;
            _AdvPropertyGrid1.Location       = new Point(0, 0);
            _AdvPropertyGrid1.Name           = "AdvPropertyGrid1";
            _AdvPropertyGrid1.Size           = new Size(315, 633);
            _AdvPropertyGrid1.TabIndex       = 8;
            _AdvPropertyGrid1.Text           = "AdvPropertyGrid1";
            //
            // ContextMenuBar1
            //
            _ContextMenuBar1.AntiAlias   = true;
            _ContextMenuBar1.Font        = new Font("Segoe UI", 9.0F);
            _ContextMenuBar1.IsMaximized = false;
            _ContextMenuBar1.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { _ButtonItem_CM });
            _ContextMenuBar1.Location = new Point(787, 0);
            _ContextMenuBar1.Name     = "ContextMenuBar1";
            _ContextMenuBar1.Size     = new Size(78, 25);
            _ContextMenuBar1.Stretch  = true;
            _ContextMenuBar1.Style    = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
            _ContextMenuBar1.TabIndex = 9;
            _ContextMenuBar1.TabStop  = false;
            _ContextMenuBar1.Text     = "ContextMenuBar1";
            //
            // ButtonItem_CM
            //
            _ButtonItem_CM.AutoExpandOnClick = true;
            _ButtonItem_CM.Name = "ButtonItem_CM";
            _ButtonItem_CM.SubItems.AddRange(new DevComponents.DotNetBar.BaseItem[] { _ButtonItem44, _ButtonItem43 });
            _ButtonItem_CM.Text = "ContextMenu";
            //
            // ButtonItem44
            //
            _ButtonItem44.ButtonStyle   = DevComponents.DotNetBar.eButtonStyle.ImageAndText;
            _ButtonItem44.Image         = My.Resources.MyIcons.icons8_plus_math_16px;
            _ButtonItem44.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top;
            _ButtonItem44.Name          = "ButtonItem44";
            _ButtonItem44.Shortcuts.Add(DevComponents.DotNetBar.eShortcut.CtrlN);
            _ButtonItem44.SubItemsExpandWidth = 14;
            _ButtonItem44.SymbolColor         = Color.FromArgb(Conversions.ToInteger(Conversions.ToByte(82)), Conversions.ToInteger(Conversions.ToByte(124)), Conversions.ToInteger(Conversions.ToByte(64)));
            _ButtonItem44.SymbolSet           = DevComponents.DotNetBar.eSymbolSet.Material;
            _ButtonItem44.SymbolSize          = 12.0F;
            _ButtonItem44.Text = "Add New";
            //
            // ButtonItem43
            //
            _ButtonItem43.BeginGroup = true;
            _ButtonItem43.Image      = My.Resources.MyIcons.icons8_delete_sign_16px;
            _ButtonItem43.Name       = "ButtonItem43";
            _ButtonItem43.Shortcuts.Add(DevComponents.DotNetBar.eShortcut.Del);
            _ButtonItem43.SymbolColor = Color.FromArgb(Conversions.ToInteger(Conversions.ToByte(150)), Conversions.ToInteger(Conversions.ToByte(0)), Conversions.ToInteger(Conversions.ToByte(0)));
            _ButtonItem43.SymbolSet   = DevComponents.DotNetBar.eSymbolSet.Material;
            _ButtonItem43.SymbolSize  = 12.0F;
            _ButtonItem43.Text        = "Remove";
            //
            // SplitContainer1
            //
            _SplitContainer1.BackColor  = Color.Transparent;
            _SplitContainer1.Dock       = DockStyle.Fill;
            _SplitContainer1.FixedPanel = FixedPanel.Panel2;
            _SplitContainer1.Location   = new Point(0, 0);
            _SplitContainer1.Name       = "SplitContainer1";
            //
            // SplitContainer1.Panel1
            //
            _SplitContainer1.Panel1.Controls.Add(_ListViewEx_LM_ScrollTexList);
            //
            // SplitContainer1.Panel2
            //
            _SplitContainer1.Panel2.Controls.Add(_AdvPropertyGrid1);
            _SplitContainer1.Size             = new Size(902, 633);
            _SplitContainer1.SplitterDistance = 583;
            _SplitContainer1.TabIndex         = 9;
            //
            // ScrollTexEditor
            //
            AutoScaleDimensions = new SizeF(6.0F, 13.0F);
            AutoScaleMode       = AutoScaleMode.Font;
            ClientSize          = new Size(902, 633);
            Controls.Add(_ContextMenuBar1);
            Controls.Add(_SplitContainer1);
            FormBorderStyle    = FormBorderStyle.FixedSingle;
            Icon               = (Icon)resources.GetObject("$this.Icon");
            MaximizeBox        = false;
            Name               = "ScrollTexEditor";
            StartPosition      = FormStartPosition.CenterScreen;
            Text               = "Texture Animation Editor";
            TopLeftCornerSize  = 0;
            TopRightCornerSize = 0;
            ((System.ComponentModel.ISupportInitialize)_AdvPropertyGrid1).EndInit();
            ((System.ComponentModel.ISupportInitialize)_ContextMenuBar1).EndInit();
            _SplitContainer1.Panel1.ResumeLayout(false);
            _SplitContainer1.Panel2.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)_SplitContainer1).EndInit();
            _SplitContainer1.ResumeLayout(false);
            ResumeLayout(false);
        }
Example #39
0
    public GUI()
    {
        this.Text = "Prince";

        // Delegate used by drag and drop
        asyncOpenFile = new AsyncOpenFile(this.OpenFile);
        asyncOpenFiles = new AsyncOpenFiles(this.OpenFiles);

        // Accept files dropped from Explorer
        this.AllowDrop = true;
        this.DragEnter += new DragEventHandler(Form_DragEnter);
        this.DragDrop += new DragEventHandler(Form_DragDrop);

        // Open file dialog
        openDlg = new OpenFileDialog();
        openDlg.Multiselect = true;
        openDlg.Filter =
        "All web content|*.html;*.htm;*.svg;*.xht;*.xhtml;*.xml;*.css;*.js|"+
        "Documents (HTML, XML, SVG)|*.html;*.htm;*.svg;*.xht;*.xhtml;*.xml|"+
        "Style sheets (CSS)|*.css|"+
        "Scripts (*.js)|*.js|"+
        "All files (*.*)|*.*";

        // Save file dialog
        saveDlg = new SaveFileDialog();
        saveDlg.OverwritePrompt = false;
        saveDlg.DefaultExt = "pdf";
        saveDlg.Filter =
        "PDF files|*.pdf|"+
        "All files (*.*)|*.*";

        // TreeView for files
        tv = new TreeView();
        tv.Dock = DockStyle.Fill;
        tv.ShowNodeToolTips = true;
        tv.AllowDrop = true;
        tv.Nodes.Add("Documents");
        tv.Nodes.Add("Style sheets");
        tv.Nodes.Add("Scripts");
        tv.Nodes[0].NodeFont = new Font(tv.Font, FontStyle.Bold);
        tv.Nodes[1].NodeFont = new Font(tv.Font, FontStyle.Bold);
        tv.Nodes[2].NodeFont = new Font(tv.Font, FontStyle.Bold);
        tv.KeyDown += new KeyEventHandler(TreeView_KeyDown);
        tv.AfterSelect += new TreeViewEventHandler(TreeView_AfterSelect);
        tv.ItemDrag += new ItemDragEventHandler(TreeView_ItemDrag);
        tv.DragEnter += new DragEventHandler(TreeView_DragEnter);
        tv.DragDrop += new DragEventHandler(TreeView_DragDrop);

        // ListView for output log
        lv = new ListView();
        lv.Dock = DockStyle.Fill;
        lv.View = View.Details;
        lv.Columns.Add("Status", -2);
        lv.Columns.Add("Location", -2);
        lv.Columns.Add("Message", -2);

        // Split
        SplitContainer split = new SplitContainer();
        split.Dock = DockStyle.Fill;
        split.FixedPanel = FixedPanel.Panel2;
        split.Orientation = Orientation.Horizontal;
        split.Panel1.Controls.Add(tv);
        split.Panel2.Controls.Add(lv);

        this.Controls.Add(split);

        setupMenu();
        setupStatusStrip();
    }
Example #40
0
	public MainForm ()
	{
		// 
		// _label
		// 
		_label = new Label ();
		_label.AutoSize = true;
		_label.Text = "FixedPanel:";
		_label.Location = new Point (5, 5);
		_label.TextAlign = ContentAlignment.MiddleLeft;
		Controls.Add (_label);
		// 
		// _fixedSplitterComboBox
		// 
		_fixedSplitterComboBox = new ComboBox ();
		_fixedSplitterComboBox.DropDownStyle = ComboBoxStyle.DropDownList;
		_fixedSplitterComboBox.SelectedIndexChanged += FixedSplitterComboBox_SelectedIndexChanged;
		SetHorizAdjacent (_fixedSplitterComboBox, _label);
		Controls.Add (_fixedSplitterComboBox);
		// 
		// _swapOrientationButton
		// 
		_swapOrientationButton = new Button ();
		_swapOrientationButton.AutoSize = true;
		_swapOrientationButton.Text = "Swap orientation";
		_swapOrientationButton.Click += SwapOrientationButton_Click;
		SetHorizAdjacent (_swapOrientationButton, _fixedSplitterComboBox);
		Controls.Add (_swapOrientationButton);
		// 
		// _splitContainer
		// 
		_splitContainer = new SplitContainer ();
		_splitContainer.Location = new Point (0, _swapOrientationButton.Bottom + 5);
		_splitContainer.Width = ClientSize.Width;
		_splitContainer.Height = ClientSize.Height - _splitContainer.Top;
		_splitContainer.Anchor = AnchorStyles.Left | AnchorStyles.Right |
			AnchorStyles.Top | AnchorStyles.Bottom;
		Controls.Add (_splitContainer);
		// 
		// _textBox1
		// 
		_textBox1 = new TextBox ();
		_textBox1.Dock = DockStyle.Fill;
		_textBox1.Multiline = true;
		_textBox1.Text = "Panel 1";
		_splitContainer.Panel1.Controls.Add (_textBox1);
		// 
		// _textBox2
		// 
		_textBox2 = new TextBox ();
		_textBox2.Dock = DockStyle.Fill;
		_textBox2.Multiline = true;
		_textBox2.Text = "Panel 2";
		_splitContainer.Panel2.Controls.Add (_textBox2);
		// 
		// MainForm
		// 
		ClientSize = new Size (_swapOrientationButton.Right + 5, ClientSize.Width);
		_splitContainer.SplitterDistance = ClientSize.Width / 2;
		Location = new Point (250, 100);
		StartPosition = FormStartPosition.Manual;
		Text = "bug #82763";
		Load += MainForm_Load;

	}