コード例 #1
0
 public override void Loaded(QFrameworkContainer container)
 {
     if (CurrentWorkspace == null && InvertGraphEditor.Prefs != null)
     {
         CurrentWorkspace = Workspaces.FirstOrDefault(p => p.Identifier == InvertGraphEditor.Prefs.GetString("LastLoadedWorkspace", string.Empty));
     }
     Configurations = container.ResolveAll <WorkspaceConfiguration>().ToDictionary(p => p.WorkspaceType);
 }
コード例 #2
0
ファイル: NodeSystem.cs プロジェクト: DiazGames/oneGame
        public override void Loaded(QFrameworkContainer container)
        {
            base.Loaded(container);
            FlagByName.Clear();
            foreach (var item in InvertApplication.GetDerivedTypes <IDiagramNodeItem>())
            {
                var flagProperties = item.GetProperties(BindingFlags.Default | BindingFlags.Public | BindingFlags.Instance).Where(p => p.IsDefined(typeof(NodeFlag), true)).ToArray();
                foreach (var property in flagProperties)
                {
                    var attr = property.GetCustomAttributes(typeof(NodeFlag), true).OfType <NodeFlag>().FirstOrDefault();
                    FlagByName.Add(attr.Name, new FlagConfig(item, attr.Name, attr.Color)
                    {
                        PropertyInfo = property
                    });
                }
            }

            foreach (var item in container.ResolveAll <FlagConfig>())
            {
                FlagByName.Add(item.FlagName, item);
            }
        }
コード例 #3
0
 public override void Loaded(QFrameworkContainer container)
 {
     base.Loaded(container);
     ExplorerViews        = container.ResolveAll <IExplorerProvider>().ToArray();
     ExplorerViewsStrings = container.ResolveAll <IExplorerProvider>().Select(p => p.Name).ToArray();
 }
コード例 #4
0
 public override void Loaded(QFrameworkContainer container)
 {
     base.Loaded(container);
     LaucherWindows = container.ResolveAll <IWindowFactory>().Where(c => c.ShowInLauncher).ToList();
 }