private static void PlotBooleanValue(FoxitPDFGenerator instance, object value, float y, float x = 0, String compareValue = "")
 {
     if (value != null)
     {
         if (compareValue != String.Empty)
         {
             if (value.ToString() == compareValue)
             {
                 instance.AddReceuil_Selected_Checkbox(y, x);
             }
             else
             {
                 instance.AddReceuil_UnSelected_Checkbox(y, x);
             }
         }
         else
         {
             if (value.ToString() == "1")
             {
                 instance.AddReceuil_Selected_Checkbox(y, x);
             }
             else
             {
                 instance.AddReceuil_UnSelected_Checkbox(y, x);
             }
         }
     }
     else instance.AddReceuil_UnSelected_Checkbox(y, x);
 }
Exemplo n.º 2
0
        private static void PlotBooleanValueWithAutomaticNewPage(FoxitPDFGenerator instance, object value, ref float y, float x = 0, String compareValue = "")
        {
            const float heightRef = 40;
            if (y > 0)
            {
                float pixelRestant = instance.DEFAULT_PAGE_SIZE - (y + height);
                if (pixelRestant < heightRef)
                {
                    instance.CreatePage();
                    y = 0;
                }
            }

            if (value != null)
            {
                if (compareValue != String.Empty)
                {
                    if (value.ToString() == compareValue)
                        instance.AddReceuil_Selected_Checkbox(y, x);
                    else instance.AddReceuil_UnSelected_Checkbox(y, x);
                }
                else
                {
                    if (value != null)
                        instance.AddReceuil_Selected_Checkbox(y, x);
                    else instance.AddReceuil_UnSelected_Checkbox(y, x);
                }
            }
            else instance.AddReceuil_UnSelected_Checkbox(y, x);
        }