Example #1
0
        private void Designer_onSave(object sender, EventArgsSave e)
        {
            RehostedWorkflowDesigner.Views.MainWindow designer = (RehostedWorkflowDesigner.Views.MainWindow)sender;

            baWorkflows workflow = e.baWorkflows;
            string      fileName = e.FileName;

            if (File.Exists(fileName))
            {
                workflow.WorkFlowXAML = File.ReadAllBytes(fileName);
                entities.SaveChanges();
            }
        }
Example #2
0
        private void WFListBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            ListBox lb = (ListBox)sender;

            if (lb.SelectedItem == null)
            {
                return;
            }

            baWorkflows workflow = lb.SelectedItem as baWorkflows;

            RehostedWorkflowDesigner.Views.MainWindow designer = new RehostedWorkflowDesigner.Views.MainWindow();
            designer.onSave += Designer_onSave;
            designer.openFile(workflow);
            designer.Show();
        }