Exemplo n.º 1
0
 public List <Infomation> AddList(List <Infomation> mList, Infomation addInfo)
 {
     try
     {
         mList.Add(addInfo);
     }
     catch (NullReferenceException nre)
     {
         MessageBox.Show(nre.ToString(), "エラー発生", MessageBoxButtons.OK, MessageBoxIcon.Warning);
     }
     return(mList);
 }
Exemplo n.º 2
0
        /// <summary>
        /// クリックされたリストを出力フィールドに表示する。
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void DataGridView_Cell_Clicked(object sender, EventArgs e)
        {
            Infomation selectInfo = new Infomation();

            foreach (DataGridViewRow gdvRow in dataGridView_Data.SelectedRows)
            {
                selectInfo = masterInfo[gdvRow.Index];
                textBox_OutputTitle.Text       = selectInfo.getTitle();
                textBox_OutputID.Text          = selectInfo.getMailID();
                textBox_OutputPass.Text        = selectInfo.getPassword();
                richTextBox_OutputExplain.Text = selectInfo.getExplain();
            }
        }
Exemplo n.º 3
0
        private void button_Add_Click(object sender, EventArgs e)
        {
            Infomation info = new Infomation();

            if (mfp.CheckBlank(textBox_InputID.Text, textBox_InputPass.Text))
            {
                label_error.Text = "メールアドレス/ID、またはパスワードが記入されていません。";
                return;
            }
            info.setInfomation(textBox_InputTitle.Text,
                               textBox_InputID.Text,
                               textBox_InputPass.Text,
                               richTextBox_InputExplain.Text);

            masterInfo = mfp.AddList(masterInfo, info);
            UpdateList(masterInfo);
            ClearText_Input();
        }