コード例 #1
0
 private void SetOptionsControl(D2DViewControl pControl)
 {
     _currentOptionsView.Clear();
     _currentOptionsView.AddViewControl(pControl);
     pControl.Bounds = new Rectangle(0, 0, _currentOptionsView.Width, _currentOptionsView.Height);
     pControl.StartRender();
 }
コード例 #2
0
        public void StopRendererTest()
        {
            D2DViewControl target = CreateD2DViewControl(); // TODO: Initialize to an appropriate value

            target.StopRenderer();
            Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }
コード例 #3
0
        public void AddViewControlTest()
        {
            D2DViewControl target = CreateD2DViewControl();
            var            add    = CreateD2DViewControl();

            target.AddViewControl(add);
            Assert.AreSame(add, target.ViewControls[0]);
        }
コード例 #4
0
        public void SendUpdateTest()
        {
            D2DViewControl target          = CreateD2DViewControl(); // TODO: Initialize to an appropriate value
            ReactiveUpdate pReactiveUpdate = null;                   // TODO: Initialize to an appropriate value

            target.SendUpdate(pReactiveUpdate);
            Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }
コード例 #5
0
        public void RemoveTest()
        {
            D2DViewControl target       = CreateD2DViewControl(); // TODO: Initialize to an appropriate value
            D2DViewControl pViewControl = null;                   // TODO: Initialize to an appropriate value

            target.Remove(pViewControl);
            Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }
コード例 #6
0
        public void OnSizeChangedTest()
        {
            D2DViewControl target = CreateD2DViewControl(); // TODO: Initialize to an appropriate value
            object         sender = null;                   // TODO: Initialize to an appropriate value
            EventArgs      e      = null;                   // TODO: Initialize to an appropriate value

            target.OnSizeChanged(sender, e);
            Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }
コード例 #7
0
        public void ClearTest()
        {
            D2DViewControl target = CreateD2DViewControl();

            target.AddViewControl(CreateD2DViewControl());
            target.AddViewControl(CreateD2DViewControl());
            target.Clear();

            Assert.AreEqual(0, target.ViewControls.Count);
        }
コード例 #8
0
        public void GetScreenPointTest()
        {
            D2DViewControl target   = CreateD2DViewControl(); // TODO: Initialize to an appropriate value
            Point          expected = new Point();            // TODO: Initialize to an appropriate value
            Point          actual;

            actual = target.GetScreenPoint();
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }
コード例 #9
0
        public void IndexOfTest()
        {
            D2DViewControl target       = CreateD2DViewControl(); // TODO: Initialize to an appropriate value
            D2DViewControl pViewControl = null;                   // TODO: Initialize to an appropriate value
            int            expected     = 0;                      // TODO: Initialize to an appropriate value
            int            actual;

            actual = target.IndexOf(pViewControl);
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }
コード例 #10
0
        public void GetViewControlContainingPointTest()
        {
            D2DViewControl target       = CreateD2DViewControl(); // TODO: Initialize to an appropriate value
            D2DViewControl pViewControl = null;                   // TODO: Initialize to an appropriate value
            Point          pPoint       = new Point();            // TODO: Initialize to an appropriate value
            D2DViewControl expected     = null;                   // TODO: Initialize to an appropriate value
            D2DViewControl actual;

            actual = target.GetViewControlContainingPoint(pViewControl, pPoint);
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }
コード例 #11
0
        public void GetAllowedRenderingAreaTest()
        {
            D2DViewControl root = CreateD2DViewControl();

            root.Bounds = new Rectangle(0, 0, 5, 5);

            D2DViewControl immediateParent = CreateD2DViewControl();

            immediateParent.Bounds = new Rectangle(2, -2, 5, 5);
            root.AddViewControl(immediateParent);

            D2DViewControl child = CreateD2DViewControl();

            child.Bounds = new Rectangle(-4, 0, 5, 5);
            immediateParent.AddViewControl(child);

            Rectangle actual   = child.GetAllowedScreenRenderingArea();
            Rectangle expected = new Rectangle(4, 2, 1, 3);

            Assert.AreEqual(expected, actual);
        }
コード例 #12
0
        public void RouteTouchEvents(Touch pTouchEvent)
        {
            D2DViewControl currentlySelected = null;

            //for (int i = _overlayViewControls.Count - 1;
            //    i >= 0;
            //    i--)
            //{
            currentlySelected = _overlayViewControls.GetViewControlContainingPoint(pTouchEvent.Location);
            if (currentlySelected != null &&
                currentlySelected != _overlayViewControls)
            {
                currentlySelected.SendUpdate(pTouchEvent);
                return;
            }
            //}

            currentlySelected = _currentView.GetViewControlContainingPoint(pTouchEvent.Location);
            if (currentlySelected != null)
            {
                currentlySelected.SendUpdate(pTouchEvent);
            }
        }