예제 #1
0
        public void ViewIsResourcesCreated()
        {
            tlog.Debug(tag, $"ViewIsResourcesCreated START");

            var testingTarget = new MyView()
            {
                Layout = new LinearLayout(),
            };

            Assert.IsNotNull(testingTarget, "null handle");
            Assert.IsInstanceOf <View>(testingTarget, "Should return View instance.");

            var result = testingTarget.IsResourcesCreated;

            tlog.Debug(tag, "IsResourcesCreated : " + result);

            testingTarget.Dispose();
            tlog.Debug(tag, $"ViewIsResourcesCreated END (OK)");
        }
예제 #2
0
        public async Task RelayoutContainerAdd()
        {
            tlog.Debug(tag, $"RelayoutContainerAdd START");

            var myView = new MyView();

            Assert.IsNotNull(myView, "Can't create success object PaddingType");
            Assert.IsInstanceOf <MyView>(myView, "Should be an instance of MyView2 type.");

            Window.Instance.Add(myView);

            try
            {
                _flagAdd = false;
                Assert.False(_flagAdd, "Should be false");

                PropertyMap propertyMap = new PropertyMap();
                propertyMap.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.Color));
                propertyMap.Add(ColorVisualProperty.MixColor, new PropertyValue(Color.Blue));

                myView.AddVisual(propertyMap);
                await Task.Delay(1000);

                Assert.True(_flagAdd, "Should be true");
            }
            catch (Exception e)
            {
                tlog.Error(tag, "Caught Exception" + e.ToString());
                LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString());
                Assert.Fail("Caught Exception" + e.ToString());
            }
            finally
            {
                Window.Instance.Remove(myView);
            }

            myView.Dispose();
            tlog.Debug(tag, $"RelayoutContainerAdd END (OK)");
        }
예제 #3
0
        public void ViewKeyInputFocus()
        {
            tlog.Debug(tag, $"ViewKeyInputFocus START");

            var testingTarget = new MyView()
            {
                Layout = new LinearLayout(),
            };

            Assert.IsNotNull(testingTarget, "null handle");
            Assert.IsInstanceOf <View>(testingTarget, "Should return View instance.");

            var result = testingTarget.KeyInputFocus;

            tlog.Debug(tag, "KeyInputFocus : " + result);

            testingTarget.KeyInputFocus = true;
            tlog.Debug(tag, "KeyInputFocus : " + testingTarget.KeyInputFocus);

            testingTarget.Dispose();
            tlog.Debug(tag, $"ViewKeyInputFocus END (OK)");
        }
예제 #4
0
        public void ViewControlState()
        {
            tlog.Debug(tag, $"ViewControlState START");

            var testingTarget = new MyView()
            {
                Layout = new LinearLayout(),
            };

            Assert.IsNotNull(testingTarget, "null handle");
            Assert.IsInstanceOf <View>(testingTarget, "Should return View instance.");

            var result = testingTarget.LayoutSet;

            tlog.Debug(tag, "LayoutSet : " + result);

            testingTarget.OnControlState(ControlState.Disabled);
            tlog.Debug(tag, "LayoutSet : " + result);

            testingTarget.Dispose();
            tlog.Debug(tag, $"ViewControlState END (OK)");
        }