Пример #1
0
        public ProfileSwitchKeyTableRowModel(ProfileSwitchKeyTableManager profileSwitchKeyTable, HotkeyProfile profile, int profileCount)
        {
            _profileSwitchKeyTable = profileSwitchKeyTable;
            _profile = profile;

            for (int i = 1; i <= profileCount; i++)
            {
                SwitchKeyCells.Add(new SwitchKeyCellModel(profileSwitchKeyTable, profile.ProfileNum, i));
            }
        }
Пример #2
0
        public SwitchKeyTableWindowViewModel(IEventAggregator eventAggregator,
                                             ProfileSwitchKeyTableManager profileSwitchKeyTable,
                                             ProfileManager profileManager)
        {
            eventAggregator.SubscribeOnUIThread(this);

            int profileCount = profileManager.ProfileCount;

            foreach (var profile in profileManager.Profiles)
            {
                ProfileNames.Add(profile.ProfileName);

                SwitchKeyRows.Add(new ProfileSwitchKeyTableRowModel(
                                      profileSwitchKeyTable,
                                      profile,
                                      profileCount));
            }
        }
Пример #3
0
 public SwitchKeyCellModel(ProfileSwitchKeyTableManager profileSwitchKeyTableManager, int from, int to)
 {
     _profileSwitchKeyTableManager = profileSwitchKeyTableManager;
     _fromIdx = from - 1;
     _toIdx   = to - 1;
 }