Exemplo n.º 1
0
        public JDateTimePicture()
        {
            this.Size        = new Size(161, 23);
            this.MinimumSize = new Size(161, 23);

            //添加TextBox
            jmtb        = new JMTextBox();
            jmtb.Name   = "jmTextBox1";
            jmtb.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                                                                | System.Windows.Forms.AnchorStyles.Right)));
            jmtb.BorderStyle   = BorderStyle.None;
            jmtb.Location      = new Point(8, 5);
            jmtb.Multiline     = false;
            jmtb.ZEmptyTextTip = "";
            jmtb.Text          = "";
            jmtb.Width         = 133;
            jmtb.Enter        += new EventHandler(jmtb_Enter);
            jmtb.Leave        += new EventHandler(jmtb_Leave);
            jmtb.ReadOnly      = true;
            this.Controls.Add(jmtb);

            frm = new FrmDropDownDate();
            frm.DateSelected += new DateRangeEventHandler(frm_DateSelected);
            _borderColor      = Color.FromArgb(170, 170, 170);
            _formatString     = "yyyy-MM-dd";
            _mouse            = false;
        }
Exemplo n.º 2
0
        public JMRundRandTextBox()
        {
            jmtb        = new JMTextBox();
            jmtb.Name   = "jmTextBox1";
            jmtb.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)));
            jmtb.BorderStyle  = BorderStyle.None;
            jmtb.Location     = new Point(XZhou, YZhou);
            jmtb.ZBorderColor = Color.White;
            jmtb.KeyPress    += new KeyPressEventHandler(jmtb_KeyPress);
            jmtb.SizeChanged += new EventHandler(jmtb_SizeChanged);
            this.Controls.Add(jmtb);

            jmtb.Width = this.Width - 16;

            this.Size        = new Size(110, 23);
            this.MinimumSize = new Size(110, 23);
            this.BackColor   = Color.Transparent;
            _ZRadian         = 23;
            _borderColor     = Color.FromArgb(170, 170, 170);
        }
Exemplo n.º 3
0
        public JMComboBoxAdd()
        {
            this.InitializeComponent();
            _acolor = Color.FromArgb(19, 88, 128);
            zExSize = new Size(200, 300);

            this.pnlBack             = new Panel();
            this.pnlBack.BorderStyle = BorderStyle.None;
            this.pnlBack.BackColor   = Color.White;
            this.pnlBack.AutoScroll  = false;
            this.pnlBack.Dock        = DockStyle.Fill;

            this.tbSelectedValue                  = new JMTextBox();
            this.tbSelectedValue.BorderStyle      = BorderStyle.FixedSingle;
            this.tbSelectedValue.ZEmptyTextTip    = "";
            this.tbSelectedValue.ReadOnlyChanged += new EventHandler(tbSelectedValue_ReadOnlyChanged);


            this.btnSelect           = new ButtonEx(_acolor, ZBorderColor);
            this.btnSelect.Click    += new EventHandler(ToggleTreeView);
            this.btnSelect.FlatStyle = FlatStyle.Flat;

            this.lblSizingGrip            = new LabelEx();
            this.lblSizingGrip.Size       = new Size(9, 9);
            this.lblSizingGrip.BackColor  = Color.Transparent;
            this.lblSizingGrip.Cursor     = Cursors.SizeNWSE;
            this.lblSizingGrip.MouseMove += new MouseEventHandler(SizingGripMouseMove);
            this.lblSizingGrip.MouseDown += new MouseEventHandler(SizingGripMouseDown);

            this.tvTreeView                       = new ListBox();
            this.tvTreeView.BorderStyle           = BorderStyle.None;
            this.tvTreeView.SelectedIndexChanged += new EventHandler(tvTreeView_SelectedIndexChanged);
            this.tvTreeView.MouseDoubleClick     += new MouseEventHandler(TreeViewNodeSelect);
            this.tvTreeView.Location              = new Point(0, 0);
            //this.tvTreeView.Scrollable = false;

            this.frmTreeView = new Form();
            this.frmTreeView.FormBorderStyle = FormBorderStyle.None;
            this.frmTreeView.BringToFront();
            this.frmTreeView.StartPosition = FormStartPosition.Manual;
            this.frmTreeView.ShowInTaskbar = false;
            this.frmTreeView.BackColor     = SystemColors.Control;
            this.frmTreeView.Size          = new Size(200, 300);
            this.frmTreeView.Deactivate   += new EventHandler(frmTreeView_Deactivate);

            this.pnlTree             = new Panel();
            this.pnlTree.BorderStyle = BorderStyle.FixedSingle;
            this.pnlTree.BackColor   = Color.White;
            this.pnlTree.Dock        = DockStyle.Fill;
            this.pnlTree.Size        = new Size(200, 300);

            this.picbtn          = new Label();
            this.picbtn.Cursor   = Cursors.Hand;
            this.picbtn.Size     = new Size(30, 12);
            this.picbtn.AutoSize = false;
            this.picbtn.Location = new Point(120, 275);
            this.picbtn.Anchor   = ((System.Windows.Forms.AnchorStyles)(System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right));
            this.picbtn.Font     = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Underline, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            this.picbtn.Text     = "添加";
            this.picbtn.Click   += new EventHandler(picbtn_Click);

            this.picsel          = new Label();
            this.picsel.Cursor   = Cursors.Hand;
            this.picsel.Size     = new Size(30, 12);
            this.picsel.AutoSize = false;
            this.picsel.Location = new Point(155, 275);
            this.picsel.Anchor   = ((System.Windows.Forms.AnchorStyles)(System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right));
            this.picsel.Font     = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Underline, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            this.picsel.Text     = "查找";
            this.picsel.Click   += new EventHandler(picsel_Click);

            this.jmtxt        = new JMTextBox();
            this.jmtxt.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
                                                                      | System.Windows.Forms.AnchorStyles.Right)));
            this.jmtxt.Size          = new Size(110, 21);
            this.jmtxt.Location      = new Point(5, 270);
            this.jmtxt.ZEmptyTextTip = "-录入值-";

            SetStyle(ControlStyles.DoubleBuffer, true);
            SetStyle(ControlStyles.ResizeRedraw, true);

            // Adding Controls to UserControl
            this.pnlTree.Controls.Add(this.lblSizingGrip);
            this.pnlTree.Controls.Add(this.tvTreeView);
            this.pnlTree.Controls.Add(this.jmtxt);
            this.pnlTree.Controls.Add(this.picbtn);
            this.pnlTree.Controls.Add(this.picsel);
            this.frmTreeView.Controls.Add(this.pnlTree);
            this.pnlBack.Controls.AddRange(new Control[] { btnSelect, tbSelectedValue });
            this.Controls.Add(this.pnlBack);
        }
