예제 #1
0
        private void gvwView_DoubleClick(object sender, EventArgs e)
        {
            BandedGridView view = (BandedGridView)sender;

            if (view != null)
            {
                Point             pt   = view.GridControl.PointToClient(Control.MousePosition);
                BandedGridHitInfo info = view.CalcHitInfo(pt);
                DevExpress.XtraGrid.Views.BandedGrid.BandedGridView sndr = sender as DevExpress.XtraGrid.Views.BandedGrid.BandedGridView;
                DevExpress.Utils.DXMouseEventArgs dxMouseEventArgs       = e as DevExpress.Utils.DXMouseEventArgs;
                DevExpress.XtraGrid.Views.BandedGrid.ViewInfo.BandedGridHitInfo hitInfo = sndr.CalcHitInfo(dxMouseEventArgs.Location);
                if (hitInfo.RowHandle < 0)
                {
                    if (hitInfo.Band.Caption.Equals("Chart"))
                    {
                        this.Close();
                        Form fc = Application.OpenForms["FRM_SMT_OS_TOPO_WEEKLY_CHART"];
                        if (fc != null)
                        {
                            fc.Show();
                        }
                        else
                        {
                            FRM_SMT_OS_TOPO_WEEKLY_CHART f = new FRM_SMT_OS_TOPO_WEEKLY_CHART();
                            f.Show();
                        }
                    }
                }
            }
        }
예제 #2
0
        void DWMYClick(string ButtonCap, string ButtonCD)
        {
            //MessageBox.Show(ButtonCap + "    " + ButtonCD);
            switch (ButtonCD)
            {
            case "C":
                this.Close();
                Form fcc = Application.OpenForms["FRM_SMT_OS_TOPO_WEEKLY"];
                if (fcc != null)
                {
                    fcc.Show();
                }
                else
                {
                    FRM_SMT_OS_TOPO_WEEKLY f = new FRM_SMT_OS_TOPO_WEEKLY();
                    f.Show();
                }
                break;

            case "D":
                this.Close();
                Form fc = Application.OpenForms["FRM_SMT_OS_TOPO_DAILY"];
                if (fc != null)
                {
                    fc.Show();
                }
                else
                {
                    FRM_SMT_OS_TOPO_DAILY f = new FRM_SMT_OS_TOPO_DAILY();
                    f.Show();
                }
                break;

            case "W":
                this.Close();
                Form fc1 = Application.OpenForms["FRM_SMT_OS_TOPO_WEEKLY_CHART"];
                if (fc1 != null)
                {
                    fc1.Show();
                }
                else
                {
                    FRM_SMT_OS_TOPO_WEEKLY_CHART f1 = new FRM_SMT_OS_TOPO_WEEKLY_CHART();
                    f1.Show();
                }
                break;

            case "M":
                this.Close();
                Form fc2 = Application.OpenForms["FRM_SMT_OS_PROD_MONTH"];
                if (fc2 != null)
                {
                    fc2.Show();
                }
                else
                {
                    FRM_SMT_OS_PROD_MONTH f2 = new FRM_SMT_OS_PROD_MONTH();
                    f2.Show();
                }
                break;

            case "Y":
                this.Close();
                Form fc3 = Application.OpenForms["FRM_SMT_OS_PROD_YEAR"];
                if (fc3 != null)
                {
                    fc3.Show();
                }
                else
                {
                    FRM_SMT_OS_PROD_YEAR f3 = new FRM_SMT_OS_PROD_YEAR();
                    f3.Show();
                }
                break;
            }
        }