/// <summary> /// 변경된 DB 연결 정보를 저장한다. /// </summary> public static void DB_Setting_Save() { Pgm_Setting.Group_Select("MsSql"); Pgm_Setting.Value_Set("IP", conn.strIP); Pgm_Setting.Value_Set("DataBase", conn.strDataBase); Pgm_Setting.Value_Set("ID", conn.strID); Pgm_Setting.Value_Set("PassWords", conn.strPass); Pgm_Setting.Setting_Save(); }
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); } }