protected void OnButtonScanClicked(object sender, EventArgs e) { GetFromScanner scanWin = new GetFromScanner(); scanWin.Show(); int result = scanWin.Run(); if (result == (int)ResponseType.Ok) { FilesStore.AppendValues(-1, scanWin.FileName, scanWin.File.LongLength, FileIconWorks.GetPixbufForFile(scanWin.FileName), scanWin.File ); } scanWin.Destroy(); }
public bool GetFileFromDialog(out string fileName, out byte[] file) { fileName = string.Empty; file = Array.Empty <byte>(); var scanDialog = new GetFromScanner(); scanDialog.Show(); if (scanDialog.Run() == (int)ResponseType.Ok) { fileName = scanDialog.FileName; file = scanDialog.File; } scanDialog.Destroy(); return(!string.IsNullOrEmpty(fileName)); }
protected void OnButtonScanClicked(object sender, EventArgs e) { GetFromScanner scanWin = new GetFromScanner (); scanWin.Show (); int result = scanWin.Run (); if (result == (int)ResponseType.Ok) { FilesStore.AppendValues (-1, scanWin.FileName, scanWin.File.LongLength, FileIconWorks.GetPixbufForFile (scanWin.FileName), scanWin.File ); } scanWin.Destroy (); }