Exemplo n.º 1
0
 public ExternalEditStopButton(ExternalEditButton editButton)
 {
     TextAlign = ContentAlignment.MiddleCenter;
     this.editButton = editButton;
     this.Text = "Stop Editing";
     this.Enabled = false;
 }
Exemplo n.º 2
0
        private void Init()
        {
            this.SuspendLayout();

            // this thing is set up as follows: you have a topPanel that holds the snippet date and the
            // snippet title. Then under that, filling up the rest of the space, is the propertiesPaneHolder

            //
            // snippetDate
            //
            this.snippetDate = new SnippetDateBox();
            this.snippetDate.Location = new System.Drawing.Point(0, 0);
            this.snippetDate.Width = this.ClientSize.Width;
            this.snippetDate.Height = standardLabelHeight;
            this.snippetDate.AutoSize = true;
            this.snippetDate.Dock = DockStyle.Left;
            this.snippetDate.Text = new DateTime().ToString();
            this.snippetDate.BorderStyle = BorderStyle.Fixed3D;

            //
            // snippetTitle
            //
            this.snippetTitle = new SnippetTitleBox();
            this.snippetTitle.Location = new System.Drawing.Point(0, 0);
            //this.snippetTitle.Width = this.ClientSize.Width;
            this.snippetTitle.Height = standardLabelHeight;
            this.snippetTitle.Multiline = false;
            this.snippetTitle.Name = "Snippet Title";
            this.snippetTitle.TabIndex = 0;
            this.snippetTitle.ReadOnly = false;
            this.snippetTitle.Dock = DockStyle.Left;

            //
            // externalEditButton
            //
            externalEditButton = new ExternalEditButton();
            externalEditButton.Location = new System.Drawing.Point(0, 0);
            externalEditButton.Height = standardLabelHeight - 10;
            externalEditButton.AutoSize = true;
            externalEditButton.Dock = DockStyle.Right;

            //
            // externalEditStopButton
            //
            externalEditStopButton = externalEditButton.externalEditStopButton;
            externalEditStopButton.Location = new System.Drawing.Point(0, 0);
            externalEditStopButton.Height = standardLabelHeight - 10;
            externalEditStopButton.AutoSize = true;
            externalEditStopButton.Dock = DockStyle.Right;

            // Top Panel
            topPanel = new Panel();
            topPanel.Dock = DockStyle.Top;
            topPanel.Controls.Add(externalEditStopButton);
            topPanel.Controls.Add(this.externalEditButton);
            topPanel.Controls.Add(this.snippetTitle);
            topPanel.Controls.Add(this.snippetDate);

            // ParentPane which is the tree backwards
            this.parentPane = new ParentPane.ParentPane();
            this.parentPane.Location = new System.Drawing.Point(0, 15);
            this.parentPane.Dock = DockStyle.Fill;
            this.parentPane.AutoSize = true;

            // LocationPane is another version of the ParentPane
            this.locationPane = new LocationPane2.LocationPane();
            this.locationPane.Location = new System.Drawing.Point(0, 15);
            this.locationPane.Dock = DockStyle.Fill;
            this.locationPane.AutoSize = true;

            locationPanesPageParents = new TabPage("Parents");
            locationPanesPageParents.Controls.Add(parentPane);
            locationPanesPageLocations = new TabPage("Locations");
            locationPanesPageLocations.Controls.Add(locationPane);
            List<TabPage> pages = new List<TabPage>(2);
            pages.Add(locationPanesPageParents);
            pages.Add(locationPanesPageLocations);

            propertiesPaneHolder = new PropertiesPaneHolder(pages);

            //
            // SnippetDetailPane
            //
            // this.AllowDrop = true;
            this.AutoScroll = true;
            this.VScroll = true;
            this.Controls.Add(propertiesPaneHolder);
            this.Controls.Add(topPanel);
            this.Cursor = System.Windows.Forms.Cursors.Default;
            this.Name = "PropertiesPane";
            this.Text = "Properties";
            // does nothing bottomHalfSplitContainer.Location = new Point(0, 0);
            // does nothing bottomHalfSplitContainer.Height = 1000;
            this.ResumeLayout(false);
        }