private void Run(WorkFlowItem obj)
        {
            var workFlow = obj.IsPackage
                ? WorkflowManager.Instance.LoadFromPackage(obj.File)
                : WorkflowManager.Instance.Load(obj.File);

            if (workFlow.Views.Count == 0)
            {
                MessageBox.Show("No view(s) are defined !");
                return;
            }
            WorkflowManager.Instance.Context.WorkFlow = workFlow;
            WorkflowViewView wnd = new WorkflowViewView();

            wnd.ShowDialog();
        }
        private void Run(WorkFlowItem obj)
        {
            var workFlow = obj.IsPackage
                ? WorkflowManager.Instance.LoadFromPackage(obj.File)
                : WorkflowManager.Instance.Load(obj.File);

            if (File.Exists(Path.Combine(Settings.Instance.DefaultWorkflowFolder, Path.GetFileName(obj.File))))
            {
                var defFile     = Path.Combine(Settings.Instance.DefaultWorkflowFolder, Path.GetFileName(obj.File));
                var defWorkflow = obj.IsPackage
                    ? WorkflowManager.Instance.LoadFromPackage(defFile)
                    : WorkflowManager.Instance.Load(defFile);

                if (defWorkflow.GetVersion() > workFlow.GetVersion())
                {
                    if (MessageBox.Show("New version is available do  you want update the workflow ?", "Warning",
                                        MessageBoxButton.YesNo, MessageBoxImage.Question) == MessageBoxResult.Yes)
                    {
                        Revert(obj);
                        workFlow = obj.IsPackage
                            ? WorkflowManager.Instance.LoadFromPackage(obj.File)
                            : WorkflowManager.Instance.Load(obj.File);
                    }
                }
            }

            if (workFlow.Views.Count == 0)
            {
                MessageBox.Show("No view(s) are defined !");
                return;
            }
            ServiceProvider.Instance.DeviceManager.PhotoCaptured -= DeviceManager_PhotoCaptured;
            WorkflowManager.Instance.Context.WorkFlow             = workFlow;
            WorkflowViewView wnd = new WorkflowViewView();

            wnd.ShowDialog();
            WorkflowManager.Instance.Context.Clear();
            ServiceProvider.Instance.DeviceManager.PhotoCaptured += DeviceManager_PhotoCaptured;
        }
Exemple #3
0
        private void Run()
        {
            WorkflowViewView wnd = new WorkflowViewView();

            wnd.ShowDialog();
        }