コード例 #1
0
ファイル: VarScopeSelect.cs プロジェクト: RHY3756547/FreeSO
 public ScopeDefinition(byte id, string name, ScopeGroup group, string desc)
 {
     ID = id;
     Name = name;
     Group = group;
     Description = desc;
     Total = (((Group == ScopeGroup.Other) ? "" : VarScopeSelect.Categories[(int)Group] + " ") + Name).ToLowerInvariant();
 }
コード例 #2
0
ファイル: ARScope.cs プロジェクト: aleksandar-k03/FitAR
        public void NotifyStateChange(ScopeGroup group, dynamic?data = null)
        {
            if (!Groups.ContainsKey(group))
            {
                return;
            }

            foreach (var action in this.Groups[group])
            {
                try
                {
                    action.Value.Inline.Invoke();
                    action.Value.Override?.Invoke(data);
                }
                catch { }
            }
        }
コード例 #3
0
        public InterlocksVM(IRelatable root, ChangeWatcher watcher,
                            TECCatalogs catalogs, Func <ITECObject, bool> filterPredicate = null)
        {
            if (filterPredicate == null)
            {
                filterPredicate = item => true;
            }
            this.filterPredicate = filterPredicate;

            this.root = root;
            new DirectRelationshipChangedFilter(watcher).DirectRelationshipChanged += parentScopeChanged;


            noneConduit                  = new TECElectricalMaterial();
            noneConduit.Name             = "None";
            this.rootInterlockablesGroup = new ScopeGroup("root");
            this.AddInterlockCommand     = new RelayCommand(addInterlockExecute, canAddInterlock);
            this.DeleteInterlockCommand  = new RelayCommand <TECInterlockConnection>(deleteInterlockExecute, canDeleteInterlock);
            this.ConduitTypes            = new List <TECElectricalMaterial>(catalogs.ConduitTypes);
            this.ConduitTypes.Add(noneConduit);
            this.ConduitType = noneConduit;

            repopulateGroups(null, root, addInterlockable);
        }
コード例 #4
0
ファイル: GoogleScopes.cs プロジェクト: rjshaver/core
 public static string[] ToStrings(ScopeGroup scopeGroup)
 {
     return(scopesDict [scopeGroup]);
 }