public VirtualTreeRow(VirtualTreeList grid, String name) { Name = name; Grid = grid; //Children = new List<VirtualTreeRow>(100); //Rows = new List<VirtualGridRow>(100); }
public static byte[] getImage(String filename, VirtualTreeList list) { try { System.IO.FileInfo fi = new System.IO.FileInfo(filename); if (fi.Exists) { //byte[] buf = new byte[fi.Length]; using (System.IO.FileStream fs = new System.IO.FileStream(filename, System.IO.FileMode.Open, System.IO.FileAccess.Read)) { //fs.Read(buf, 0, buf.Length); System.Drawing.Image img = System.Drawing.Image.FromStream(fs); System.IO.MemoryStream ms = new System.IO.MemoryStream(); //System.Drawing.Imaging.EncoderParameters System.Drawing.Image thumb = img; if (list.Parameter.ImageScaleing == ImageScaleings.Scale) { thumb = ResizeImage(img, 100, 100); } thumb.Save(ms, System.Drawing.Imaging.ImageFormat.Png); return(ms.ToArray()); } } return(new byte[0]); } catch (Exception ex) { Console.WriteLine(ex.ToString()); //TODO logger return(new byte[0]); } }
public VirtualGridHeaderColumn(VirtualTreeList grid, String columnName) { Grid = grid; ColumnName = columnName; CustomOption = String.Empty; //Rows = new List<VirtualGridRow>(1000); }
public VirtualTreeRow(VirtualTreeList grid, String name) { Name = name; Grid = grid; //Children = new List<VirtualTreeRow>(100); //Rows = new List<VirtualGridRow>(100); }
public VirtualGridHeaderColumn(VirtualTreeList grid, String columnName) { Grid = grid; ColumnName = columnName; CustomOption = String.Empty; //Rows = new List<VirtualGridRow>(1000); }
public VirtualGridRow(VirtualTreeList grid) { Grid = grid; Cells = new List <VirtualGridCell>(1000); ChildRows = new List <VirtualGridRow>(1000); dataCache = new Dictionary <string, object>(100); CustomOption = String.Empty; }
public VirtualTreeRow(VirtualTreeList grid, String name, String nodevalue) { Name = name; Grid = grid; NodeValue = nodevalue; //Children = new List<VirtualTreeRow>(100); //Rows = new List<VirtualGridRow>(100); }
public VirtualGridRow(VirtualTreeList grid) { Grid = grid; Cells = new List<VirtualGridCell>(1000); ChildRows = new List<VirtualGridRow>(1000); dataCache = new Dictionary<string, object>(100); CustomOption = String.Empty; }
public VirtualTreeRow(VirtualTreeList grid, String name, String nodevalue) { Name = name; Grid = grid; NodeValue = nodevalue; //Children = new List<VirtualTreeRow>(100); //Rows = new List<VirtualGridRow>(100); }
public VirtualGridCell(VirtualTreeList grid, VirtualGridRow row, VirtualGridHeaderColumn headercolumn, object data) { HeaderColumn = headercolumn; Row = row; Grid = grid; Data = data; Changed = false; CustomOption = String.Empty; }
public VirtualGridCell(VirtualTreeList grid, VirtualGridRow row, VirtualGridHeaderColumn headercolumn, object data) { HeaderColumn = headercolumn; Row = row; Grid = grid; Data = data; Changed = false; CustomOption = String.Empty; }
public static byte[] getImage(String filename,VirtualTreeList list) { try { System.IO.FileInfo fi = new System.IO.FileInfo(filename); if (fi.Exists) { //byte[] buf = new byte[fi.Length]; using (System.IO.FileStream fs = new System.IO.FileStream(filename, System.IO.FileMode.Open,System.IO.FileAccess.Read)) { //fs.Read(buf, 0, buf.Length); System.Drawing.Image img = System.Drawing.Image.FromStream(fs); System.IO.MemoryStream ms = new System.IO.MemoryStream(); //System.Drawing.Imaging.EncoderParameters System.Drawing.Image thumb = img; if (list.Parameter.ImageScaleing == ImageScaleings.Scale) { thumb = ResizeImage(img, 100, 100); } thumb.Save(ms, System.Drawing.Imaging.ImageFormat.Png); return ms.ToArray(); } } return new byte[0]; } catch (Exception ex) { Console.WriteLine(ex.ToString()); //TODO logger return new byte[0]; } }