Ejemplo n.º 1
0
 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();
     }
 }
Ejemplo n.º 2
0
        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);
            }
        }
Ejemplo n.º 3
0
        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"
            });
        }
Ejemplo n.º 4
0
 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 = "";
     }
 }
Ejemplo n.º 5
0
 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 = "";
     }
 }