private void StartStopBtnClicked(object sender, RoutedEventArgs e) { if (!_appDataModel.UserReady) { System.Threading.Thread.Sleep(100); LynxFileService lfs = new LynxFileService(_appDataModel.FolderPath); if (!lfs.LynxFilesExist()) { MessageBox.Show("Could not find Lynx .evt, .sch, or .ppl files. " + "Make sure to update start lists in shared folder.", "Lynx Files Not Found", MessageBoxButton.OK, MessageBoxImage.Warning); } else { setupPanel.StartProgressBar.Visibility = Visibility.Visible; setupPanel.InfoText.Text = "Posting Lynx Files to Server"; setupPanel.StartStopBtn.IsEnabled = false; bool success = PostLynxFiles(); if (success) { } } } else { ResetStartStopBtn(); } }
private void worker_PostLynxFiles(object sender, DoWorkEventArgs e) { LynxFileService lfs = new LynxFileService(_appDataModel.FolderPath); FieldScribeFileDataController fdc = new FieldScribeFileDataController(); if (_tokenManager.Token != "") { _postLynxSuccess = fdc.AddMeetFiles(_appDataModel.SelectedMeet.MeetId, lfs, _tokenManager.Token); } else { _postLynxSuccess = false; } }