lu
2025-04-03 47aa4ae2904b057c6ebadfe7f7bf801b9bb64fef
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
using DevExpress.XtraEditors;
using Gs.DevApp.DevFrm.Work;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
 
namespace Gs.DevApp.UserControl
{
    public partial class UcDictionary : DevExpress.XtraEditors.XtraUserControl
    {
        public UcDictionary()
        {
            InitializeComponent();
        }
 
 
 
        /// <summary>
        ///     总记录数
        /// </summary>
        public string BtnTxt
        {
            get { return this.simpleButton1.Text.Trim(); }
            set
            {
                this.simpleButton1.Text = value;
            }
        }
 
 
        /// <summary>
        ///     总记录数
        /// </summary>
        public string TextTxt
        {
            get { return memoEdit1.Text.Trim(); }
            set
            {
                this.memoEdit1.Text = value;
            }
        }
 
        private void simpleButton1_Click(object sender, EventArgs e)
        {
            UcDictionarySelect frm = new UcDictionarySelect(this.BtnTxt, "");
            frm.UpdateParent += (ss, ee) =>
            {
                System.Text.StringBuilder stringBuilder = new System.Text.StringBuilder();
                var lst = ee.DynamicList;
                foreach (dynamic dym in lst)
                {
                    if (stringBuilder.Length > 0)
                        stringBuilder.Append("|");
                    stringBuilder.Append(dym.dicTxt);
                }
                this.TextTxt = stringBuilder.ToString();
            };
            frm.ShowDialog();
        }
    }
}