Example #1
0
 public NavCategoryGroupInitializer(CategoryGroupType t, string h, string n, string a)
 {
     type = t;
     headerResourceKey     = h;
     modeResourceKey       = n;
     automationResourceKey = a;
 }
Example #2
0
            // GetIndex is 0-based, GetPosition is 1-based
            public static int GetIndexInGroup(ViewMode mode, CategoryGroupType type)
            {
                int index = -1;
                var iter  = s_categoryManifest.FirstOrDefault(initializer =>
                {
                    if (initializer.Value.groupType == type)
                    {
                        index++;
                        return(initializer.Value.viewMode == mode);
                    }

                    return(false);
                });

                return((iter != null) ? index : -1);
            }
Example #3
0
            public static int GetFlatIndex(ViewMode mode)
            {
                int index = -1;
                CategoryGroupType type = CategoryGroupType.None;
                var iter = s_categoryManifest.FirstOrDefault(initializer => {
                    index++;
                    if (initializer.Value.groupType != type)
                    {
                        type = initializer.Value.groupType;
                        index++;
                    }

                    return(initializer.Value.viewMode == mode);
                });

                return((iter != null) ? index : -1);
            }
Example #4
0
 public NavCategoryInitializer(
     ViewMode mode,
     int id,
     string name,
     string nameKey,
     string glyph,
     CategoryGroupType group,
     MyVirtualKey vKey,
     bool categorySupportsNegative)
 {
     this.viewMode         = mode;
     this.serializationId  = id;
     this.friendlyName     = name;
     this.nameResourceKey  = nameKey;
     this.glyph            = glyph;
     this.groupType        = group;
     this.virtualKey       = vKey;
     this.supportsNegative = categorySupportsNegative;
 }
Example #5
0
 internal static Task <string> GetStringToPaste(ViewMode mode, CategoryGroupType categoryGroupType, int numberBase, int bitLengthType) => throw new NotImplementedException();
Example #6
0
            public static bool IsModeInCategoryGroup(ViewMode mode, CategoryGroupType type)
            {
                var iter = s_categoryManifest.FirstOrDefault(c => c.Value.viewMode == mode && c.Value.groupType == type);

                return(iter != null);
            }