private void Upload_Click(object sender, RoutedEventArgs e) { var dlg = new OpenFileDialog(); if (dlg.ShowDialog(this) == true) { string error = InjectorCore.Upload(dlg.FileName); if (error != null) { MessageBox.Show(error, "Error"); } else { MessageBox.Show("Upload Done, but remember to check log.txt for any upload errors.", "Error"); } } }
private void uploadButton_Click(object sender, EventArgs args) { var openPanel = new NSOpenPanel(); openPanel.ReleasedWhenClosed = true; openPanel.Prompt = "Open bar file"; var result = openPanel.RunModal(); if (result == 1) { string error = InjectorCore.Upload(openPanel.Url.Path); if (error != null) { MessageBox(error, "Error"); } else { MessageBox("Upload complete, but remember to check log.txt for any upload errors.", "Success"); } } }