Beispiel #1
0
		public void BasicTest ()
		{
			SW.Point nonEmptyPoint =
				new SW.Point (1,2);
			SW.Point emptyPoint =
				new SW.Point (double.NegativeInfinity, double.NegativeInfinity);

			DC.Point nonEmptyCorePoint = new DC.Point (nonEmptyPoint);
			Assert.AreEqual (nonEmptyPoint.X,
			                 nonEmptyCorePoint.x,
			                 "x from Point");
			Assert.AreEqual (nonEmptyPoint.Y,
			                 nonEmptyCorePoint.y,
			                 "y from Point");

			DC.Point emptyCorePoint = new DC.Point (emptyPoint);
			Assert.AreEqual (emptyPoint.X,
			                 emptyCorePoint.x,
			                 "x from Point");
			Assert.AreEqual (emptyPoint.Y,
			                 emptyCorePoint.y,
			                 "y from Point");

			nonEmptyCorePoint.x = 5;
			Assert.AreEqual (5,
			                 nonEmptyCorePoint.x,
			                 "x set manually");
			nonEmptyCorePoint.y = 6;
			Assert.AreEqual (6,
			                 nonEmptyCorePoint.y,
			                 "y set manually");
		}
Beispiel #2
0
        public void BasicTest()
        {
            SW.Point nonEmptyPoint =
                new SW.Point(1, 2);
            SW.Point emptyPoint =
                new SW.Point(double.NegativeInfinity, double.NegativeInfinity);

            DC.Point nonEmptyCorePoint = new DC.Point(nonEmptyPoint);
            Assert.AreEqual(nonEmptyPoint.X,
                            nonEmptyCorePoint.x,
                            "x from Point");
            Assert.AreEqual(nonEmptyPoint.Y,
                            nonEmptyCorePoint.y,
                            "y from Point");

            DC.Point emptyCorePoint = new DC.Point(emptyPoint);
            Assert.AreEqual(emptyPoint.X,
                            emptyCorePoint.x,
                            "x from Point");
            Assert.AreEqual(emptyPoint.Y,
                            emptyCorePoint.y,
                            "y from Point");

            nonEmptyCorePoint.x = 5;
            Assert.AreEqual(5,
                            nonEmptyCorePoint.x,
                            "x set manually");
            nonEmptyCorePoint.y = 6;
            Assert.AreEqual(6,
                            nonEmptyCorePoint.y,
                            "y set manually");
        }
Beispiel #3
0
        public ITextPatternRange RangeFromPoint(Point screenLocation)
        {
            DC.Point pt        = new DC.Point(screenLocation);
            string   rangePath = null;

            try {
                rangePath = pattern.RangePathFromPoint(pt);
            } catch (Exception ex) {
                throw DbusExceptionTranslator.Translate(ex);
            }
            return(GetTextPatternRange(rangePath));
        }
Beispiel #4
0
        public string RangePathFromPoint(DC.Point screenLocation)
        {
            var textRangeProvider = provider.RangeFromPoint(new SW.Point(screenLocation.x, screenLocation.y));

            return(GetOrCreateTextRange(textRangeProvider));
        }
Beispiel #5
0
		public ITextPatternRange RangeFromPoint (Point screenLocation)
		{
			DC.Point pt = new DC.Point (screenLocation);
			string rangePath = null;
			try {
				rangePath = pattern.RangePathFromPoint (pt);
			} catch (Exception ex) {
				throw DbusExceptionTranslator.Translate (ex);
			}
			return GetTextPatternRange (rangePath);
		}