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

            fci.ShowDialog();
            Initialize();
        }
Ejemplo n.º 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);
     }
 }
Ejemplo n.º 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;
        }
Ejemplo n.º 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;
     }
 }
Ejemplo n.º 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;
     }
 }
Ejemplo n.º 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;
     }
 }
Ejemplo n.º 7
0
        private void редакторToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FormCatInfo fci = new FormCatInfo("my_pets", "Редактирование элементов", FormCatInfoModes.Edit);

            fci.ShowDialog();
        }