예제 #1
0
    /// 鼠标移至菜单
    private static void toolControl_MouseEnter(object sender, EventArgs e)
    {
        PictureBoxEx pL = (PictureBoxEx)sender;

        pL.BackColor = system_selectColor;
        pL.Cursor    = Cursors.Hand;
    }
예제 #2
0
        }             // EnableListItem

        private string GetServiceLogoImageKey(UiBroadcastService service, bool disabled)
        {
            var logo = service.Logo;

            if (SmallImageList.Images.ContainsKey(logo.Key))
            {
                return(disabled ? "<Disabled> " + logo.Key : logo.Key);
            } // if

            var key         = logo.Key;
            var disabledKey = "<Disabled> " + key;

            // load small logo and add it to small image list
            using (var image = logo.GetImage(SmallLogoSize, true))
            {
                SmallImageList.Images.Add(logo.Key, image);
                using (var disabledImage = PictureBoxEx.ToGrayscale(image))
                {
                    SmallImageList.Images.Add(disabledKey, disabledImage);
                } // using image
            }     // using image

            // load large logo and add it to large image list
            using (var image = logo.GetImage(LargeLogoSize, true))
            {
                LargeImageList.Images.Add(logo.Key, image);
                using (var disabledImage = PictureBoxEx.ToGrayscale(image))
                {
                    LargeImageList.Images.Add(disabledKey, disabledImage);
                } // using image
            }     // using image

            return(disabled ? disabledKey : key);
        } // GetChannelLogoKey
예제 #3
0
    /// 鼠标离开菜单
    private static void toolControl_MouseLeave(object sender, EventArgs e)
    {
        PictureBoxEx pL = (PictureBoxEx)sender;

        pL.BackColor = Color.Transparent;
        pL.Cursor    = Cursors.Default;
    }
예제 #4
0
        private void AddImageLayer(Image img, int LayerIndex, Point Location)
        {
            var guid  = Guid.NewGuid();
            var picEx = new PictureBoxEx();

            picEx.Name     = guid.ToString();
            picEx.Parent   = this;
            picEx.SizeMode = PictureBoxSizeMode.Zoom;
            picEx.Location = Location;
            picEx.Width    = Convert.ToInt32(img.Width * PicsScale);
            picEx.Height   = Convert.ToInt32(img.Height * PicsScale);
            picEx.Image    = img;
            picEx.Tag      = new UsCtrlExInfors {
                ControlName = picEx.Name, ControlText = ""
            };
            picEx.ContextMenuStrip = picMenu;

            picEx.MouseDown += new MouseEventHandler(Conotrl_MouseDown);
            picEx.MouseMove += new MouseEventHandler(Conotrl_MouseMove);
            picEx.MouseUp   += new MouseEventHandler(Conotrl_MouseUp);

            this.Controls.Add(picEx);
            if (-1 < LayerIndex && LayerIndex < Controls.Count)
            {
                this.Controls.SetChildIndex(picEx, LayerIndex);
            }
        }
예제 #5
0
        /// <summary>
        /// Adds a new log message row to the message window.
        /// </summary>
        /// <param name="column">The <see cref="LogColumn"/> that should be represented by the new row.</param>
        private void AddLogMsgRowItem(LogColumn column)
        {
            RowStyle baseStyle = tblLogMessage.RowStyles[0];

            tblLogMessage.RowCount++;

            tblLogMessage.RowStyles.Add(new RowStyle(
                                            baseStyle.SizeType
                                            , baseStyle.Height));

            tblLogMessage.Controls.Add(new Label()
            {
                Text     = column.Name,
                AutoSize = true,
                Margin   = new Padding(3, 1, 10, 1),
                Padding  = new Padding(4),
                Tag      = column,
                Font     = mBoldCaptionFont
            }, 0, tblLogMessage.RowCount - 1);

            TextBox txtValue = new TextBox()
            {
                BorderStyle = BorderStyle.None,
                ReadOnly    = true,
                Dock        = DockStyle.Fill,
                Margin      = new Padding(3, 4, 3, 1),
                BackColor   = ThemeManager.CurrentApplicationTheme.ColorPalette.ContentBackground,
                ForeColor   = ThemeManager.CurrentApplicationTheme.ColorPalette.ContentForeground,
                Tag         = column
            };

            tblLogMessage.Controls.Add(
                txtValue
                , 1
                , tblLogMessage.RowCount - 1);

            PictureBoxEx pbxCopyButton = new PictureBoxEx()
            {
                BackgroundImageLayout = ImageLayout.Center,
                Cursor  = Cursors.Hand,
                Image   = ThemeManager.CurrentApplicationTheme.Resources.Images["FrmScriptTbCopy"],
                Margin  = new Padding(2, 2, 1, 1),
                Size    = new Size(17, 18),
                Visible = false
            };

            pbxCopyButton.Click += (sender, e) =>
                                   pbxCopyButton.CopyToClipboard(txtValue.Text);

            tltTip.SetToolTip(pbxCopyButton, string.Format(
                                  Resources.strMessageDetailsCopyButtonTooltip
                                  , column.Name));

            tblLogMessage.Controls.Add(
                pbxCopyButton
                , 2
                , tblLogMessage.RowCount - 1);
        }
예제 #6
0
        private void Picture_Click(object sender, EventArgs e)
        {
            PictureBoxEx p = (PictureBoxEx)sender;

            ImageBoxes.ForEach((b) => { b.ShowCurrent = b == sender; b.Invalidate(); });
            m_Current = p.Tag.Cast <int>();
            pbMainImage.SetPicture(p.Picture);
            pbMainImage.Invalidate();
        }
예제 #7
0
        public void TestPictureBoxEx()
        {
            PictureBoxEx pb = new PictureBoxEx();

            pb.SetImage("", "");
            Assert.AreEqual(pb.Image, null, "No relevant image resource");

            pb.SetImage(base64ImageExample, "base64");
            Assert.AreNotEqual(pb.Image, null, "No relevant image resource");
        }
예제 #8
0
    /// 点击菜单
    private void ToolControl_MouseDown(object sender, MouseEventArgs e)
    {
        PictureBoxEx pL = (PictureBoxEx)sender;

        int pheight = (int)((PreViewPage_Area.Height) * zoomScale) + 20; //每页高度

        switch (pL.Tag)
        {
        case "PREVIEW_PRINT":
            DialogUse_HotKey = false;
            print_File();
            break;

        case "PREVIEW_SEARCH":
            DialogUse_HotKey = false;
            new RBuild_PreviewSearch().Search();
            break;

        case "PREVIEW_ZOOM":
            Preview_Menu.Show(pL.PointToScreen(new Point(0, 25)));
            break;

        case "PREVIEW_FIRST":
            page_Container.AutoScrollPosition = new Point(0, 0);
            break;

        case "PREVIEW_PREVIOUS":
            if (Now_Page - 1 >= 1)
            {
                page_Container.AutoScrollPosition = new Point(0, Now_Page * pheight - 2 * pheight);
            }
            break;

        case "PREVIEW_NEXT":
            if (Now_Page + 1 <= Total_Page)
            {
                page_Container.AutoScrollPosition = new Point(0, Now_Page * pheight);
            }
            break;

        case "PREVIEW_LAST":
            page_Container.AutoScrollPosition = new Point(0, Now_Page * pheight + (Total_Page - Now_Page - 1) * pheight);
            break;

        case "PREVIEW_CLOSE":
            preview_Form._formObject.Close();
            break;

        case "PREVIEW_ABOUT":
            break;

        default:
            break;
        }
    }
예제 #9
0
 /// <summary>
 /// 分割线图像
 /// </summary>
 /// <param name="obj">主控件</param>
 /// <param name="_size">大小</param>
 /// <param name="_point">位置</param>
 /// <param name="_bmp">图像</param>
 public void Spear_line(Control obj, Size _size, Point _point, Bitmap _bmp)
 {
     spear_Img = new PictureBoxEx()
     {
         Size      = _size,
         Location  = _point,
         Image     = _bmp,
         BackColor = Color.Transparent
     };
     obj.Controls.Add(spear_Img);
 }
