Esempio n. 1
0
 private void Dd_OpenExist(Events a)
 {
     //פתיחת קובץ קיים
     for (int i = 0; i < l.Count; i++)
     {
         if (l[i] == a)
         {
             if (a is Wedding)
             {
                 Fwedding fw = new Fwedding(a as Wedding);
                 fw.Show();
                 fw.Erase         += Fw_Erase;
                 fw.addToListBox2 += addToListBox;
             }
             if (a is BirthdayParty)
             {
                 FbirthdayParty fb = new FbirthdayParty(a as BirthdayParty);
                 fb.Show();
                 fb.Erase         += Fw_Erase;
                 fb.addToListBox2 += addToListBox;
             }
             if (a is Trip)
             {
                 Ftrip ft = new Ftrip(a as Trip);
                 ft.Show();
                 ft.Erase         += Fw_Erase;
                 ft.addToListBox2 += addToListBox;
             }
         }
     }
 }
Esempio n. 2
0
        private void Form1_EventOpenForm(string kindEvent, int numOfDay)
        {
            //לאירוע חדש Form פתיחת
            DateTime d1 = new DateTime(d.Year, d.Month, numOfDay);

            if (kindEvent == "חתונה")
            {
                Fwedding fw = new Fwedding(d1);
                fw.addToListBox2 += addToListBox;
                fw.Show();
            }
            if (kindEvent == "טיול")
            {
                Ftrip ft = new Ftrip(d1);
                ft.addToListBox2 += addToListBox;
                ft.Show();
            }
            if (kindEvent == "יום הולדת")
            {
                FbirthdayParty fb = new FbirthdayParty(d1);
                fb.addToListBox2 += addToListBox;
                fb.Show();
            }
        }