Changeset 2037


Ignore:
Timestamp:
Oct 30, 2010, 12:59:52 AM (11 years ago)
Author:
Sven Rech
Message:
  • improved tab captioning
  • Only one tab for each plugin description
Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/CrypPluginBase/PluginExtension.cs

    r1424 r2037  
    400400            return keyword;
    401401          }
    402         }       
     402        }
     403
     404        private static Dictionary<string, FlowDocument> descriptionDocumentCache = new Dictionary<string, FlowDocument>();
    403405
    404406        public static FlowDocument GetDescriptionDocument(this IPlugin plugin)
     
    407409          {
    408410            string description = plugin.GetPluginInfoAttribute().DescriptionUrl;
     411            if (descriptionDocumentCache.ContainsKey(description))
     412                return descriptionDocumentCache[description];
     413
    409414            if (description != null && description != string.Empty && description != "")
    410415            {
     
    412417              if (sIndex == -1) return null;
    413418              XamlReader xaml = new XamlReader();
    414               return (FlowDocument)xaml.LoadAsync(Application.GetResourceStream(new Uri(string.Format("pack://application:,,,/{0};component/{1}", description.Substring(0, sIndex), description.Substring(sIndex + 1)))).Stream);
     419              var result = (FlowDocument)xaml.LoadAsync(Application.GetResourceStream(new Uri(string.Format("pack://application:,,,/{0};component/{1}", description.Substring(0, sIndex), description.Substring(sIndex + 1)))).Stream);
     420              descriptionDocumentCache.Add(description, result);
     421              return result;
    415422            }
    416423            return null;
  • trunk/CrypPlugins/WorkspaceManager/WorkspaceManager.cs

    r1994 r2037  
    140140                WorkspaceSpaceEditorView.Load(WorkspaceModel);
    141141                HasChanges = false;
    142                 this.OnProjectTitleChanged.BeginInvoke(this, fileName, null, null);
     142                this.OnProjectTitleChanged.BeginInvoke(this, System.IO.Path.GetFileName(fileName), null, null);
    143143            }
    144144            catch (Exception ex)
     
    160160                ModelPersistance.saveModel(this.WorkspaceModel, fileName);
    161161                HasChanges = false;
    162                 this.OnProjectTitleChanged.BeginInvoke(this, fileName, null, null);
     162                this.OnProjectTitleChanged.BeginInvoke(this, System.IO.Path.GetFileName(fileName), null, null);
    163163            }
    164164            catch (Exception ex)
Note: See TracChangeset for help on using the changeset viewer.