예제 #1
0
 public void Load(string url, string allowingReadAccessTo = null)
 {
     if (allowingReadAccessTo != null)
     {
         var fName = Path.GetFileName(url);
         if (fName == null)
         {
             return;
         }
         var relativeUrl = new Uri(fName, UriKind.Relative);
         var resolver    = new StreamResolver(allowingReadAccessTo);
         try {
             CurrentBrowser.NavigateToLocalStreamUri(relativeUrl, resolver);
         }
         catch (Exception e) {
             Context.DispatchEvent("TRACE", e.Message);
         }
     }
     else
     {
         try {
             CurrentBrowser.Navigate(new Uri(url));
         }
         catch (Exception e) {
             Context.DispatchEvent("TRACE", e.Message);
         }
     }
 }
예제 #2
0
        private StreamResolver GetRowResolver(int rowIndex)
        {
            StreamResolver result;

            if (!RowResolvers.TryGetValue(rowIndex, out result))
                result = RowResolvers[rowIndex] = new StreamResolver(this, rowIndex);

            return result;
        }