Esempio n. 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);
 }
Esempio n. 2
0
        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);
            }
        }
 public override void Loaded(QFrameworkContainer container)
 {
     base.Loaded(container);
     ExplorerViews        = container.ResolveAll <IExplorerProvider>().ToArray();
     ExplorerViewsStrings = container.ResolveAll <IExplorerProvider>().Select(p => p.Name).ToArray();
 }
Esempio n. 4
0
 public override void Loaded(QFrameworkContainer container)
 {
     base.Loaded(container);
     LaucherWindows = container.ResolveAll <IWindowFactory>().Where(c => c.ShowInLauncher).ToList();
 }