private void OnBrowseClicked(object sender, RoutedEventArgs e)
        {
            if (ModelTypeService.ModelTypes == null)
            {
                return;
            }

            ActorViewModel?vm = this.DataContext as ActorViewModel;

            if (vm == null)
            {
                return;
            }

            ModelTypes?selected = null;

            foreach (ModelTypes modelType in ModelTypeService.ModelTypes)
            {
                if (modelType.Id == vm.ModelType)
                {
                    selected = modelType;
                }
            }

            SelectorDrawer.Show <ModelTypeSelector, ModelTypes>("Model Type", selected, (v) => { vm.ModelType = v.Id; });
        }
Пример #2
0
        private void OnWeatherClicked(object sender, RoutedEventArgs e)
        {
            WeatherSelector selector = new WeatherSelector();

            SelectorDrawer.Show(selector, this.TerritoryService.CurrentWeather, (w) =>
            {
                this.TerritoryService.CurrentWeather = w;
            });
        }
Пример #3
0
        private void OnBrowseClicked(object sender, RoutedEventArgs e)
        {
            if (Module.ModelTypes == null)
            {
                return;
            }

            ModelTypes selected = null;

            foreach (ModelTypes modelType in Module.ModelTypes)
            {
                if (modelType.Id == this.ModelType)
                {
                    selected = modelType;
                }
            }

            SelectorDrawer.Show <ModelTypeSelector, ModelTypes>("Model Type", selected, (v) => { this.ModelType = v.Id; });
        }
Пример #4
0
 private void OnLoadNpcClicked(object sender, RoutedEventArgs e)
 {
     SelectorDrawer.Show <NpcSelector, INpcResident>("Select NPC", null, (v) => { this.ApplyNpc(v.Appearance); });
 }
Пример #5
0
        public static void Show(string title, Item current, List <Item> options, Action <Item> changed)
        {
            GenericSelector selector = new GenericSelector(options);

            SelectorDrawer.Show <Item>(title, selector, current, changed);
        }