Ejemplo n.º 1
0
 private void cbxFrom_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (cbxFrom.Text == ConstantString.SELF_DEFINING) //弹出自定义窗口
     {
         var          selfDefining = new SelfDefiningConverterForm();
         DialogResult show         = selfDefining.ShowDialog();
         if (show != DialogResult.OK)
         {
             cbxFrom.SelectedText = "";
             return;
         }
         else //选了自定义
         {
             fromUserSetPattern = selfDefining.SelectedParsePattern;
         }
     }
 }
Ejemplo n.º 2
0
 //private void btnExport_Click(object sender, EventArgs e)
 //{
 //    if (MessageBox.Show("是否将文本框中的所有词条保存到本地硬盘上?", "是否保存", MessageBoxButtons.YesNo, MessageBoxIcon.Question) ==
 //        DialogResult.Yes)
 //    {
 //        saveFileDialog1.DefaultExt = ".txt";
 //        if (cbxTo.Text == ConstantString.MS_PINYIN)
 //        {
 //            saveFileDialog1.DefaultExt = ".dctx";
 //        }
 //        if (saveFileDialog1.ShowDialog() == DialogResult.OK)
 //        {
 //            if (FileOperationHelper.WriteFile(saveFileDialog1.FileName, export.Encoding, richTextBox1.Text))
 //            {
 //                ShowStatusMessage("保存成功,词库路径:" + saveFileDialog1.FileName, true);
 //            }
 //            else
 //            {
 //                ShowStatusMessage("保存失败", false);
 //            }
 //        }
 //    }
 //}
 private void cbxFrom_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (cbxFrom.Text == ConstantString.SELF_DEFINING) //弹出自定义窗口
     {
         var selfDefining = new SelfDefiningConverterForm();
         DialogResult show = selfDefining.ShowDialog();
         if (show != DialogResult.OK)
         {
             cbxFrom.SelectedText = "";
             return;
         }
         else //选了自定义
         {
             fromUserSetPattern = selfDefining.SelectedParsePattern;
         }
     }
     if (cbxFrom.Text == ConstantString.XIAOXIAO)
     {
         var diag = new XiaoxiaoConfigForm();
         if (diag.ShowDialog() == DialogResult.OK)
         {
             fromCodeType = diag.SelectedCodeType;
         }
     }
     if (cbxFrom.Text == ConstantString.RIME)
     {
         var diag = new RimeConfigForm();
         if (diag.ShowDialog() == DialogResult.OK)
         {
             fromCodeType = diag.SelectedCodeType;
         }
     }
     if (cbxFrom.Text == ConstantString.LINGOES_LD2)
     {
         var diag = new Ld2EncodingConfigForm(ld2WordEncoding);
         if (diag.ShowDialog() == DialogResult.OK)
         {
             ld2WordEncoding = diag.SelectedEncoding;
         }
     }
 }
Ejemplo n.º 3
0
 private void cbxTo_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (cbxTo.Text == ConstantString.SELF_DEFINING) //弹出自定义窗口
     {
         var selfDefining = new SelfDefiningConverterForm();
         selfDefining.IsImport = false;
         DialogResult show = selfDefining.ShowDialog();
         if (show != DialogResult.OK)
         {
             cbxFrom.SelectedText = "";
             return;
         }
         else //选了自定义
         {
             toUserSetPattern = selfDefining.SelectedParsePattern;
         }
     }
     if (cbxTo.Text == ConstantString.XIAOXIAO)
     {
         var diag = new XiaoxiaoConfigForm();
         if (diag.ShowDialog() == DialogResult.OK)
         {
             toCodeType = diag.SelectedCodeType;
         }
     }
     if (cbxTo.Text == ConstantString.RIME)
     {
         var diag = new RimeConfigForm();
         if (diag.ShowDialog() == DialogResult.OK)
         {
             toCodeType = diag.SelectedCodeType;
         }
     }
 }
Ejemplo n.º 4
0
 private void cbxFrom_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (cbxFrom.Text == ConstantString.SELF_DEFINING) //弹出自定义窗口
     {
         var selfDefining = new SelfDefiningConverterForm();
         DialogResult show = selfDefining.ShowDialog();
         if (show != DialogResult.OK)
         {
             cbxFrom.SelectedText = "";
             return;
         }
         else //选了自定义
         {
             fromUserSetPattern = selfDefining.SelectedParsePattern;
         }
     }
 }