void RefreshCmdExecuted(object target, ExecutedRoutedEventArgs e) { if (e.Parameter != null) { HexgridPanel.SetMapDirty(); } HexgridPanel.Refresh(); }
void RefreshLandmarkMenu(MyMapDisplay model) { Model.LandmarkToShow = 0; while (LandmarkItems.Count > 1) { LandmarkItems.RemoveAt(1); } foreach (var item in model.Landmarks.Select((l, i) => new ListBoxItem { Name = String.Format("No_{0}", i), Content = String.Format(CultureInfo.InvariantCulture, "{0}", l.Coords) })) { LandmarkItems.Add(item); } HexgridPanel.SetMapDirty(); }
private void ShowRangeLineToggled(object sender, EventArgs <bool> e) => RefreshAfter(() => { MapBoard.ShowRangeLine = e.Value; HexgridPanel.SetMapDirty(); MapBoard.StartHex = MapBoard.StartHex; // Indirect, but it works. });
private void SelectedLandmarkChanged(object sender, EventArgs <int> e) => RefreshAfter(() => { MapBoard.LandmarkToShow = e.Value; HexgridPanel.SetMapDirty(); });