Example #1
0
    public GameConfig()
    {
        kill_point_30_60    = new IntArray();
        kill_point_60       = new IntArray();
        delta_level_exp     = new IntArray();
        carriage_list       = new IntArray();
        best_carriage_list  = new IntArray();
        clear_cd_skill_list = new IntArray();
        pickup_item_notice  = new IntArray();

        learn_skill          = new LearnSkillConfig();
        equip_endure_cost    = new EquipEndureCost();
        strings              = new ConstString();
        battlefield          = new BattlefieldConfig();
        jizhou_battlefield   = new JiZhouBattlefieldConfig();
        huangjin_battlefield = new HuangJinBattlefieldConfig();
        card_mgr             = new CardMgr();
        group_setting        = new GroupSetting();
        store_setting        = new IBStoreSettings();
        relationship         = new RelationshipConfig();

        OfflineExpItems     = new OfflineExpItemCfgArray();
        OfflineExpPerLevels = new OfflineExpPerLevelArray();

        group_league = new GroupLeagueConfig();
        country      = new CountryConfig();

        auto_equip_when_enter_map_config = new AutoEquipWhenEnterMapConfig();
        sign_manager = new SignManager();
    }
Example #2
0
 public static void RegisterHelperViews()
 {
     ConstString.SetConstStrings(ConstStrings.Get);
     MessageBox.View     = new MessageBoxView();
     OpenFileDialog.View = new OpenFileDialogView();
     ChartPredefinedValuesProvider.View = new ChartPredefinedValuesProviderView();
     ReportDialog.View = new ReportDialogView();
     Mouse.View        = new MouseView();
     CreateGroupAndCategories();
 }
Example #3
0
        private static Vt GetConstString(SyntaxTree syntaxTree)
        {
            ConstString result = null;

            if (syntaxTree.NodeType.Type == ContextfreeGrammarTreeNodeType.constStringLeave__)
            {
                string originalName = syntaxTree.NodeType.Content;
                originalName = originalName.Substring(1, originalName.Length - 2);
                string identifieredName = ConstString2IdentifierHelper.ConstString2Identifier(originalName);
                result = new ConstString(originalName, identifieredName);
            }

            return(result);
        }
Example #4
0
 public new ConstString toString_c()
 {
     ConstString ret = new ConstString(yarpPINVOKE.ResourceFinder_toString_c(swigCPtr), true);
     return ret;
 }
Example #5
0
 public void addString(ConstString str)
 {
     yarpPINVOKE.Bottle_addString__SWIG_1(swigCPtr, ConstString.getCPtr(str));
     if (yarpPINVOKE.SWIGPendingException.Pending) throw yarpPINVOKE.SWIGPendingException.Retrieve();
 }
Example #6
0
 public ConstString findPath()
 {
     ConstString ret = new ConstString(yarpPINVOKE.ResourceFinder_findPath__SWIG_1(swigCPtr), true);
     return ret;
 }
Example #7
0
 public ConstString getName()
 {
     ConstString ret = new ConstString(yarpPINVOKE.PortReaderBufferBase_getName(swigCPtr), true);
     return ret;
 }
 public override ConstString getName()
 {
     ConstString ret = new ConstString(yarpPINVOKE.BufferedPortImageFloat_getName(swigCPtr), true);
     return ret;
 }
Example #9
0
 public static new ConstString toString(int x)
 {
     ConstString ret = new ConstString(yarpPINVOKE.ConstString_toString__SWIG_1(x), true);
     return ret;
 }
Example #10
0
 public virtual ConstString asString()
 {
     ConstString ret = new ConstString(yarpPINVOKE.Value_asString(swigCPtr), true);
     return ret;
 }
Example #11
0
 public static ConstString getConfigFile(string fname)
 {
     ConstString ret = new ConstString(yarpPINVOKE.NetworkBase_getConfigFile(fname), true);
     return ret;
 }
Example #12
0
 public static ConstString getEnvironment(string key, SWIGTYPE_p_bool found)
 {
     ConstString ret = new ConstString(yarpPINVOKE.NetworkBase_getEnvironment__SWIG_0(key, SWIGTYPE_p_bool.getCPtr(found)), true);
     return ret;
 }
