Nanook.QueenBee.GenericQbEditItem.ConvertTo C# (CSharp) Method

ConvertTo() public method

Convert text representations
public ConvertTo ( Type toType ) : string
toType System.Type Type to convert to
return string
        public string ConvertTo(Type toType)
        {
            if (!GenericQbItem.IsTypeSupported(toType))
                throw new ArgumentOutOfRangeException(string.Format("{0} is not supported", toType.FullName));

            string s = _gItem.ConvertTo(toType);
            btnConvert.Text = GenericQbItem.GetTypeName(toType);
            txtValue.Text = s;
            return s;
        }

Usage Example

コード例 #1
0
        private void addEditItem(int spacing, ref int top, ref int lblWidth, ref bool hasEditable, GenericQbItem gi)
        {
            GenericQbEditItem ei;

            ei = new GenericQbEditItem();
            ei.SetData(gi);
            ei.Left   = 0;
            ei.Width  = this.ClientSize.Width;
            ei.Top    = top;
            top      += spacing;
            ei.Anchor = AnchorStyles.Left | AnchorStyles.Top | AnchorStyles.Right;

            if (!hasEditable && !gi.ReadOnly)
            {
                hasEditable = true;
            }

            if (gi.UseQbItemType)
            {
                ei.ConvertTo(base.QbItemDataType);
            }
            //else
            //    ei.ConvertTo(base.EditType);

            this.Controls.Add(ei);

            if (ei.LabelWidth > lblWidth)
            {
                lblWidth = ei.LabelWidth;
            }
        }
All Usage Examples Of Nanook.QueenBee.GenericQbEditItem::ConvertTo