Exemplo n.º 1
0
 private bool RestoreState(String deviceSpecificID)
 {
     if (null != deviceSpecificID)
     {
         _currentDeviceSpecificID = deviceSpecificID.ToLower(CultureInfo.InvariantCulture);
         PropertyOverridesCachedState state =
             (PropertyOverridesCachedState)_cachedDeviceSpecifics[
                 _currentDeviceSpecificID
             ];
         if (state != null)
         {
             state.Restore(_cbChoices);
             foreach (ChoiceTreeNode node in state.Choices)
             {
                 node.Choice.Refresh();
             }
             return(true);
         }
     }
     else
     {
         _currentDeviceSpecificID = null;
     }
     return(false);
 }
Exemplo n.º 2
0
 private void SaveChoices()
 {
     if (_currentDeviceSpecificID != null)
     {
         CacheCurrentState();
     }
     foreach (DictionaryEntry entry in _cachedDeviceSpecifics)
     {
         PropertyOverridesCachedState state =
             (PropertyOverridesCachedState)entry.Value;
         state.SaveChoicesFromComboBox(
             _designer,
             (String)entry.Key
             );
     }
 }
 private void CacheState(String deviceSpecificID)
 {
     _cachedDeviceSpecifics[deviceSpecificID] = 
         new PropertyOverridesCachedState(_cbChoices);
 }
Exemplo n.º 4
0
 private void CacheState(String deviceSpecificID)
 {
     _cachedDeviceSpecifics[deviceSpecificID] =
         new PropertyOverridesCachedState(_cbChoices);
 }