예제 #1
0
 public TargetDetailsPage(int targetId, bool forEdit)
 {
     InitializeComponent();
     this.targetId = targetId;
     var model = new TargetEditModel() { Id = forEdit ? targetId : -1 };
     model.Load();
     TargetEditForm.DataContext = model;
     YearComboBox.Focus();
     if (model.AddChartList.Count > 0)
         AddChartList.SelectedItem = model.AddChartList.First();
     CommonHelper.InitValidation(SummInput, Month1WeightInput, Month2WeightInput, Month3WeightInput, ColorComboBox);
     SetMoveButtonState();
 }