private void tbx_pass_KeyDown(object sender, KeyEventArgs e) { try { if (e.KeyData == Keys.Enter) { NoParamDele dele = new NoParamDele(ProcessLogin); Invoke(dele); } } catch (Exception ex) { Logger.error(ex.ToString()); } }
private void Mn_server_Click(object sender, EventArgs e) { NoParamDele dele = new NoParamDele(makeSetServerForm); Invoke(dele); }
private void tbx_pass_KeyDown(object sender, KeyEventArgs e) { try { if (e.KeyData == Keys.Enter) { NoParamDele dele = new NoParamDele(checkInfoForLogin); Invoke(dele); } } catch (Exception ex) { logWrite(ex.ToString()); } }
private void Mn_extension_Click(object sender, EventArgs e) { NoParamDele npdele = new NoParamDele(makeExtensionForm); Invoke(npdele); }
private void btn_all_MouseClick(object sender, MouseEventArgs e) { NoParamDele dele = new NoParamDele(dialogSelectAll); Invoke(dele); }
private void Mn_extension_Click(object sender, EventArgs e) { NoParamDele npdele = new NoParamDele(DisplayExtensionForm); Invoke(npdele); }
//result = private void disposeLicenseResult(string result) { try { //result = -1 : 비밀번호 틀림 //result = 1 : 라이선스 생성 성공 //result = 0 : 요청정보 부족 //result = 2 : 라이선스 리스트 정보 //result = 3 : 코드중복 또는 기한입력오류 string license_message = ""; string[] license_info = result.Split('†'); result = license_info[0]; switch (result) { case "-1": MessageBox.Show("비밀번호가 올바르지 않습니다."); checkpass.tbx_pass.Focus(); break; case "1": MessageBox.Show("요청하신 라이선스가 정상발급 되었습니다."); checkpass.Close(); addcompany.Close(); NoParamDele reload = new NoParamDele(reloadList); Invoke(reload); break; case "2": if (license_info.Length > 1) { NoParamDele nodele = new NoParamDele(clearDGV); Invoke(nodele); listDele dele = new listDele(listupLicenseInfo); foreach (string item in license_info) { if (item.Length > 1) { string[] temparr = item.Split('&'); //com_code&comName&2099/12/31 Invoke(dele, new object[] { temparr[0], temparr[1], temparr[2] }); } } } break; case "3": MessageBox.Show("코드가 중복되었거나 만료일자 오류입니다."); checkpass.Close(); break; } } catch (Exception ex) { logWriter(ex.ToString()); } }
private void SendCheck() { try { IPEndPoint checkiep = new IPEndPoint(server.Address, 8885); byte[] re = null; checkSock.Client.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReceiveTimeout, 2000); byte[] buffer = Encoding.ASCII.GetBytes("1"); while (true) { for (int i = 0; i < 2; i++) { while (connected == true) { Thread.Sleep(3000); try { int count = checkSock.Send(buffer, buffer.Length, checkiep); re = checkSock.Receive(ref checkiep); if (re == null) { logWrite("메시지가 전달되지 않음"); break; } else { //로그인 시도중인 상황에서 서버응답 성공시 if (serverAlive == false) { serverAlive = true; NoParamDele relogin = new NoParamDele(StartService); Invoke(relogin); PanelCtrlDelegate dele = new PanelCtrlDelegate(ServerFailCtrl); Invoke(dele, true); } } } catch (Exception ex1) { logWrite("서버 체크 실패 " + i + "번째"); break; } } //while } //for if (connected == true) { if (serverAlive == true) { serverAlive = false; LogOutDelegate logoutdele = new LogOutDelegate(LogOut); Invoke(logoutdele); LogOutDelegate dele = new LogOutDelegate(disposeServerFail); Invoke(dele); } } } //while } catch (Exception ex2) { logWrite(ex2.ToString()); } }
private void showAnswerCallInfo(string ANI, string name) { try { int height_point = 0; if (TransferNotiArea.Count > 0) { foreach (DictionaryEntry de in TransferNotiArea) { if (de.Value.ToString().Equals("0")) { int temp = Convert.ToInt32(de.Key.ToString()); if (temp > height_point) { height_point = temp; } } else { logWrite("TransferNotiArea[" + de.Key.ToString() + "] = " + de.Value.ToString()); logWrite(de.Key.ToString() + " is not 0"); } } if (height_point == 0) { //가장 오래된 태그폼 삭제 NoParamDele dele = new NoParamDele(closeNoticeForm); Invoke(dele); foreach (DictionaryEntry de in TransferNotiArea) { if (de.Value.ToString().Equals("0")) { int temp = Convert.ToInt32(de.Key.ToString()); if (temp > height_point) { height_point = temp; } } else { logWrite("TransferNotiArea[" + de.Key.ToString() + "] = " + de.Value.ToString()); logWrite(de.Key.ToString() + " is not 0"); } } } } TransferNotiForm miniform = new TransferNotiForm(); miniform.TopMost = false; miniform.pbx_icon.Image = global::Client.Properties.Resources.phone_black; miniform.pbx_close.Visible = true; miniform.pbx_close.MouseClick += new MouseEventHandler(pbx_close_MouseClick); miniform.pbx_icon.MouseClick += new MouseEventHandler(pbx_icon_MouseClick); miniform.MouseClick += new MouseEventHandler(miniform_MouseClick_for_Call); miniform.label_Customer.MouseClick += new MouseEventHandler(label_Customer_MouseClick_for_Call); miniform.label_from.MouseClick += new MouseEventHandler(label_Customer_MouseClick_for_Call); if (name.Length > 1) { miniform.label_Customer.Text = name + "(" + ANI + ")"; } else { miniform.label_Customer.Text = ANI; } //miniform.label_from.Text = notifyform.label_sender.Text; //miniform.label_ani.Text = notifyform.label_ani.Text; //miniform.label_date.Text = notifyform.label_TONGDATE.Text; //miniform.label_time.Text = notifyform.label_TONGTIME.Text; miniform.label_from.Text = "시간 : "+ DateTime.Now.ToShortTimeString(); screenWidth = Screen.PrimaryScreen.WorkingArea.Width; screenHeight = Screen.PrimaryScreen.WorkingArea.Height; miniform.SetBounds(screenWidth - miniform.Width, height_point, miniform.Width, miniform.Height); miniform.Show(); TransferNotiArea[height_point.ToString()] = "1"; NotiFormList.Add(miniform); } catch (Exception ex) { logWrite(ex.ToString()); } }
private void timerForNotify_Tick(object sender, EventArgs e) { try { if (notifyform != null) { timerForNotify.Stop(); int height_point = 0; if (TransferNotiArea.Count > 0) { foreach (DictionaryEntry de in TransferNotiArea) { if (de.Value.ToString().Equals("0")) { int temp = Convert.ToInt32(de.Key.ToString()); if (temp > height_point) { height_point = temp; } } else { logWrite("TransferNotiArea[" + de.Key.ToString() + "] = " + de.Value.ToString()); logWrite(de.Key.ToString() + " is not 0"); } } if (height_point == 0) { //가장 오래된 태그폼 삭제 NoParamDele dele = new NoParamDele(closeNoticeForm); Invoke(dele); foreach (DictionaryEntry de in TransferNotiArea) { if (de.Value.ToString().Equals("0")) { int temp = Convert.ToInt32(de.Key.ToString()); if (temp > height_point) { height_point = temp; } } else { logWrite("TransferNotiArea[" + de.Key.ToString() + "] = " + de.Value.ToString()); logWrite(de.Key.ToString() + " is not 0"); } } } } TransferNotiForm miniform = new TransferNotiForm(); miniform.pbx_icon.Image = global::Client.Properties.Resources.img_customer; miniform.MouseClick += new MouseEventHandler(miniform_MouseClick); miniform.pbx_icon.MouseClick+=new MouseEventHandler(pbx_icon_MouseClick_for_Transfer); miniform.label_Customer.MouseClick += new MouseEventHandler(label_Customer_MouseClick); miniform.label_from.MouseClick += new MouseEventHandler(label_Customer_MouseClick); miniform.label_Customer.Text = notifyform.label_Customer.Text; miniform.label_from.Text = notifyform.label_sender.Text; miniform.label_ani.Text = notifyform.label_ani.Text; miniform.label_date.Text = notifyform.label_TONGDATE.Text; miniform.label_time.Text = notifyform.label_TONGTIME.Text; miniform.label_senderid.Text = notifyform.label_senderid.Text; screenWidth = Screen.PrimaryScreen.WorkingArea.Width; screenHeight = Screen.PrimaryScreen.WorkingArea.Height; miniform.SetBounds(screenWidth - miniform.Width, height_point, miniform.Width, miniform.Height); notifyform.Close(); notifyform = null; miniform.TopLevel = true; miniform.Show(); TransferNotiArea[height_point.ToString()] = "1"; NotiFormList.Add(miniform); } } catch (Exception ex) { logWrite(ex.ToString()); } }
private void SetUserInfo() { logWrite("SetUserInfo ����"); logWrite("com_cd = " + this.com_cd); logWrite("myid = " + this.myid); logWrite("pass = " + tbx_pass.Text); cm.SetUserInfo(this.com_cd, this.myid, tbx_pass.Text, serverIP, socket_port_crm); NoParamDele dele = new NoParamDele(startCRMmanager); Invoke(dele); }
private void VersionCheck() { bool isUpdate = false; try { Uri ftpuri = new Uri(FtpHost); FtpWebRequest wr = (FtpWebRequest)WebRequest.Create(ftpuri); wr.Method = WebRequestMethods.Ftp.ListDirectory; wr.Credentials = new NetworkCredential(FtpUsername, passwd); FtpWebResponse wres = (FtpWebResponse)wr.GetResponse(); Stream st = wres.GetResponseStream(); string SVRver = null; if (st.CanRead) { StreamReader sr = new StreamReader(st); SVRver = sr.ReadLine(); } logWrite("VersionCheck FtpHost = " + FtpHost); logWrite("Server Version = " + SVRver); logWrite("Client Version = " + version); if (SVRver.Equals(version.Trim())) { version = SVRver; logWrite("Last Version is already Installed!"); } else { string[] ver = SVRver.Split('.'); string[] now = version.Split('.'); for (int v = 0; v < ver.Length; v++) { if (!ver[v].Equals(now[v])) { if (Convert.ToInt32(ver[v]) > Convert.ToInt32(now[v])) { NoParamDele dele = new NoParamDele(requestUpdate); Invoke(dele); break; } } } } } catch (Exception ex) { logWrite(ex.ToString()); } noActive = true; //return isUpdate; }
private void pbx_login_MouseClick(object sender, MouseEventArgs e) { NoParamDele dele = new NoParamDele(ProcessLogin); Invoke(dele); }
private void btn_login_MouseClick(object sender, MouseEventArgs e) { NoParamDele dele = new NoParamDele(checkInfoForLogin); Invoke(dele); }
private void MsgSvrForm_MinimumSizeChanged(object sender, EventArgs e) { NoParamDele dele = new NoParamDele(formHide); Invoke(dele); }
private void cancel_MouseClick(object sender, MouseEventArgs e) { NoParamDele dele = new NoParamDele(selectcancelforNoticeList); Invoke(dele); }
private void btn_all_MouseClickForNoticeList(object sender, MouseEventArgs e) { NoParamDele dele = new NoParamDele(selectAllforNoticeList); Invoke(dele); }
private void btn_cancel_MouseClickForMemoListForm(object sender, EventArgs e) { NoParamDele dele = new NoParamDele(selectCancelForMemoList); Invoke(dele); }
private void btn_login_MouseClick(object sender, MouseEventArgs e) { NoParamDele dele = new NoParamDele(ProcessLogin); Invoke(dele); }
private void disposeLicenseResult(string result)//result = { try { //result = -1 : 비밀번호 틀림 //result = 1 : 라이선스 생성 성공 //result = 0 : 요청정보 부족 //result = 2 : 라이선스 리스트 정보 //result = 3 : 코드중복 또는 기한입력오류 string license_message = ""; string[] license_info = result.Split('†'); result = license_info[0]; switch (result) { case "-1": MessageBox.Show("비밀번호가 올바르지 않습니다."); checkpass.tbx_pass.Focus(); break; case "1": MessageBox.Show("요청하신 라이선스가 정상발급 되었습니다."); checkpass.Close(); addcompany.Close(); NoParamDele reload = new NoParamDele(reloadList); Invoke(reload); break; case "2": if (license_info.Length > 1) { NoParamDele nodele = new NoParamDele(clearDGV); Invoke(nodele); listDele dele = new listDele(listupLicenseInfo); foreach (string item in license_info) { if (item.Length > 1) { string[] temparr = item.Split('&'); //com_code&comName&2099/12/31 Invoke(dele, new object[] { temparr[0], temparr[1], temparr[2] }); } } } break; case "3": MessageBox.Show("코드가 중복되었거나 만료일자 오류입니다."); checkpass.Close(); break; } } catch (Exception ex) { logWriter(ex.ToString()); } }