コード例 #1
0
ファイル: Settings.cs プロジェクト: YustasGals/Simulator_MPSA
        public SettingsTableViewModel(Sett settings)
        {
            SettingsViewModel[] temp = new SettingsViewModel[settings.items.Count];
            string[]            keys = new string[settings.items.Count];
            settings.items.Keys.CopyTo(keys, 0);

            for (int i = 0; i < settings.items.Count; i++)
            {
                temp[i] = new SettingsViewModel(settings.items[keys[i]]);
            }
            Items = temp;
        }
コード例 #2
0
        public StationSetup()
        {
            InitializeComponent();

            Sett s = new Sett();

            s.items = new Dictionary <string, SettingsItem>();

            foreach (KeyValuePair <string, SettingsItem> pair in Sett.Instance.items)
            {
                s.items.Add(pair.Key, pair.Value);
            }

            viewModel        = new SetupViewModel(s);
            this.DataContext = viewModel;
        }
コード例 #3
0
 public SetupViewModel(Sett initSettings)
 {
     settings = initSettings;
 }