コード例 #1
0
        /// <summary>
        ///  Handles the save and back button being pressed on the <see cref="Views.IncomeAdd"/> form
        /// </summary>
        /// <param name="sender">The sender object</param>
        /// <param name="e">Event arguments</param>
        public static void AddSaveAndBack(object sender, EventArgs e)
        {
            var success = SaveAddIncome();

            if (success)
            {
                IncomeAdd.Owner.Show();
                IncomeAdd.Close();
            }
        }
コード例 #2
0
        /// <summary>
        ///  Handles the <see cref="Views.IncomeAdd"/> form being opened from the <see cref="Views.IncomeView"/> form
        /// </summary>
        /// <param name="sender">The sender object</param>
        /// <param name="e">Event arguments</param>
        public static void AddButtonClicked(object sender, EventArgs e)
        {
            if (IncomeAdd == null)
            {
                IncomeAdd             = new IncomeAdd();
                IncomeAdd.FormClosed += IncomeAddViewOnFormClosed;
            }

            IncomeAdd.Show(IncomeView);
            IncomeView.Hide();
        }
コード例 #3
0
 /// <summary>
 ///  Handles the cancel button being clicked on the <see cref="Views.IncomeAdd"/> form
 /// </summary>
 /// <param name="sender">The sender object</param>
 /// <param name="e">Event arguments</param>
 public static void AddCancelClicked(object sender, EventArgs e)
 {
     IncomeAdd.Owner.Show();
     IncomeAdd.Close();
 }