Esempio n. 1
0
        // return true if really something is dropped, otherwise, false.
        bool DoAutoWrapDrop(InsertionPosition insertionPos, IEnumerable <object> droppedObjects)
        {
            List <Activity> activityList = ObjectList2ActivityList(droppedObjects);

            if (activityList.Count == 0)
            {
                return(false);
            }

            AutoWrapEventArgs args = new AutoWrapEventArgs()
            {
                InsertionPosition      = insertionPos,
                ExistingActivity       = this.MyActivity,
                ActivitiesToBeInserted = activityList
            };

            using (ModelEditingScope scope = this.Context.Services.GetService <ModelService>().Root.BeginEdit(SR.WrapInSequenceDescription))
            {
                ModelItem sequenceActivity = WorkflowItemPresenter.AutoWrapInSequenceHandler(this.Context, args);
                if (this.UpdateItem(sequenceActivity, true))
                {
                    scope.Complete();
                    return(true);
                }
                else
                {
                    scope.Revert();
                    return(false);
                }
            }
        }
Esempio n. 2
0
 public SpacerHelper(WorkflowItemPresenter wfItemPresenter)
 {
     Fx.Assert(wfItemPresenter != null, "null WorkflowItemPresenter");
     this.TopSpacerWrapper    = new SpacerWrapper();
     this.BottomSpacerWrapper = new SpacerWrapper();
     this.wfItemPresenter     = wfItemPresenter;
     Loaded();
 }
Esempio n. 3
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
 {
     switch (connectionId)
     {
     case 1:
         this.BodyHandlerContainer = ((System.Activities.Presentation.WorkflowItemPresenter)(target));
         return;
     }
     this._contentLoaded = true;
 }
Esempio n. 4
0
        private List <WorkflowViewElement> ObjectList2WorkflowViewElementList(IEnumerable <object> droppedObjects)
        {
            List <WorkflowViewElement> movedViewElements = new List <WorkflowViewElement>();

            foreach (object droppedObject in droppedObjects)
            {
                if (droppedObject is ModelItem && ((ModelItem)droppedObject).View != null)
                {
                    WorkflowViewElement   view      = (WorkflowViewElement)((ModelItem)droppedObject).View;
                    WorkflowItemPresenter container = DragDropHelper.GetCompositeView(view) as WorkflowItemPresenter;
                    if (container != this)
                    {
                        movedViewElements.Add(view);
                    }
                }
            }
            return(movedViewElements);
        }
 public SpacerHelper(WorkflowItemPresenter wfItemPresenter)
 {
     Fx.Assert(wfItemPresenter != null, "null WorkflowItemPresenter");
     this.TopSpacerWrapper = new SpacerWrapper();
     this.BottomSpacerWrapper = new SpacerWrapper();
     this.wfItemPresenter = wfItemPresenter;
     Loaded();
 }
 public WorkflowItemPresenterAutomationPeer(WorkflowItemPresenter owner)
     : base(owner)
 {
     this.owner = owner;
 }
Esempio n. 7
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 8 "..\..\..\Application\OpenApplicationDesigner.xaml"
                ((RPA.Core.Activities.ApplicationActivity.OpenApplicationDesigner)(target)).Loaded += new System.Windows.RoutedEventHandler(this.ActivityDesigner_Loaded_1);

            #line default
            #line hidden
                return;

            case 2:
                this.grid1 = ((System.Windows.Controls.Grid)(target));
                return;

            case 3:
                this.navigateTextBlock = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 4:
                this.Hyperlink = ((System.Windows.Documents.Hyperlink)(target));

            #line 36 "..\..\..\Application\OpenApplicationDesigner.xaml"
                this.Hyperlink.Click += new System.Windows.RoutedEventHandler(this.HyperlinkClick);

            #line default
            #line hidden
                return;

            case 5:
                this.grid = ((System.Windows.Controls.Grid)(target));
                return;

            case 6:

            #line 40 "..\..\..\Application\OpenApplicationDesigner.xaml"
                ((System.Windows.Controls.Button)(target)).MouseDoubleClick += new System.Windows.Input.MouseButtonEventHandler(this.Button_MouseDoubleClick);

            #line default
            #line hidden
                return;

            case 7:
                this.navigateImage = ((System.Windows.Controls.Image)(target));
                return;

            case 8:
                this.navigateButton = ((System.Windows.Controls.Button)(target));

            #line 43 "..\..\..\Application\OpenApplicationDesigner.xaml"
                this.navigateButton.Click += new System.Windows.RoutedEventHandler(this.NavigateButtonClick);

            #line default
            #line hidden

            #line 43 "..\..\..\Application\OpenApplicationDesigner.xaml"
                this.navigateButton.Initialized += new System.EventHandler(this.NavigateButtonInitialized);

            #line default
            #line hidden
                return;

            case 9:
                this.contextMenu = ((System.Windows.Controls.ContextMenu)(target));
                return;

            case 10:

            #line 49 "..\..\..\Application\OpenApplicationDesigner.xaml"
                ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.meauItemClickOne);

            #line default
            #line hidden
                return;

            case 11:
                this.grid12 = ((System.Windows.Controls.Grid)(target));
                return;

            case 12:
                this.BodyHandlerContainer = ((System.Activities.Presentation.WorkflowItemPresenter)(target));
                return;
            }
            this._contentLoaded = true;
        }
Esempio n. 8
0
 public WorkflowItemPresenterAutomationPeer(WorkflowItemPresenter owner)
     : base(owner)
 {
     this.owner = owner;
 }
Esempio n. 9
0
        static void OnItemChanged(DependencyObject dependencyObject, DependencyPropertyChangedEventArgs e)
        {
            WorkflowItemPresenter control = (WorkflowItemPresenter)dependencyObject;

            control.OnItemChanged(e);
        }