コード例 #1
0
 public DialogAdd(Notebook notes, bool isAdd, int pos = 0)
 {
     this.notes = notes;
     this.isAdd = isAdd;
     InitializeComponent();
     if (isAdd)
     {
         Text = "Добавление записи";
     }
     else
     {
         Text = "Редактировние записи";
         txtBx_surname.Text  = notes.GetSurnameByPos(pos);
         txtBx_name.Text     = notes.GetNameByPos(pos);
         txtBx_phone.Text    = notes.GetPhoneByPos(pos);
         txtBx_birthday.Text = notes.GetDateByPos(pos);
     }
     txtBx_surname.Select();
     SetIcon();
 }
コード例 #2
0
ファイル: Form1.cs プロジェクト: CALLlA-74/Olimpic_Execises
 private string MakeText(int idx)
 {
     return(notes.GetSurnameByPos(idx) + " " + notes.GetNameByPos(idx) + " " + notes.GetPhoneByPos(idx) + " "
            + (notes.GetDateByPos(idx) == null || notes.GetDateByPos(idx).Equals("") ? null : notes.GetDateByPos(idx)));
 }