Inheritance: IViewModel, INotifyPropertyChanged
Exemplo n.º 1
0
        public MainViewModel()
        {
            try
            {
                m_config = AppConfig.Load();
            }
            catch(Exception e)
            {
                MessageBox.Show($"app.configを読み込めませんでした:{e.Message}");
                Application.Current.Shutdown();
            }

            Units = new UnitViewModel(m_config);
            OwnedIdol = new OwnedIdolViewModel(m_config,Units);
            ImplementedIdol = new ImplementedIdolViewModel(m_config, OwnedIdol);
            Simulation = new SimulationViewModel(m_config);
        }
Exemplo n.º 2
0
        public MainViewModel()
        {
            try
            {
                m_config = AppConfig.Load();
            }
            catch (Exception e)
            {
                MessageBox.Show($"app.configを読み込めませんでした:{e.Message}");
                Application.Current.Shutdown();
            }

            Units           = new UnitViewModel(m_config, this);
            OwnedIdol       = new OwnedIdolViewModel(m_config, this);
            ImplementedIdol = new ImplementedIdolViewModel(m_config, this);
            Simulation      = new SimulationViewModel(m_config);
            Potential       = new PotentialViewModel(m_config);
        }