lixiaojun
2025-01-20 6e1306ab578ed1ad79fc33b0bb7e496b897bf4a4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
using DevExpress.XtraEditors;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
 
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
        {
            横向,
            纵向
        }
 
        /// <summary>
        /// 忽略字符串
        /// </summary>
        public List<string> 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<string>();
            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();
        }
 
 
    }
}