private UserFriendlySupplier CloneFor(IPreferenceFolder snapshot)
            {
                UserFriendlySupplier n = new UserFriendlySupplier();

                n._folder = snapshot;
                n._i      = snapshot.ChildAt(0) as IIntPreferenceItem;
                n._s      = snapshot.ChildAt(1) as IStringPreferenceItem;
                return(n);
            }
Beispiel #2
0
        private KeyBindConfiguration GetKeyBindInternal(IPreferenceFolder folder)
        {
            Debug.Assert(folder.Id == PLUGIN_ID);
            IPreferenceLooseNode ln = (IPreferenceLooseNode)folder.ChildAt(_keyBindNode.Index);

            Debug.Assert(ln != null);
            KeyBindConfiguration kb = ln.Content as KeyBindConfiguration;

            Debug.Assert(kb != null);
            return(kb);
        }
Beispiel #3
0
        public IPreferenceItem ConvertItem(IPreferenceFolder child_folder, IPreferenceItem item_in_template)
        {
            if (_id != child_folder.Id)
            {
                throw new ArgumentException("child_folder is not compatible for this array");
            }
            if (!_template.Contains(item_in_template))
            {
                throw new ArgumentException("item_in_template must be a member of the template folder");
            }

            IPreferenceItem r = (IPreferenceItem)child_folder.ChildAt(item_in_template.Index);

            Debug.Assert(r.GetType() == item_in_template.GetType());
            return(r);
        }
Beispiel #4
0
 private UserFriendlySupplier CloneFor(IPreferenceFolder snapshot)
 {
     UserFriendlySupplier n = new UserFriendlySupplier();
     n._folder = snapshot;
     n._i = snapshot.ChildAt(0) as IIntPreferenceItem;
     n._s = snapshot.ChildAt(1) as IStringPreferenceItem;
     return n;
 }
Beispiel #5
0
 protected IIntPreferenceItem ConvertItem(IIntPreferenceItem item)
 {
     return(_folder.ChildAt(item.Index).AsItem().AsInt());
 }
Beispiel #6
0
 private KeyBindConfiguration GetKeyBindInternal(IPreferenceFolder folder) {
     Debug.Assert(folder.Id == PLUGIN_ID);
     IPreferenceLooseNode ln = (IPreferenceLooseNode)folder.ChildAt(_keyBindNode.Index);
     Debug.Assert(ln != null);
     KeyBindConfiguration kb = ln.Content as KeyBindConfiguration;
     Debug.Assert(kb != null);
     return kb;
 }