public static bool SendEmailWithConfirm(string recipientEmail, string subject, string body, ref string errorText) { bool result = false; MessageBoxManager.Yes = "Xem trước"; MessageBoxManager.No = "Gửi luôn"; MessageBoxManager.Cancel = "Không gửi"; MessageBoxManager.Register(); DialogResult dlg = MessageBox.Show("Bạn có muốn gửi mail cho người nhận không?", TextUtils.Caption, MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question); if (dlg == DialogResult.Yes) { result = SendEmailThroughDefaultClient(recipientEmail, subject, body, ref errorText); //result = sendHtmlEMailThroughOUTLOOK(recipientEmail, subject, body); } else if (dlg == DialogResult.No) { result = SendEmail(recipientEmail, subject, body, ref errorText); } MessageBoxManager.Unregister(); return(result); }
private void simpleButton1_Click(object sender, EventArgs e) { try { MessageBoxManager.Yes = "نعم"; MessageBoxManager.No = "لا"; MessageBoxManager.Register(); DialogResult dr = MessageBox.Show("هل أنت متأكد من الاضافة .. ؟؟", "تنبيه", MessageBoxButtons.YesNo); MessageBoxManager.Unregister(); if (dr == DialogResult.Yes) { if (cnx.State == ConnectionState.Closed) { cnx.Open(); } cmd.CommandText = "insert into Paiement values(" + txb_avance.Text + ",getdate() ," + comboBox1.SelectedItem + ")"; cmd.Connection = cnx; cmd.ExecuteNonQuery(); MessageBoxManager.OK = "حسنا"; MessageBoxManager.Register(); DialogResult d = MessageBox.Show("لقد ثمث الاضافة ... ", "تنبيه", MessageBoxButtons.OK, MessageBoxIcon.Information); cnx.Close(); } else { this.Close(); } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void simpleButton2_Click(object sender, EventArgs e) { MessageBoxManager.Yes = "نعم"; MessageBoxManager.No = "لا"; MessageBoxManager.Register(); DialogResult dr = MessageBox.Show("هل أنت متأكد من الحدف ؟؟", "تنبيه", MessageBoxButtons.YesNo); MessageBoxManager.Unregister(); if (dr == DialogResult.Yes) { try { string id = dataGridView1.CurrentRow.Cells[1].Value.ToString(); int r = order.delete(id); if (r == 1) { MessageBox.Show("تم الحدف بنجاح"); } else { MessageBox.Show("الرجاء إعادة المحاولة"); } history.AddHistory("الأمر", "حدف", id); refresh(); } catch (Exception ee) { MessageBox.Show("Error : " + ee); } } else { } }
private void btn_remove_Click(object sender, EventArgs e) { if (dataGridView1.Rows.Count == 0) { MessageBox.Show("الجدول غير ممتلئ"); } else { MessageBoxManager.Yes = "نعم"; MessageBoxManager.No = "لا"; MessageBoxManager.Register(); DialogResult dr = MessageBox.Show("هل أنت متأكد من الحدف ؟؟", "تنبيه", MessageBoxButtons.YesNo); MessageBoxManager.Unregister(); if (dr == DialogResult.Yes && dataGridView1.Rows.Count > 0) { client_order c = client_order.findById((int)dataGridView1.CurrentRow.Cells[0].Value); c.delete(); history.AddHistory("موكلي الأمر", "حدف", dataGridView1.CurrentRow.Cells[0].Value.ToString()); MessageBox.Show("تم الحذف بنجاح"); refresh(); } else { } } }
private void ShowTaskDetail(Task task) { MessageBoxManager.Yes = "Edit"; MessageBoxManager.No = "Delete"; MessageBoxManager.Cancel = "Close"; MessageBoxManager.Register(); var dialogResult = MessageBox.Show(string.Format("Title: {0}\nDescription: {1}\nTime create: {2}", task.Title, task.Description, Convert.ToDateTime(task.TimeCreate)), "Task Detail", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Information); MessageBoxManager.Unregister(); if (dialogResult == DialogResult.Yes) { EditTask(task); } else if (dialogResult == DialogResult.No) { var confirmResult = MessageBox.Show("Do you want to delete this task?", "Warning", MessageBoxButtons.YesNo, MessageBoxIcon.Warning); if (confirmResult == DialogResult.Yes) { DeleteTask(task.Id); } } }
private void tsmiPregledMjesta_Click(object sender, EventArgs e) { MessageBoxManager.Unregister(); PregledMjestaForma pregledMjesta = new PregledMjestaForma(this, tsslStatusnaLabela); pregledMjesta.ShowDialog(); }
private void btn_ajouter_Click(object sender, EventArgs e) { if (txt_decision.Text == "" || cb_id_cause.Text == "") { MessageBoxManager.OK = "حسنا"; MessageBoxManager.Register(); DialogResult dr = MessageBox.Show("المرجو ملئ جميع الحقول", "تنبيه", MessageBoxButtons.OK); MessageBoxManager.Unregister(); } else { try { //cn.Open(); Session se = new Session(); se.Date_session = dateTimePicker1.Value; se.Decision = txt_decision.Text; se.Id_cause = cb_id_cause.Text; co.add_session(se); getdata(); history.AddHistory("الجلسات", "الاضافة", cb_id_cause.Text); //cn.Close(); } catch (Exception ex) { MessageBox.Show(ex.Message); } } }
private void simpleButton3_Click(object sender, EventArgs e) { MessageBoxManager.Yes = "نعم"; MessageBoxManager.No = "لا"; MessageBoxManager.Register(); DialogResult dr = MessageBox.Show("هل أنت متأكد من الحذف ؟؟", "تنبيه", MessageBoxButtons.YesNo); MessageBoxManager.Unregister(); if (dr == DialogResult.Yes) { if (dataGridView1.Rows.Count != 0) { op.deletePlaignant(dataGridView1.SelectedRows[0].Cells[0].Value.ToString()); getDataTable(); chikaya.getDataTablePlaignant(); history.AddHistory("المشتكون", "الحدف", txb_cin.Text); } else { MessageBox.Show("يجب اختيار مشتكي"); } } else { } }
private void btn_ajouter_Click(object sender, EventArgs e) { try { if (txb_name.Text == "") { MessageBoxManager.OK = "حسنا"; MessageBoxManager.Register(); DialogResult dr = MessageBox.Show("المرجو ملئ الحقل المخصص بالاسم", "", MessageBoxButtons.OK); MessageBoxManager.Unregister(); } //else //{ // if (txb_genre_client.Text == "معنوي" && txb_juridique.Text == "" && txb_num_societe.Text == "" && txb_name.Text=="" && txb_tele.Text=="" && txb_adresse.Text=="") // { // // MessageBox.Show("المرجو ملئ الحقل المخصص لالسجل التجاري و الممثل القانوني "); // MessageBoxManager.OK = "حسنا"; // MessageBoxManager.Register(); // DialogResult dr = MessageBox.Show("المرجو ملئ جميع الحقول", "", MessageBoxButtons.OK); // MessageBoxManager.Unregister(); // } // else // { // if (txb_genre_client.Text == "طبيعي" && (txb_cin.Text == "" || txb_name.Text=="" || txb_tele.Text=="" || txb_adresse.Text=="")) // { // // MessageBox.Show("المرجو ملئ الحقل المخصص لرقم البطاقة الوطنية "); // MessageBoxManager.OK = "حسنا"; // MessageBoxManager.Register(); // DialogResult dr = MessageBox.Show("المرجو ملئ جميع الحقول", "تنبيه", MessageBoxButtons.OK); // MessageBoxManager.Unregister(); // } else { if (cn.State == ConnectionState.Closed) { cn.Open(); } client_cause c = new client_cause(); c.Type_client = txb_genre_client.Text; c.Cin = txb_cin.Text; c.Nom = txb_name.Text; c.Telephone = txb_tele.Text; c.Representant_legal = txb_juridique.Text; c.Registre_commerce = txb_num_societe.Text; c.Adresse = txb_adresse.Text; co.add_client_cause(c); getDataTable(); ma.getDataTable(); cn.Close(); btn_ajouter.Enabled = false; } history.AddHistory(" ادارة الموكلين", "الاضافة", txb_cin.Text); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e) { if (newWindow) { // Calcels closing the window e.Cancel = false; } else { // Prompt if the user wants to close the window string messageboxContent = LangResource.MBExitContent; string messageboxTitle = LangResource.MBExitTitle; MessageBoxManager.Yes = LangResource.Yes; MessageBoxManager.No = LangResource.No; MessageBoxManager.Register(); if (MessageBox.Show(messageboxContent, messageboxTitle, MessageBoxButton.YesNo) == MessageBoxResult.Yes) { // Close the window MessageBoxManager.Unregister(); e.Cancel = false; } else { // Don't close the window MessageBoxManager.Unregister(); e.Cancel = true; } } }
private void simpleButtonSupprimer_Click(object sender, EventArgs e) { PlaintesOperations po = new PlaintesOperations(); MessageBoxManager.Yes = "نعم"; MessageBoxManager.No = "لا"; MessageBoxManager.Register(); DialogResult dr = MessageBox.Show("هل أنت متأكد من الحذف ؟؟", "تنبيه", MessageBoxButtons.YesNo); MessageBoxManager.Unregister(); if (dr == DialogResult.Yes) { if (cn.State == ConnectionState.Closed) { cn.Open(); } int id; id = int.Parse(dataGridView1.SelectedRows[0].Cells[0].Value.ToString()); po.deleteSessionPlainte(id); getdata(); //getDataTable(); //ma.getDataTable(); videz_champs(); //textBox1.Clear(); //history.AddHistory(" ادارة ", "الحدف" ); cn.Close(); } }
private void Form1_FormClosing(object sender, FormClosingEventArgs e) { if (lbl_cins.Text == "Cinsiyet :") { if (MessageBox.Show("Çıkmak istediğinizden emin misiniz?", "Onay", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { e.Cancel = false; } else { e.Cancel = true; } } else if (lbl_cins.Text == "Gender :") { MessageBoxManager.Yes = "Yes"; MessageBoxManager.No = "No"; MessageBoxManager.Register(); if (MessageBox.Show("Are you sure that you want to exit ?", "Confirmation", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { e.Cancel = false; } else { e.Cancel = true; } MessageBoxManager.Unregister(); } }
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); MessageBoxManager.Yes = "Singleplayer"; MessageBoxManager.No = "Multiplayer"; MessageBoxManager.Cancel = "Exit"; MessageBoxManager.OK = "Restart"; MessageBoxManager.Register(); while (true) { var result = MessageBox.Show("Choose your mode!", "Welcome!", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question); if (result == DialogResult.No) { Application.Run(new TicTacToeTwoPlayer()); } else if (result == DialogResult.Yes) { Application.Run(new TicTacToeOnePlayer()); } else { break; } } MessageBoxManager.Unregister(); }
private void simpleButton3_Click(object sender, EventArgs e) { MessageBoxManager.Yes = "نعم"; MessageBoxManager.No = "لا"; MessageBoxManager.Register(); DialogResult dr = MessageBox.Show("هل أنت متأكد من الحذف ؟؟", "تنبيه", MessageBoxButtons.YesNo); MessageBoxManager.Unregister(); if (dr == DialogResult.Yes) { if (dataGridView1.Rows.Count != 0) { op.deleteCoercitionPhysique(Convert.ToInt32(dataGridView1.SelectedRows[0].Cells[0].Value)); getDataFORgrid(); history.AddHistory("المشتكون", "الحدف", dataGridView1.CurrentRow.Cells[0].ToString()); } else { MessageBox.Show("يجب اختيار مشتكي"); } } else { } }
/// <summary> /// Pop up confirm window /// </summary> /// <param name="vm"></param> /// <param name="confirmText"></param> public bool ConfirmWindow(INotifyPropertyChanged vm, string confirmText) { // Pop up dialog to require confirmation MessageBoxManager.Yes = TranslationService.Translate("View_Messagebox_Button_Yes")?.ToString(); MessageBoxManager.No = TranslationService.Translate("View_Messagebox_Button_No")?.ToString(); MessageBoxManager.Register(); var dialogService = ServiceLocator.Current.GetInstance <IDialogService>(); MessageBoxResult rsl = dialogService.ShowMessageBox(vm, confirmText, TranslationService.Translate("View_Application_Title")?.ToString(), MessageBoxButton.YesNo, MessageBoxImage.Information); MessageBoxManager.Unregister(); if (rsl.ToString().Equals("No")) { // cancel return(false); } return(true); }
private void button1_Click(object sender, EventArgs e) { MessageBoxManager.Yes = "AFH"; MessageBoxManager.No = "SF"; MessageBoxManager.Cancel = "Cancel"; MessageBoxManager.Register(); DialogResult answer = MessageBox.Show(res_man.GetString("AboutForm_DownloadUpdate_Server", cul) + " \n*Android File Host (AFH) \n*SourceForge (SF)", "Moto_Boot_Logo_Maker " + res_man.GetString("AboutDownloadUpdateServerTitle", cul), MessageBoxButtons.YesNoCancel, MessageBoxIcon.Information); switch (answer) { case DialogResult.Yes: InternetCheck.CheckInternetProcessStart("https://androidfilehost.com/?w=files&flid=323184"); MessageBoxManager.Unregister(); this.Close(); break; case DialogResult.No: InternetCheck.CheckInternetProcessStart("https://sourceforge.net/projects/motobootlogomaker/files/PORTABLE/"); MessageBoxManager.Unregister(); this.Close(); break; case DialogResult.Cancel: MessageBoxManager.Unregister(); return; } MessageBoxManager.Unregister(); }
private void tsmiOdjava_Click(object sender, EventArgs e) { this.Hide(); MessageBoxManager.Unregister(); loginForma.PodesiDugmad(prijavljenZaposleni); loginForma.Show(); }
// // //session // //add session public void add_session(Session c) { if (cn.State == ConnectionState.Closed) { cn.Open(); } SqlTransaction tx = cn.BeginTransaction(); try { SqlCommand cmd = new SqlCommand("insert into sessione(date_session,id_cause,decision)values(@b,@z,@e)", cn); SqlParameter p1 = new SqlParameter("@b", c.Date_session); SqlParameter p2 = new SqlParameter("@z", c.Id_cause); SqlParameter p3 = new SqlParameter("@e", c.Decision); cmd.Parameters.Add(p1); cmd.Parameters.Add(p2); cmd.Parameters.Add(p3); cmd.Transaction = tx; cmd.ExecuteNonQuery(); tx.Commit(); cn.Close(); MessageBoxManager.OK = "حسنا"; MessageBoxManager.Register(); DialogResult dr = MessageBox.Show("تمت الإضافة بنجاح", "", MessageBoxButtons.OK); MessageBoxManager.Unregister(); //MessageBox.Show("تمت الإضافة بنجاح"); } catch (Exception e) { tx.Rollback(); MessageBox.Show(e.Message); } }
private void btnProcFolder_Click(object sender, EventArgs e) { if (fbdSelect.ShowDialog() != DialogResult.OK) { return; } MessageBoxManager.Yes = "Encrypt"; MessageBoxManager.No = "Decrypt"; MessageBoxManager.Register(); switch (MessageBox.Show(Resources.ProcessFolderPrompt, Resources.MessageBoxCaption, MessageBoxButtons.YesNoCancel)) { case DialogResult.Yes: foreach (var f in Directory.GetFiles(fbdSelect.SelectedPath, "*", SearchOption.AllDirectories)) { lvwLoad.Items.Add(new ListViewItem(new[] { f, Resources.EncryptProperty }, 1)); } break; case DialogResult.No: foreach (var f in Directory.GetFiles(fbdSelect.SelectedPath, "*", SearchOption.AllDirectories)) { lvwLoad.Items.Add(new ListViewItem(new[] { f, Resources.DecryptProperty }, 0)); } break; case DialogResult.Cancel: break; } MessageBoxManager.Unregister(); }
private DialogResult PromptToDeleteForChangedHash(Merge merge, string modFilePath, string modName) { var msg = $"The '{modName}' {(merge.IsBundleContent ? "bundle" : "version of the following file")} " + "is different from when it was used in a merge, perhaps because the mod has been updated.\n\n" + $"This file has changed:\n\n{modFilePath}\n\n" + $"This merge is affected:\n\n{merge.RelativePath}\n " + string.Join("\n ", merge.Mods.Select(mod => mod.Name)) + "\n\n"; msg += merge.IsBundleContent ? "Delete this affected merge & repack the merged bundle?" : "Delete this affected merge?"; MessageBoxManager.Cancel = "Ne&ver"; MessageBoxManager.Register(); var choice = MessageBox.Show( msg, "Merged Mod File Changed", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Exclamation); MessageBoxManager.Unregister(); return(choice); }
private void NarudzbaForma_FormClosing(object sender, FormClosingEventArgs e) { if (e.CloseReason == CloseReason.UserClosing) { if (!btnKreiratiNarudzbu.Enabled) { if (DialogResult.Yes == MessageBox.Show("Otvorena narudžba će biti poništena zatvaranjem aplikacije! Da li želite zatvoriti aplikaciju?", "Upozorenje", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button2)) { PonistiKreiranuNarudzbu(); MessageBoxManager.Unregister(); menadzerForma.PodesiDugmad(); this.Close(); } else { e.Cancel = true; } } else { if (brojacNarudzbi == 1) { statusnaLabela.Text = "Narudžba je kreirana;"; } else { statusnaLabela.Text = "Narudžbe su kreirane;"; } MessageBoxManager.Unregister(); menadzerForma.PodesiDugmad(); this.Close(); } } }
private void simpleButton1_Click(object sender, EventArgs e) { try { if (cn.State == ConnectionState.Closed) { cn.Open(); } if (dateTimePicker2.Value < dateTimePicker1.Value) { // MessageBox.Show("isk tcha"); MessageBoxManager.OK = "حسنا"; MessageBoxManager.Register(); DialogResult dr = MessageBox.Show("يجب على التاريخ الاخير ان يكون اكبر من الاخير", "تنبيه", MessageBoxButtons.OK); MessageBoxManager.Unregister(); } else { cmd = new SqlCommand("select s.id_cause as[المرجع],cl.nom as[الموكل],a.nom_adv as[الخصم],c.num_cause_tribunal as [رقم القضية],c.type_cause as [نوع القضية],s.date_session as[تاريخ الجلسة],c.juge as[القاضي],s.decision as[الاجراء],c.ville as [المدينة],c.tribunal as [المحكمة] from cause c,sessione s,client_cause cl,adversaire_cause a where (s.date_session between '" + dateTimePicker1.Value.ToString() + "' and '" + dateTimePicker2.Value.ToString() + "') and s.id_cause=c.id_cause and c.id_client=cl.id_client_cause and a.id_adversaire_cause=c.id_adv order by c.tribunal", cn); ad = new SqlDataAdapter(cmd); ds = new DataSet(); ad.Fill(ds, "a"); dataGridView1.DataSource = ds.Tables["a"]; } cn.Close(); } catch (Exception ee) { MessageBox.Show(ee.Message); } }
void FormHelpers.ICustomTranslate.CustomTranslate() { MessageBoxManager.Unregister(); MessageBoxManager.Yes = Tr("&Yes"); MessageBoxManager.No = Tr("&No"); MessageBoxManager.OK = Tr("&OK"); MessageBoxManager.Cancel = Tr("&Cancel"); MessageBoxManager.Retry = Tr("&Retry"); MessageBoxManager.Register(); //??? doesn't get translated if we don't translate it directly???? toolStripStatusLabelGlobalRateText.Text = Tr("Global rate:"); toolStripStatusLabelBTCDayText.Text = "BTC/" + Tr(ConfigManager.GeneralConfig.TimeUnit.ToString()); toolStripStatusLabelBalanceText.Text = RatesAndStatsStates.Instance.LabelBalanceText; devicesListViewEnableControl1.InitLocale(); // this one here is probably redundant labelDemoMode.Text = Tr("{0} is running in DEMO mode!", NHMProductInfo.Name); toolTip1.SetToolTip(labelDemoMode, Tr("You have not entered a bitcoin address. {0} will start mining in DEMO mode. In the DEMO mode, you can test run the miner and be able see how much you can earn using your computer. Would you like to continue in DEMO mode?\n\nDISCLAIMER: YOU WILL NOT EARN ANYTHING DURING DEMO MODE!", NHMProductInfo.Name)); SetToolTip(Tr("User's bitcoin address for mining."), textBoxBTCAddress, labelBitcoinAddress); SetToolTip(Tr("To identify the user's computer."), textBoxWorkerName, labelWorkerName); SetToolTip(Tr("Sets the mining location. Choosing Hong Kong or Tokyo will add extra latency."), comboBoxLocation, labelServiceLocation); }
private void btn_edit_Click(object sender, EventArgs e) { if (cn.State == ConnectionState.Closed) { cn.Open(); } adversaire_cause cc = new adversaire_cause(); if (txb_cin.Text == "" && txb_num_societe.Text == "") { MessageBoxManager.OK = "حسنا"; MessageBoxManager.Register(); DialogResult dr = MessageBox.Show("يجب إختيار السجل المراد تعديله", "", MessageBoxButtons.OK); MessageBoxManager.Unregister(); //MessageBox.Show("يجب إختيار السجل المراد تعديله"); } else { cc.Id_adv_cause = int.Parse(dataGridView1.SelectedRows[0].Cells[0].Value.ToString()); cc.Type_adversaire = CB_genre_Adv.Text; cc.Cin = txb_cin.Text; cc.Nom = txb_name.Text; cc.Adjoint = txt_adjoint.Text; cc.Representant_legal = txb_juridique.Text; cc.Registre_commerce = txb_num_societe.Text; cc.Adresse = txb_adresse.Text; co.update_adversaire_cause(cc); getDataTable(); ma.getDataTable(); vider_champ(); } history.AddHistory(" ادارة الخصوم", "التعديل", txb_name.Text); cn.Close(); }
private void InitLocalization() { MessageBoxManager.Unregister(); MessageBoxManager.Yes = International.GetText("Global_Yes"); MessageBoxManager.No = International.GetText("Global_No"); MessageBoxManager.OK = International.GetText("Global_OK"); MessageBoxManager.Cancel = International.GetText("Global_Cancel"); MessageBoxManager.Retry = International.GetText("Global_Retry"); MessageBoxManager.Register(); labelServiceLocation.Text = International.GetText("Service_Location") + ":"; labelBitcoinAddress.Text = International.GetText("BitcoinAddress") + ":"; labelWorkerName.Text = International.GetText("WorkerName") + ":"; linkLabelCheckStats.Text = International.GetText("Form_Main_check_stats"); linkLabelChooseBTCWallet.Text = International.GetText("Form_Main_choose_bitcoin_wallet"); toolStripStatusLabelGlobalRateText.Text = International.GetText("Form_Main_global_rate") + ":"; toolStripStatusLabelBTCDayText.Text = "BTC/" + International.GetText("Day"); toolStripStatusLabelBalanceText.Text = (ExchangeRateAPI.ActiveDisplayCurrency + "/") + International.GetText("Day") + " " + International.GetText("Form_Main_balance") + ":"; devicesListViewEnableControl1.InitLocale(); buttonBenchmark.Text = International.GetText("Form_Main_benchmark"); buttonSettings.Text = International.GetText("Form_Main_settings"); buttonStartMining.Text = International.GetText("Form_Main_start"); buttonStopMining.Text = International.GetText("Form_Main_stop"); buttonHelp.Text = International.GetText("Form_Main_help"); label_NotProfitable.Text = International.GetText("Form_Main_MINING_NOT_PROFITABLE"); groupBox1.Text = International.GetText("Form_Main_Group_Device_Rates"); }
private void btn_remove_Click(object sender, EventArgs e) { testdata(); MessageBoxManager.Yes = "نعم"; MessageBoxManager.No = "لا"; MessageBoxManager.Register(); DialogResult dr = MessageBox.Show("هل أنت متأكد من الحذف ؟؟", "تنبيه", MessageBoxButtons.YesNo); MessageBoxManager.Unregister(); if (dr == DialogResult.Yes) { if (cn.State == ConnectionState.Closed) { cn.Open(); } int id; id = int.Parse(dataGridView1.SelectedRows[0].Cells[0].Value.ToString()); co.deleteAdversaire_cause(id); getDataTable(); ma.getDataTable(); vider_champ(); txb_searsh.Clear(); history.AddHistory(" ادارة الخصوم", "الحدف", txb_name.Text); cn.Close(); } else { } }
private void simpleButton2_Click(object sender, EventArgs e) { MessageBoxManager.Yes = "نعم"; MessageBoxManager.No = "لا"; MessageBoxManager.Register(); DialogResult dr = MessageBox.Show("هل أنت متأكد من التعديل .. ؟؟", "تنبيه", MessageBoxButtons.YesNo); MessageBoxManager.Unregister(); if (dr == DialogResult.Yes) { Properties.Settings.Default.Server = txtServerName.Text; Properties.Settings.Default.DataBase = txtDBName.Text; Properties.Settings.Default.Mode = radioSQLAuth.Checked == true ? "SQL" : "Windows"; Properties.Settings.Default.ID = txtUser.Text; Properties.Settings.Default.PassWord = txtPass.Text; Properties.Settings.Default.Save(); MessageBoxManager.OK = "حسنا"; MessageBoxManager.Register(); DialogResult d = MessageBox.Show("لقد ثم التعديل ", "تنبيه", MessageBoxButtons.OK, MessageBoxIcon.Information); MessageBoxManager.Unregister(); } else { this.Close(); } }
// event. Click sur le boutton 'françaisToolStripMenuItem' private void françaisToolStripMenuItem_Click(object sender, EventArgs e) { try { if (françaisToolStripMenuItem.Checked == false) { françaisToolStripMenuItem.Checked = true; arabeToolStripMenuItem.Checked = false; // changement de la langue au français ClassGlobal.cul = CultureInfo.CreateSpecificCulture("fr"); // enregistrement de la langue actuelle ClassGlobal.setDefaultLanguage("fr"); // messagesBox => état normal ClassGlobal.msgBoxOptions = new MessageBoxOptions(); // messageBox buttons text => état normal MessageBoxManager.Unregister(); // main form => état normal this.RightToLeft = RightToLeft.No; // modification du texte des controls switchLanguage(); // on informe les fenêtres enfants this.OnLanguageChanged(sender, e); } } catch (Exception ex) { MessageBox.Show(ex.Message, ClassGlobal.AppName, MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, ClassGlobal.msgBoxOptions); } }
private void InitLocalization() { MessageBoxManager.Unregister(); MessageBoxManager.Yes = International.GetText("Global_Yes"); MessageBoxManager.No = International.GetText("Global_No"); MessageBoxManager.OK = International.GetText("Global_OK"); MessageBoxManager.Register(); labelServiceLocation.Text = International.GetText("Service_Location") + ":"; labelBitcoinAddress.Text = International.GetText("BitcoinAddress") + ":"; labelWorkerName.Text = International.GetText("WorkerName") + ":"; linkLabelVisitUs.Text = International.GetText("Form_Main_visit_us"); linkLabelCheckStats.Text = International.GetText("Form_Main_check_stats"); linkLabelChooseBTCWallet.Text = International.GetText("Form_Main_choose_bitcoin_wallet"); // these strings are no longer used, check and use them as base string rateString = International.GetText("Rate") + ":"; string ratesBTCInitialString = "0.00000000 BTC/" + International.GetText("Day"); string ratesDollarInitialString = String.Format("0.00 {0}/", ConfigManager.Instance.GeneralConfig.DisplayCurrency) + International.GetText("Day"); toolStripStatusLabelGlobalRateText.Text = International.GetText("Form_Main_global_rate") + ":"; toolStripStatusLabelBTCDayText.Text = "BTC/" + International.GetText("Day"); toolStripStatusLabelBalanceText.Text = (ConfigManager.Instance.GeneralConfig.DisplayCurrency + "/") + International.GetText("Day") + " " + International.GetText("Form_Main_balance") + ":"; devicesListViewEnableControl1.InitLocale(); buttonBenchmark.Text = International.GetText("Form_Main_benchmark"); buttonSettings.Text = International.GetText("Form_Main_settings"); buttonStartMining.Text = International.GetText("Form_Main_start"); buttonStopMining.Text = International.GetText("Form_Main_stop"); label_NotProfitable.Text = International.GetText("Form_Main_MINING_NOT_PROFITABLE"); groupBox1.Text = International.GetText("Form_Main_Group_Device_Rates"); }
public void GrabCDKey(string fileName, string title) { string message; MessageBoxManager.OK = "Grab Key"; MessageBoxManager.Register(); try { string path = cdKeysLocation + fileName; StreamReader streamReader = new StreamReader(path); message = streamReader.ReadToEnd(); if (MessageBox.Show(message, title, MessageBoxButtons.OK) == System.Windows.Forms.DialogResult.OK) { Clipboard.SetText(message); } MessageBoxManager.Unregister(); } catch (Exception) { MessageBoxManager.Unregister(); message = "The CD Key could not be found, make sure that Warcraft III is installed correctly. Keep in mind that this button only works with the patches 1.30 and 1.31"; title += " - Error"; MessageBox.Show(message, title, MessageBoxButtons.OK); } }