示例#1
0
        void customStringTextBox_TextChanged(object sender, EventArgs e)
        {
            CustomFormatType customFormatType = formatTypeListBox.SelectedItem as CustomFormatType;

            sampleLabel.Text = customFormatType.SampleString;
            Dirty            = true;
        }
        private void customStringTextBox_TextChanged(object sender, EventArgs e)
        {
            CustomFormatType selectedItem = this.formatTypeListBox.SelectedItem as CustomFormatType;

            this.sampleLabel.Text = selectedItem.SampleString;
            this.dirty            = true;
        }
示例#3
0
        public static CustomFormat GetFormat(CustomFormatType type, string formatString)
        {
            switch (type)
            {
            case CustomFormatType.DateTime:
                return(new DateTimeFormat(formatString));

            case CustomFormatType.Long:
                return(new LongFormat(formatString));

            case CustomFormatType.Decimal:
                return(new DecimalFormat(formatString));

            case CustomFormatType.Custom:
            default:
                return(new CustomFormat(formatString));
            }
        }