private void buttonAddPartner_Click(object sender, EventArgs e) { FormCatInfo fci = new FormCatInfo("cat_partners", "Новый партнер", FormMain.FormCatInfoModes.NewPartnerOrKitty); fci.ShowDialog(); Initialize(); }
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); } }
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; }
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; } }
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; } }
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; } }
private void редакторToolStripMenuItem_Click(object sender, EventArgs e) { FormCatInfo fci = new FormCatInfo("my_pets", "Редактирование элементов", FormCatInfoModes.Edit); fci.ShowDialog(); }