Exemplo n.º 1
0
        public static void PLC_Setting_Save()
        {
            Pgm_Setting.Group_Select("PLC");


            vari.Pgm_Setting.Value_Set("RSLINX_ID", plc.RSLINX_ID);
            vari.Pgm_Setting.Value_Set("TOPIC_NAME", plc.Topic_Name);
            vari.Pgm_Setting.Value_Set("ADD_TRIGGER", plc.Add_Trigger);
            vari.Pgm_Setting.Value_Set("ADD_CONFIRM", plc.Add_Confirm);
            vari.Pgm_Setting.Value_Set("ADD_ACK", plc.Add_Ack);
            vari.Pgm_Setting.Value_Set("ADD_INFO", plc.Add_Info);
            vari.Pgm_Setting.Value_Set("ADD_DATA", plc.Add_Data);


            //프로그램 설정
            Pgm_Setting.Group_Select("PGM");

            vari.Pgm_Setting.Value_Set("StationID", StationID);
            vari.Pgm_Setting.Value_Set("TestSeq", iTestSeq.ToString());
            vari.Pgm_Setting.Value_Set("OPMODE", ((int)OpMode).ToString());
            vari.Pgm_Setting.Value_Set("TorqueImagePath", vari.TorqueImagePath);
            vari.Pgm_Setting.Value_Set("IF_Check", vari.bIF_Chk.ToString());


            Pgm_Setting.Setting_Save();
        }
Exemplo n.º 2
0
        private async void btnConnect_Click(object sender, EventArgs e)
        {
            try
            {
                string phone = textBox1.Text.Trim();

                config.Group_Select("PgmSetting", true);

                config.Value_Set("PhoneNumber", phone, null, null, null);
                config.Setting_Save();


                _client = new Client(phone, fnc.apiId, fnc.apiHash, this);

                await _client.Connect();

                if (_client.isAuth())
                {
                    SetMessage(false, "연결이 되었습니다.", false);
                }
                else
                {
                    SetMessage(false, "연결이 되었습니다. 인증이 필요 합니다.", false);
                }
            }
            catch (Exception ex)
            {
                ProcException(ex, "btnConnect_Click", false);
            }
        }