ConvertTo() public method

Convert text representations
public ConvertTo ( Type toType ) : string
toType System.Type Type to convert to
return string
コード例 #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;
            }
        }
コード例 #2
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;
        }