private void ReadClipboard() { IDataObject dObj = Clipboard.GetDataObject(); IDataObject dObj2 = Clipboard.GetDataObject(); if (dObj.GetDataPresent(DataFormats.Text)) { DatabaseOperations.AddData((string)dObj.GetData(DataFormats.Text), "Category", Convert.ToString(dateTime)); CreateObject.GetMetroTextBox(flowLayoutPanel1, DatabaseOperations.GetLastData(), 300, 300, 1); } else if (dObj2.GetDataPresent(DataFormats.Bitmap)) { MessageBox.Show("Test"); CreateObject.GetPictureBox(flowLayoutPanel1, (Image)dObj2.GetData(DataFormats.Bitmap), 300, 300); } }
public Main(DatabaseOperations databaseOperations) : this() { _databaseOperations = databaseOperations; }