예제 #1
0
        private void SelectedEngineChanged(ViewModel sender)
        {
            if (sender.SelectedEngine == null)
                return;

            ExpandToSelected();

            //control_EngineEditor.Focus();
        }
예제 #2
0
        void MainWindow_Loaded(object sender, RoutedEventArgs e)
        {
            // Get the 'ViewModel' resource
            _vm = (ViewModel)Application.Current.Resources["ViewModelDataSource"];

            var test = DB.Instance["General"]["Steading"].Go(55) as ResultObject;

            string result = test.Engine.Name + ":\r\n";

            foreach (var property in test.Properties)
                result += "    " + test[property.Engine.ID] + "\r\n";

            Console.WriteLine(result);

            // Can we create an 'options' object that can be passed down to promote/restrict specific options?
            // Can we create a top-level 'template' of options for a Village, Town, Keep, and City?

            _vm.Results.CollectionChanged += Results_CollectionChanged;
            _vm.SubscribeToChange(() => _vm.SelectedEngine, SelectedEngineChanged);
            web_Results.LoadCompleted += web_Results_LoadCompleted;
        }