Ejemplo n.º 1
0
 // Ensure the emitter is immediately disposed when destroyed
 void OnDestroy()
 {
     _emitter.Dispose();
     _emitter = null;
     _alignment.Dispose();
     _alignment = null;
 }
Ejemplo n.º 2
0
 /// <inheritdoc />
 public void Dispose()
 {
     _treeAlignment?.Dispose();
     this.GameContext.Assets?.Dispose();
     _treeModel?.Dispose();
     _treeSorter?.Dispose();
     _treeFilter?.Dispose();
     this.Tree?.Dispose();
 }
Ejemplo n.º 3
0
        public void AlignmentConstructorWithHorizontalAndVerticalType()
        {
            tlog.Debug(tag, $"AlignmentConstructorWithHorizontalAndVerticalType START");

            var testingTarget = new Alignment(Alignment.Type.HorizontalCenter, Alignment.Type.VerticalCenter);

            Assert.IsNotNull(testingTarget, "Can't create success object Alignment");
            Assert.IsInstanceOf <Alignment>(testingTarget, "Should be an instance of Alignment type.");

            testingTarget.Dispose();
            tlog.Debug(tag, $"AlignmentConstructorWithHorizontalAndVerticalType END (OK)");
        }
Ejemplo n.º 4
0
        public void AlignmentConstructor()
        {
            tlog.Debug(tag, $"AlignmentConstructor START");

            var testingTarget = new Alignment();

            Assert.IsNotNull(testingTarget, "Can't create success object Alignment");
            Assert.IsInstanceOf <Alignment>(testingTarget, "Should be an instance of Alignment type.");

            testingTarget.Dispose();
            tlog.Debug(tag, $"AlignmentConstructor END (OK)");
        }
Ejemplo n.º 5
0
        public void AlignmentConstructorWithAlignment()
        {
            tlog.Debug(tag, $"AlignmentConstructorWithAlignment START");

            using (Alignment alignMent = new Alignment(Alignment.Type.HorizontalRight))
            {
                var testingTarget = new Alignment(alignMent);
                Assert.IsNotNull(testingTarget, "Can't create success object Alignment");
                Assert.IsInstanceOf <Alignment>(testingTarget, "Should be an instance of Alignment type.");

                testingTarget.Dispose();
            }

            tlog.Debug(tag, $"AlignmentConstructorWithAlignment END (OK)");
        }
Ejemplo n.º 6
0
        public void AlignmentSetScaling()
        {
            tlog.Debug(tag, $"AlignmentSetScaling START");

            var testingTarget = new Alignment(Alignment.Type.HorizontalCenter);

            Assert.IsNotNull(testingTarget, "Can't create success object Alignment");
            Assert.IsInstanceOf <Alignment>(testingTarget, "Should be an instance of Alignment type.");

            tlog.Debug(tag, "Alignment.Scaling : " + testingTarget.GetScaling());

            testingTarget.SetScaling(Alignment.Scaling.ScaleToFill);
            tlog.Debug(tag, "Alignment.Scaling : " + testingTarget.GetScaling());

            testingTarget.Dispose();
            tlog.Debug(tag, $"AlignmentSetScaling END (OK)");
        }
Ejemplo n.º 7
0
        public void AlignmentSetPadding()
        {
            tlog.Debug(tag, $"AlignmentSetPadding START");

            var testingTarget = new Alignment(Alignment.Type.HorizontalCenter);

            Assert.IsNotNull(testingTarget, "Can't create success object Alignment");
            Assert.IsInstanceOf <Alignment>(testingTarget, "Should be an instance of Alignment type.");

            tlog.Debug(tag, "Alignment.Padding : " + testingTarget.GetPadding());

            using (Alignment.Padding padding = new Alignment.Padding(1.0f, 2.0f, 3.0f, 4.0f))
            {
                testingTarget.SetPadding(padding);
                tlog.Debug(tag, "Alignment.Padding : " + testingTarget.GetPadding());
            }

            testingTarget.Dispose();
            tlog.Debug(tag, $"AlignmentSetPadding END (OK)");
        }
Ejemplo n.º 8
0
        public void AlignmentDownCast()
        {
            tlog.Debug(tag, $"AlignmentDownCast START");

            var testingTarget = new Alignment();

            Assert.IsNotNull(testingTarget, "Can't create success object Alignment");
            Assert.IsInstanceOf <Alignment>(testingTarget, "Should be an instance of Alignment type.");

            try
            {
                Alignment.DownCast(testingTarget);
            }
            catch (Exception e)
            {
                tlog.Debug(tag, e.Message.ToString());
                Assert.Fail("Caught Exception : Failed!");
            }

            testingTarget.Dispose();
            tlog.Debug(tag, $"AlignmentDownCast END (OK)");
        }
Ejemplo n.º 9
0
        public void AlignmentGetCPtr()
        {
            tlog.Debug(tag, $"AlignmentGetCPtr START");

            var testingTarget = new Alignment(new ImageView().SwigCPtr.Handle, false);

            Assert.IsNotNull(testingTarget, "Can't create success object Alignment");
            Assert.IsInstanceOf <Alignment>(testingTarget, "Should be an instance of Alignment type.");

            try
            {
                Alignment.getCPtr(testingTarget);
            }
            catch (Exception e)
            {
                tlog.Debug(tag, e.Message.ToString());
                Assert.Fail("Caught Exception : Failed!");
            }

            testingTarget.Dispose();
            tlog.Debug(tag, $"AlignmentGetCPtr END (OK)");
        }
        void ReleaseDesignerOutlets()
        {
            if (TypefaceDropdown != null)
            {
                TypefaceDropdown.Dispose();
                TypefaceDropdown = null;
            }

            if (WeightDropdown != null)
            {
                WeightDropdown.Dispose();
                WeightDropdown = null;
            }

            if (Size != null)
            {
                Size.Dispose();
                Size = null;
            }

            if (Alignment != null)
            {
                Alignment.Dispose();
                Alignment = null;
            }

            if (StrikeThruCheckbox != null)
            {
                StrikeThruCheckbox.Dispose();
                StrikeThruCheckbox = null;
            }

            if (UnderlineCheckbox != null)
            {
                UnderlineCheckbox.Dispose();
                UnderlineCheckbox = null;
            }

            if (VerticalCheckbox != null)
            {
                VerticalCheckbox.Dispose();
                VerticalCheckbox = null;
            }

            if (ScaleSlider != null)
            {
                ScaleSlider.Dispose();
                ScaleSlider = null;
            }

            if (ScaleValue != null)
            {
                ScaleValue.Dispose();
                ScaleValue = null;
            }

            if (SkewSlider != null)
            {
                SkewSlider.Dispose();
                SkewSlider = null;
            }

            if (SkewValue != null)
            {
                SkewValue.Dispose();
                SkewValue = null;
            }
        }