private void AcceptBtn_Click(object sender, RoutedEventArgs e) { /* * Note.Bottom = BottomCombo.Text ?? "Песок"; * Note.CatchWeight = CatchWeightUpDown.Value ?? 0; * Note.CatchCount = ((ShowAllCatchesViewModel)(CatchPanel.DataContext)).GetCount() + ((ShowAllTrophiesViewModel)(TrophyPanel.DataContext)).GetCount(); + Note.Cloud = (CloudCombo.SelectedItem as Icon)?.Text ?? "Ясно"; + Note.Date = (DateTime)DatePick.SelectedDate; + Note.Depth = DepthUpDown.Value ?? 0.0; + Note.Distance = (int)(DistanceUpDown.Value ?? 0); + Note.EndTime = new DateTime(1,1,1,0,0,0,0) + EndTimePick.SelectedTime.Value; + Note.Flow = FlowCombo.Text; + Note.Moon = (MoonCombo.SelectedItem as Icon)?.Text ?? "Полнолуние"; + Note.NoteString = NoteStringTxt.Text; + Note.Rainfall = RainfallCheck.IsChecked ?? false; + Note.Pressure = (int)(PressureUpDown.Value ?? 0); + Note.StartTime = new DateTime(1, 1, 1, 0, 0, 0, 0) + StartTimePick.SelectedTime.Value; + Note.TempMax = (int)(TMaxUpDown.Value ?? 0); + Note.TempMin = (int)(TMinUpDown.Value ?? 0); + Note.TempWater = (int)(TWaterUpDown.Value ?? 0); + Note.Waste = WasteCombo.Text; + Note.WaterHeight = WaterHeightCombo.Text; + Note.WaterNote = WaterNoteTxt.Text; + Note.WaterTransparency = WaterTransparencyCombo.Text; + Note.WeatherNote = WeatherNoteTxt.Text; + Note.WindDir = WindDirCombo.Text; + Note.WindSpeed = (int)(WindSpeedUpDown.Value ?? 0); */ LocationGallery.SaveToFolder((DataContext as EditNoteViewModel).Note.Photos); DialogResult = true; }