Esempio n. 1
0
        private void OnFileSave(object sender, EventArgs e)
        {
            if (m_bdc == BinaryDataClass.RichText)
            {
                string strRtf = m_rtbText.Rtf;

                if (StrUtil.RtfIsURtf(strRtf))
                {
                    m_bURtfWithHighChar = StrUtil.ContainsHighChar(m_rtbText.Text);
                }
                else
                {
                    m_bURtfWithHighChar = false;
                }

                m_pbEditedData = StrUtil.Utf8.GetBytes(StrUtil.RtfFix(strRtf));
            }
            else
            {
                string strData = m_rtbText.Text;
                strData        = StrUtil.NormalizeNewLines(strData, m_bNewLinesWin);
                m_pbEditedData = StrUtil.Utf8.GetBytes(strData);
            }

            m_bModified = false;
            UpdateUIState(false, false);
        }