Exemplo n.º 1
0
        public override UIView CreateView()
        {
            _view = new UIView();
            _view.AddSubview(_child.CreateView());

            return(_view);
        }
Exemplo n.º 2
0
        IControl <UIView> GetView(int position)
        {
            IControl <UIView> control = _controls [position];

            if (control.View == null)
            {
                control.CreateView();
                LayoutChild(control);
            }
            return(control);
        }
Exemplo n.º 3
0
        public object CreateScreen <T>(String screenName, ValueStack.ValueStack stack, BitMobile.Controllers.ScreenController controller) where T : StyleSheet, new()
        {
            string TS_NAME = "CreateScreen: " + screenName;

            TimeStamp.Start("Total");
            TimeStamp.Start(TS_NAME);

            System.IO.Stream screenStream = ApplicationContext.Context.DAL.GetScreenByName(screenName);
            if (screenStream == null)
            {
                throw new Exception(String.Format("Can't load screen {0}", screenName));
            }

            TimeStamp.Log(TS_NAME, "Prepare");
            TimeStamp.Start(TS_NAME);

            controller.OnLoading();

            TimeStamp.Log(TS_NAME, "OnLoading invoke");
            TimeStamp.Start(TS_NAME);

            IControl <object> scr = (IControl <object>)objectFactory.CreateObject(stack, screenStream);

            TimeStamp.Log(TS_NAME, "CreateInstance objects");
            TimeStamp.Start(TS_NAME);

            scr.CreateView(); // TODO: Replace to platform controllers

            TimeStamp.Log(TS_NAME, "CreateInstance views");
            TimeStamp.Start(TS_NAME);

            ApplyStyles(screenName, scr as IStyledObject, new T());

            TimeStamp.Log(TS_NAME, "Apply styles");
            TimeStamp.Start(TS_NAME);

            controller.OnLoad();

            TimeStamp.Log(TS_NAME, "OnLoad invoke");

            TimeStamp.Log("Total");
            TimeStamp.WriteLog();
            TimeCollector.Write("CallFunction");
            TimeCollector.Stop("CallFunction");
            TimeCollector.Write("CallFunctionNoException");
            TimeCollector.Stop("CallFunctionNoException");

            return(scr);
        }
Exemplo n.º 4
0
        private View GetView(int position)
        {
            if (position <= _controls.Count)
            {
                IControl <View> control = _controls[position];
                if (control.View == null)
                {
                    control.CreateView();
                    LayoutChild(control);

                    control.View.LayoutParameters =
                        new AbsListView.LayoutParams(control.Frame.Width.Round(), control.Frame.Height.Round());
                }

                return(control.View);
            }
            throw new Exception("Position less than count");
        }