예제 #1
0
    public void recover(string[] ids, CallBackStrtArray callback)
    {
        this.callback = callback;
        this.ids      = ids;

        ErlKVMessage message = new ErlKVMessage(FrontPort.FUBEN_RECOVER);

        message.addValue("card_uid", new ErlString(getStringByArray(ids)));
        access(message);
    }
예제 #2
0
    public override void read(ErlKVMessage message)
    {
        string str = (message.getValue("msg") as ErlType).getValueString();

        if (str == FPortGlobal.SYSTEM_OK)
        {
            callback(ids);
        }
        else
        {
            MessageWindow.ShowAlert(str);
            if (callback != null)
            {
                callback = null;
            }
        }
    }
    public void Initialize(int propId, int showtype, string[] ids, CallBackStrtArray useCallBack)
    {
        this.useCallBack = useCallBack;
        this.ids         = ids;
        Prop prop = StorageManagerment.Instance.getProp(propId);

        if (prop == null)
        {
            prop = PropManagerment.Instance.createProp(propId);
        }

        showType = showtype;
        updateProp(prop);
        propDescript.text = prop.getDescribe();

        switch (showtype)
        {
        case ONEKEYREST:
            propDescript.text = LanguageConfigManager.Instance.getLanguage("s0180", ids.Length.ToString());
            break;

        case ONEKEYREBIRTH:
            propDescript.text = LanguageConfigManager.Instance.getLanguage("s0181", ids.Length.ToString());
            break;

        case SINGLEREST:
            propDescript.text = LanguageConfigManager.Instance.getLanguage("s0178");
            break;

        case SINGLEREBIRTH:
            propDescript.text = LanguageConfigManager.Instance.getLanguage("s0179");
            break;
        }


        if (prop.getNum() <= 0)
        {
            buttonUse.disableButton(true);
        }
    }