private void login_btn_Click(object sender, EventArgs e) { General.settings.username = username_txtbx.Text.Trim(); General.settings.password = password_txtbx.Text; GetSettings get_settings = new GetSettings(General.settings.username, General.settings.password, General.settings.host, General.settings.lang); string data = get_settings.execute(); if (get_settings.Is_Passed) { AllowEnter = true; General.user = new JavaScriptSerializer().DeserializeObject(data) as IDictionary <string, object>; SMSHeaders SH = new SMSHeaders(General.settings.username, General.settings.password, General.settings.host, General.settings.lang); string data1 = SH.execute(); General.headers = new JavaScriptSerializer().Deserialize <IList <string> >(data1); //Console.WriteLine(General.headers); this.Close(); } else { MessageBox.Show("Kullanıcı adı veya Şifre hata!", data, MessageBoxButtons.OK, MessageBoxIcon.Warning); } }
public void refresh_items() { GetSettings get_settings = new GetSettings(General.settings.username, General.settings.password, General.settings.host, General.settings.lang); string data = get_settings.execute(); General.user = new JavaScriptSerializer().DeserializeObject(data) as IDictionary <string, object>; SMSHeaders SH = new SMSHeaders(General.settings.username, General.settings.password, General.settings.host, General.settings.lang); string data1 = SH.execute(); General.headers = new JavaScriptSerializer().Deserialize <IList <string> >(data1); if (General.user != null) { fullname_lbl.Text = General.user["fullname"].ToString(); username_lbl.Text = General.user["username"].ToString(); total_waiting_lbl.Text = General.user["waiting_all"].ToString(); total_delivered_lbl.Text = General.user["delivered_all"].ToString(); total_undelivered_lbl.Text = General.user["undelivered_all"].ToString(); total_count_lbl.Text = General.user["count_all"].ToString(); pkt_balance_tsslbl.Text = string.Format("{0} SMS, {1} TELEFON", General.user["sms_balance_pkt"].ToString(), General.user["tel_balance_pkt"].ToString()); balance_tsslbl.Text = string.Format("{0} {1} BAKİYE", General.user["balance"].ToString(), General.user["currency"].ToString()); try { var Pbox = new PictureBox(); Pbox.Load(string.Format("http://{0}/media/profile_pictures/{1}.jpg", General.settings.host, General.user["username"].ToString())); picture_pnl.BackgroundImage = Pbox.Image; } catch { } sms_header_cmbbx.DataSource = General.headers; } message_rchtxtbx.Text = phoneset_rchtxtbx.Text = ""; mainform_sttsstrp.BackColor = SystemColors.Highlight; this.phoneset_rchtxtbx.ReadOnly = false; ready_tsslbl.Text = "Ready"; this.Is_SMSCustom = false; this.ExcelFileName = ""; this.ExcelPhoneColumn = 0; this.GSM_Array = null; this.message_auto_complete_menu.RemoveItems(); }