public void MakeScreenShotFromBitmap(string customname, Bitmap bitmap) { MemoryStream mstr = new MemoryStream(); bitmap.Save(mstr, System.Drawing.Imaging.ImageFormat.Png); uploadOrganizer.AddUpload(customname + ".png", mstr); }
private void frmDropArea_DragDrop(object sender, DragEventArgs e) { DragEnd(); string[] files = e.Data.GetData(DataFormats.FileDrop) as string[]; if (files != null) { foreach (string file in files) { uploadOrganizer.AddFileUpload(file); } return; } string text = e.Data.GetData(DataFormats.Text) as string; if (text != null) { uploadOrganizer.AddUpload("paste.txt", new MemoryStream(System.Text.Encoding.ASCII.GetBytes(text))); } }