Beispiel #1
0
        public ProfileDialog(ElementModel element)
        {
            this.InitializeComponent();
            PrimaryButtonText = "Aktualisieren";
            Mode = ProfileDialogMode.Edit;
            _id  = element.Id;
            Init();

            TextBoxProfileNumber.IsEnabled = false;
            TextBoxLength.IsEnabled        = false;
            TextBoxSurface.IsEnabled       = false;

            TextBoxProfileNumber.Text = element.Position;
            TextBoxCount.Text         = element.Count.ToString();
            TextBoxAmount.Text        = element.Amount.ToString();
            TextBoxLength.Text        = element.Length;
            TextBoxDescription.Text   = element.Description;
            TextBoxSurface.Text       = element.Surface;

            List <string> items = ConboBoxContraction.Items.Cast <ComboBoxItem>().Select(item => item.Content.ToString()).ToList();

            ConboBoxContraction.SelectedIndex = items.FindIndex(x => x.Equals(element.Contraction));
        }
Beispiel #2
0
 public ProfileDialog()
 {
     this.InitializeComponent();
     Mode = ProfileDialogMode.Create;
     Init();
 }