Exemplo n.º 4
0
        public JMComboBoxButton()
        {
            _JMImageSize     = new Size(20, 20);
            _MaxLen          = 30;
            _JMText          = "";
            _JMTextColor     = Color.Black;
            this.BackColor   = Color.Transparent;
            this.Cursor      = Cursors.Hand;
            this.MinimumSize = new Size(116, 33);
            this.MouseEnter += new EventHandler(JMImageButton_MouseEnter);
            this.MouseLeave += new EventHandler(JMImageButton_MouseLeave);

            jmlb             = new Label();
            jmlb.Name        = "label1";
            jmlb.AutoSize    = true;
            jmlb.BackColor   = Color.Transparent;
            jmlb.Text        = "";
            jmlb.Font        = this.Font;
            jmlb.ForeColor   = _JMTextColor;
            jmlb.Cursor      = Cursors.Hand;
            jmlb.Click      += new EventHandler(jmlb_Click);
            jmlb.MouseEnter += new EventHandler(JMImageButton_MouseEnter);
            jmlb.MouseLeave += new EventHandler(JMImageButton_MouseLeave);
            this.Controls.Add(jmlb);

            jmtb               = new JMTextBox();
            jmtb.Name          = "textbox1";
            jmtb.BackColor     = Color.White;
            jmtb.ZBorderColor  = Color.White;
            jmtb.ZEmptyTextTip = "";
            jmtb.MaxLen        = _MaxLen;
            jmtb.Text          = "";
            jmtb.Cursor        = Cursors.Hand;
            jmtb.Visible       = false;
            jmtb.MouseEnter   += new EventHandler(JMImageButton_MouseEnter);
            this.Controls.Add(jmtb);
            jmtb.Size = new Size(50, 21);

            jmpb             = new PictureBox();
            jmpb.Name        = "picturebox1";
            jmpb.Cursor      = Cursors.Hand;
            jmpb.Image       = _JMUpdateImage;
            jmpb.Size        = _JMImageSize;
            jmpb.SizeMode    = PictureBoxSizeMode.StretchImage;
            jmpb.BackColor   = Color.Transparent;
            jmpb.Click      += new EventHandler(jmpb_Click);
            jmpb.MouseEnter += new EventHandler(JMImageButton_MouseEnter);
            this.Controls.Add(jmpb);

            jmpb1             = new PictureBox();
            jmpb1.Name        = "picturebox2";
            jmpb1.Cursor      = Cursors.Hand;
            jmpb1.Image       = _JMUpdateImage;
            jmpb1.Size        = _JMImageSize;
            jmpb1.SizeMode    = PictureBoxSizeMode.StretchImage;
            jmpb1.BackColor   = Color.Transparent;
            jmpb1.Click      += new EventHandler(jmpb_Click);
            jmpb1.MouseEnter += new EventHandler(JMImageButton_MouseEnter);
            this.Controls.Add(jmpb1);

            this.Size = new Size(116, 33);

            jmlb.Location  = new Point(8, (this.Height - jmlb.Height) / 2);
            jmtb.Location  = new Point(8, (this.Height - jmtb.Height) / 2);
            jmpb.Location  = new Point(jmtb.Location.X + jmtb.Width + 6, (this.Height - jmpb.Height) / 2);
            jmpb1.Location = new Point(jmpb.Location.X + jmpb.Width + 6, (this.Height - jmpb1.Height) / 2);
        }
