void RefreshCmdExecuted(object target, ExecutedRoutedEventArgs e)
 {
     if (e.Parameter != null)
     {
         HexgridPanel.SetMapDirty();
     }
     HexgridPanel.Refresh();
 }
Example #2
0
        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();
        }
Example #3
0
 private void ShowRangeLineToggled(object sender, EventArgs <bool> e)
 => RefreshAfter(() => {
     MapBoard.ShowRangeLine = e.Value;
     HexgridPanel.SetMapDirty();
     MapBoard.StartHex = MapBoard.StartHex; // Indirect, but it works.
 });
Example #4
0
 private void SelectedLandmarkChanged(object sender, EventArgs <int> e)
 => RefreshAfter(() => {
     MapBoard.LandmarkToShow = e.Value;
     HexgridPanel.SetMapDirty();
 });