private void button1_Click(object sender, EventArgs e) { if (button1.Text.Equals("Сохранить")) { owner.Save(); } else { owner.Publish(); } }