Exemplo n.º 5
0
        private void Init()
        {
            this.lab_Name = new System.Windows.Forms.Label();
            this.lab_JE   = new System.Windows.Forms.Label();
            this.txt_Name = new JMTextBox();
            this.txt_JE   = new JMTextBox();
            this.lab_Cha  = new System.Windows.Forms.Label();
            this.btn_Save = new System.Windows.Forms.Button();

            //
            // lab_Name
            //
            this.lab_Name.AutoSize = true;
            this.lab_Name.Font     = new System.Drawing.Font("宋体", 9F);
            this.lab_Name.Location = new System.Drawing.Point(92, 13);
            this.lab_Name.Name     = "lab_JE";
            this.lab_Name.Size     = new System.Drawing.Size(60, 11);
            this.lab_Name.TabIndex = 1;
            this.lab_Name.Text     = "修改名称:";
            //
            // lab_JE
            //
            this.lab_JE.AutoSize = true;
            this.lab_JE.Font     = new System.Drawing.Font("宋体", 9F);
            this.lab_JE.Location = new System.Drawing.Point(169, 13);
            this.lab_JE.Name     = "lab_JE";
            this.lab_JE.Size     = new System.Drawing.Size(60, 11);
            this.lab_JE.TabIndex = 1;
            this.lab_JE.Text     = "录入金额:";
            //
            // txt_Name
            //
            this.txt_Name.BorderStyle  = System.Windows.Forms.BorderStyle.FixedSingle;
            this.txt_Name.Location     = new System.Drawing.Point(92, 31);
            this.txt_Name.Font         = new System.Drawing.Font("宋体", 9F);
            this.txt_Name.Name         = "txt_Name";
            this.txt_Name.Size         = new System.Drawing.Size(69, 21);
            this.txt_Name.TabIndex     = 2;
            this.txt_Name.ZBorderColor = Color.FromArgb(198, 198, 198);
            //this.txt_Name.MaxLength = 5;

            //
            // txt_JE
            //
            this.txt_JE.BorderStyle  = System.Windows.Forms.BorderStyle.FixedSingle;
            this.txt_JE.Font         = new System.Drawing.Font("宋体", 9F);
            this.txt_JE.Location     = new System.Drawing.Point(165, 31);
            this.txt_JE.Name         = "txt_JE";
            this.txt_JE.Size         = new System.Drawing.Size(69, 21);
            this.txt_JE.TabIndex     = 3;
            this.txt_JE.ZDtype       = JMDataType.JMDECIMAL;
            this.txt_JE.ZBorderColor = Color.FromArgb(198, 198, 198);
            this.txt_JE.ZMedian      = 2;
            this.txt_JE.MaxLen       = 14;
            this.txt_JE.MaxLength    = 14;
            this.txt_JE.ZNegative    = true;

            ///
            ///lab_Cha
            ///
            this.lab_Cha.AutoSize  = false;
            this.lab_Cha.Font      = new System.Drawing.Font("宋体", 9F, FontStyle.Underline);
            this.lab_Cha.Cursor    = Cursors.Hand;
            this.lab_Cha.Location  = new System.Drawing.Point(92, 62);
            this.lab_Cha.ForeColor = Color.FromArgb(0, 63, 133);
            this.lab_Cha.Name      = "lab_Cha";
            this.lab_Cha.TabIndex  = 4;
            this.lab_Cha.Text      = "查流水";
            this.lab_Cha.Click    += new EventHandler(lab_Cha_Click);

            //
            // btn_Save
            //
            this.btn_Save.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));
            this.btn_Save.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
            this.btn_Save.Font      = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold);
            this.btn_Save.ForeColor = System.Drawing.Color.White;
            this.btn_Save.Location  = new System.Drawing.Point(186, 56);
            this.btn_Save.Name      = "btn_Save";
            this.btn_Save.Size      = new System.Drawing.Size(48, 24);
            this.btn_Save.TabIndex  = 5;
            this.btn_Save.Text      = "保存";
            this.btn_Save.UseVisualStyleBackColor = false;
            this.btn_Save.Click += new EventHandler(btn_Save_Click);

            this.Controls.Add(this.btn_Save);
            this.Controls.Add(this.lab_Cha);
            this.Controls.Add(this.txt_JE);
            this.Controls.Add(this.txt_Name);
            this.Controls.Add(this.lab_JE);
            this.Controls.Add(this.lab_Name);
        }