Example #13
0
 public ConstString getName(string subName)
 {
     ConstString ret = new ConstString(yarpPINVOKE.RFModule_getName__SWIG_0(swigCPtr, subName), true);
     return ret;
 }
Example #14
0
 public ConstString getName()
 {
     ConstString ret = new ConstString(yarpPINVOKE.RFModule_getName__SWIG_1(swigCPtr), true);
     return ret;
 }
Example #15
0
 public new ConstString toString()
 {
     ConstString ret = new ConstString(yarpPINVOKE.Drivers_toString(swigCPtr), true);
     return ret;
 }
Example #16
0
        /// <summary>
        /// 短信验证码
        /// </summary>
        /// <param name="receiveId"></param>
        /// <param name="step"></param>
        /// <param name="parameters"></param>
        /// <returns></returns>
        public Result <int> AddSMSValCode(string phone, MessageStep step, Dictionary <string, string> parameters)
        {
            //生成验证码
            string code = ConstString.CreateRandomNum(ConstString.RANDOMNUMCOUNT);

            parameters.Add("Code", code);

            Result <int> result = new Result <int>();

            try
            {
                //查找模板
                var templete = DataOperateMsg <Msg_SMSTemplete> .Get().Single(i => i.Step == step.ToString() && i.IsConfirm && i.IsEnable);

                if (templete != null)
                {
                    Msg_SMS model = new Msg_SMS();
                    string  con   = templete.TemplateCon;
                    if (parameters != null && parameters.Any())
                    {
                        //替换内容参数
                        foreach (var item in parameters)
                        {
                            con = con.Replace("{" + item.Key + "}", item.Value);
                        }
                    }
                    var receive = DataOperateBasic <Base_User> .Get().Single(i => i.Phone == phone);

                    long receiveId = 0;
                    if (receive != null && receive.Id > 0)
                    {
                        receiveId = receive.Id;
                    }
                    model.ReceivePhone     = phone;
                    model.ReceiveId        = receiveId;
                    model.SendeCompanyId   = 0;
                    model.ReceiveCompanyId = 0;
                    model.SenderId         = 0;
                    model.SenderPhone      = "";
                    model.SenderTime       = null;
                    model.SmsCon           = con;
                    model.State            = false;
                    model.SubmissionTime   = DateTime.Now;
                    model.Step             = step.ToString();
                    model.TemplateId       = templete.Id;
                    model.ServerNo         = templete.ServerNo;
                    model.Params           = UtilitySendMessage.CreateSmsParam(parameters).Data;
                    model.SignName         = templete.SignName;
                    var splitTime = (LoadSettingsByKeys(Settings.SendRegisterCodeTime));
                    //验证是否频繁发送
                    var last = DataOperateMsg <Msg_SMSValidate> .Get().GetList(i => i.ReceivePhone == phone).OrderByDescending(i => i.Id).FirstOrDefault();

                    if (last != null && (DateTime.Now - last.RecordTime).TotalSeconds < splitTime.Value.ToInt32Req())
                    {
                        throw new Exception("不能频繁发送验证码");
                    }
                    var rows = DataOperateMsg <Msg_SMS> .Get().Add(model);

                    //添加验证码数据
                    Msg_SMSValidate valModel = new Msg_SMSValidate();
                    valModel.Code         = code;
                    valModel.SMSId        = model.Id;
                    valModel.ReceivePhone = model.ReceivePhone;
                    valModel.ReceiveId    = model.ReceiveId;
                    valModel.SendId       = model.SenderId;
                    valModel.SendTime     = model.SubmissionTime;
                    valModel.State        = ValCodeState.UNUse.ToString();
                    valModel.ValidateType = step.ToString();
                    var seconds = LoadSettingsByKeys(Settings.SMSCodeDuration).Value.ToInt32Req();
                    valModel.ExpiredTime = DateTime.Now.AddSeconds(seconds);
                    rows = DataOperateMsg <Msg_SMSValidate> .Get().Add(valModel);


                    result.Data = rows;
                    result.Flag = EResultFlag.Success;

                    WriteLog(AdminModule.SMSHistory.GetText(), SystemRight.Add.GetText(), "新增短信验证码:" + model.Id + ":" + model.SmsCon);
                }
                else
                {
                    throw new Exception("未查找到对应短信模板");
                }
            }
            catch (Exception ex)
            {
                result.Data      = -1;
                result.Flag      = EResultFlag.Failure;
                result.Exception = new ExceptionEx(ex, "AddSMSValCode");
            }
            return(result);
        }
