Exemplo n.º 1
0
        private void m_btnProcess_Click(object sender, EventArgs e)
        {
            m_btnOk.Enabled = m_btnSkipAll.Enabled = false;
            lock (this)
            {
                if (m_outputForm == null || m_outputForm.IsDisposed)
                {
                    m_outputForm = new OutputForm();
                    m_outputForm.Show(this);
                }
                else
                {
                    m_outputForm.Clear();
                }
            }

            RefTextDevUtilities.ReferenceTextUtility.DifferencesToIgnore = RefTextDevUtilities.ReferenceTextUtility.Ignore.Nothing;

            if (m_chkPunctuation.Checked)
            {
                RefTextDevUtilities.ReferenceTextUtility.DifferencesToIgnore = RefTextDevUtilities.ReferenceTextUtility.Ignore.Punctuation;
            }
            else if (m_chkQuoteMarkDifferences.Checked)
            {
                RefTextDevUtilities.ReferenceTextUtility.DifferencesToIgnore = RefTextDevUtilities.ReferenceTextUtility.Ignore.QuotationMarkDifferences;
            }
            else if (m_chkCurlyVsStraight.Checked)
            {
                RefTextDevUtilities.ReferenceTextUtility.DifferencesToIgnore = RefTextDevUtilities.ReferenceTextUtility.Ignore.CurlyVsStraightQuoteDifferences;
            }
            if (m_chkWhitespace.Checked)
            {
                RefTextDevUtilities.ReferenceTextUtility.DifferencesToIgnore |= RefTextDevUtilities.ReferenceTextUtility.Ignore.WhitespaceDifferences;
            }
            if (m_chkSymbols.Checked)
            {
                RefTextDevUtilities.ReferenceTextUtility.DifferencesToIgnore |= RefTextDevUtilities.ReferenceTextUtility.Ignore.Symbols;
            }

            if (m_chkAttemptToRegularizeQuotationMarksToMatchEnglish.Enabled)
            {
                RefTextDevUtilities.ReferenceTextUtility.AttemptToAddQuotationMarksToMatchEnglish = m_chkAttemptToRegularizeQuotationMarksToMatchEnglish.Checked;
            }

            m_passes.Clear();
            m_passes.Push(RefTextDevUtilities.ReferenceTextUtility.Mode.Generate);
            m_passes.Push(RefTextDevUtilities.ReferenceTextUtility.Mode.FindDifferencesBetweenCurrentVersionAndNewText);
            BackgroundProcessor.RunWorkerAsync();
        }
Exemplo n.º 2
0
        protected override void OnFormClosed(FormClosedEventArgs e)
        {
            lock (this)
            {
                RefTextDevUtilities.ReferenceTextUtility.OnMessageRaised -= HandleMessageRaised;

                if (m_outputForm != null)
                {
                    m_outputForm.Close();
                    m_outputForm.Dispose();
                    m_outputForm = null;
                }

                base.OnFormClosed(e);
            }
        }
Exemplo n.º 3
0
        private void m_btnProcess_Click(object sender, EventArgs e)
        {
            m_btnOk.Enabled = false;
            lock (this)
            {
                if (m_outputForm == null || m_outputForm.IsDisposed)
                {
                    m_outputForm = new OutputForm();
                    m_outputForm.Show(this);
                }
                else
                {
                    m_outputForm.Clear();
                }
            }

            m_passes.Clear();
            m_passes.Push(RefTextDevUtilities.ReferenceTextUtility.Mode.Generate);
            m_passes.Push(RefTextDevUtilities.ReferenceTextUtility.Mode.FindDifferencesBetweenCurrentVersionAndNewText);
            BackgroundProcessor.RunWorkerAsync();
        }