예제 #1
0
 private void setAdditionalAction(JavaScriptAction action, string key)
 {
     if (action == null)
     {
         setActionValue(null, key);
         if ((_dictionary["AA"] as PDFDictionary) != null)
         {
             (_dictionary["AA"] as PDFDictionary).RemoveItem(key);
             if ((_dictionary["AA"] as PDFDictionary).Count == 0)
             {
                 _dictionary.RemoveItem("AA");
             }
         }
     }
     else
     {
         JavaScriptAction a = (JavaScriptAction)action.Clone(_documentEssential);
         setActionValue(a, key);
         if ((_dictionary["AA"] as PDFDictionary) == null)
         {
             _dictionary.AddItem("AA", new PDFDictionary());
         }
         (_dictionary["AA"] as PDFDictionary).AddItem(key, a.GetDictionary());
     }
 }
예제 #2
0
 private void setAdditionalAction(JavaScriptAction action, string key)
 {
     if (action == null)
     {
         setActionValue(null, key);
         if (Dictionary["AA"] as PDFDictionary != null)
         {
             (Dictionary["AA"] as PDFDictionary).RemoveItem(key);
             if ((Dictionary["AA"] as PDFDictionary).Count == 0)
             {
                 Dictionary.RemoveItem("AA");
             }
         }
     }
     else
     {
         JavaScriptAction a = (JavaScriptAction)action.Clone(Owner);
         setActionValue(a, key);
         if (Dictionary["AA"] as PDFDictionary == null)
         {
             Dictionary.AddItem("AA", new PDFDictionary());
         }
         (Dictionary["AA"] as PDFDictionary).AddItem(key, a.GetDictionary());
     }
 }