public SurveyFragmentsPage(AccessToken token, string serverUrl, SurveyDetails surveyDetails) { InitializeComponent(); Token = token; ServerUrl = serverUrl; SurveyDetails = surveyDetails; ScriptFragments = new SurveyScriptFragmentViewModel(token, serverUrl, surveyDetails, null); BindingContext = ScriptFragments; }
public async Task Upload_File() { try { var fileData = await CrossFilePicker.Current.PickFile(); ScriptFragments = new SurveyScriptFragmentViewModel(Token, ServerUrl, SurveyDetails, fileData, true, "Uploading..."); BindingContext = ScriptFragments; } catch (Exception e) { await DisplayAlert("Error", $"Something went wrong uploading interviewers {e.Message}", "Ok"); Console.WriteLine(e); throw; } }