示例#1
0
文件: record.cs 项目: hyes/miniprj
 public DayRecord( int DD, Coffee coffee, Exercise exercise, Study study, Meditation meditation, Stress stress)
 {
     this.DD = DD;
     this.Coffee = coffee;
     this.Exercise = exercise;
     this.study = study;
     this.meditation = meditation;
     this.stress = stress;
 }
示例#2
0
文件: Form2.cs 项目: hyes/miniprj
        private void button1_Click(object sender, EventArgs e)
        {
            string rename = name.Substring(3);

            Coffee a = new Coffee(null, (int)numericUpDown1.Value);
            Study b = new Study(null, (int)numericUpDown3.Value);
            Exercise c = new Exercise(null, (int)numericUpDown4.Value);
            Meditation d = new Meditation(null, (int)numericUpDown2.Value);
            Stress f = new Stress((int)numericUpDown5.Value);

            day = new DayRecord(int.Parse(rename), a,c,b,d,f);

            if(day.Coffee.Count > 4)
                MessageBox.Show("Too Much Coffee>0< \n 위에 구멍나 ㅠㅠ!");
            if(day.Exercise.Count > 4)
                MessageBox.Show(" 썬크림은 발랐니...");
            if (day.meditation.Count > 3)
                MessageBox.Show("그만 좀 나가 놀아보렴~~");
            if (day.study.Count > 6 )
                MessageBox.Show("공부 잘~~~했어!Gooooood!");

            this.DialogResult = DialogResult.OK;
            this.Close();
        }