Example #17
0
 public void put(string key, ConstString value)
 {
     yarpPINVOKE.Property_put__SWIG_1(swigCPtr, key, ConstString.getCPtr(value));
     if (yarpPINVOKE.SWIGPendingException.Pending) throw yarpPINVOKE.SWIGPendingException.Retrieve();
 }
Example #18
0
 public virtual ConstString expectText()
 {
     ConstString ret = new ConstString(yarpPINVOKE.ConnectionReader_expectText__SWIG_1(swigCPtr), true);
     return ret;
 }
Example #19
0
 public static ConstString getEnvironment(string key)
 {
     ConstString ret = new ConstString(yarpPINVOKE.NetworkBase_getEnvironment__SWIG_1(key), true);
     return ret;
 }
Example #20
0
 public ConstString(ConstString alt)
     : this(yarpPINVOKE.new_ConstString__SWIG_3(ConstString.getCPtr(alt)), true)
 {
     if (yarpPINVOKE.SWIGPendingException.Pending) throw yarpPINVOKE.SWIGPendingException.Retrieve();
 }
Example #21
0
 public static ConstString getNameServerName()
 {
     ConstString ret = new ConstString(yarpPINVOKE.NetworkBase_getNameServerName(), true);
     return ret;
 }
Example #22
0
 public virtual ConstString getName()
 {
     ConstString ret = new ConstString(yarpPINVOKE.Contactable_getName(swigCPtr), true);
     return ret;
 }
Example #23
0
 public static ConstString readString(SWIGTYPE_p_bool eof)
 {
     ConstString ret = new ConstString(yarpPINVOKE.NetworkBase_readString__SWIG_0(SWIGTYPE_p_bool.getCPtr(eof)), true);
     return ret;
 }
Example #24
0
 public override ConstString getName()
 {
     ConstString ret = new ConstString(yarpPINVOKE.RpcClient_getName(swigCPtr), true);
     return ret;
 }
Example #25
0
 public static ConstString readString()
 {
     ConstString ret = new ConstString(yarpPINVOKE.NetworkBase_readString__SWIG_1(), true);
     return ret;
 }
Example #26
0
 public virtual ConstString getName()
 {
     ConstString ret = new ConstString(yarpPINVOKE.TypedReaderImageMono_getName(swigCPtr), true);
     return ret;
 }
Example #27
0
 public bool notEqual(ConstString alt)
 {
     bool ret = yarpPINVOKE.ConstString_notEqual__SWIG_0(swigCPtr, ConstString.getCPtr(alt));
     if (yarpPINVOKE.SWIGPendingException.Pending) throw yarpPINVOKE.SWIGPendingException.Retrieve();
     return ret;
 }
Example #28
0
 public new ConstString toString_c()
 {
     ConstString ret = new ConstString(yarpPINVOKE.Bottle_toString_c(swigCPtr), true);
     return ret;
 }
