コード例 #1
0
ファイル: WindowManager.cs プロジェクト: dox0/DotNet471RS3
        protected override void OnLayout(LayoutEventArgs eventArgs)
        {
            WorkflowView parentView = ParentView;

            using (Graphics graphics = parentView.CreateGraphics())
            {
                if (parentView.RootDesigner != null)
                {
                    try
                    {
                        ((IWorkflowDesignerMessageSink)parentView.RootDesigner).OnLayoutSize(graphics);
                    }
                    catch (Exception e)
                    {
                        //Eat the exception thrown
                        Debug.WriteLine(e);
                    }

                    try
                    {
                        ((IWorkflowDesignerMessageSink)parentView.RootDesigner).OnLayoutPosition(graphics);
                    }
                    catch (Exception e)
                    {
                        //Eat the exception thrown
                        Debug.WriteLine(e);
                    }
                }
            }
        }
コード例 #2
0
        protected override void OnLayout(LayoutEventArgs eventArgs)
        {
            WorkflowView parentView = base.ParentView;

            using (Graphics graphics = parentView.CreateGraphics())
            {
                if (parentView.RootDesigner != null)
                {
                    try
                    {
                        ((IWorkflowDesignerMessageSink)parentView.RootDesigner).OnLayoutSize(graphics);
                    }
                    catch (Exception)
                    {
                    }
                    try
                    {
                        ((IWorkflowDesignerMessageSink)parentView.RootDesigner).OnLayoutPosition(graphics);
                    }
                    catch (Exception)
                    {
                    }
                }
            }
        }