Exemplo n.º 1
0
        private void BtnDiff_Click(object sender, EventArgs e)
        {
            try
            {
                IFrontEnd       oFrontEnd = moFrontEnds[typeof(DiffScript)];
                IFrontEndConfig oConfig   = moConfigs[typeof(DiffScript)];


                oFrontEnd.ExePath       = oConfig.ProgramPath;
                oFrontEnd.TempDirectory = Path.Combine(oConfig.WorkingDirectory, "tmp");

                if (moDiffForm == null)
                {
                    moDiffForm = new DiffForm((DiffFrontEnd)oFrontEnd);
                }
                if (moDiffForm.ShowDiff(TB_Data.Text, TB_Result.Text))
                {
                    moDiffForm.ShowDialog(this);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
        private void BtnDiff_Click(object sender, EventArgs e)
        {
            try
            {
                IFrontEnd oFrontEnd = moFrontEnds[typeof(DiffScript)];
                IFrontEndConfig oConfig = moConfigs[typeof(DiffScript)];

                oFrontEnd.ExePath = oConfig.ProgramPath;
                oFrontEnd.TempDirectory = Path.Combine(oConfig.WorkingDirectory, "tmp");

                    if (moDiffForm == null)
                    {
                        moDiffForm = new DiffForm((DiffFrontEnd)oFrontEnd);
                    }
                    if (moDiffForm.ShowDiff(TB_Data.Text, TB_Result.Text))
                    {
                        moDiffForm.ShowDialog(this);
                    }

            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }