public override void RunCommand(RasterColorSchemeCommand command)
        {
            switch (command)
            {
            case RasterColorSchemeCommand.AddInterval:
                var interval = new RasterInterval()
                {
                    LowValue  = 0.0,
                    HighValue = 0.0,
                };
                _view.Intervals.Add(interval);
                break;

            case RasterColorSchemeCommand.RemoveInterval:
                var item = _view.SelectedInterval;
                if (item != null)
                {
                    View.Intervals.Remove(item);
                }
                break;

            case RasterColorSchemeCommand.Clear:
                if (MessageService.Current.Ask("Do you want to remove all the intervals?"))
                {
                    _view.Intervals.Clear();
                }
                break;

            default:
                throw new ArgumentOutOfRangeException("command");
            }
        }
Esempio n. 2
0
 public static GridColorBreak GetInternal(this RasterInterval interval)
 {
     return(interval.InternalObject as GridColorBreak);
 }