public static string StartForResult() { SelectFileForm form = new SelectFileForm(); form.ShowDialog(); return(isSelectedFile?(string)form.listFiles.SelectedItem:""); }
public MainForm(IFileService fileService, InputBoxForm inputBoxForm, SelectFileForm selectFileForm) { _selectFileForm = selectFileForm; _inputBoxForm = inputBoxForm; _fileService = fileService; InitializeComponent(); }
private async void OnLoadFromDatabaseClick(object sender, EventArgs e) { fileName = SelectFileForm.StartForResult(); if (!String.IsNullOrEmpty(fileName)) { string result = await Global.Database.GetFileContentByName(fileName); textContainer.Text = result.Decompress(); } }