Esempio n. 1
0
        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;
        }
Esempio n. 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;
        }
Esempio n. 3
0
 public SetupViewModel(Sett initSettings)
 {
     settings = initSettings;
 }