コード例 #1
0
 public System.Drawing.Color GetDocumentColor(DocumentColors whichcolor)
 {
     System.Drawing.Color cret = System.Drawing.Color.Empty;
     if (m_pDoc2 != null)
     {
         if ((whichcolor == DocumentColors.Backcolor) && (m_pDoc2.bgColor != null))
         {
             cret = System.Drawing.ColorTranslator.FromHtml(m_pDoc2.bgColor.ToString());
         }
         else if ((whichcolor == DocumentColors.Forecolor) && (m_pDoc2.fgColor != null))
         {
             cret = System.Drawing.ColorTranslator.FromHtml(m_pDoc2.fgColor.ToString());
         }
         else if ((whichcolor == DocumentColors.Linkcolor) && (m_pDoc2.linkColor != null))
         {
             cret = System.Drawing.ColorTranslator.FromHtml(m_pDoc2.linkColor.ToString());
         }
         else if ((whichcolor == DocumentColors.ALinkcolor) && (m_pDoc2.alinkColor != null))
         {
             cret = System.Drawing.ColorTranslator.FromHtml(m_pDoc2.alinkColor.ToString());
         }
         else if ((whichcolor == DocumentColors.VLinkcolor) && (m_pDoc2.vlinkColor != null))
         {
             cret = System.Drawing.ColorTranslator.FromHtml(m_pDoc2.vlinkColor.ToString());
         }
     }
     return(cret);
 }
コード例 #2
0
 public System.Drawing.Color GetDocumentColor(DocumentColors whichcolor)
 {
     System.Drawing.Color cret = System.Drawing.Color.Empty;
     if (m_pDoc2 != null)
     {
         if ((whichcolor == DocumentColors.Backcolor) && (m_pDoc2.bgColor != null))
             cret = System.Drawing.ColorTranslator.FromHtml(m_pDoc2.bgColor.ToString());
         else if ((whichcolor == DocumentColors.Forecolor) && (m_pDoc2.fgColor != null))
             cret = System.Drawing.ColorTranslator.FromHtml(m_pDoc2.fgColor.ToString());
         else if ((whichcolor == DocumentColors.Linkcolor) && (m_pDoc2.linkColor != null))
             cret = System.Drawing.ColorTranslator.FromHtml(m_pDoc2.linkColor.ToString());
         else if ((whichcolor == DocumentColors.ALinkcolor) && (m_pDoc2.alinkColor != null))
             cret = System.Drawing.ColorTranslator.FromHtml(m_pDoc2.alinkColor.ToString());
         else if ((whichcolor == DocumentColors.VLinkcolor) && (m_pDoc2.vlinkColor != null))
             cret = System.Drawing.ColorTranslator.FromHtml(m_pDoc2.vlinkColor.ToString());
     }
     return cret;
 }