Esempio n. 1
0
            public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destType)
            {
                if (destType == typeof(string) && value is CellHelper)
                {
                    // Cast the value to an Employee type
                    CellHelper pp = (CellHelper)value;

                    return(pp.Value + ", " + pp.Rowhandle + ", " + pp.Columnindex);
                }
                return(base.ConvertTo(context, culture, value, destType));
            }
Esempio n. 2
0
 private void CopySelectionToClipboard()
 {
     DevExpress.XtraGrid.Views.Base.GridCell[] cellcollection = gridView1.GetSelectedCells();
     CellHelperCollection chc = new CellHelperCollection();
     foreach (DevExpress.XtraGrid.Views.Base.GridCell gc in cellcollection)
     {
         CellHelper ch = new CellHelper();
         ch.Rowhandle = gc.RowHandle;
         ch.Columnindex = gc.Column.AbsoluteIndex;
         object o = gridView1.GetRowCellValue(gc.RowHandle, gc.Column);
         if (m_viewtype == ViewType.Hexadecimal)
         {
             ch.Value = Convert.ToInt32(o.ToString(), 16);
         }
         else
         {
             ch.Value = Convert.ToInt32(o);
         }
         chc.Add(ch);
     }
     string serialized = ((int)m_viewtype).ToString();//string.Empty;
     foreach (CellHelper ch in chc)
     {
         serialized += ch.Columnindex.ToString() + ":" + ch.Rowhandle.ToString() + ":" + ch.Value.ToString() + ":~";
     }
     
     Clipboard.SetText(serialized);
 }
Esempio n. 3
0
 public bool Contains(CellHelper value)
 {
     // If value is not of type Int16, this will return false.
     return (List.Contains(value));
 }
Esempio n. 4
0
 public int Add(CellHelper value)
 {
     return (List.Add(value));
 }
Esempio n. 5
0
 public void Remove(CellHelper value)
 {
     List.Remove(value);
 }
Esempio n. 6
0
 public void Insert(int index, CellHelper value)
 {
     List.Insert(index, value);
 }
Esempio n. 7
0
 public int IndexOf(CellHelper value)
 {
     return (List.IndexOf(value));
 }
Esempio n. 8
0
 public bool Contains(CellHelper value)
 {
     // If value is not of type Int16, this will return false.
     return(List.Contains(value));
 }
Esempio n. 9
0
 public void Remove(CellHelper value)
 {
     List.Remove(value);
 }
Esempio n. 10
0
 public void Insert(int index, CellHelper value)
 {
     List.Insert(index, value);
 }
Esempio n. 11
0
 public int IndexOf(CellHelper value)
 {
     return(List.IndexOf(value));
 }
Esempio n. 12
0
 public int Add(CellHelper value)
 {
     return(List.Add(value));
 }