示例#1
0
        public override void SetData()
        {
            textField = (Label.LabelDef.TextField)base.Field;
            alignTextcombo.SelectedItem = textField.printFormat.format.Align.ToString();

            ACA.LabelX.Label.LabelDef.FontX tempfont = textField.Font;
            Fontcombo.Items.Clear();
            foreach (LabelDef.FontX fontToAdd in localfontList.Values)
            {
                addFontXtoCombobox(fontToAdd, Fontcombo);
            }

            Fontcombo.SelectedItem = fontToString(textField.Font);


            if (textField.printFormat.format is LabelDef.DateTimeFormat)
            {
                typecombo.SelectedItem = "Date";
                formattxt.Text         = textField.printFormat.format.FormatString;
                formattxt.Enabled      = true;
            }
            else if (textField.printFormat.format is LabelDef.DecimalFormat)
            {
                LabelDef.DecimalFormat tempformat = (LabelDef.DecimalFormat)textField.printFormat.format;
                if (tempformat.Portion == LabelDef.DecimalFormat.DecimalPortion.Entire)
                {
                    typecombo.SelectedItem = "Decimal:Whole";
                }
                else if (tempformat.Portion == LabelDef.DecimalFormat.DecimalPortion.Fraction)
                {
                    typecombo.SelectedItem = "Decimal:Fraction";
                }
                else if (tempformat.Portion == LabelDef.DecimalFormat.DecimalPortion.Integer)
                {
                    typecombo.SelectedItem = "Decimal:Integer";
                }
                formattxt.Text    = textField.printFormat.format.FormatString;
                formattxt.Enabled = true;
            }
            else if (textField.printFormat.format is LabelDef.StringFormat)
            {
                typecombo.SelectedItem = "Text";
                formattxt.Text         = string.Empty;
                formattxt.Enabled      = false;
            }
        }
示例#2
0
        public override void SetData()
        {
            textfieldgroup = (Label.LabelDef.TextFieldGroup)base.Field;
            alignTextcombo.SelectedItem    = textfieldgroup.printFormat.format.Align.ToString();
            concatmethodcombo.SelectedItem = textfieldgroup.concatMethod.ToString();

            LabelDef.TextField previouslySelectedTextField = null;
            if (selectedTextfield != null)
            {
                previouslySelectedTextField = selectedTextfield;
            }

            linkedtextfieldslist.Items.Clear();
            foreach (LabelDef.TextField temptextfield in textfieldgroup.fields)
            {
                linkedtextfieldslist.Items.Add(temptextfield.ID);
            }
            if (previouslySelectedTextField != null)
            {
                selectedTextfield = previouslySelectedTextField;
            }
            else
            {
                selectedTextfield = textfieldgroup.fields.ElementAt(0);
            }


            ACA.LabelX.Label.LabelDef.FontX tempfont = null;
            if (selectedTextfield != null)
            {
                tempfont = selectedTextfield.Font;
            }

            Fontcombo.Items.Clear();
            foreach (LabelDef.FontX fontToAdd in localfontList.Values)
            {
                addFontXtoCombobox(fontToAdd, Fontcombo);
            }
            if (tempfont != null)
            {
                Fontcombo.SelectedItem = fontToString(tempfont);
            }
            else
            {
                Fontcombo.SelectedIndex = 0;
            }


            if (selectedTextfield != null)
            {
                if (selectedTextfield.ValueRef == null)
                {
                    referencecombo.SelectedIndex = 0;
                }
                else
                {
                    referencecombo.SelectedItem = selectedTextfield.ValueRef;
                }
            }

            if (selectedTextfield != null && selectedTextfield.printFormat.format.FormatString != null)
            {
                formattxt.Text = selectedTextfield.printFormat.format.FormatString;
            }
            else
            {
                formattxt.Text = String.Empty;
            }
        }