protected override void SubAreaControl_Leaving(object sender, AutoCompleteTextBoxControlEventArgs e) { base.SubAreaControl_Leaving(sender, e); //DisplayItem.SubjectLocationLatitude = (Window.SettingsSubjectLocationControl.GetCurrentObject() as SubjectLocation)?.Coordinates?.Latitude; //DisplayItem.SubjectLocationLongitude = (Window.SettingsSubjectLocationControl.GetCurrentObject() as SubjectLocation)?.Coordinates?.Longitude; }
private void ShootingLocationNameControl_Leaving(object sender, AutoCompleteTextBoxControlEventArgs e) { // set the view model // existing shooting location if (e.Object is ShootingLocation shootingLocation) { DisplayItem.ShootingLocationName = shootingLocation.Name; DisplayItem.ShootingLocationLatitude = shootingLocation.Coordinates?.Latitude; DisplayItem.ShootingLocationLongitude = shootingLocation.Coordinates?.Longitude; // might be null if no photos exist DisplayItem.Photo_1 = ImageTools.ByteArrayToBitmapImage(shootingLocation.Photos?.ElementAtOrDefault(0)?.ImageBytes); DisplayItem.Photo_2 = ImageTools.ByteArrayToBitmapImage(shootingLocation.Photos?.ElementAtOrDefault(1)?.ImageBytes); DisplayItem.Photo_3 = ImageTools.ByteArrayToBitmapImage(shootingLocation.Photos?.ElementAtOrDefault(2)?.ImageBytes); } // new shooting location else { // other attributes set via databinding DisplayItem.ShootingLocationName = Window.ShootingLocationControl.GetCurrentText(); } // RefreshParkingLocationControl(); Window.ShootingLocationLatitudeTextBox.Focus(); }
protected void OnLeavingViaShift(AutoCompleteTextBoxControlEventArgs e) { LeavingViaShiftEventHandler handler = LeavingViaShift; if (handler != null) { LeavingViaShift(this, e); } }
protected void OnObjectChanged(AutoCompleteTextBoxControlEventArgs e) { ObjectChangedEventHandler handler = ObjectChanged; if (handler != null) { ObjectChanged(this, e); } }
protected override void SubjectLocationControl_Leaving(object sender, AutoCompleteTextBoxControlEventArgs e) { base.SubjectLocationControl_Leaving(sender, e); DisplayItem.SubjectLocationLatitude = (e.Object as SubjectLocation)?.Coordinates?.Latitude; DisplayItem.SubjectLocationLongitude = (e.Object as SubjectLocation)?.Coordinates?.Longitude; Window.Settings_SubjectLocationLatituteTextBox.Focus(); Window.Settings_SubjectLocationLatituteTextBox.CaretIndex = Window.Settings_SubjectLocationLatituteTextBox.Text.Length; }
protected override void SubjectLocationControl_Leaving(object sender, AutoCompleteTextBoxControlEventArgs e) { // base class call base.SubjectLocationControl_Leaving(sender, e); // set the view model of the coordinates // DisplayItem.SubjectLocationName = (e.Object as SubjectLocation)?.Name; DisplayItem.SubjectLocationLatitude = (e.Object as SubjectLocation)?.Coordinates?.Latitude; DisplayItem.SubjectLocationLongitude = (e.Object as SubjectLocation)?.Coordinates?.Longitude; // RefreshShootLocationControl(); // Window.ShootingLocationControl.SetFocus(); }
private void ParkingLocationControl_Leaving(object sender, AutoCompleteTextBoxControlEventArgs e) { // existing parking location if (e.Object is ParkingLocation parkingLocation) { DisplayItem.ParkingLocationName = parkingLocation.Name; DisplayItem.ParkingLocationLatitude = parkingLocation.Coordinates.Latitude; DisplayItem.ParkingLocationLongitude = parkingLocation.Coordinates.Longitude; } // new parking location else { DisplayItem.ParkingLocationName = Window.ParkingLocationControl.GetCurrentText(); } // DisplayItem.ParkingLocationName = e.Object is ParkingLocation pl ? pl.Name : Window.ParkingLocationControl.GetCurrentText(); Window.ParkingLocationLatitudeTextBox.Focus(); }
private void _acControler_ObjectChanged(object sender, AutoCompleteTextBoxControlEventArgs e) { AutoCompleteTextBoxControlEventArgs arg = new AutoCompleteTextBoxControlEventArgs(e.Object, e.Text); OnObjectChanged(arg); }
private void _acControler_LeavingViaShift(object sender, AutoCompleteTextBoxControlEventArgs e) { AutoCompleteTextBoxControlEventArgs arg = new AutoCompleteTextBoxControlEventArgs(e.Object, e.Text); OnLeavingViaShift(arg); }
private void SubjectLocationControl_LeavingViaShift(object sender, AutoCompleteTextBoxControlEventArgs e) { SubAreaControl.SetFocus(); }