Example #1
0
        private void Data2UI(ClassFont oFont = null)
        {
            if (oFont != null)
            {
                oFont.SelCopy2(inFont);
            }

            if (inFont.isSet(ClassFont.euMembers.NameFarEast))
            {
                cmbChineseFonts.Text = inFont.NameFarEast;
            }
            else
            {
                cmbChineseFonts.Text = m_strNoChange;
            }

            if (inFont.isSet(ClassFont.euMembers.NameAscii))
            {
                cmbAsciiFonts.Text = inFont.NameAscii;
            }
            else
            {
                cmbAsciiFonts.Text = m_strNoChange;
            }

            if (inFont.isSet(ClassFont.euMembers.Size))
            {
                cmbFontSize.Text = "" + inFont.Size;
            }
            else
            {
                cmbFontSize.Text = m_strNoChange;
            }

            //
            if (inFont.isSet(ClassFont.euMembers.Bold))
            {
                if (inFont.Bold != 0) // true
                {
                    chkFontBold.CheckState = CheckState.Checked;
                }
                else
                {
                    chkFontBold.CheckState = CheckState.Unchecked;
                }
            }
            else
            {
                chkFontBold.CheckState = CheckState.Indeterminate;
            }

            //
            if (inFont.isSet(ClassFont.euMembers.Italic))
            {
                if (inFont.Italic != 0) // true
                {
                    chkFontItalic.CheckState = CheckState.Checked;
                }
                else
                {
                    chkFontItalic.CheckState = CheckState.Unchecked;
                }
            }
            else
            {
                chkFontItalic.CheckState = CheckState.Indeterminate;
            }

            return;
        }