Exemple #1
0
        /// <summary>
        /// 扫描事件
        /// </summary>
        /// <param name="isCloseWhenCancel">是否换型</param>
        private void SelectMode()
        {
            try
            {
                bool isAdmin = Global.userLevel == UserLevel.设计者 || Global.userLevel == UserLevel.工程师;
                using (svfrmScanAndSelectMode frm = new svfrmScanAndSelectMode(AppConfig.ProductIntrinsicConfigModel, isAdmin))
                {
                    frm.ShowDialog();
                    if (string.IsNullOrEmpty(frm.A2C))
                    {
                        Close();
                        return;
                    }
                    AppConfig.ProductPath      = frm.A2C;
                    interLockingParam.Instance = SerializerManager <interLockingParam> .Instance.Load(AppConfig.MesConfigPathName);

                    locking = new Locking();
                    interLockingParam.Instance.EvData.DeviceA2C = frm.A2C;
                    interLockingParam.Instance.EvData.LoginName = lbJobnumber.Text;
                    lbA2C.Text         = AppConfig.ProductPath;
                    lbModel.Text       = interLockingParam.Instance.EvData.ModelName = frm.Model;
                    lb.Text            = interLockingParam.Instance.EvData.StationID = Config.Instance.StationID;
                    lbCustomer.Text    = frm.Customer;
                    lbStationName.Text = frm.Line;
                    Delay.Instance     = SerializerManager <Delay> .Instance.Load(AppConfig.ConfigDelayName);

                    Position.Instance = SerializerManager <Position> .Instance.Load(AppConfig.ConfigPositionName);

                    ProductConfig.Instance = SerializerManager <ProductConfig> .Instance.Load(AppConfig.ConfigOtherParamName);

                    interlock = new InterlockingClass();
                    lbInterlockingModel.Text = ProductConfig.Instance.switchCom.ToString();
                }
            }
            catch (Exception ex)
            {
                LogHelper.Error("扫描调取程序异常", ex);
            }
        }
Exemple #2
0
 public Station1(External ExternalSign, StationInitialize stationIni, StationOperate stationOpe)
     : base(ExternalSign, stationIni, stationOpe, typeof(Station1))
 {
     InterlockingClass = new InterlockingClass();
 }