예제 #1
0
        private void CreateButtons()
        {
            #region 로그인 버튼

            CreateLoginButton();

            #endregion

            #region 예약 버튼

            _reservationButton         = new Tools.Controls.Button();
            _reservationButton.Text    = "예약";
            _reservationButton.Enabled = false;
            _reservationButton.Click  += (_, __) => new ReservationForm().ShowDialog();
            Controls.AddControl(_reservationButton, Range["C7"], "예약");

            #endregion

            #region 결제내역 버튼

            _paymentListButton         = new Tools.Controls.Button();
            _paymentListButton.Text    = "결제내역";
            _paymentListButton.Enabled = false;
            _paymentListButton.Click  += (_, __) => Globals.PaymentListSheet.Activate();
            Controls.AddControl(_paymentListButton, Range["E7"], "결제내역");

            #endregion

            #region 집계차트 버튼

            var summaryButton = new Tools.Controls.Button();
            summaryButton.Text   = "집계차트";
            summaryButton.Click += (_, __) => Globals.ChartSheet.Activate();
            Controls.AddControl(summaryButton, Range["G7"], "집계차트");

            #endregion

            #region 리뷰 버튼

            var reviewButton = new Tools.Controls.Button();
            reviewButton.Text   = "리뷰";
            reviewButton.Click += (_, __) => Globals.ReviewSheet.Activate();
            Controls.AddControl(reviewButton, Range["D10"], "리뷰");

            #endregion

            #region 종료

            var closeButton = new Tools.Controls.Button();
            closeButton.Click += (_, __) =>
            {
                Globals.ThisWorkbook.Save();
                Globals.ThisWorkbook.Close();
            };
            closeButton.Text = "종료";
            Controls.AddControl(closeButton, Range["F10"], "종료");

            #endregion
        }