Пример #1
0
        public FrmMain()
        {
            this.m_errorTickerCounter = 0;
            this.m_errorNoRecords     = 0;
            this.m_errorList          = new List <string>();
            this.m_errorList.Clear();
            this.m_parameter        = ClsSingeltonParameter.CreateInstance();
            this.m_sqliteConnection = new SQLiteConnection();
            this.m_sqliteConnection.ConnectionString = this.m_parameter.ConnectionString;
            this.m_sqliteConnection.Open();

            this.m_sqliteCommand = new SQLiteCommand(this.m_sqliteConnection);

            FuncGeneral.Start();

            this.InitializeComponent();
            this.Width  = 1024;
            this.Height = 768;

            this.m_formularManager   = ClsSingeltonFormularManager.CreateInstance();
            this.m_userManagement    = ClsSingeltonUserManagement.CreateInstance(this);
            this.m_varCollect        = ClsSingeltonVariablesCollecter.CreateInstance();
            this.m_dataBinding       = ClsSingeltonDataBinding.CreateInstance();
            this.m_plcPara.ProgBar   = this.BarPlcProgress;
            this.m_plcPara.LblStatus = this.lblState;
            this.m_plcPara.BtnStart  = this.BtnStartPlc;
            this.m_plcPara.BtnStopp  = this.BtnStoppPlc;
            this.m_plcPara.IP        = this.m_parameter.PlcIp;
            this.m_plcPara.IP        = "192.168.56.1";

            this.m_plcPara.Rack   = this.m_parameter.PlcRack;
            this.m_plcPara.Slot   = this.m_parameter.PlcSlot;
            this.m_plcPara.LblPlc = this.LblPlcNoConnect;

            this.m_plc      = ClsSingeltonPlc.CreateInstance(this.m_plcPara);
            this.m_language = ClsSingeltonLanguage.CreateInstance(this);

            this.FrmHeater               = new FrmHeater();
            this.FrmParameter            = new FrmPara();
            this.FrmInformation          = new FrmInfo();
            this.FrmService              = new FrmServ();
            this.FrmError                = new FrmError();
            this.FrmRelease              = new FrmRelease();
            this.FrmErrorReportingSystem = new FrmErrorReportingSystem();
            this.FrmO2Curve              = new FrmO2Curve();

            this.BtnStartPlc.Click += new System.EventHandler(this.BtnStartPlc_Click);
            this.BtnStoppPlc.Click += new System.EventHandler(this.BtnStoppPlc_Click);

            this.TmrErrorTicker.Enabled = true;
        }
Пример #2
0
        public FrmHeater()
        {
            InitializeComponent();
            this.m_formularManager = ClsSingeltonFormularManager.CreateInstance(this, this.Name.ToString());
            this.m_language        = ClsSingeltonLanguage.CreateInstance(this);
            this.m_dataBinding     = ClsSingeltonDataBinding.CreateInstance();
            this.m_userManagement  = ClsSingeltonUserManagement.CreateInstance(this);
            this.m_parameter       = ClsSingeltonParameter.CreateInstance();
            this.m_dataBinding.AddList(this, "Txt01", "Text", "DB50.P1_Qmin_1");
            this.m_dataBinding.AddList(this, "Txt02", "Text", "DB50.P1_Qmin_3");
            this.m_dataBinding.AddList(this, "Txt03", "Text", "DB50.P1_Qmin_2");

            this.m_dataBinding.AddList(this, "Led01", "State", "DB54.Bit20");

            this.m_dataBinding.AddList(this, "Vnt01", "State", "DB52.Valve04");

            this.m_dataBinding.AddList(this, "Pip01", "Flow", "DB53.Bit04");
        }