コード例 #1
0
        public static List <string> GetProfiles(Project project, ToolWindowType toolWindowType)
        {
            if (toolWindowType == ToolWindowType.PluginTraceViewer)
            {
                return(null);
            }

            SpklConfig spklConfig  = ConfigFile.GetSpklConfigFile(project);
            string     projectPath = ProjectWorker.GetProjectPath(project);

            switch (toolWindowType)
            {
            case ToolWindowType.PluginDeployer:
                return(GetConfigProfiles(projectPath, spklConfig.plugins));

            case ToolWindowType.SolutionPackager:
                return(GetConfigProfiles(projectPath, spklConfig.solutions));

            case ToolWindowType.WebResourceDeployer:
                return(GetConfigProfiles(projectPath, spklConfig.webresources));

            default:
                return(null);
            }
        }
コード例 #2
0
        public ToolWindowAttribute(string displayName, ToolWindowType type, Type viewType, bool shouldShareViewModelInstance = true)
        {
            DisplayName = displayName;

            ToolWindowType = type;

            ViewType = viewType;

            ShareViewModelInstance = shouldShareViewModelInstance;
        }
コード例 #3
0
ファイル: XFeaturesPackage.cs プロジェクト: gramcha/XFeatures
 private ToolWindowPane CreateToolWindow(ToolWindowType type)
 {
     for (int i = 0; ; i++)
     {
         //Find Existing windows.
         ToolWindowPane currentwnd = null;
         switch (type)
         {
             case ToolWindowType.RSSFeed:
                 currentwnd = this.FindToolWindow(typeof(RSSViewerWindow), i, false);
                 break;
             case ToolWindowType.Settings:
                 currentwnd = this.FindToolWindow(typeof(SettingsWindow), i, false);
                 break;
             case ToolWindowType.FAFFileOpen:
                 currentwnd = this.FindToolWindow(typeof(FAFFileOpenToolWindow), i, false);
                 break;
             case ToolWindowType.MultiWordFind:
                 currentwnd = this.FindToolWindow(typeof(MultiTextFindWindow), i, false);
                 break;
         }
         if (currentwnd == null)
         {
             //Create the window with 1'st free id.
             ToolWindowPane wnd = null;
             switch (type)
             {
                 case ToolWindowType.RSSFeed:
                     wnd = this.CreateToolWindow(typeof(RSSViewerWindow), i) as ToolWindowPane;
                     break;
                 case ToolWindowType.Settings:
                     wnd = this.CreateToolWindow(typeof(SettingsWindow), i) as ToolWindowPane;
                     break;
                 case ToolWindowType.FAFFileOpen:
                     wnd = this.CreateToolWindow(typeof(FAFFileOpenToolWindow), i) as ToolWindowPane;
                     break;
                 case ToolWindowType.MultiWordFind:
                     wnd = this.CreateToolWindow(typeof(MultiTextFindWindow), i) as ToolWindowPane;
                     break;
             }
             //ToolWindowPane wnd = new RSSViewerWindow();
             if ((null == wnd) || (null == wnd.Frame))
             {
                 throw new NotSupportedException("Error in window creation");
             }
             return wnd;
         }
         else
         {
             return currentwnd;
         }
     }
 }