コード例 #1
0
ファイル: Controller.cs プロジェクト: estimpson/21st
        public Controller()
        {
            // Instantiate declared class objects
            shippingForm      = new formShipping(this);
            location          = new DataLayer.DataAccess.Location();
            shipping          = new DataLayer.DataAccess.Shipping();
            alert             = new ErrorAlert();
            messageController = new MessageController(shippingForm.messageBoxControl1.ucMessageBox, Resources.loginInstructions);
            ScreenState       = screenStates.pendingLogin;

            // Wire control events
            shippingForm.logOnOffControl1.LogOnOffChanged     += new LogOnOffControl.LogOnOffChangedEventHandler(logOnOffControl1_LogOnOffChanged);
            shippingForm.logOnOffControl1.OperatorCodeChanged += new LogOnOffControl.OperatorCodeChangedEventHandler(logOnOffControl1_OperatorCodeChanged);
            shippingForm.messageBoxControl1.MessageBoxControl_ShowPrevMessage += new EventHandler <EventArgs>(messageBoxControl1_MessageBoxControl_ShowPrevMessage);
            shippingForm.messageBoxControl1.MessageBoxControl_ShowNextMessage += new EventHandler <EventArgs>(messageBoxControl1_MessageBoxControl_ShowNextMessage);

            Application.Run(shippingForm);
        }
コード例 #2
0
ファイル: Controller.cs プロジェクト: estimpson/21st
        public Controller()
        {
            // Instantiate declared class objects
            cycleCountForm    = new formCycleCount(this);
            location          = new DataLayer.DataAccess.Location();
            cycle             = new DataLayer.DataAccess.CycleCount();
            alert             = new ErrorAlert();
            messageController = new MessageController(cycleCountForm.messageBoxControl1.ucMessageBox, Resources.loginInstructions);
            ScreenState       = screenStates.pendingLogin;

            // Wire control events
            cycleCountForm.logOnOffControl1.LogOnOffChanged     += new LogOnOffControl.LogOnOffChangedEventHandler(logOnOffControl1_LogOnOffChanged);
            cycleCountForm.logOnOffControl1.OperatorCodeChanged += new LogOnOffControl.OperatorCodeChangedEventHandler(logOnOffControl1_OperatorCodeChanged);
            cycleCountForm.messageBoxControl1.MessageBoxControl_ShowPrevMessage += new EventHandler <EventArgs>(messageBoxControl1_MessageBoxControl_ShowPrevMessage);
            cycleCountForm.messageBoxControl1.MessageBoxControl_ShowNextMessage += new EventHandler <EventArgs>(messageBoxControl1_MessageBoxControl_ShowNextMessage);

            // Hide form fields
            cycleCountForm.ckbxFlagBox.Visible =
                cycleCountForm.tbxNote.Visible = cycleCountForm.lblNote.Visible = false;


            Application.Run(cycleCountForm);
        }