Exemplo n.º 1
0
 public void setNumEdit(MobNumEdit pNumEdit)
 {
     _numEdit = pNumEdit;
     _numEdit.processCmd(CalcCmd.MS);
     _numEdit.processCmd(CalcCmd.reset);
 }
Exemplo n.º 2
0
        protected override void Dispose(bool disposing)
        {
            base.Dispose(disposing);

            _numEdit = null;
        }
Exemplo n.º 3
0
            public View OnCreateView(string name, Context context, IAttributeSet attrs)
            {
                // string ns = "http://schemas.android.com/apk/res-auto";
                string ns_ = "http://schemas.android.com/apk/res/android";

                string tag_ = ToolCell.isNull(attrs.GetAttributeValue(ns_, "tag"), string.Empty).ToString();
                // string style_ = ToolCell.isNull(attrs.GetAttributeValue(ns_, "style"), string.Empty).ToString();
                string type_ = ToolObjectName.getArgValue(tag_, ConstCmdLine.type);


                //ToolMobile.log("OnCreateView [" + name + "] with tag [" + tag_ + "]");

                View v = null;

                switch (name)
                {
                case "GridView":
                    if (type_ == "grid")
                    {
                        v = new MobDataGrid(context, attrs);
                    }
                    break;

                case "ExpandableListView":
                    if (type_ == "tree")
                    {
                        v = new MobTreeView(context, attrs);
                    }
                    break;

                case "ListView":
                    if (type_ == "list")
                    {
                        v = new MobListView(context, attrs);
                    }
                    break;

                case "LinearLayout":
                    if (type_ == "numinput")
                    {
                        v = new MobNumInput(context, attrs);
                    }
                    else
                    {
                        v = new MobPanel(context, attrs);
                    }
                    break;

                case "RelativeLayout":
                {
                    v = new MobPanelRelative(context, attrs);
                }
                break;

                case "FrameLayout":
                {
                    v = new MobFrame(context, attrs);
                }
                break;

                case "TextView":
                {
                    v = new MobLabel(context, attrs);
                }
                break;

                case "EditText":
                    if (type_ == "num")
                    {
                        v = new MobNumEdit(context, attrs);
                    }
                    else
                    if (type_ == "date")
                    {
                        v = new MobDateEdit(context, attrs);
                    }
                    else
                    {
                        v = new MobTextBox(context, attrs);
                    }
                    break;

                case "Button":
                {
                    v = new MobButton(context, attrs);
                }
                break;

                case "DatePicker":
                {
                    v = new MobDatePicker(context, attrs);
                }
                break;

                case "TimePicker":
                {
                    v = new MobTimePicker(context, attrs);
                }
                break;

                case "TabHost":
                {
                    v = new MobTabControl(context, attrs);
                }
                break;
                }

                //  if (v == null)
                //     ToolMobile.log("OnCreateView undefined for [" + name + "] with tag [" + tag_ + "]");


                return(v);
            }