예제 #10
0
        public SmartMenuButtonHotspot()
        {
            this.Transparent = true;

            imageControl             = new PictureBoxEx();
            imageControl.Pushable    = false;
            imageControl.Location    = new Point(0, 0);
            imageControl.SizeMode    = PictureBoxSizeMode.CenterImage;
            imageControl.Transparent = true;
            imageControl.MouseDown  += (sender, e) => OnMouseDown(e);
            imageControl.MouseUp    += (sender, e) => OnMouseUp(e);
            this.Controls.Add(imageControl);
        }
예제 #11
0
        public override bool WindowResize()
        {
            if ((InternalW == Form_.Width) && (InternalH == Form_.Height))
            {
                return(false);
            }

            InternalW = Form_.Width;
            InternalH = Form_.Height;

            WinW = Form_.ClientSize.Width / CellW;
            WinH = Form_.ClientSize.Height / CellH;

            Bitmap_  = new Bitmap(WinW * CellW, WinH * CellH, System.Drawing.Imaging.PixelFormat.Format24bppRgb);
            Bitmap_G = Graphics.FromImage(Bitmap_);

            FormCtrlB = new int[WinW, WinH];
            FormCtrlF = new int[WinW, WinH];
            FormCtrlC = new char[WinW, WinH];
            FormCtrlR = new Rectangle[WinW, WinH];
            Form_.Controls.Clear();
            PictureBox_             = new PictureBoxEx(WinPicturePanel);
            PictureBox_.Ctrl.Left   = (Form_.ClientSize.Width - Bitmap_.Width) / 2;
            PictureBox_.Ctrl.Top    = (Form_.ClientSize.Height - Bitmap_.Height) / 2;
            PictureBox_.Ctrl.Width  = Bitmap_.Width;
            PictureBox_.Ctrl.Height = Bitmap_.Height;
            PictureBox_.Image       = Bitmap_;

            Form_.Controls.Add(PictureBox_.Ctrl);
            PictureBox_.Ctrl.Refresh();

            for (int Y = 0; Y < WinH; Y++)
            {
                for (int X = 0; X < WinW; X++)
                {
                    FormCtrlB[X, Y] = -1;
                    FormCtrlF[X, Y] = -1;
                    FormCtrlC[X, Y] = ' ';
                    FormCtrlR[X, Y] = new Rectangle(X * CellW, Y * CellH, CellW, CellH);
                }
            }

            return(true);
        }
예제 #12
0
        public OptLayout(Panel layout, int blinkMax)
        {
            pnlLayout                 = layout;
            optIn                     = pnlLayout.Controls.Find("txtOptIn", true).FirstOrDefault() as CheckBox;
            smOptInY                  = pnlLayout.Controls.Find("txtSmOptInY", true).FirstOrDefault() as RadioButton;
            smOptInN                  = pnlLayout.Controls.Find("txtSmOptInN", true).FirstOrDefault() as RadioButton;
            smOptInText               = pnlLayout.Controls.Find("txtSmOptIn", true).FirstOrDefault() as RichTextBoxEx;
            smOptInBg                 = pnlLayout.Controls.Find("imgSmOpInBg", true).FirstOrDefault() as PictureBoxEx;
            txtTitle                  = pnlLayout.Controls.Find("txtTitle", true).FirstOrDefault() as RichTextBoxEx;
            darkenProductOverlay      = pnlLayout.Controls.Find("pnlDarkenOverlay", true).FirstOrDefault() as Panel;
            darkenProductOverlay.Size = pnlLayout.Size;

            imgDarkenOverlay = new PictureBox
            {
                Anchor   = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right,
                Location = pnlLayout.Location,
                Name     = "imgDarkenOverlay",
                Size     = pnlLayout.Size,
                TabStop  = false,
                Visible  = false
            };
            pnlLayout.Controls.Add(imgDarkenOverlay);

            string opt = ConfigParser.GetConfig().GetStringValue("//RemoteConfiguration/FlowSettings/OptType", OptType.IN);

            if (opt == OptType.SMART && (smOptInText == null || string.IsNullOrEmpty(smOptInText.Text))) // Fallback if the remote config not relevant
            {
                opt = OptType.IN;
            }
            if (opt == OptType.IN)
            {
                optIn.Visible = true;
            }
            else if (opt == OptType.SMART)
            {
                smOptInY.Visible = true;
                smOptInN.Visible = true;
            }
            this.opt      = opt;
            this.blinkMax = blinkMax;
            InitTimer();
        }
예제 #13
0
        //-----------------------------------------------------------------------------------------------------
        private PictureBoxEx CreateThumb(string file)
        {
            PictureBoxEx pic = new PictureBoxEx();

            pic.ContextMenuStrip = contextMenuStrip1;
            toolTip1.SetToolTip(pic, Path.GetFileName(file));
            pic.Cursor    = Cursors.Hand;
            pic.BackColor = Color.Black;
            pic.Width     = 120;
            pic.Height    = 160;
            pic.SizeMode  = PictureBoxSizeMode.Zoom;

            string thumb = Path.GetDirectoryName(file) + "\\thumb\\" + Path.GetFileNameWithoutExtension(file) + ".jpg";

            if (File.Exists(thumb))
            {
                pic.Image = Image.FromStream(new MemoryStream(File.ReadAllBytes(thumb)));
            }
            pic.Tag = file;
            return(pic);
        }
