void BackgroundWorker1_DoWork(object sender, DoWorkEventArgs e) { try { if (Program.DebugMode || Program.IsWexflowWindowsServiceRunning()) { try { _wexflowServiceClient = new WexflowServiceClient(WexflowWebServiceUri); _workflows = _wexflowServiceClient.GetWorkflows(); } catch (Exception ex) { _exception = ex; } } else if (!Program.DebugMode && !Program.IsWexflowWindowsServiceRunning()) { _exception = new Exception(); } else { _workflows = new WorkflowInfo[] { }; textBoxInfo.Text = ""; } } catch (Exception) { ShowError(); } }
private void BindGridView() { try { var workflows = new List <WorkflowDataInfo>(); var wfs = _wexflowServiceClient.GetWorkflows(); _workflowsPerId = new Dictionary <int, WorkflowInfo>(); foreach (var w in wfs) { workflows.Add(new WorkflowDataInfo(w.Id.ToString(CultureInfo.CurrentCulture), w.Name, w.LaunchType.ToString(), w.IsEnabled, w.Description)); _workflowsPerId.Add(w.Id, w); } var collection = new ObservableCollection <WorkflowDataInfo>(workflows.OrderBy(w => int.Parse(w.Id))); _gvWorkflows.DataStore = collection; _gvWorkflows.Columns.Add(new GridColumn { DataCell = new TextBoxCell { Binding = Binding.Property <WorkflowDataInfo, string>(w => w.Id) }, HeaderText = "Id" }); _gvWorkflows.Columns.Add(new GridColumn { DataCell = new TextBoxCell { Binding = Binding.Property <WorkflowDataInfo, string>(w => w.Name) }, HeaderText = "Name" }); _gvWorkflows.Columns.Add(new GridColumn { DataCell = new TextBoxCell { Binding = Binding.Property <WorkflowDataInfo, string>(w => w.LaunchType) }, HeaderText = "LaunchType" }); _gvWorkflows.Columns.Add(new GridColumn { DataCell = new CheckBoxCell { Binding = Binding.Property <WorkflowDataInfo, bool?>(w => w.IsEnabled) }, HeaderText = "Enabled" }); _gvWorkflows.Columns.Add(new GridColumn { DataCell = new TextBoxCell { Binding = Binding.Property <WorkflowDataInfo, string>(w => w.Description) }, HeaderText = "Description" }); } catch (Exception e) { MessageBox.Show("An error occured while retrieving workflows. Check Wexflow Web Service Uri and check that Wexflow Windows Service is running correctly. Error: " + e.Message, MessageBoxType.Error); } }
void BindGridView() { var workflows = new List <WorkflowDataInfo>(); var wfs = _wexflowServiceClient.GetWorkflows(); _workflowsPerId = new Dictionary <int, WorkflowInfo>(); foreach (var w in wfs) { workflows.Add(new WorkflowDataInfo(w.Id.ToString(CultureInfo.CurrentCulture), w.Name, w.LaunchType.ToString(), w.IsEnabled, w.Description)); _workflowsPerId.Add(w.Id, w); } var collection = new ObservableCollection <WorkflowDataInfo>(workflows.OrderBy(w => int.Parse(w.Id))); _gvWorkflows.DataStore = collection; _gvWorkflows.Columns.Add(new GridColumn { DataCell = new TextBoxCell { Binding = Binding.Property <WorkflowDataInfo, string>(w => w.Id) }, HeaderText = "Id" }); _gvWorkflows.Columns.Add(new GridColumn { DataCell = new TextBoxCell { Binding = Binding.Property <WorkflowDataInfo, string>(w => w.Name) }, HeaderText = "Name" }); _gvWorkflows.Columns.Add(new GridColumn { DataCell = new TextBoxCell { Binding = Binding.Property <WorkflowDataInfo, string>(w => w.LaunchType) }, HeaderText = "LaunchType" }); _gvWorkflows.Columns.Add(new GridColumn { DataCell = new CheckBoxCell { Binding = Binding.Property <WorkflowDataInfo, bool?>(w => w.IsEnabled) }, HeaderText = "Enabled" }); _gvWorkflows.Columns.Add(new GridColumn { DataCell = new TextBoxCell { Binding = Binding.Property <WorkflowDataInfo, string>(w => w.Description) }, HeaderText = "Description" }); }
void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e) { if (Program.DebugMode || Program.IsWexflowWindowsServiceRunning()) { _wexflowServiceClient = new WexflowServiceClient(WexflowWebServiceUri); _workflows = _wexflowServiceClient.GetWorkflows(); } else { _workflows = new WorkflowInfo[] { }; textBoxInfo.Text = ""; } }
private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e) { if (Program.DEBUG_MODE || Program.IsWexflowWindowsServiceRunning()) { this._wexflowServiceClient = new WexflowServiceClient(); this._workflows = _wexflowServiceClient.GetWorkflows(); } else { this._workflows = new WorkflowInfo[] { }; this.textBoxInfo.Text = ""; } }