Beispiel #1
0
 public void SetTarget(LayoutTarget target)
 {
     if (!layout.IsSetLayoutTarget())
     {
         layout.AddNewLayoutTarget();
     }
     layout.layoutTarget.val = fromLayoutTarget(target);
 }
 public void SetTarget(LayoutTarget target)
 {
     if (!this.layout.IsSetLayoutTarget())
     {
         this.layout.AddNewLayoutTarget();
     }
     this.layout.layoutTarget.val = this.fromLayoutTarget(target);
 }
Beispiel #3
0
 private ST_LayoutTarget fromLayoutTarget(LayoutTarget target)
 {
     switch (target)
     {
         case LayoutTarget.INNER: return ST_LayoutTarget.inner;
         case LayoutTarget.OUTER: return ST_LayoutTarget.outer;
         default:
             throw new ArgumentException();
     }
 }
Beispiel #4
0
        private ST_LayoutTarget fromLayoutTarget(LayoutTarget target)
        {
            switch (target)
            {
            case LayoutTarget.Inner: return(ST_LayoutTarget.inner);

            case LayoutTarget.Outer: return(ST_LayoutTarget.outer);

            default:
                throw new ArgumentException();
            }
        }
        public void TestAccessorMethods()
        {
            double       newRatio         = 1.1;
            double       newCoordinate    = 0.3;
            LayoutMode   nonDefaultMode   = LayoutMode.Factor;
            LayoutTarget nonDefaultTarget = LayoutTarget.Outer;

            IManualLayout layout = GetEmptyLayout();

            layout.SetWidthRatio(newRatio);
            Assert.IsTrue(layout.GetWidthRatio() == newRatio);

            layout.SetHeightRatio(newRatio);
            Assert.IsTrue(layout.GetHeightRatio() == newRatio);

            layout.SetX(newCoordinate);
            Assert.IsTrue(layout.GetX() == newCoordinate);

            layout.SetY(newCoordinate);
            Assert.IsTrue(layout.GetY() == newCoordinate);

            layout.SetXMode(nonDefaultMode);
            Assert.IsTrue(layout.GetXMode() == nonDefaultMode);

            layout.SetYMode(nonDefaultMode);
            Assert.IsTrue(layout.GetYMode() == nonDefaultMode);

            layout.SetWidthMode(nonDefaultMode);
            Assert.IsTrue(layout.GetWidthMode() == nonDefaultMode);

            layout.SetHeightMode(nonDefaultMode);
            Assert.IsTrue(layout.GetHeightMode() == nonDefaultMode);

            layout.SetTarget(nonDefaultTarget);
            Assert.IsTrue(layout.GetTarget() == nonDefaultTarget);
        }
 private ST_LayoutTarget fromLayoutTarget(LayoutTarget target)
 {
     switch (target)
     {
         case LayoutTarget.Inner: return ST_LayoutTarget.inner;
         case LayoutTarget.Outer: return ST_LayoutTarget.outer;
         default:
             throw new ArgumentException();
     }
 }
 public void SetTarget(LayoutTarget target)
 {
     if (!layout.IsSetLayoutTarget())
     {
         layout.AddNewLayoutTarget();
     }
     layout.layoutTarget.val = fromLayoutTarget(target);
 }