public Form2()
        {
            // Create and initialize a Panel.
            this.panel1 = new BSE.Windows.Forms.Panel();
            this.panel1.Text = "panel1";
            // Set the panel background.
            this.panel1.ShowTransparentBackground = false;
            // Set the panel's DockStyle to DockStyle.Fill
            this.panel1.Dock = DockStyle.Fill;
            // Add the panel to the form
            this.Controls.Add(this.panel1);

            // Create and initialize a ToolStripProfessionalRenderer.
            ToolStripProfessionalRenderer renderer = new BSE.Windows.Forms.Office2007Renderer();
            // Add it to the ToolStripManager.Renderer
            ToolStripManager.Renderer = renderer;

            // Get the ProfessionalColorTable colorTable for the current renderer.
            BSE.Windows.Forms.ProfessionalColorTable colorTable = renderer.ColorTable as BSE.Windows.Forms.ProfessionalColorTable;
            if (colorTable != null)
            {
                // Get the PanelColors panelColorTable for the current  colortable.
                BSE.Windows.Forms.PanelColors panelColorTable = colorTable.PanelColorTable;
                if (panelColorTable != null)
                {
                    // Set the panel properties for the form controls collection
                    BSE.Windows.Forms.PanelSettingsManager.SetPanelProperties(this.Controls, panelColorTable);
                }
            }
        }
示例#2
0
文件: Form1.cs 项目: zz58458/BP162
        private void ViewMenuItemsClick(object sender, EventArgs e)
        {
            ToolStripMenuItem menuItem = sender as ToolStripMenuItem;

            if (menuItem != null)
            {
                BSE.Windows.Forms.Panel panel = menuItem.Tag as BSE.Windows.Forms.Panel;
                if (panel != null)
                {
                    panel.Visible = !panel.Visible;
                }
            }
        }
        public WellDetailPopup(Form parent, BSE.Windows.Forms.Panel leftPanel, Well well, GPoint markerLocationOnParent, string dataConnString, Action<Well> updateMarkerPosition, Action<Well> deleteMarker)
        {
            this.FormClosing += Close_clicked;
            this.leftPanel = leftPanel;
            deleteMarkerAction = deleteMarker;
            updateMarkerPositionAction = updateMarkerPosition;
            connectionString = dataConnString;
            Owner = parent;
            StartPosition = FormStartPosition.Manual;
            Location = markerLocationOnParent;

            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;

            InitializeComponent();

            this.well = well;
            editLngBox.Text = well.Latitude;
            editLatBox.Text = well.Longitude;
            imageEditBackup = well.WellImage;
            wellImage.Image = well.WellImage;
            wellImage.SizeMode = PictureBoxSizeMode.Zoom;
        }
        public WellDetailPopup(Form parent, BSE.Windows.Forms.Panel leftPanel, Well well, GPoint markerLocationOnParent, string dataConnString, Action <Well> updateMarkerPosition, Action <Well> deleteMarker)
        {
            this.FormClosing          += Close_clicked;
            this.leftPanel             = leftPanel;
            deleteMarkerAction         = deleteMarker;
            updateMarkerPositionAction = updateMarkerPosition;
            connectionString           = dataConnString;
            Owner         = parent;
            StartPosition = FormStartPosition.Manual;
            Location      = markerLocationOnParent;

            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;

            InitializeComponent();

            this.well          = well;
            editLngBox.Text    = well.Latitude;
            editLatBox.Text    = well.Longitude;
            imageEditBackup    = well.WellImage;
            wellImage.Image    = well.WellImage;
            wellImage.SizeMode = PictureBoxSizeMode.Zoom;
        }
示例#5
0
文件: Form1.cs 项目: zz58458/BP162
        private void SetViewMenuItems()
        {
            this.m_mnuView.DropDownItems.Clear();
            ArrayList basePanels = BSE.Windows.Forms.PanelSettingsManager.FindPanels(true, this.Controls);

            foreach (BSE.Windows.Forms.BasePanel basePanel in basePanels)
            {
                BSE.Windows.Forms.Panel panel = basePanel as BSE.Windows.Forms.Panel;
                if ((panel != null) && ((panel.Dock != DockStyle.Fill) || (panel.Dock != DockStyle.None)) && (panel.ShowCloseIcon == true))
                {
                    ToolStripMenuItem menuItem = new ToolStripMenuItem();
                    menuItem.Text   = panel.Text;
                    menuItem.Image  = panel.Image;
                    menuItem.Tag    = panel;
                    menuItem.Click += new EventHandler(ViewMenuItemsClick);
                    if (panel.Visible == true)
                    {
                        menuItem.Checked = true;
                    }
                    this.m_mnuView.DropDownItems.Add(menuItem);
                }
            }
        }
