コード例 #1
0
ファイル: Form1.cs プロジェクト: kjmjr/C-Applications
        private void getSentences(ref MorseCode phrase)
        {
            try
            {
                phrase.sentence = txtPhrase.Text;
            }//end try

            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            } //end catch
        }     //end of void method
コード例 #2
0
ファイル: Form1.cs プロジェクト: kjmjr/C-Applications
        private void btnAdd_Click(object sender, EventArgs e)
        {
            //create instance
            MorseCode s = new MorseCode();

            //call method to get data from screen
            getSentences(ref s);

            //add to list object
            MorseCodeList.Add(s);

            txtPhrase.Clear();
        }