private void BtnFetchDashboardsClick(object sender, EventArgs e) { if (!backgroundWorker1.IsBusy) { _actionType = FormImportActionType.GetFormDashboardList; backgroundWorker1.RunWorkerAsync(); } else { MessageBox.Show("Busy processing another task, please wait..."); } }
/// <summary> /// /// </summary> public ImportFormData() { InitializeComponent(); _actionType = FormImportActionType.GetTemplateList; tabPage2.Enabled = false; tabPage3.Enabled = false; ShowFirstProfile(); var version = Assembly.GetExecutingAssembly().GetName().Version; lblVersion.Text = string.Format("Version {0}", version); uxAuthServerUrl.Text = VisualVault.Examples.Common.Constants.SoapApiServerUrl; uxAuthUserID.Text = VisualVault.Examples.Common.Constants.UserId; uxAuthPassword.Text = VisualVault.Examples.Common.Constants.Password; }
private void BtnExportClick(object sender, EventArgs e) { if (_selectedFormDashboard != null) { _exportFilePath = txtExportFilePath.Text; if (Path.HasExtension(_exportFilePath)) { _actionType = FormImportActionType.ExportFormDashboard; backgroundWorker1.RunWorkerAsync(); } else { MessageBox.Show("Please select a target csv file for the export", "Error", MessageBoxButtons.OK); } } else { MessageBox.Show("Please select a Form Dashboard", "Error", MessageBoxButtons.OK); } }
private void BtnImportClick(object sender, EventArgs e) { if (_selectedFormTemplate != null) { _csvFilePath = txtFilePath.Text; if (File.Exists(_csvFilePath)) { //if (!Common.FileSystem.IsFileInUse(_profile.ImportCsvSourcePath)) //{ if (txtDelimeter.Text.Length > 0) { _actionType = FormImportActionType.ImportForms; if (!backgroundWorker1.IsBusy) { backgroundWorker1.RunWorkerAsync(); } } else { MessageBox.Show("Missing Delimeter Character", "Error", MessageBoxButtons.OK); } //}else //{ // MessageBox.Show(string.Format("File {0} is in use by another application", _profile.ImportCsvSourcePath), "Source file in use by another application", MessageBoxButtons.OK); //} } else { MessageBox.Show("Please select a csv file for import", "Error", MessageBoxButtons.OK); } } else { MessageBox.Show("Please select a form template", "Error", MessageBoxButtons.OK); } }
private void BtnLoginClick(object sender, EventArgs e) { _actionType = FormImportActionType.Authenticate; backgroundWorker1.RunWorkerAsync(); }