1-) C# Athena - custom messagebox ayarlama
1-) custom messagebox ayarlama
- windows forms oluştur
- CenterScreen olarak ayarla
- controlbox false yap
- formborderstyle -> fixeddialog yap
- label ve button ekle
- button -> Dialog result -> Yes veya No yaparsın
- constracterde ise text'lerini değiştir
2-) Messagebox clası
public CustomMessageBox(string baslik, string icerik) {
InitializeComponent();
this.Text=baslik;
label1.Text= icerik;
}
3-) Çağırırken
var CustomMessageBox = new CustomMessageBox("Hedef Şirkette ...", "Diyalog Penceresi");
string sonuc = CustomMessageBox.ShowDialog().ToString();
if (sonuc.Equals("Yes")) {
MessageBox.Show("İlk buton tıklandı");
} else if (sonuc.Equals("No")) {
MessageBox.Show("İkinci buton tıklandı");
}
4-) Kaynak
https://social.msdn.microsoft.com/Forums/tr-TR/f3ce26d1-7e6c-4723-bdfa-58e48b2539fd/messagebox-zelletirme?forum=csharptr