예제 #1
0
        private void buttonAddPartner_Click(object sender, EventArgs e)
        {
            FormCatInfo fci = new FormCatInfo("cat_partners", "Новый партнер", FormMain.FormCatInfoModes.NewPartnerOrKitty);

            fci.ShowDialog();
            Initialize();
        }
예제 #2
0
 private void buttonAddKitty_Click(object sender, EventArgs e)
 {
     if (listBoxCatteries.SelectedIndex != -1)
     {
         FormCatInfo fci = new FormCatInfo("kitties", "Новый котёнок", FormMain.FormCatInfoModes.NewPartnerOrKitty, catteries[listBoxCatteries.SelectedIndex]);
         fci.ShowDialog();
         listBoxCatteries_SelectedIndexChanged(sender, e);
     }
 }
예제 #3
0
        private void новыйПитомецToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FormCatInfo fci = new FormCatInfo("my_pets", "Новый питомец", FormCatInfoModes.NewPet);

            fci.ShowDialog();
            this.Cursor = Cursors.WaitCursor;
            Initialize();
            this.Cursor = DefaultCursor;
        }
예제 #4
0
 private void buttonChangeKittyInfo_Click(object sender, EventArgs e)
 {
     if (listBoxKitties.SelectedIndex != -1)
     {
         int         kittySelectedIndex   = listBoxKitties.SelectedIndex;
         int         catterySelectedIndex = listBoxCatteries.SelectedIndex;
         FormCatInfo fci = new FormCatInfo("kitties", "Информация", FormCatInfoModes.PartnerOrKittyInfo, kitties[kittySelectedIndex]);
         fci.Image = ByteToImage(kittiesImages[kittySelectedIndex]);
         fci.ShowDialog();
         listBoxCatteries_SelectedIndexChanged(sender, e);
         listBoxKitties.SelectedIndex = kittySelectedIndex;
     }
 }
예제 #5
0
 private void buttonPartnerInfo_Click(object sender, EventArgs e)
 {
     if (listBoxCatteries.SelectedIndex != -1)
     {
         int         catterySelectedIndex = listBoxCatteries.SelectedIndex;
         int         petSelectedIndex     = listBoxPets.SelectedIndex;
         FormCatInfo fci = new FormCatInfo("cat_partners", "Информация", FormCatInfoModes.PartnerOrKittyInfo, catteries[catterySelectedIndex]);
         fci.Image = ByteToImage(partnersImages[catterySelectedIndex]);
         fci.ShowDialog();
         listBoxPets_SelectedIndexChanged(sender, e);
         listBoxCatteries.SelectedIndex = catterySelectedIndex;
     }
 }
예제 #6
0
 private void buttonChangePetInfo_Click(object sender, EventArgs e)
 {
     if (listBoxPets.SelectedIndex != -1)
     {
         int         index = listBoxPets.SelectedIndex;
         FormCatInfo fci   = new FormCatInfo("my_pets", "Изменение информации о питомце", FormCatInfoModes.ChangeInfo, cats[index]);
         fci.Image = ByteToImage(petsImages[index]);
         fci.ShowDialog();
         this.Cursor = Cursors.WaitCursor;
         Initialize();
         this.Cursor = DefaultCursor;
     }
 }
예제 #7
0
        private void редакторToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FormCatInfo fci = new FormCatInfo("my_pets", "Редактирование элементов", FormCatInfoModes.Edit);

            fci.ShowDialog();
        }