Ejemplo n.º 1
0
        public void PrepareAllPanel()
        {
            _productionPanel      = new AppProductionPanel();
            _productionPanel.Dock = DockStyle.Fill;
            kGroupOperation.Panel.Controls.Add(_productionPanel);


            _recipePanel      = new AppRecipePanel();
            _recipePanel.Dock = DockStyle.Fill;
            kRecipeManagerPage.Controls.Add(_recipePanel);


            _generalPanel      = new AppGeneralPanel();
            _generalPanel.Dock = DockStyle.Fill;
            kGeneralSetupPage.Controls.Add(_generalPanel);


            _specPanel      = new AppSpecPanel();
            _specPanel.Dock = DockStyle.Fill;
            kSpecPage.Controls.Add(_specPanel);


            _machineSetupPanel      = new AppMachineSetupPanel();
            _machineSetupPanel.Dock = DockStyle.Fill;
            kMachineSetupPage.Controls.Add(_machineSetupPanel);


            _commonPararmPanel      = new AppCommonParamPanel();
            _commonPararmPanel.Dock = DockStyle.Fill;
            kCommonParamPage.Controls.Add(_commonPararmPanel);


            _utilityPanel      = new AppUtilityPanel();
            _utilityPanel.Dock = DockStyle.Fill;
            kGroupUtility.Panel.Controls.Add(_utilityPanel);


            _userPanel      = new AppUsersPanel();
            _userPanel.Dock = DockStyle.Fill;
            kUsersManagerPage.Controls.Add(_userPanel);


            //Default Selection Page
            try
            {
                kNavigatorMain.SelectedIndex             = 0;
                kNavigatorMainSetup.SelectedIndex        = 0;
                kNavigatorStateMachine.SelectedIndex     = 0;
                kNavigatorSemiStateMachine.SelectedIndex = 0;
            }
            catch
            {
            }
        }
        protected override void Initializing()
        {
            #region Standard Pattern
            InitializeComponent();
            This = this;
            #endregion

            #region Example Pattern But Can Change Upto Developer
            panelRedLight.BackColor = Color.Red;

            strOperatorName.BindTwoWay(() => AppMachine.Comp.AppMachine.This.CurrentUser.UserName);
            strOperatorEN.BindTwoWay(() => AppMachine.Comp.AppMachine.This.CurrentUser.UserEN);
            U.RegisterOnChanged(() => AppMachine.Comp.AppMachine.This.CurrentUser, CurrentUser_OnChange);


            OnInputProductChange(AppMachine.Comp.AppMachine.This.InputsProduct);
            U.RegisterOnChanged(() => AppMachine.Comp.AppMachine.This.InputsProduct, OnInputProductChange);

            OnFailProductChange(AppMachine.Comp.AppMachine.This.FailedProduct);
            U.RegisterOnChanged(() => AppMachine.Comp.AppMachine.This.FailedProduct, OnFailProductChange);

            OnYieldChange(AppMachine.Comp.AppMachine.This.Yield);
            U.RegisterOnChanged(() => AppMachine.Comp.AppMachine.This.Yield, OnYieldChange);

            strProductRecipe.BindTwoWay(() => AppMachine.Comp.AppMachine.This.CurrentProdRecipeName);
            strLotId.BindTwoWay(() => AppMachine.Comp.AppMachine.This.LotId);
            intLotSize.BindTwoWay(() => AppMachine.Comp.AppMachine.This.LotSize);

            U.RegisterOnChanged(() => AppMachine.Comp.AppMachine.This.AnySMRunning, AnySMRunningOnChange);
            U.RegisterOnChanged(() => AppMachine.Comp.AppMachine.This.RunStatus, RunningStatusOnChange);
            #endregion

            /*Example Tower Light GUI Handle
             * U.RegisterOnChanged(() => AppMachine.Comp.AppMachine.This.IOList.BoolOutputCollection[AppMachine.AppConstStaticName.GREENLIGHT].Value,
             *                  GreenLightOnChange);
             * U.RegisterOnChanged(() => AppMachine.Comp.AppMachine.This.IOList.BoolOutputCollection[AppMachine.AppConstStaticName.AMBERLIGHT].Value,
             *                  AmberLightOnChange);
             * U.RegisterOnChanged(() => AppMachine.Comp.AppMachine.This.IOList.BoolOutputCollection[AppMachine.AppConstStaticName.REDLIGHT].Value,
             *                  RedLightOnChange);
             */
        }