Exemple #1
0
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);

            Glazer glazer = (Glazer)e.Parameter;

            populateTextBoxes(glazer);
        }
Exemple #2
0
 private void populateTextBoxes(Glazer glazer)
 {
     this.lblDate.Text       = glazer.Date.ToShortDateString();
     this.lblHeight.Text     = glazer.Height.ToString();
     this.lblWidth.Text      = glazer.Width.ToString();
     this.lblQuantity.Text   = glazer.Quantity.ToString();
     this.lblColor.Text      = glazer.Color.ToString();
     this.lblGlassArea.Text  = glazer.GlassArea.ToString();
     this.lblWoodLength.Text = glazer.WoodLength.ToString();
 }
        private void ButtonCalculate_Click(object sender, RoutedEventArgs e)
        {
            double width  = ToDouble(this.textWidth);
            double height = ToDouble(this.textHeight);

            Glazer glazer = new Glazer()
            {
                Height     = ToDouble(this.textWidth),
                Width      = ToDouble(this.textHeight),
                WoodLength = 2 * (width + height) * 3.25,
                GlassArea  = 2 * (width + height),
                Color      = this.ComboBoxColors.SelectedValue.ToString(),
                Date       = DateTime.Today,
                Quantity   = Int32.Parse(this.sliderQuantity.Value.ToString())
            };

            Frame.Navigate(typeof(Display), glazer);
        }