Exemplo n.º 1
0
        /// <summary>
        /// Init.
        /// </summary>
        /// <param name="htmlContainer">the container of the html to handle load image for</param>
        /// <param name="loadCompleteCallback">callback raised when image load process is complete with image or without</param>
        public ImageLoadHandler(HtmlContainer htmlContainer, ActionInt <Image, Rectangle, bool> loadCompleteCallback)
        {
            ArgChecker.AssertArgNotNull(htmlContainer, "htmlContainer");
            ArgChecker.AssertArgNotNull(loadCompleteCallback, "loadCompleteCallback");

            _htmlContainer        = htmlContainer;
            _loadCompleteCallback = loadCompleteCallback;
        }
Exemplo n.º 2
0
        /// <summary>
        /// Init.
        /// </summary>
        /// <param name="htmlContainer">the container of the html to handle load image for</param>
        /// <param name="loadCompleteCallback">callback raised when image load process is complete with image or without</param>
        public ImageLoadHandler(HtmlContainerInt htmlContainer, ActionInt <RImage, RRect, bool> loadCompleteCallback)
        {
            ArgChecker.AssertArgNotNull(htmlContainer, "htmlContainer");
            ArgChecker.AssertArgNotNull(loadCompleteCallback, "loadCompleteCallback");

            this._htmlContainer        = htmlContainer;
            this._loadCompleteCallback = loadCompleteCallback;
        }
Exemplo n.º 3
0
        public void Test1()
        {
            SomeFunction p = x => x - 1;
            ActionInt    w = x => Debug.WriteLine(x);
            ActionInt    v = x => Debug.WriteLine("hello: {0}", x);

            f2(1, v);
        }
Exemplo n.º 4
0
 /// <summary>
 /// Execute action on all the "td" cells of the table.<br/>
 /// Handle if there is "theader" or "tbody" exists.
 /// </summary>
 /// <param name="table">the table element</param>
 /// <param name="action">the action to execute</param>
 private static void SetForAllCells(CssBox table, ActionInt <CssBox> action)
 {
     foreach (var l1 in table.Boxes)
     {
         foreach (var l2 in l1.Boxes)
         {
             if (l2.HtmlTag != null && l2.HtmlTag.Name == "td")
             {
                 action(l2);
             }
             else
             {
                 foreach (var l3 in l2.Boxes)
                 {
                     action(l3);
                 }
             }
         }
     }
 }
Exemplo n.º 5
0
 /// <summary>
 /// Execute action on all the "td" cells of the table.<br/>
 /// Handle if there is "theader" or "tbody" exists.
 /// </summary>
 /// <param name="table">the table element</param>
 /// <param name="action">the action to execute</param>
 private static void SetForAllCells(CssBox table, ActionInt<CssBox> action)
 {
     foreach (var l1 in table.Boxes)
     {
         foreach (var l2 in l1.Boxes)
         {
             if (l2.HtmlTag != null && l2.HtmlTag.Name == "td")
             {
                 action(l2);
             }
             else
             {
                 foreach (var l3 in l2.Boxes)
                 {
                     action(l3);
                 }
             }
         }
     }
 }
Exemplo n.º 6
0
 public void registerUpdateSelectedItem(ActionInt updateSelectedItem)
 {
     this.updateSelectedItem += updateSelectedItem;
 }
        /// <summary>
        /// Init.
        /// </summary>
        /// <param name="htmlContainer">the container of the html to handle load image for</param>
        /// <param name="loadCompleteCallback">callback raised when image load process is complete with image or without</param>
        public ImageLoadHandler(HtmlContainerInt htmlContainer, ActionInt<RImage, RRect, bool> loadCompleteCallback)
        {
            ArgChecker.AssertArgNotNull(htmlContainer, "htmlContainer");
            ArgChecker.AssertArgNotNull(loadCompleteCallback, "loadCompleteCallback");

            _htmlContainer = htmlContainer;
            _loadCompleteCallback = loadCompleteCallback;
        }
Exemplo n.º 8
0
 void f2(int x, ActionInt onX)
 {
     onX(x + 1);
     onX(x + 2);
     onX(x * 2);
 }