Example #29
0
        /// <summary>
        /// 邮件验证码
        /// </summary>
        /// <param name="receiveId"></param>
        /// <param name="step"></param>
        /// <param name="parameters"></param>
        /// <returns></returns>
        public Result <int> AddEmailValCode(string email, MessageStep step, Dictionary <string, string> parameters)
        {
            //生成验证码
            string code = ConstString.CreateRandomNum(ConstString.RANDOMNUMCOUNT);

            parameters.Add("Code", code);

            Result <int> result = new Result <int>();

            try
            {
                //查找模板
                var templete = DataOperateMsg <Msg_EmailTemplete> .Get().Single(i => i.Step == step.ToString() && i.IsConfirm && i.IsEnable);

                if (templete != null)
                {
                    Msg_Email model = new Msg_Email();
                    string    con   = templete.TemplateCon;
                    string    title = templete.TitleCon;
                    if (parameters != null && parameters.Any())
                    {
                        //替换标题和内容参数
                        foreach (var item in parameters)
                        {
                            con   = con.Replace("{" + item.Key + "}", item.Value);
                            title = title.Replace("{" + item.Key + "}", item.Value);
                        }
                    }
                    var receive = DataOperateBasic <Base_User> .Get().Single(i => i.Email == email);

                    long receiveId = 0;
                    if (receive != null && receive.Id > 0)
                    {
                        receiveId = receive.Id;
                    }

                    model.EmailCon         = con;
                    model.ReceiveId        = receiveId;
                    model.SendeCompanyId   = 0;
                    model.ReceiveCompanyId = 0;
                    model.ReceiveEmaile    = email;
                    model.SenderId         = 0;//管理员
                    model.SenderEmail      = DataOperateMsg <Msg_EmailSetting> .Get().Single(i => i.IsConfirm && i.IsEnable).UserName;

                    model.State          = false;
                    model.Step           = step.ToString();
                    model.TemplateId     = templete.Id;
                    model.Title          = title;
                    model.SenderTime     = null;
                    model.SubmissionTime = DateTime.Now;

                    var rows = DataOperateMsg <Msg_Email> .Get().Add(model);

                    //添加验证码数据
                    Msg_EmailValidate valModel = new Msg_EmailValidate();
                    valModel.Code         = code;
                    valModel.EmailId      = model.Id;
                    valModel.ReceiveEmail = model.ReceiveEmaile;
                    valModel.ReceiveId    = model.ReceiveId;
                    valModel.SendId       = model.SenderId;
                    valModel.SendTime     = model.SubmissionTime;
                    valModel.State        = ValCodeState.UNUse.ToString();
                    valModel.ValidateType = step.ToString();
                    var seconds = LoadSettingsByKeys(Settings.EmailCodeDuration).Value.ToInt32Req();
                    valModel.ExpiredTime = DateTime.Now.AddSeconds(seconds);
                    rows = DataOperateMsg <Msg_EmailValidate> .Get().Add(valModel);


                    result.Data = rows;
                    result.Flag = EResultFlag.Success;

                    WriteLog(AdminModule.EmailHistory.GetText(), SystemRight.Add.GetText(), "新增邮件验证码:" + model.Id + ":" + model.Title);
                }
                else
                {
                    throw new Exception("未查找到对应邮件模板");
                }
            }
            catch (Exception ex)
            {
                result.Data      = -1;
                result.Flag      = EResultFlag.Failure;
                result.Exception = new ExceptionEx(ex, "AddEmailValCode");
            }
            return(result);
        }
Example #30
0
 public ConstString findFile(string key)
 {
     ConstString ret = new ConstString(yarpPINVOKE.ResourceFinder_findFile(swigCPtr, key), true);
     return ret;
 }
Example #31
0
 public ConstString substr()
 {
     ConstString ret = new ConstString(yarpPINVOKE.ConstString_substr__SWIG_2(swigCPtr), true);
     return ret;
 }
Example #32
0
 public ConstString getContextPath()
 {
     ConstString ret = new ConstString(yarpPINVOKE.ResourceFinder_getContextPath(swigCPtr), true);
     return ret;
 }
Example #33
0
 internal static HandleRef getCPtr(ConstString obj)
 {
     return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
 }
Example #34
0
 public ConstString substr(int start)
 {
     ConstString ret = new ConstString(yarpPINVOKE.ConstString_substr__SWIG_1(swigCPtr, start), true);
     return ret;
 }
Example #35
0
 public virtual ConstString expectText(int terminatingChar)
 {
     ConstString ret = new ConstString(yarpPINVOKE.ConnectionReader_expectText__SWIG_0(swigCPtr, terminatingChar), true);
     return ret;
 }