示例#6
0
        private static void DrawBorders(Graphics graphics, XPanderPanel xpanderPanel)
        {
            if (xpanderPanel.ShowBorder == true)
            {
                using (GraphicsPath graphicsPath = new GraphicsPath())
                {
                    using (Pen borderPen = new Pen(xpanderPanel.PanelColors.BorderColor, Constants.BorderThickness))
                    {
                        Rectangle captionRectangle = xpanderPanel.CaptionRectangle;
                        Rectangle borderRectangle  = captionRectangle;

                        if (xpanderPanel.Expand == true)
                        {
                            borderRectangle = xpanderPanel.ClientRectangle;

                            graphics.DrawLine(
                                borderPen,
                                captionRectangle.Left,
                                captionRectangle.Top + captionRectangle.Height - Constants.BorderThickness,
                                captionRectangle.Left + captionRectangle.Width,
                                captionRectangle.Top + captionRectangle.Height - Constants.BorderThickness);
                        }

                        XPanderPanelList xpanderPanelList = xpanderPanel.Parent as XPanderPanelList;
                        if ((xpanderPanelList != null) && (xpanderPanelList.Dock == DockStyle.Fill))
                        {
                            BSE.Windows.Forms.Panel panel = xpanderPanelList.Parent as BSE.Windows.Forms.Panel;
                            XPanderPanel            parentXPanderPanel = xpanderPanelList.Parent as XPanderPanel;
                            if (((panel != null) && (panel.Padding == new Padding(0))) ||
                                ((parentXPanderPanel != null) && (parentXPanderPanel.Padding == new Padding(0))))
                            {
                                if (xpanderPanel.Top != 0)
                                {
                                    graphicsPath.AddLine(
                                        borderRectangle.Left,
                                        borderRectangle.Top,
                                        borderRectangle.Left + captionRectangle.Width,
                                        borderRectangle.Top);
                                }

                                // Left vertical borderline
                                graphics.DrawLine(borderPen,
                                                  borderRectangle.Left,
                                                  borderRectangle.Top,
                                                  borderRectangle.Left,
                                                  borderRectangle.Top + borderRectangle.Height);

                                // Right vertical borderline
                                graphics.DrawLine(borderPen,
                                                  borderRectangle.Left + borderRectangle.Width - Constants.BorderThickness,
                                                  borderRectangle.Top,
                                                  borderRectangle.Left + borderRectangle.Width - Constants.BorderThickness,
                                                  borderRectangle.Top + borderRectangle.Height);
                            }
                            else
                            {
                                // Upper horizontal borderline only at the top xpanderPanel
                                if (xpanderPanel.Top == 0)
                                {
                                    graphicsPath.AddLine(
                                        borderRectangle.Left,
                                        borderRectangle.Top,
                                        borderRectangle.Left + borderRectangle.Width,
                                        borderRectangle.Top);
                                }

                                // Left vertical borderline
                                graphicsPath.AddLine(
                                    borderRectangle.Left,
                                    borderRectangle.Top,
                                    borderRectangle.Left,
                                    borderRectangle.Top + borderRectangle.Height);

                                //Lower horizontal borderline
                                graphicsPath.AddLine(
                                    borderRectangle.Left,
                                    borderRectangle.Top + borderRectangle.Height - Constants.BorderThickness,
                                    borderRectangle.Left + borderRectangle.Width - Constants.BorderThickness,
                                    borderRectangle.Top + borderRectangle.Height - Constants.BorderThickness);

                                // Right vertical borderline
                                graphicsPath.AddLine(
                                    borderRectangle.Left + borderRectangle.Width - Constants.BorderThickness,
                                    borderRectangle.Top,
                                    borderRectangle.Left + borderRectangle.Width - Constants.BorderThickness,
                                    borderRectangle.Top + borderRectangle.Height);
                            }
                        }
                        else
                        {
                            // Upper horizontal borderline only at the top xpanderPanel
                            if (xpanderPanel.Top == 0)
                            {
                                graphicsPath.AddLine(
                                    borderRectangle.Left,
                                    borderRectangle.Top,
                                    borderRectangle.Left + borderRectangle.Width,
                                    borderRectangle.Top);
                            }

                            // Left vertical borderline
                            graphicsPath.AddLine(
                                borderRectangle.Left,
                                borderRectangle.Top,
                                borderRectangle.Left,
                                borderRectangle.Top + borderRectangle.Height);

                            //Lower horizontal borderline
                            graphicsPath.AddLine(
                                borderRectangle.Left,
                                borderRectangle.Top + borderRectangle.Height - Constants.BorderThickness,
                                borderRectangle.Left + borderRectangle.Width - Constants.BorderThickness,
                                borderRectangle.Top + borderRectangle.Height - Constants.BorderThickness);

                            // Right vertical borderline
                            graphicsPath.AddLine(
                                borderRectangle.Left + borderRectangle.Width - Constants.BorderThickness,
                                borderRectangle.Top,
                                borderRectangle.Left + borderRectangle.Width - Constants.BorderThickness,
                                borderRectangle.Top + borderRectangle.Height);
                        }
                    }
                    using (Pen borderPen = new Pen(xpanderPanel.PanelColors.BorderColor, Constants.BorderThickness))
                    {
                        graphics.DrawPath(borderPen, graphicsPath);
                    }
                }
            }
        }