public static void ReportError(LogType _action, string _title, string _message, Form _parent, MessageBoxButtons _buttons, MessageBoxIcon _icon, object[] _arguments = null) { int index = 0; if (_arguments != null) { foreach (string arg in _arguments) { _arguments[index++] = arg.Replace("\r\n", string.Empty); } } _message = WriteLog(_action, _message, _arguments); DialogResult Result = PoisonMessageBox.Show(_parent, _message, _title, _buttons, _icon); MessageBox.Show(Result.ToString()); }
private void Kontrol(string TXT, bool EXEC = false) { try { if (!string.IsNullOrEmpty(TXT) && !string.IsNullOrWhiteSpace(TXT) && TXT.Length == 11 && !TXT.Contains(" ")) { ulong Count = Convert.ToUInt64(TXT); if (NO.Check(TXT)) { poisonLabel2.Visible = true; poisonLabel3.Visible = false; if (EXEC) { listBox1.SelectedIndex++; } } else { poisonLabel2.Visible = false; poisonLabel3.Visible = true; Kontrol2(); } } else { if (timer1.Enabled) { Kontrol2(); } PoisonMessageBox.Show(this, "Kontrol Edilecek TC NO Belirtiniz!", "Uyarı", MessageBoxButtons.OK, MessageBoxIcon.Warning); } } catch { if (timer1.Enabled) { Kontrol2(); } PoisonMessageBox.Show(this, "Hatalı Bir TC NO Girdiniz!", "Hata", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void Job_Work(object sender, DoWorkEventArgs e) { try { if (!string.IsNullOrEmpty(poisonTextBox1.Text) && !string.IsNullOrWhiteSpace(poisonTextBox1.Text) && !poisonTextBox1.Text.StartsWith("0") && !poisonTextBox1.Text.Contains(" ")) { poisonButton3.Enabled = false; poisonButton4.Enabled = false; int Count = Convert.ToInt32(poisonTextBox1.Text); Random RNDM = new(); for (int C = 0; C < Count; C++) { string GTCN = NO.Create(RNDM); if (!listBox1.Items.Contains(GTCN)) { listBox1.Items.Add(GTCN); poisonLabel1.Text = "Eleman Sayısı: " + listBox1.Items.Count; listBox1.SelectedIndex = listBox1.Items.Count - 1; } else { C--; } } poisonButton3.Enabled = true; poisonButton4.Enabled = true; } else { PoisonMessageBox.Show(this, "Üretilecek TC NO Sayısını Belirtiniz!", "Uyarı", MessageBoxButtons.OK, MessageBoxIcon.Warning); } } catch { PoisonMessageBox.Show(this, "Hatalı Bir TC NO Sayısı Girdiniz!", "Hata", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void poisonButton12_Click(object sender, EventArgs e) { PoisonMessageBox.Show(this, "This is a sample `default` PoisonMessageBox ", "PoisonMessageBox"); }
private void poisonButton9_Click(object sender, EventArgs e) { PoisonMessageBox.Show(this, "This is a sample PoisonMessageBox `Abort`, `Retry` and `Ignore` button. With Error style.", "PoisonMessageBox", MessageBoxButtons.AbortRetryIgnore, MessageBoxIcon.Error); }
private void poisonButton11_Click(object sender, EventArgs e) { PoisonMessageBox.Show(this, "This is a sample PoisonMessageBox `Retry` and `Cancel` button. With warning style.", "PoisonMessageBox", MessageBoxButtons.RetryCancel, MessageBoxIcon.Warning); }
private void poisonButton8_Click(object sender, EventArgs e) { PoisonMessageBox.Show(this, "This is a sample PoisonMessageBox `Yes`, `No` and `Cancel` button", "PoisonMessageBox", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question); }
private void poisonButton10_Click(object sender, EventArgs e) { PoisonMessageBox.Show(this, "This is a sample PoisonMessageBox `OK` and `Cancel` button", "PoisonMessageBox", MessageBoxButtons.OKCancel, MessageBoxIcon.Information); }
private void poisonButton2_Click(object sender, EventArgs e) { PoisonMessageBox.Show(this, "Do you like this poison message box?", "Poison Title", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Asterisk); }