コード例 #1
0
        //create real estate button is press
        private void CreateRealEstateBtn_Click(object sender, EventArgs e)
        {
            SetControls();//method call to make controls visible or disable

            //set the image of the imgaBox control
            imageBox.Image = WinSalespersonDemo.Properties.Resources.salesperson_clipart_1_300x200;

            //show the CommissionRateLbl
            CommissionRateLbl.Show();

            //show the  CommisionRateTextBox
            CommisionRateTextBox.Show();

            //hide panel6
            panel6.Hide();

            //show panel5
            panel5.Show();

            //set the location property of createBtn
            CreateBtn.Location = _createBtnOriginalLocation;

            //disabled the button that trigger this event
            ((Button)sender).Enabled = false;

            //instance variable assignment
            _operationType = REALESTATE;

            //enable the  CreateGirlScoutBtn button
            CreateGirlScoutBtn.Enabled = true;
            SaleSpeechLbl.Text         = "";
            SummaryLbl.Text            = "";
            MakeSaleBtn.Enabled        = false;
        }
コード例 #2
0
 private void CreateGirlScoutBtn_Click(object sender, EventArgs e)
 {
     SetControls();
     CommissionRateLbl.Hide();
     CommisionRateTextBox.Hide();
     panel5.Hide();
     panel6.Location             = panel5.Location;
     panel6.Visible              = true;
     CreateBtn.Location          = CommisionRateTextBox.Location;
     _operationType              = GIRSCOUT;
     ((Button)sender).Enabled    = false;
     CreateRealEstateBtn.Enabled = true;
     imageBox.Image              = WinSalespersonDemo.Properties.Resources.girlsScout;
     SaleSpeechLbl.Text          = "";
     SummaryLbl.Text             = "";
     MakeSaleBtn.Enabled         = false;
 }