예제 #1
0
        /// <summary>
        /// Устроиться на работу
        /// </summary>
        /// <param name="finalJob">Работа</param>
        public void MyWorkFunc(FinalJob finalJob)
        {
            _currentJob = finalJob;

            EnableButtom(buttonQuit, true);
            EnableButtom(buttonFindJob, false);

            CurrentWork();

            Income_AddWork(_currentJob.Salary_End);
        }
예제 #2
0
        /// <summary>
        /// Уволиться с работы
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void QuitWork_Click(object sender, EventArgs e)
        {
            if (_currentJob != null)
            {
                Income_AddWork(-_currentJob.Salary_End);

                _currentJob = null;

                EnableButtom(buttonQuit, false);
                EnableButtom(buttonFindJob, true);

                CurrentWork();

                _numberMonthsWorked = 0;
            }
        }