예제 #14
0
    private void addToolControl(Control obj, int width, int height, Bitmap img, Point location, string tips, string id, bool showtips)
    {
        ToolTip      toolTip     = new ToolTip();
        PictureBoxEx toolControl = new PictureBoxEx()
        {
            Size      = new Size(width, height),
            SizeMode  = PictureBoxSizeMode.CenterImage,
            Image     = img,
            Location  = location,
            BackColor = Color.Transparent,
            Tag       = id
        };

        if (showtips)
        {
            toolTip.SetToolTip(toolControl, tips);
            toolControl.MouseEnter += new EventHandler(toolControl_MouseEnter);
            toolControl.MouseLeave += new EventHandler(toolControl_MouseLeave);
            toolControl.MouseDown  += ToolControl_MouseDown;
        }
        obj.Controls.Add(toolControl);
    }
    /// <summary>
    /// 点击窗体控制按钮
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    private void formControl_Click(object sender, EventArgs e)
    {
        PictureBoxEx pL = (PictureBoxEx)sender;

        switch ((int)pL.Tag)
        {
        case 0:     // 最小化到任务栏
            _formObject.WindowState = FormWindowState.Minimized;
            break;

        case 1:     // 最大化
            if (_formObject.WindowState == FormWindowState.Normal)
            {
                panelScroll.VerticalScroll.Value   = 0;
                panelScroll.HorizontalScroll.Value = 0;
                _formObject.WindowState            = FormWindowState.Maximized;
                pL.Image = Icon_formControl[3];
                toolTip.SetToolTip(pL, tips_formControl[3]);
            }
            else     // 还原
            {
                panelScroll.VerticalScroll.Value   = 0;
                panelScroll.HorizontalScroll.Value = 0;
                _formObject.WindowState            = FormWindowState.Normal;
                pL.Image = Icon_formControl[1];
                toolTip.SetToolTip(pL, tips_formControl[1]);
            }
            break;

        case 2:     // 退出
            _formObject.Close();
            break;

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

        /// <include file='doc\PositionStylePage.uex' path='docs/doc[@for="PositionStylePage.CreateUI"]/*' />
        /// <devdoc>
        ///     Creates the UI elements within the page.
        /// </devdoc>
        protected override void CreateUI()
        {
            Label     positionLabel  = new Label();
            Label     leftLabel      = new Label();
            Label     topLabel       = new Label();
            Label     widthLabel     = new Label();
            Label     heightLabel    = new Label();
            Label     zIndexLabel    = new Label();
            ImageList positionImages = new ImageList();

            positionImages.ImageSize = new Size(34, 34);

            positionCombo   = new UnsettableComboBox();
            positionPicture = new PictureBoxEx();
            leftUnit        = new UnitControl();
            topUnit         = new UnitControl();
            widthUnit       = new UnitControl();
            heightUnit      = new UnitControl();
            zIndexEdit      = new NumberEdit();

            positionImages.Images.AddStrip(new Bitmap(typeof(PositionStylePage), "PropPosition.bmp"));
            positionPicture.Location = new Point(4, 9);
            positionPicture.Size     = new Size(36, 36);
            positionPicture.TabIndex = 0;
            positionPicture.TabStop  = false;
            positionPicture.Images   = positionImages;

            positionLabel.Location = new Point(44, 8);
            positionLabel.Size     = new Size(240, 16);
            positionLabel.TabIndex = 1;
            positionLabel.TabStop  = false;
            positionLabel.Text     = SR.GetString(SR.PosSP_PosModeLabel);

            positionCombo.Location      = new Point(44, 24);
            positionCombo.Size          = new Size(200, 21);
            positionCombo.TabIndex      = 2;
            positionCombo.DropDownStyle = ComboBoxStyle.DropDownList;
            positionCombo.Items.AddRange(new object[]
            {
                SR.GetString(SR.PosSP_PosModeCombo_1),
                SR.GetString(SR.PosSP_PosModeCombo_2),
                SR.GetString(SR.PosSP_PosModeCombo_3)
            });
            positionCombo.SelectedIndexChanged += new EventHandler(this.OnSelChangePosition);

            topLabel.Location = new Point(46, 61);
            topLabel.Size     = new Size(60, 16);
            topLabel.TabIndex = 3;
            topLabel.TabStop  = false;
            topLabel.Text     = SR.GetString(SR.PosSP_TopLabel);

            topUnit.Location    = new Point(108, 57);
            topUnit.Size        = new Size(88, 21);
            topUnit.TabIndex    = 4;
            topUnit.DefaultUnit = UnitControl.UNIT_PX;
            topUnit.MinValue    = -32768;
            topUnit.MaxValue    = 32767;
            topUnit.Changed    += new EventHandler(this.OnChangedTop);

            heightLabel.Location = new Point(220, 61);
            heightLabel.Size     = new Size(60, 16);
            heightLabel.TabIndex = 5;
            heightLabel.TabStop  = false;
            heightLabel.Text     = SR.GetString(SR.PosSP_HeightLabel);

            heightUnit.Location            = new Point(282, 57);
            heightUnit.Size                = new Size(88, 21);
            heightUnit.TabIndex            = 6;
            heightUnit.DefaultUnit         = UnitControl.UNIT_PX;
            heightUnit.AllowNegativeValues = false;
            heightUnit.MinValue            = -32768;
            heightUnit.MaxValue            = 32767;
            heightUnit.Changed            += new EventHandler(this.OnChangedHeight);

            leftLabel.Location = new Point(46, 84);
            leftLabel.Size     = new Size(60, 16);
            leftLabel.TabIndex = 7;
            leftLabel.TabStop  = false;
            leftLabel.Text     = SR.GetString(SR.PosSP_LeftLabel);

            leftUnit.Location    = new Point(108, 80);
            leftUnit.Size        = new Size(88, 21);
            leftUnit.TabIndex    = 8;
            leftUnit.DefaultUnit = UnitControl.UNIT_PX;
            leftUnit.MinValue    = -32768;
            leftUnit.MaxValue    = 32767;
            leftUnit.Changed    += new EventHandler(this.OnChangedLeft);

            widthLabel.Location = new Point(220, 84);
            widthLabel.Size     = new Size(60, 16);
            widthLabel.TabIndex = 9;
            widthLabel.TabStop  = false;
            widthLabel.Text     = SR.GetString(SR.PosSP_WidthLabel);

            widthUnit.Location            = new Point(282, 80);
            widthUnit.Size                = new Size(88, 21);
            widthUnit.TabIndex            = 10;
            widthUnit.DefaultUnit         = UnitControl.UNIT_PX;
            widthUnit.AllowNegativeValues = false;
            widthUnit.MinValue            = -32768;
            widthUnit.MaxValue            = 32767;
            widthUnit.Changed            += new EventHandler(this.OnChangedWidth);

            zIndexLabel.Location = new Point(46, 112);
            zIndexLabel.Size     = new Size(100, 16);
            zIndexLabel.TabIndex = 11;
            zIndexLabel.TabStop  = false;
            zIndexLabel.Text     = SR.GetString(SR.PosSP_ZIndexLabel);

            zIndexEdit.Location     = new Point(46, 130);
            zIndexEdit.Size         = new Size(60, 20);
            zIndexEdit.TabIndex     = 12;
            zIndexEdit.MaxLength    = 6;
            zIndexEdit.AllowDecimal = false;
            zIndexEdit.TextChanged += new EventHandler(this.OnChangedZIndex);

            this.Controls.Clear();
            this.Controls.AddRange(new Control[] {
                zIndexLabel,
                zIndexEdit,
                widthLabel,
                widthUnit,
                leftLabel,
                leftUnit,
                heightLabel,
                heightUnit,
                topLabel,
                topUnit,
                positionPicture,
                positionLabel,
                positionCombo
            });
        }
    /// <summary>
    /// 建立窗体
    /// </summary>
    /// <param name="_panelScrollObj">窗体内设置带滚动条panel</param>
    /// <param name="_formName">窗体名称</param>
    /// <param name="_startPosition">初次打开位置</param>
    /// <param name="_formSize">大小</param>
    /// <param name="_formPoint">位置</param>
    /// <param name="_formBackColor">背景色</param>
    /// <param name="_formOpenMode">打开方式</param>
    /// <param name="_formTop">置顶</param>
    /// <param name="_fromCloseed">关闭事件</param>
    public void Create_Form(
        PanelEx _panelScrollObj,
        string _formName,
        FormStartPosition _startPosition,
        Size _formSize,
        Point _formPoint,
        Color _formBackColor,
        int _formOpenMode,
        bool _formTop,
        FormClosedEventHandler _fromClosed,
        EventHandler _formResize
        )
    {
        panelScroll                 = _panelScrollObj;
        _formObject.Name            = _formName;
        _formObject.FormBorderStyle = FormBorderStyle.None;
        _formObject.StartPosition   = _startPosition;
        _formObject.Size            = _formSize;
        _formObject.Location        = _formPoint;
        _formObject.BackColor       = _formBackColor;
        _formObject.Resize         += _formResize;
        _formObject.TopMost         = _formTop;

        panel_Title.Dock                  = DockStyle.Top;
        panel_Title.Height                = 60;
        panel_Title.BackgroundImage       = EzRBuild.EzResource.background;
        panel_Title.Cursor                = Cursors.Default;
        panel_Title.BackgroundImageLayout = ImageLayout.Stretch;
        panel_Title.MouseDown            += formMove;
        _formObject.Controls.Add(panel_Title);

        PanelEx panel_formContro = new PanelEx()
        {
            Dock      = DockStyle.Right,
            Width     = 100,
            BackColor = Color.Transparent
        };

        panel_formContro.MouseDown += formMove;
        panel_Title.Controls.Add(panel_formContro);

        for (int i = 0; i < 3; i++)
        {
            picture_formControl[i] = new PictureBoxEx()
            {
                Size      = new Size(25, 25),
                Location  = new Point(i * 35, 4),
                Image     = Icon_formControl[i],
                Cursor    = Cursors.Hand,
                BackColor = Color.Transparent,
                Tag       = i
            };
            picture_formControl[i].MouseEnter += new EventHandler(formControl_MouseEnter);
            picture_formControl[i].MouseLeave += new EventHandler(formControl_MouseLeave);
            picture_formControl[i].Click      += new EventHandler(formControl_Click);
            toolTip.SetToolTip(picture_formControl[i], tips_formControl[i]);
            panel_formContro.Controls.Add(picture_formControl[i]);
        }
        _formObject.FormClosed += _fromClosed;
        if (_formOpenMode == 0)
        {
            _formObject.Show();
        }
        else
        {
            _formObject.ShowDialog();
        }
    }
    /// <summary>
    /// 鼠标离开窗体控制按钮
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    private void formControl_MouseLeave(object sender, EventArgs e)
    {
        PictureBoxEx pL = (PictureBoxEx)sender;

        pL.BackColor = Color.Transparent;
    }
    /// <summary>
    /// 报表编辑
    /// </summary>
    public static void Initialize_Design()
    {
        printDocument = new PrintDocument();
        get_pageType();
        Initialize_PageMode();
        Set_PrintPageType(4, 0);

        // 获取打印机
        DefaultPrinter = printDocument.PrinterSettings.PrinterName;  //默认打印机名
        foreach (string sprint in PrinterSettings.InstalledPrinters) //获取所有打印机名称
        {
            printers.Add(new Printer_List(sprint));
        }

        Use_HotKey  = true;
        design_Form = new RbControls_FormCreate(); // 建立窗体

        RbControls_ConextMenu _ConextMenu = new RbControls_ConextMenu();

        _ConextMenu.Menu(design_Form.panel_Title, RBuild_Menu.total_Menu, RBuild_Menu.menu_text, RBuild_Menu.menu_point, 23, RBuild_Menu.menu_width, system_Font, Color.White, Color.FromArgb(241, 241, 241), Color.Black, RBuild_Menu.ToolMenuMove);
        _ConextMenu.text_label[0].BackColor = Color.FromArgb(241, 241, 241);
        _ConextMenu.text_label[0].ForeColor = Color.Black;

        // 工具栏
        for (int i = 0; i < 4; i++)
        {
            panel_Tool[i] = new PanelEx()
            {
                Dock = DockStyle.Top, Height = 35, Cursor = Cursors.Default, BackColor = Color.FromArgb(238, 238, 242)
            };
            PanelEx panel_Line = new PanelEx()
            {
                Dock = DockStyle.Bottom, Height = 1, BackgroundImage = EzRBuild.EzResource.line, BackgroundImageLayout = ImageLayout.Stretch
            };
            panel_Tool[i].Controls.Add(panel_Line);

            if (i == 0)
            {
                panel_Tool[i].Visible = true;
            }
            else
            {
                panel_Tool[i].Visible = false;
            }

            RBuild_Menu.tool_Control(i, panel_Tool[i]);
            design_Form._formObject.Controls.Add(panel_Tool[i]);
        }

        // 页面设计
        page_Desing = new PanelEx()
        {
            Size     = new Size(design_Form._formObject.Width - 4, design_Form._formObject.Height - 161),
            Cursor   = Cursors.Default,
            Location = new Point(2, 97)
        };
        design_Form._formObject.Controls.Add(page_Desing);

        // 页面容器
        page_Container = new PanelEx()
        {
            Size       = new Size(page_Desing.Width - 20, page_Desing.Height - 20),
            Location   = new Point(20, 20),
            AutoScroll = true,
            Cursor     = Cursors.Default,
            BackColor  = Color.FromArgb(195, 195, 195)
        };
        page_Container.Paint += RBuild_Paint.pageContainer_Paint;
        page_Desing.Controls.Add(page_Container);

        // 页面装入框
        int _iLeft = (page_Container.Width / 2) - (page_TypeFace.Page_Area.Width / 2);

        if (_iLeft < 0)
        {
            _iLeft = 0;
        }
        page_Install = new PanelEx()
        {
            Size      = new Size(page_TypeFace.Page_Area.Width + 20, page_TypeFace.Page_Area.Height + 20),
            Location  = new Point(_iLeft, 0),
            Cursor    = Cursors.Default,
            BackColor = Color.Transparent
        };
        page_Install.Paint += RBuild_Paint.pageInstall_Paint;
        page_Container.Controls.Add(page_Install);
        // 页面
        Print_PageType = new PanelEx()
        {
            Size      = page_TypeFace.Page_Area,
            Location  = new Point(10, 10),
            Cursor    = Cursors.Default,
            BackColor = Color.White
        };
        Print_PageType.Paint      += RBuild_Paint.PrintPageType_Paint;
        Print_PageType.Click      += RBuild_MouseEvent.PageType_Click;
        Print_PageType.MouseClick += RBuild_MouseEvent.PageType_MouseClick;
        Print_PageType.MouseUp    += RBuild_MouseEvent.PageType_MouseUp;
        Print_PageType.MouseDown  += RBuild_MouseEvent.PageType_MouseDown;
        Print_PageType.MouseMove  += RBuild_MouseEvent.PageType_MouseMove;
        page_Install.Controls.Add(Print_PageType);

        // 标尺
        PictureBoxEx pic_VRuler = new PictureBoxEx()
        {
            Dock      = DockStyle.Left,
            Image     = VRuler(1100),
            Width     = 20,
            Cursor    = Cursors.Default,
            BackColor = Color.White
        };

        page_Desing.Controls.Add(pic_VRuler);

        PictureBoxEx pic_HRuler = new PictureBoxEx()
        {
            Dock      = DockStyle.Top,
            Image     = HRuler(2000),
            Height    = 20,
            Cursor    = Cursors.Default,
            BackColor = Color.White
        };

        page_Desing.Controls.Add(pic_HRuler);

        Initialize_Band();
        RBuild_Menu.Initialize_MenuStrip();
        RBuild_Info.Initialize_Info(design_Form._formObject);


        RBuild_Info.Composite_Info = new RbControls_TextLabel();
        RBuild_Info.Composite_Info.Text_Label(
            design_Form.panel_Title, new Point(225, 40), system_Font, Color.FromArgb(230, 230, 230),
            "✐  当前纸张:" + page_types[page_TypeFace.Page_Type] + ", 纵向" + "  ✐  打印机:" + DefaultPrinter + "  ✐  数据库: None  ✐"
            );

        RbControls_DrawTextMethod ds = new RbControls_DrawTextMethod();
        Bitmap report_Icon           = new Bitmap(20, 20);

        ds.DrawFontAwesome(report_Icon, RbControls_FontAwesome.Type.FileText, 20, Color.FromArgb(250, 250, 250), new Point(0, 0), false);
        PictureBoxEx report_pic = new PictureBoxEx()
        {
            Size      = new Size(20, 20),
            Location  = new Point(10, 6),
            Image     = report_Icon,
            BackColor = Color.Transparent
        };

        design_Form.panel_Title.Controls.Add(report_pic);

        ReportFile_Name = new Label()
        {
            AutoSize  = true,
            Location  = new Point(30, 6),
            Font      = system_Font,
            ForeColor = Color.White,
            Text      = "MyReport.rpt",
            BackColor = Color.Transparent
        };
        design_Form.panel_Title.Controls.Add(ReportFile_Name);

        design_Form.Create_Form(page_Container, "design_Form", FormStartPosition.Manual, new Size(1200, 768), new Point(200, 100), system_backColor, form_ShowDialog, false, designForm_Close, formResize); // 显示窗体
    }
    /// <summary>
    /// 鼠标在窗体控制按钮内
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    private void formControl_MouseEnter(object sender, EventArgs e)
    {
        PictureBoxEx pL = (PictureBoxEx)sender;

        pL.BackColor = Color.FromArgb(62, 109, 182);
    }
예제 #22
0
    public void panel_Preview(Control obj)
    {
        page_View = new PanelEx()
        {
            Size      = new Size(obj.Width - 4, obj.Height - 125),
            Location  = new Point(2, 97),
            Cursor    = Cursors.Default,
            BackColor = Color.FromArgb(150, 150, 150)
        };
        obj.Controls.Add(page_View);

        page_Container = new PanelEx()
        {
            Dock       = DockStyle.Fill,
            AutoScroll = true,
            BackColor  = Color.FromArgb(150, 150, 150)
        };
        page_View.Controls.Add(page_Container);

        page_Install = new PanelEx()
        {
            Size      = new Size(page_Container.Width - 20, page_Container.Height),
            Location  = new Point(0, 0),
            BackColor = Color.Transparent
        };
        page_Install.MouseDown       += PageInstall_MouseDown;
        page_Install.LocationChanged += PageInstall_LocationChanged;
        page_Container.Controls.Add(page_Install);

        // 装入预览页面图像
        Report_generation(page_TypeFace.Page_Direction);
        if (report_Pages.Count > 0)
        {
            int pwidth  = PreViewPage_Area.Width;
            int pheight = PreViewPage_Area.Height;

            int px = (page_Install.Width - pwidth + 20) / 2;
            if (px < 0)
            {
                px = 0;
            }

            panel_Outer = new PanelEx[report_Pages.Count];
            panel_Page  = new PanelEx[report_Pages.Count];

            for (int i = 0; i < report_Pages.Count; i++)
            {
                panel_Outer[i] = new PanelEx()
                {
                    Size      = new Size(pwidth + 20, pheight + 20),
                    Location  = new Point(px, i * (pheight + 20)),
                    BackColor = Color.FromArgb(150, 150, 150),
                };
                panel_Outer[i].MouseDown += PageInstall_MouseDown;

                panel_Page[i] = new PanelEx()
                {
                    Size            = new Size(pwidth, pheight),
                    Location        = new Point(10, 10),
                    BackColor       = Color.FromArgb(250, 250, 250),
                    BackgroundImage = report_Pages[i].pageImage
                };
                panel_Page[i].MouseDown += PageInstall_MouseDown;
                panel_Outer[i].Controls.Add(panel_Page[i]);
                page_Install.Controls.Add(panel_Outer[i]);
                page_Install.AutoSize = true;
            }
        }

        // 缩放菜单
        Preview_Menu = new ContextMenuStrip()
        {
            ShowImageMargin = false, Font = system_Font
        };
        for (int i = 0; i < 10; i++)
        {
            pm_Item[i] = new ToolStripMenuItem()
            {
                AutoSize = true,
                Text     = pm_text[i],
                Tag      = i
            };
            pm_Item[i].Click += PreView_Click;
            Preview_Menu.Items.Add(pm_Item[i]);
        }
        pm_Item[2].Text = "●  " + pm_text[2].Trim();

        // 底部信息栏
        panel_Info = new PanelEx()
        {
            Size      = new Size(obj.Width - 4, 25),
            Location  = new Point(2, obj.Height - 27),
            BackColor = Color.Transparent,
        };
        obj.Controls.Add(panel_Info);
        PanelEx panel_LineInfo = new PanelEx()
        {
            Dock                  = DockStyle.Top,
            Height                = 1,
            BackgroundImage       = EzRBuild.EzResource.line,
            BackgroundImageLayout = ImageLayout.Stretch
        };

        panel_Info.Controls.Add(panel_LineInfo);

        // 预览信息
        PictureBoxEx info_Icon = new PictureBoxEx()
        {
            Size      = new Size(20, 20),
            Location  = new Point(5, 2),
            Image     = EzRBuild.EzResource.prview,
            BackColor = Color.Transparent
        };

        panel_Info.Controls.Add(info_Icon);

        pg_Total = new RbControls_TextLabel();
        pg_Total.Text_Label(panel_Info, new Point(75, 5), system_Font, system_previewFontColor, Total_Page + " .");

        pg_Now = new RbControls_TextLabel();
        pg_Now.Text_Label(panel_Info, new Point(165, 5), system_Font, system_previewFontColor, Now_Page + " .");

        string _direct = page_TypeFace.Page_Type + "";

        if (page_TypeFace.Page_Type != -1)
        {
            _direct = page_types[page_TypeFace.Page_Type] + ", " + page_size[page_TypeFace.Page_Type] + " 毫米";
            if (page_TypeFace.Page_Direction == 0)
            {
                _direct += ",纵向,";
            }
            else
            {
                _direct += ",横向,";
            }
        }
        else
        {
            _direct = "自定义纸张";
        }

        new RbControls_TextLabel().Text_Label(panel_Info, new Point(280, 5), system_Font, system_previewFontColor, _direct);

        page_Info = new RbControls_TextLabel();
        page_Info.Text_Label(panel_Info, new Point(30, 5), system_Font, system_FontColor, "总页数:          当前页:                    纸张:");
    }
예제 #23
0
        ///////////////////////////////////////////////////////////////////////////
        // IStyleBuilderPage Implementation and StyleBuilderPage Overrides

        /// <include file='doc\LayoutStylePage.uex' path='docs/doc[@for="LayoutStylePage.CreateUI"]/*' />
        /// <devdoc>
        ///     Creates the UI elements within the page.
        /// </devdoc>
        protected override void CreateUI()
        {
            GroupBox clippingGroup        = new GroupBox();
            Label    flowControlLabel     = new GroupLabel();
            Label    visibilityLabel      = new Label();
            Label    displayLabel         = new Label();
            Label    floatLabel           = new Label();
            Label    clearLabel           = new Label();
            Label    contentLabel         = new GroupLabel();
            Label    overflowLabel        = new Label();
            Label    clipTopLabel         = new Label();
            Label    clipLeftLabel        = new Label();
            Label    clipBottomLabel      = new Label();
            Label    clipRightLabel       = new Label();
            Label    pageBreakLabel       = new GroupLabel();
            Label    pageBreakBeforeLabel = new Label();
            Label    pageBreakAfterLabel  = new Label();

            ImageList visibilityImages = new ImageList();

            visibilityImages.ImageSize = new Size(34, 34);
            ImageList displayImages = new ImageList();

            displayImages.ImageSize = new Size(34, 34);
            ImageList floatImages = new ImageList();

            floatImages.ImageSize = new Size(34, 34);
            ImageList clearImages = new ImageList();

            clearImages.ImageSize = new Size(34, 34);

            visibilityCombo      = new UnsettableComboBox();
            visibilityPicture    = new PictureBoxEx();
            displayCombo         = new UnsettableComboBox();
            displayPicture       = new PictureBoxEx();
            floatCombo           = new UnsettableComboBox();
            floatPicture         = new PictureBoxEx();
            clearCombo           = new UnsettableComboBox();
            clearPicture         = new PictureBoxEx();
            overflowCombo        = new UnsettableComboBox();
            clipTopUnit          = new UnitControl();
            clipLeftUnit         = new UnitControl();
            clipBottomUnit       = new UnitControl();
            clipRightUnit        = new UnitControl();
            pageBreakBeforeCombo = new UnsettableComboBox();
            pageBreakAfterCombo  = new UnsettableComboBox();

            flowControlLabel.Location = new Point(4, 4);
            flowControlLabel.Size     = new Size(400, 16);
            flowControlLabel.TabIndex = 0;
            flowControlLabel.TabStop  = false;
            flowControlLabel.Text     = SR.GetString(SR.LytSP_FlowControlLabel);

            visibilityImages.Images.AddStrip(new Bitmap(typeof(LayoutStylePage), "PropVisibility.bmp"));
            visibilityPicture.Location = new Point(8, 25);
            visibilityPicture.Size     = new Size(36, 36);
            visibilityPicture.TabIndex = 1;
            visibilityPicture.TabStop  = false;
            visibilityPicture.Images   = visibilityImages;

            visibilityLabel.Location = new Point(48, 24);
            visibilityLabel.Size     = new Size(132, 16);
            visibilityLabel.TabIndex = 2;
            visibilityLabel.TabStop  = false;
            visibilityLabel.Text     = SR.GetString(SR.LytSP_VisibilityLabel);

            visibilityCombo.Location      = new Point(48, 40);
            visibilityCombo.Size          = new Size(132, 21);
            visibilityCombo.TabIndex      = 3;
            visibilityCombo.DropDownStyle = ComboBoxStyle.DropDownList;
            visibilityCombo.Items.AddRange(new object[]
            {
                SR.GetString(SR.LytSP_VisibilityCombo_1),
                SR.GetString(SR.LytSP_VisibilityCombo_2)
            });
            visibilityCombo.SelectedIndexChanged += new EventHandler(this.OnSelChangedVisibility);

            floatImages.Images.AddStrip(new Bitmap(typeof(LayoutStylePage), "PropFloat.bmp"));
            floatPicture.Location = new Point(186, 25);
            floatPicture.Size     = new Size(36, 36);
            floatPicture.TabIndex = 4;
            floatPicture.TabStop  = false;
            floatPicture.Images   = floatImages;

            floatLabel.Location = new Point(226, 24);
            floatLabel.Size     = new Size(180, 16);
            floatLabel.TabIndex = 5;
            floatLabel.TabStop  = false;
            floatLabel.Text     = SR.GetString(SR.LytSP_FloatLabel);

            floatCombo.Location      = new Point(226, 40);
            floatCombo.Size          = new Size(174, 21);
            floatCombo.TabIndex      = 6;
            floatCombo.DropDownStyle = ComboBoxStyle.DropDownList;
            floatCombo.Items.AddRange(new object[]
            {
                SR.GetString(SR.LytSP_FloatCombo_1),
                SR.GetString(SR.LytSP_FloatCombo_2),
                SR.GetString(SR.LytSP_FloatCombo_3)
            });
            floatCombo.SelectedIndexChanged += new EventHandler(this.OnSelChangedFloat);

            displayImages.Images.AddStrip(new Bitmap(typeof(LayoutStylePage), "PropDisplay.bmp"));
            displayPicture.Location = new Point(8, 69);
            displayPicture.Size     = new Size(36, 36);
            displayPicture.TabIndex = 7;
            displayPicture.TabStop  = false;
            displayPicture.Images   = displayImages;

            displayLabel.Location = new Point(48, 68);
            displayLabel.Size     = new Size(132, 16);
            displayLabel.TabIndex = 8;
            displayLabel.TabStop  = false;
            displayLabel.Text     = SR.GetString(SR.LytSP_DisplayLabel);

            displayCombo.Location      = new Point(48, 84);
            displayCombo.Size          = new Size(132, 21);
            displayCombo.TabIndex      = 9;
            displayCombo.DropDownStyle = ComboBoxStyle.DropDownList;
            displayCombo.Items.AddRange(new object[]
            {
                SR.GetString(SR.LytSP_DisplayCombo_1),
                SR.GetString(SR.LytSP_DisplayCombo_2),
                SR.GetString(SR.LytSP_DisplayCombo_3)
            });
            displayCombo.SelectedIndexChanged += new EventHandler(this.OnSelChangedDisplay);

            clearImages.Images.AddStrip(new Bitmap(typeof(LayoutStylePage), "PropClear.bmp"));
            clearPicture.Location = new Point(186, 69);
            clearPicture.Size     = new Size(36, 36);
            clearPicture.TabIndex = 10;
            clearPicture.TabStop  = false;
            clearPicture.Images   = clearImages;

            clearLabel.Location = new Point(226, 68);
            clearLabel.Size     = new Size(180, 16);
            clearLabel.TabIndex = 11;
            clearLabel.TabStop  = false;
            clearLabel.Text     = SR.GetString(SR.LytSP_ClearLabel);

            clearCombo.Location      = new Point(226, 84);
            clearCombo.Size          = new Size(174, 21);
            clearCombo.TabIndex      = 12;
            clearCombo.DropDownStyle = ComboBoxStyle.DropDownList;
            clearCombo.Items.AddRange(new object[]
            {
                SR.GetString(SR.LytSP_ClearCombo_1),
                SR.GetString(SR.LytSP_ClearCombo_2),
                SR.GetString(SR.LytSP_ClearCombo_3),
                SR.GetString(SR.LytSP_ClearCombo_4)
            });
            clearCombo.SelectedIndexChanged += new EventHandler(this.OnSelChangedClear);

            contentLabel.Location = new Point(4, 114);
            contentLabel.Size     = new Size(400, 16);
            contentLabel.TabIndex = 13;
            contentLabel.TabStop  = false;
            contentLabel.Text     = SR.GetString(SR.LytSP_ContentLabel);

            overflowLabel.Location = new Point(8, 138);
            overflowLabel.Size     = new Size(108, 16);
            overflowLabel.TabIndex = 14;
            overflowLabel.TabStop  = false;
            overflowLabel.Text     = SR.GetString(SR.LytSP_OverflowLabel);

            overflowCombo.Location      = new Point(116, 134);
            overflowCombo.Size          = new Size(252, 21);
            overflowCombo.TabIndex      = 15;
            overflowCombo.DropDownStyle = ComboBoxStyle.DropDownList;
            overflowCombo.Items.AddRange(new object[]
            {
                SR.GetString(SR.LytSP_OverflowCombo_1),
                SR.GetString(SR.LytSP_OverflowCombo_2),
                SR.GetString(SR.LytSP_OverflowCombo_3),
                SR.GetString(SR.LytSP_OverflowCombo_4)
            });
            overflowCombo.SelectedIndexChanged += new EventHandler(this.OnSelChangedOverflow);

            clippingGroup.Location  = new Point(8, 162);
            clippingGroup.Size      = new Size(360, 72);
            clippingGroup.TabIndex  = 16;
            clippingGroup.TabStop   = false;
            clippingGroup.FlatStyle = FlatStyle.System;
            clippingGroup.Text      = SR.GetString(SR.LytSP_ClippingGroup);

            clipTopLabel.Location = new Point(12, 20);
            clipTopLabel.Size     = new Size(58, 16);
            clipTopLabel.TabIndex = 0;
            clipTopLabel.TabStop  = false;
            clipTopLabel.Text     = SR.GetString(SR.LytSP_ClipTopLabel);

            clipTopUnit.Location    = new Point(70, 16);
            clipTopUnit.Size        = new Size(88, 21);
            clipTopUnit.TabIndex    = 1;
            clipTopUnit.DefaultUnit = UnitControl.UNIT_PX;
            clipTopUnit.MinValue    = -32768;
            clipTopUnit.MaxValue    = 32767;
            clipTopUnit.Changed    += new EventHandler(this.OnChangedClip);

            clipLeftLabel.Location = new Point(12, 44);
            clipLeftLabel.Size     = new Size(58, 16);
            clipLeftLabel.TabIndex = 4;
            clipLeftLabel.TabStop  = false;
            clipLeftLabel.Text     = SR.GetString(SR.LytSP_ClipLeftLabel);

            clipLeftUnit.Location    = new Point(70, 40);
            clipLeftUnit.Size        = new Size(88, 21);
            clipLeftUnit.TabIndex    = 5;
            clipLeftUnit.DefaultUnit = UnitControl.UNIT_PX;
            clipLeftUnit.MinValue    = -32768;
            clipLeftUnit.MaxValue    = 32767;
            clipLeftUnit.Changed    += new EventHandler(this.OnChangedClip);

            clipBottomLabel.Location = new Point(182, 20);
            clipBottomLabel.Size     = new Size(62, 16);
            clipBottomLabel.TabIndex = 2;
            clipBottomLabel.TabStop  = false;
            clipBottomLabel.Text     = SR.GetString(SR.LytSP_ClipBottomLabel);

            clipBottomUnit.Location    = new Point(248, 16);
            clipBottomUnit.Size        = new Size(88, 21);
            clipBottomUnit.TabIndex    = 3;
            clipBottomUnit.DefaultUnit = UnitControl.UNIT_PX;
            clipBottomUnit.MinValue    = -32768;
            clipBottomUnit.MaxValue    = 32767;
            clipBottomUnit.Changed    += new EventHandler(this.OnChangedClip);

            clipRightLabel.Location = new Point(182, 44);
            clipRightLabel.Size     = new Size(62, 16);
            clipRightLabel.TabIndex = 6;
            clipRightLabel.TabStop  = false;
            clipRightLabel.Text     = SR.GetString(SR.LytSP_ClipRightLabel);

            clipRightUnit.Location    = new Point(248, 40);
            clipRightUnit.Size        = new Size(88, 21);
            clipRightUnit.TabIndex    = 7;
            clipRightUnit.DefaultUnit = UnitControl.UNIT_PX;
            clipRightUnit.MinValue    = -32768;
            clipRightUnit.MaxValue    = 32767;
            clipRightUnit.Changed    += new EventHandler(this.OnChangedClip);

            pageBreakLabel.Location = new Point(4, 244);
            pageBreakLabel.Size     = new Size(400, 16);
            pageBreakLabel.TabIndex = 17;
            pageBreakLabel.TabStop  = false;
            pageBreakLabel.Text     = SR.GetString(SR.LytSP_PageBreakGroup);

            pageBreakBeforeLabel.Location = new Point(8, 268);
            pageBreakBeforeLabel.Size     = new Size(82, 16);
            pageBreakBeforeLabel.TabIndex = 18;
            pageBreakBeforeLabel.TabStop  = false;
            pageBreakBeforeLabel.Text     = SR.GetString(SR.LytSP_PgBrBeforeLabel);

            pageBreakBeforeCombo.Location      = new Point(90, 264);
            pageBreakBeforeCombo.Size          = new Size(180, 21);
            pageBreakBeforeCombo.TabIndex      = 19;
            pageBreakBeforeCombo.DropDownStyle = ComboBoxStyle.DropDownList;
            pageBreakBeforeCombo.Items.AddRange(new object[]
            {
                SR.GetString(SR.LytSP_PgBrBeforeCombo_1),
                SR.GetString(SR.LytSP_PgBrBeforeCombo_2)
            });
            pageBreakBeforeCombo.SelectedIndexChanged += new EventHandler(this.OnSelChangedPageBreak);

            pageBreakAfterLabel.Location = new Point(8, 294);
            pageBreakAfterLabel.Size     = new Size(82, 16);
            pageBreakAfterLabel.TabIndex = 20;
            pageBreakAfterLabel.TabStop  = false;
            pageBreakAfterLabel.Text     = SR.GetString(SR.LytSP_PgBrAfterLabel);

            pageBreakAfterCombo.Location      = new Point(90, 290);
            pageBreakAfterCombo.Size          = new Size(180, 21);
            pageBreakAfterCombo.TabIndex      = 21;
            pageBreakAfterCombo.DropDownStyle = ComboBoxStyle.DropDownList;
            pageBreakAfterCombo.Items.AddRange(new object[]
            {
                SR.GetString(SR.LytSP_PgBrAfterCombo_1),
                SR.GetString(SR.LytSP_PgBrAfterCombo_2)
            });
            pageBreakAfterCombo.SelectedIndexChanged += new EventHandler(this.OnSelChangedPageBreak);

            this.Controls.Clear();
            this.Controls.AddRange(new Control[] {
                pageBreakLabel,
                pageBreakAfterLabel,
                pageBreakAfterCombo,
                pageBreakBeforeLabel,
                pageBreakBeforeCombo,
                clippingGroup,
                overflowLabel,
                overflowCombo,
                contentLabel,
                clearPicture,
                clearLabel,
                clearCombo,
                displayPicture,
                displayLabel,
                displayCombo,
                floatPicture,
                floatLabel,
                floatCombo,
                visibilityPicture,
                visibilityLabel,
                visibilityCombo,
                flowControlLabel
            });

            clippingGroup.Controls.Clear();
            clippingGroup.Controls.AddRange(new Control[] {
                clipRightLabel,
                clipRightUnit,
                clipBottomLabel,
                clipBottomUnit,
                clipLeftLabel,
                clipLeftUnit,
                clipTopLabel,
                clipTopUnit
            });
        }
예제 #24
0
        ///////////////////////////////////////////////////////////////////////////
        // StyleBuilderPage Overrides

        /// <include file='doc\OtherStylePage.uex' path='docs/doc[@for="OtherStylePage.CreateUI"]/*' />
        /// <devdoc>
        ///     Creates the UI elements within the page.
        /// </devdoc>
        protected override void CreateUI()
        {
            Label     effectsLabel  = new GroupLabel();
            Label     filterLabel   = new Label();
            Label     uiLabel       = new GroupLabel();
            Label     cursorLabel   = new Label();
            Label     behaviorLabel = new GroupLabel();
            Label     urlLabel      = new Label();
            Label     tablesLabel   = new GroupLabel();
            Label     bordersLabel  = new Label();
            Label     layoutLabel   = new Label();
            ImageList cursorImages  = new ImageList();

            cursorImages.ImageSize = new Size(34, 34);
            ImageList bordersImages = new ImageList();

            bordersImages.ImageSize = new Size(34, 34);

            filterEdit      = new TextBox();
            cursorPicture   = new PictureBoxEx();
            cursorCombo     = new UnsettableComboBox();
            behaviorEdit    = new TextBox();
            urlPickerButton = new Button();
            bordersPicture  = new PictureBoxEx();
            bordersCombo    = new UnsettableComboBox();
            layoutCombo     = new UnsettableComboBox();

            uiLabel.Location = new Point(4, 4);
            uiLabel.Size     = new Size(400, 16);
            uiLabel.TabIndex = 0;
            uiLabel.TabStop  = false;
            uiLabel.Text     = SR.GetString(SR.OtherSP_UILabel);

            cursorImages.Images.AddStrip(new Bitmap(typeof(OtherStylePage), "PropCursor.bmp"));
            cursorPicture.Location = new Point(8, 25);
            cursorPicture.Size     = new Size(36, 36);
            cursorPicture.TabIndex = 1;
            cursorPicture.TabStop  = false;
            cursorPicture.Images   = cursorImages;

            cursorLabel.Location = new Point(48, 24);
            cursorLabel.Size     = new Size(160, 16);
            cursorLabel.TabIndex = 2;
            cursorLabel.TabStop  = false;
            cursorLabel.Text     = SR.GetString(SR.OtherSP_CursorLabel);

            cursorCombo.Location      = new Point(48, 40);
            cursorCombo.Size          = new Size(224, 21);
            cursorCombo.TabIndex      = 3;
            cursorCombo.DropDownStyle = ComboBoxStyle.DropDownList;
            cursorCombo.Items.AddRange(new object[]
            {
                SR.GetString(SR.OtherSP_CursorCombo_1),
                SR.GetString(SR.OtherSP_CursorCombo_2),
                SR.GetString(SR.OtherSP_CursorCombo_3),
                SR.GetString(SR.OtherSP_CursorCombo_4),
                SR.GetString(SR.OtherSP_CursorCombo_5),
                SR.GetString(SR.OtherSP_CursorCombo_6),
                SR.GetString(SR.OtherSP_CursorCombo_7),
                SR.GetString(SR.OtherSP_CursorCombo_8),
                SR.GetString(SR.OtherSP_CursorCombo_9),
                SR.GetString(SR.OtherSP_CursorCombo_10),
                SR.GetString(SR.OtherSP_CursorCombo_11),
                SR.GetString(SR.OtherSP_CursorCombo_12),
                SR.GetString(SR.OtherSP_CursorCombo_13),
                SR.GetString(SR.OtherSP_CursorCombo_14),
                SR.GetString(SR.OtherSP_CursorCombo_15),
                SR.GetString(SR.OtherSP_CursorCombo_16)
            });
            cursorCombo.SelectedIndexChanged += new EventHandler(this.OnSelChangedCursor);

            tablesLabel.Location = new Point(4, 74);
            tablesLabel.Size     = new Size(400, 16);
            tablesLabel.TabIndex = 4;
            tablesLabel.TabStop  = false;
            tablesLabel.Text     = SR.GetString(SR.OtherSP_TablesLabel);

            bordersImages.Images.AddStrip(new Bitmap(typeof(OtherStylePage), "PropTableBorders.bmp"));
            bordersPicture.Location = new Point(8, 95);
            bordersPicture.Size     = new Size(36, 36);
            bordersPicture.TabIndex = 5;
            bordersPicture.TabStop  = false;
            bordersPicture.Images   = bordersImages;

            bordersLabel.Location = new Point(48, 94);
            bordersLabel.Size     = new Size(160, 16);
            bordersLabel.TabIndex = 6;
            bordersLabel.TabStop  = false;
            bordersLabel.Text     = SR.GetString(SR.OtherSP_BordersLabel);

            bordersCombo.Location      = new Point(48, 110);
            bordersCombo.Size          = new Size(174, 21);
            bordersCombo.TabIndex      = 7;
            bordersCombo.DropDownStyle = ComboBoxStyle.DropDownList;
            bordersCombo.Items.AddRange(new object[]
            {
                SR.GetString(SR.OtherSP_BordersCombo_1),
                SR.GetString(SR.OtherSP_BordersCombo_2)
            });
            bordersCombo.SelectedIndexChanged += new EventHandler(this.OnSelChangedBorders);

            layoutLabel.Location = new Point(234, 94);
            layoutLabel.Size     = new Size(160, 16);
            layoutLabel.TabIndex = 8;
            layoutLabel.TabStop  = false;
            layoutLabel.Text     = SR.GetString(SR.OtherSP_LayoutLabel);

            layoutCombo.Location      = new Point(234, 110);
            layoutCombo.Size          = new Size(164, 21);
            layoutCombo.TabIndex      = 9;
            layoutCombo.DropDownStyle = ComboBoxStyle.DropDownList;
            layoutCombo.Items.AddRange(new object[]
            {
                SR.GetString(SR.OtherSP_LayoutCombo_1),
                SR.GetString(SR.OtherSP_LayoutCombo_2)
            });
            layoutCombo.SelectedIndexChanged += new EventHandler(this.OnSelChangedLayout);

            effectsLabel.Location = new Point(4, 144);
            effectsLabel.Size     = new Size(400, 16);
            effectsLabel.TabIndex = 10;
            effectsLabel.TabStop  = false;
            effectsLabel.Text     = SR.GetString(SR.OtherSP_VisEffectsLabel);

            filterLabel.Location = new Point(8, 168);
            filterLabel.Size     = new Size(76, 16);
            filterLabel.TabIndex = 11;
            filterLabel.TabStop  = false;
            filterLabel.Text     = SR.GetString(SR.OtherSP_FilterLabel);

            filterEdit.Location     = new Point(88, 164);
            filterEdit.Size         = new Size(306, 20);
            filterEdit.TabIndex     = 12;
            filterEdit.Text         = "";
            filterEdit.TextChanged += new EventHandler(this.OnChangedFilter);

            behaviorLabel.Location = new Point(4, 196);
            behaviorLabel.Size     = new Size(400, 16);
            behaviorLabel.TabIndex = 13;
            behaviorLabel.TabStop  = false;
            behaviorLabel.Text     = SR.GetString(SR.OtherSP_BehaviorLabel);

            urlLabel.Location = new Point(8, 218);
            urlLabel.Size     = new Size(76, 16);
            urlLabel.TabIndex = 14;
            urlLabel.TabStop  = false;
            urlLabel.Text     = SR.GetString(SR.OtherSP_URLLabel);

            behaviorEdit.Location     = new Point(88, 214);
            behaviorEdit.Size         = new Size(278, 20);
            behaviorEdit.TabIndex     = 15;
            behaviorEdit.Text         = "";
            behaviorEdit.TextChanged += new EventHandler(this.OnChangedBehavior);

            urlPickerButton.Location  = new Point(370, 213);
            urlPickerButton.Size      = new Size(24, 22);
            urlPickerButton.TabIndex  = 16;
            urlPickerButton.Text      = "...";
            urlPickerButton.FlatStyle = FlatStyle.System;
            urlPickerButton.Click    += new EventHandler(this.OnClickedBehaviorUrlPicker);

            this.Controls.Clear();
            this.Controls.AddRange(new Control[] {
                behaviorLabel,
                urlLabel,
                behaviorEdit,
                urlPickerButton,
                effectsLabel,
                filterLabel,
                filterEdit,
                tablesLabel,
                layoutLabel,
                layoutCombo,
                bordersPicture,
                bordersLabel,
                bordersCombo,
                uiLabel,
                cursorPicture,
                cursorLabel,
                cursorCombo
            });
        }
    /// 点击工具栏图标
    private static void toolControl_Click(object sender, EventArgs e)
    {
        PictureBoxEx pL = (PictureBoxEx)sender;

        switch (pL.Tag)
        {
        case "FILE_NWE":
            RBuild_File.New_File();
            break;

        case "FILE_OPEN":
            RBuild_File.Open_File();
            break;

        case "FILE_SAVE":
            RBuild_File.Save_File();
            break;

        case "FILE_SETPAGE":
            DialogUse_HotKey = true;
            new RBuild_SetPageType().Set_Type();
            break;

        case "FILE_SETDATABASE":
            DialogUse_HotKey = true;
            new RBuild_SetDataBase().Set_Data();
            break;

        case "SYSTEM_CLOSE":
            RBuild_Design.designForm_Close(null, null);
            break;

        case "EDIT_CUT":
            Object_OperationCopy();
            Delete_Control(true);
            break;

        case "EDIT_COPY":
            Object_OperationCopy();
            break;

        case "EDIT_PAST":
            Object_OperationPast(0, 21);
            break;

        case "EDIT_DELETE":
            Delete_Control(true);
            break;

        case "EDIT_CANCEL":
            Object_Operation(0);
            break;

        case "EDIT_REDO":
            Object_Operation(1);
            break;

        case "EDIT_DELALL":
            Object_Record();
            for (int i = 0; i < DraggableObjects.Count; i++)
            {
                Delete_Control(false);
            }
            break;

        case "EDIT_PREVIEW":
            new RBuild_Preview().View();
            break;

        case "EDIT_PRINT":
            break;

        case "DESIGN_PONINTER":
            RBuild_Design.design_Form._formObject.Cursor = Cursors.Default;
            control_Type = -1;
            break;

        case "DESIGN_SHOWLINE":
            Show_Line = !Show_Line;
            page_Install.Invalidate();
            page_Container.Invalidate();
            Print_PageType.Invalidate();
            break;

        case "DESIGN_BAND":
            DialogUse_HotKey = true;
            new RBuild_SetBandRect().Set_Band(0);
            break;

        case "DESIGN_TEXTBOX":
            pL.Cursor    = custom_MouseCursor(control_icon[0], 5, 5);
            control_Type = 1;
            break;

        case "DESIGN_IMGBOX":
            pL.Cursor    = custom_MouseCursor(control_icon[1], 5, 5);
            control_Type = 2;
            break;

        case "DESIGN_SHAPEBOX":
            pL.Cursor    = custom_MouseCursor(control_icon[2], 5, 5);
            control_Type = 3;
            break;

        case "DESIGN_DATAFIELD":
            pL.Cursor    = custom_MouseCursor(control_icon[3], 5, 5);
            control_Type = 4;
            break;

        case "DESIGN_PAGECODE":
            pL.Cursor    = custom_MouseCursor(control_icon[4], 5, 5);
            control_Type = 5;
            break;

        case "DESIGN_FUNCTION":
            pL.Cursor    = custom_MouseCursor(control_icon[5], 5, 5);
            control_Type = 6;
            break;

        case "DESIGN_SETCOLOR":
            DialogUse_HotKey = true;
            new RBuild_SetColor().Set_Colors();
            break;

        case "DESIGN_TOPMOSE":
            ListSwap_Top();
            break;

        case "DESIGN_BOTMOST":
            ListSwap_Bottom();
            break;

        case "DESIGN_SETLEFT":
            Set_BoxPoint(0);
            break;

        case "DESIGN_SETRIGHT":
            Set_BoxPoint(1);
            break;

        case "DESIGN_SETTOP":
            Set_BoxPoint(2);
            break;

        case "DESIGN_SETBOT":
            Set_BoxPoint(3);
            break;

        case "DESIGN_ALEFT":
            Set_FillAlign(0);
            break;

        case "DESIGN_ACENTER":
            Set_FillAlign(1);
            break;

        case "DESIGN_ARIGHT":
            Set_FillAlign(2);
            break;

        case "DESIGN_ATOP":
            Set_FillAlign(3);
            break;

        case "DESIGN_ABOTTOM":
            Set_FillAlign(4);
            break;

        case "DESIGN_LINEBOT":
            Set_LineBorder(0);
            break;

        case "DESIGN_LINETOP":
            Set_LineBorder(1);
            break;

        case "DESIGN_LINELEFT":
            Set_LineBorder(2);
            break;

        case "DESIGN_LINERIGHT":
            Set_LineBorder(3);
            break;

        case "DESIGN_LINENO":
            Set_LineBorder(4);
            break;

        case "DESIGN_LINEEXTER":
            Set_LineBorder(5);
            break;

        case "DESIGN_LINEBIASDOWN":
            Set_LineBorder(6);
            break;

        case "DESIGN_LINE_BIASUP":
            Set_LineBorder(7);
            break;

        case "DESIGN_LINETHICK":
            DialogUse_HotKey = true;
            new RBuild_SetLineThick().Set_Thick();
            break;

        default:
            break;
        }
    }
예제 #26
0
        //-----------------------------------------------------------------------------------------------------
        private void pic_Click(object sender, EventArgs e)
        {
            PictureBoxEx pic = sender as PictureBoxEx;

            ShowStatus("当前选择:{0}", Path.GetFileName(pic.Tag.ToString()));
        }