Ejemplo n.º 1
0
        private void butSure_Click(object sender, EventArgs e)
        {
            try
            {
                if (_formats == null)
                {
                    _formats = new DesignLabelFormats();
                }

                _formats.数据项名称 = cbxDbName.Text;

                _formats.文本格式.Clear();

                foreach (ListViewItem lvi in listView1.Items)
                {
                    _formats.文本格式.Add(lvi.Tag as DesignLabelFormatItem);
                }

                _formatContext = JsonHelper.SerializeObject(_formats);

                this.Close();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Ejemplo n.º 2
0
        public string ShowDataNameEditor(string format, IWin32Window owner)
        {
            _formatContext = format;
            _formats       = JsonHelper.DeserializeObject <DesignLabelFormats>(format);

            this.ShowDialog(owner);

            return(_formatContext);
        }
Ejemplo n.º 3
0
        public DesignLabel()
        {
            Formats = new DesignLabelFormats();

            SizeConstraintsType = SizeConstraintsType.Custom;

            TextVisible = true;
            AppearanceItemCaption.Options.UseBackColor = true;
            AppearanceItemCaption.Options.UseForeColor = true;
            AppearanceItemCaption.Options.UseFont      = true;

            Formats.默认背景色 = this.AppearanceItemCaption.BackColor;
            Formats.默认前景色 = this.AppearanceItemCaption.ForeColor;
        }
Ejemplo n.º 4
0
        private void LoadDesign(DesignLabelFormats formats)
        {
            if (formats == null)
            {
                return;
            }

            cbxDbName.Text = formats.数据项名称;

            foreach (DesignLabelFormatItem fi in formats.文本格式)
            {
                AddItemToList(fi);
            }

            listView1.View = View.Details;
        }
Ejemplo n.º 5
0
 public ItemFormat()
 {
     Formats = new DesignLabelFormats();
 }
Ejemplo n.º 6
0
        public frmSelectField()
        {
            InitializeComponent();

            _formats = new DesignLabelFormats();
        }