Ejemplo n.º 1
0
        public int notify(ref TNofityUI msg)
        {
            if (msg.mType == "click")
            {
                if (msg.mSender == mButtonClose)
                {
                    this.Dispose();
                }
                else if (msg.mSender == mButtonLogin)
                {
                    Action action = () =>
                    {
                        MessageBox.Show("OK");
                    };
                    this.BeginInvoke(action);
                }
            }
            else if (msg.mType == "itemselect")
            {
                Action <string, string> action = (controlName, strText) =>
                {
                    if (controlName == "accountcombo")
                    {
                        EditUI pAccountEdit = (EditUI)mManager.findControl("accountedit");
                        if (pAccountEdit != null)
                        {
                            pAccountEdit.setText(strText);
                        }
                    }
                };
                this.BeginInvoke(action, msg.mSender.getName(), msg.mSender.getText());
            }

            return(0);
        }
Ejemplo n.º 2
0
        public int notify(ref TNofityUI msg)
        {
            if (msg.mType == "selectchanged")
            {
                string      name     = msg.mSender.getName();
                TabLayoutUI pControl = (TabLayoutUI)mManager.findControl("switch");
                if (name == "examine")
                {
                    pControl.selectItem(0);
                }
                else if (name == "trojan")
                {
                    pControl.selectItem(1);
                }
                else if (name == "plugins")
                {
                    pControl.selectItem(2);
                }
                else if (name == "vulnerability")
                {
                    pControl.selectItem(3);
                }
                else if (name == "rubbish")
                {
                    pControl.selectItem(4);
                }
                else if (name == "cleanup")
                {
                    pControl.selectItem(5);
                }
                else if (name == "fix")
                {
                    pControl.selectItem(6);
                }
                else if (name == "tool")
                {
                    pControl.selectItem(7);
                }
            }
            else if (msg.mType == "click")
            {
                if (msg.mSender.getName() == "closebtn")
                {
                    this.Dispose();
                }
            }

            return(0);
        }