Ejemplo n.º 1
0
        private void btnPriceKit_Click(object sender, EventArgs e)
        {
            _frmPriceKit              = new CalculatePriceKitPage();
            _frmPriceKit.EvtMoveItem += Receiver;

            #region 使打开的窗口依附在原窗口的边上

            //var x = (SystemInformation.WorkingArea.Width - _frmPriceKit.Size.Width) / 2 + _frmPriceKit.Size.Width;
            //var y = (SystemInformation.WorkingArea.Height - _frmPriceKit.Size.Height) / 2;
            var x = 100;
            var y = 100;
            _frmPriceKit.StartPosition = FormStartPosition.Manual; //窗体的位置由Location属性决定
            _frmPriceKit.Location      = (Point) new Size(x, y);

            #endregion

            _frmPriceKit.Show();
            //btnPriceKit.Enabled = false;
        }
Ejemplo n.º 2
0
        private void btnPriceKit_Click(object sender, EventArgs e)
        {
            _frmPriceKit = new CalculatePriceKitPage();

            #region Setting the start position of the new window

            //var x = (SystemInformation.WorkingArea.Width - _frmPriceKit.Size.Width) / 3 + _frmPriceKit.Size.Width;
            //var y = (SystemInformation.WorkingArea.Height - _frmPriceKit.Size.Height) / 3;
            var x = 100;
            var y = 100;
            _frmPriceKit.StartPosition = FormStartPosition.Manual; //窗体的位置由Location属性决定
            _frmPriceKit.Location      = (Point) new Size(x, y);   //窗体的起始位置为(x,y)

            #endregion

            EvtOpenPriceKit += _frmPriceKit.Receiver;
            EvtOpenPriceKit("Outer");
            _frmPriceKit.Show();
        }