using DevExpress.XtraEditors; namespace Yw.WinFrmUI.Phart { public partial class ClipboardCurveTextSelDlg : XtraForm { public ClipboardCurveTextSelDlg() { InitializeComponent(); this.Shown += delegate { this.txtClipboard.EditValue = Clipboard.GetText(); }; } private void ClipboardCurveTextSelDlg_Load(object sender, EventArgs e) { this.rgSeparator.SelectedIndex = 0; this.rgDirection.SelectedIndex = 0; //if (SPump.WinFrmUI.Localization.IsCN) // return; //this.Text = SPump.WinFrmUI.Localization.TranslateHelper.GetString("剪切板数据确认"); //this.layoutControlItem5.Text = SPump.WinFrmUI.Localization.TranslateHelper.GetString("剪切板内容"); //this.layoutControlItem1.Text = SPump.WinFrmUI.Localization.TranslateHelper.GetString("分隔"); //this.layoutControlItem2.Text = SPump.WinFrmUI.Localization.TranslateHelper.GetString("方向"); //this.layoutControlItem6.Text = SPump.WinFrmUI.Localization.TranslateHelper.GetString("忽略") + "1"; //this.layoutControlItem7.Text = SPump.WinFrmUI.Localization.TranslateHelper.GetString("忽略") + "2"; //this.layoutControlItem8.Text = SPump.WinFrmUI.Localization.TranslateHelper.GetString("忽略") + "3"; //this.btnOk.Text = SPump.WinFrmUI.Localization.TranslateHelper.GetString("确定"); //this.btnCancel.Text = SPump.WinFrmUI.Localization.TranslateHelper.GetString("取消"); //this.rgDirection.Properties.Items.Clear(); //this.rgDirection.Properties.Items.AddRange(new DevExpress.XtraEditors.Controls.RadioGroupItem[] { //new DevExpress.XtraEditors.Controls.RadioGroupItem(null, SPump.WinFrmUI.Localization.TranslateHelper.GetString("横向")), //new DevExpress.XtraEditors.Controls.RadioGroupItem(null, SPump.WinFrmUI.Localization.TranslateHelper.GetString("纵向"))}); //this.rgSeparator.Properties.Items.Clear(); //this.rgSeparator.Properties.Items.AddRange(new DevExpress.XtraEditors.Controls.RadioGroupItem[] { //new DevExpress.XtraEditors.Controls.RadioGroupItem(null, SPump.WinFrmUI.Localization.TranslateHelper.GetString("单元")), //new DevExpress.XtraEditors.Controls.RadioGroupItem(null, SPump.WinFrmUI.Localization.TranslateHelper.GetString("逗号"))}); } public enum eSeparator { 单元, 逗号 } public enum eDirection { 横向, 纵向 } /// /// 忽略字符串 /// public List NeglectList { get; set; } public eSeparator Separator { get; private set; } public eDirection Direction { get; private set; } private void btnOk_Click(object sender, EventArgs e) { if (this.rgSeparator.SelectedIndex == 0) Separator = eSeparator.单元; else Separator = eSeparator.逗号; if (this.rgDirection.SelectedIndex == 0) Direction = eDirection.横向; else Direction = eDirection.纵向; //Yw.WinFrmUI.Phart.Properties.Settings.Default.LastSelClipboard1 = // this.rgSeparator.SelectedIndex; //Yw.WinFrmUI.Phart.Properties.Settings.Default.LastSelClipboard2 = // this.rgDirection.SelectedIndex; var neglectList = new List(); if (!string.IsNullOrEmpty(txtNeglectChar1.Text)) neglectList.Add(this.txtNeglectChar1.Text); if (!string.IsNullOrEmpty(txtNeglectChar2.Text)) neglectList.Add(this.txtNeglectChar2.Text); if (!string.IsNullOrEmpty(txtNeglectChar3.Text)) neglectList.Add(this.txtNeglectChar3.Text); NeglectList = neglectList; //Yw.WinFrmUI.Phart.Properties.Settings.Default.Save(); this.DialogResult = DialogResult.OK; this.Close(); } } }