/// <summary> /// Fires the ChangesApplied event. /// </summary> protected virtual void OnChangesApplied() { if (_rasterCategory != null) { _rasterCategory.LowColor = grdSlider.MinimumColor; _rasterCategory.HighColor = grdSlider.MaximumColor; } Original.CopyProperties(_rasterCategory); ChangesApplied?.Invoke(this, EventArgs.Empty); }
public void SetData(MyModel model) { if (model.Initialized) { this.Model = model; ChangesApplied?.Invoke(Model); } else { // Handle case where model isn't initialized } }
/// <summary> /// Fires the ChangesApplied event. /// </summary> protected virtual void OnChangesApplied() { _activeCategory.Expression = sqlExpression.ExpressionText; ChangesApplied?.Invoke(this, EventArgs.Empty); if (_original != null) { _original.CopyProperties(_layer); _original.CreateLabels(); // We have no guarantee that the MapFrame property is set, but redrawing the map is important. _original.FeatureLayer.MapFrame?.Invalidate(); } }
/// <summary> /// Applies the changes that have been specified in this control. /// </summary> protected virtual void OnApplyChanges() { _originalLayer.Symbolizer = _newLayer.Symbolizer.Copy(); _originalScheme = _newLayer.Symbolizer.Scheme.Copy(); if (_originalLayer.Symbolizer.ShadedRelief.IsUsed) { if (_originalLayer.Symbolizer.ShadedRelief.HasChanged || _originalLayer.Symbolizer.HillShade == null) { _originalLayer.Symbolizer.CreateHillShade(mwProgressBar1); } } _originalLayer.WriteBitmap(mwProgressBar1); ChangesApplied?.Invoke(_originalLayer, EventArgs.Empty); }
/// <summary> /// Fires the ChangesApplied event. /// </summary> protected virtual void OnApplyChanges() { ChangesApplied?.Invoke(this, new FilterEventArgs(sqlQueryControl1.ExpressionText)); }
/// <summary> /// Fires the ChangesApplied event. /// </summary> protected void OnApplyChanges() { UpdatePreview(); _original.CopyProperties(_symbolizer); ChangesApplied?.Invoke(this, EventArgs.Empty); }
/// <summary> /// Occurs during apply changes operations and is overrideable in subclasses. /// </summary> protected virtual void OnApplyChanges() { _rasterCategoryControl.ApplyChanges(); ChangesApplied?.Invoke(_layer, EventArgs.Empty); }
/// <summary> /// Fires the ChangesApplied event /// </summary> protected virtual void OnApplyChanges() { detailedPointSymbolControl1.ApplyChanges(); ChangesApplied?.Invoke(this, EventArgs.Empty); }
/// <summary> /// Fires a the ChangesApplied event. /// </summary> /// <param name="changedItem">Item that was changed.</param> protected virtual void OnChangesApplied(object changedItem) { ChangesApplied?.Invoke(this, new ChangedObjectEventArgs(changedItem)); }
protected virtual void RaiseChangesApplied(IList <IEntityStateEntry> entityStateEntries) { ChangesApplied?.Invoke(this, new ChangesAppliedEventArgs(entityStateEntries)); }
/// <summary> /// Fires the ChangesApplied event. If an original object IDescriptor has been set, /// then this directly handles the update. /// </summary> protected virtual void OnChangesApplied() { OriginalObject?.CopyProperties(PropertyGrid.SelectedObject); ChangesApplied?.Invoke(this, EventArgs.Empty); }
/// <summary> /// Applies the changes that have been specified in this control. /// </summary> protected virtual void OnApplyChanges() { _originalLayer.Symbolizer = _newLayer.Symbolizer.Copy(); ChangesApplied?.Invoke(_originalLayer, EventArgs.Empty); }
protected virtual void RaiseChangesApplied(BulkInsertAppliedEventArgs e) { ChangesApplied?.Invoke(this, e); }
/// <summary> /// Fires the ChangesApplied event /// </summary> protected virtual void OnApplyChanges() { _original.CopyProperties(_symbolizer); ChangesApplied?.Invoke(this, EventArgs.Empty); }
/// <summary> /// Fires the ChangesApplied event. /// </summary> protected virtual void OnApplyChanges() { // This duplicates the content from the edit copy, but leaves the original object reference intact so that the map updates. _original.CopyProperties(_symbolizer); ChangesApplied?.Invoke(this, EventArgs.Empty); }
/// <summary> /// Fires the ChangesApplied event /// </summary> protected virtual void OnApplyChanges() { ChangesApplied?.Invoke(this, EventArgs.Empty); }
private void ApplyChangesClicked(object sender, RoutedEventArgs e) { if (SelectedElement == null && SelectedObject == null) { return; } int tempIntValue; double tempDoubleValue; var levelViewModel = (LevelViewModel)DataContext; if (SelectedElement != null) { SelectedElement.WorldElement.usesRotFlags = editor_UseRotFlagsBox.IsChecked.GetValueOrDefault(); // Uses Rot Flags if (GetIntHex(editor_XYZRotFlagsBox.Text, out tempIntValue)) // XYZ Rot Flags { SelectedElement.WorldElement.xyzRotFlags = tempIntValue; } if (GetDouble(editor_CosBox.Text, out tempDoubleValue)) // Cos { SelectedElement.WorldElement.cosAlpha = tempDoubleValue; } if (GetDouble(editor_SinBox.Text, out tempDoubleValue)) // Sin { SelectedElement.WorldElement.sinAlpha = tempDoubleValue; } if (GetDouble(editor_PosXBox.Text, out tempDoubleValue)) // X { SelectedElement.WorldElement.pos.X = tempDoubleValue; } if (GetDouble(editor_PosYBox.Text, out tempDoubleValue)) // Y { SelectedElement.WorldElement.pos.Y = tempDoubleValue; } if (GetDouble(editor_PosZBox.Text, out tempDoubleValue)) // Z { SelectedElement.WorldElement.pos.Z = tempDoubleValue; } levelViewModel.RebuildScene(); } else if (SelectedObject != null) { SelectedObject.ObjectData.Name = editor_Obj_NameBox.Text; // Name if (GetIntHex(editor_Obj_I6Box.Text, out tempIntValue)) // I6 { SelectedObject.ObjectData.I6 = (short)tempIntValue; } if (GetDouble(editor_Obj_Float1Box.Text, out tempDoubleValue)) // Float 1 { SelectedObject.ObjectData.Floats[0] = (float)tempDoubleValue; } if (GetDouble(editor_Obj_Float2Box.Text, out tempDoubleValue)) // Float 2 { SelectedObject.ObjectData.Floats[1] = (float)tempDoubleValue; } if (GetDouble(editor_Obj_Float3Box.Text, out tempDoubleValue)) // Float 3 { SelectedObject.ObjectData.Floats[2] = (float)tempDoubleValue; } SelectedObject.ObjectData.Properties.Clear(); SelectedObject.ObjectData.Properties.AddRange(editor_Obj_PropertiesBox.Text.Split(new[] { '\n', '\r' }, StringSplitOptions.RemoveEmptyEntries)); levelViewModel.ObjectManager.RemoveObjectFromList(SelectedObject); var newObject = levelViewModel.ObjectManager.ParseObject(SelectedObject.ObjectData); SelectedObject = newObject; levelViewModel.RebuildScene(); } ChangesApplied?.Invoke(this, EventArgs.Empty); }