Exemplo n.º 1
0
 public void SetTarget(LayoutTarget target)
 {
     if (!layout.IsSetLayoutTarget())
     {
         layout.AddNewLayoutTarget();
     }
     layout.layoutTarget.val = fromLayoutTarget(target);
 }
Exemplo n.º 2
0
 public void SetTarget(LayoutTarget target)
 {
     if (!this.layout.IsSetLayoutTarget())
     {
         this.layout.AddNewLayoutTarget();
     }
     this.layout.layoutTarget.val = this.fromLayoutTarget(target);
 }
Exemplo n.º 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();
     }
 }
Exemplo n.º 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();
            }
        }
Exemplo n.º 5
0
        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);
        }
Exemplo n.º 6
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();
     }
 }
Exemplo n.º 7
0
 public void SetTarget(LayoutTarget target)
 {
     if (!layout.IsSetLayoutTarget())
     {
         layout.AddNewLayoutTarget();
     }
     layout.layoutTarget.val = fromLayoutTarget(target);
 }