public InfoView(ScenarioBase scenario) : this()
        {
            var model = new ScenarioModel(scenario);

            DataContext = model;

            Unloaded += (o, e) => model.Dispose();

            itemView.Click += (o, e) => InfoViewSwitch.Show((newVal) => model.ScenarioValue = newVal);
        }
Beispiel #2
0
        public static void Show(Action <string> callbackEnter, bool numeric = false, double min = 0, double max = 100)
        {
            var @switch = new InfoViewSwitch(numeric, min, max);
            var dialog  = new DialogView(@switch);

            @switch.ApplyClicked += (o, e) =>
            {
                callbackEnter?.Invoke(e.Value);
                dialog.Close();
            };
            dialog.Show();
        }