Inheritance: System.Windows.Forms.UserControl
Beispiel #1
0
        private void lvwPrint_Click(object sender, EventArgs e)
        {
            if (tsbExit.Visible)
            {
                gbxMiddle.Controls[1].Dispose();
                tsbExit.Visible = false;
            }

            if (tsbExitPrint.Visible)
            {
                gbxMiddle.Controls[1].Dispose();
            }

            tsbExitPrint.Visible       = true;
            tsbErrorListSelect.Visible = false;
            txtErrorListSelect.Visible = false;


            gbxUp.Visible   = false;
            gbxDown.Visible = false;

            dgvInfo.Visible = false;

            string tblName = lvwPrint.SelectedItems[0].ImageKey;

            switch (tblName)
            {
            case "Service":
                ucPrint ucService = new ucPrint(this._dstPrint.Tables[
                                                    lvwPrint.SelectedItems[0].Name], tblName);
                gbxMiddle.Controls.Add(ucService);
                ucService.Dock = DockStyle.Fill;
                break;

            case "Lift":
                ucPrint ucLift = new ucPrint(this._dstPrint.Tables[
                                                 lvwPrint.SelectedItems[0].Name], tblName);
                gbxMiddle.Controls.Add(ucLift);
                ucLift.Dock = DockStyle.Fill;
                break;

            default:
                break;
            }
        }
Beispiel #2
0
        private void lvwPrint_Click(object sender, EventArgs e)
        {
            if (tsbExit.Visible)
            {
                gbxMiddle.Controls[1].Dispose();
                tsbExit.Visible = false;
            }

            if (tsbExitPrint.Visible)
            {
                gbxMiddle.Controls[1].Dispose();
            }

            tsbExitPrint.Visible = true;
            tsbErrorListSelect.Visible = false;
            txtErrorListSelect.Visible = false;


            gbxUp.Visible = false;
            gbxDown.Visible = false;

            dgvInfo.Visible = false;

            string tblName = lvwPrint.SelectedItems[0].ImageKey;

            switch (tblName)
            {
                case "Service":
                    ucPrint ucService = new ucPrint(this._dstPrint.Tables[
                        lvwPrint.SelectedItems[0].Name], tblName);
                    gbxMiddle.Controls.Add(ucService);
                    ucService.Dock = DockStyle.Fill;
                    break;
                case "Lift":
                    ucPrint ucLift = new ucPrint(this._dstPrint.Tables[
                        lvwPrint.SelectedItems[0].Name], tblName);
                    gbxMiddle.Controls.Add(ucLift);
                    ucLift.Dock = DockStyle.Fill;
                    break;
                default:
                    break;
            }
        }