コード例 #1
0
 public bool IsViewShowing(string viewId)
 {
     string[] paths = BasePath.Split('/');
     if (paths.Length > 0)
     {
         if (paths[paths.Length - 1] == "Detail")
         {
             if (ActiveView != null && ActiveView.ViewName == viewId)
             {
                 return(true);
             }
             else
             {
                 return(false);
             }
         }
         else if (paths[paths.Length - 1] == "List")
         {
             return(this.IsDockViewShowing(viewId));
         }
         else
         {
             throw new Exception("Error basePath :" + BasePath);
         }
     }
     else
     {
         throw (new Exception("Error basePath :" + BasePath));
     }
 }
コード例 #2
0
ファイル: Item.cs プロジェクト: Geeksltd/ProductivityTools
        void BuildDisplayPath()
        {
            var splittedBasePath   = BasePath.Split('\\').Where(path => path != string.Empty).ToArray();
            var currentProjectName = splittedBasePath[splittedBasePath.Length - 1];

            if (currentProjectName == FileName.Split('\\')[0])
            {
                DisplayPath = FileName;
            }
            else
            {
                DisplayPath = currentProjectName + FileName;
            }
        }