Beispiel #1
0
        public CButton createButtons(int type)
        {
            CButton btn = null;

            btn = defineButtonType(type);
            if (btn == null)
            {
                return(null);
            }
            return(btn);
        }
Beispiel #2
0
        public CButton defineButtonType(int _type)
        {
            CButton newbtn = null;

            char name = Convert.ToChar(_type);

            if (_type < 10)
            {
                newbtn = new NumButtons(_type);
            }
            if (_type > 10)
            {
                newbtn = new CalButtons(name);
            }
            if (newbtn == null)
            {
                return(null);
            }
            newbtn.m_Name = name.ToString();
            return(newbtn);
        }