示例#1
0
        public DisplayQuote(DeskQuote deskQuote)
        {
            InitializeComponent();

            _deskQuote = deskQuote;

            NameTextBox.Text           = _deskQuote.Name;
            WidthNumericUpDown.Value   = _deskQuote.NewDesk.Width;
            DepthNumericUpDown.Value   = _deskQuote.NewDesk.Depth;
            DrawersNumericUpDown.Value = _deskQuote.NewDesk.NumDrawers;
            MaterialText.Text          = _deskQuote.NewDesk.SurfaceMaterial.ToString();
            RushText.Text = _deskQuote.Rush.ToString();

            NameTextBox.Enabled          = false;
            WidthNumericUpDown.Enabled   = false;
            DepthNumericUpDown.Enabled   = false;
            DrawersNumericUpDown.Enabled = false;
            MaterialText.Enabled         = false;
            RushText.Enabled             = false;

            QuoteLabel.Text = _deskQuote.QuoteTotal(_deskQuote).ToString("c");
        }