Пример #1
0
            public static bool GetHotKey(HotKeyHelper.HotOp op, out Keys k)
            {
                k = Keys.BrowserFavorites;
                bool   rt   = false;
                string defv = "";

                switch (op)
                {
                case HotKeyHelper.HotOp.QinKong:
                    defv = "327755";
                    break;

                case HotKeyHelper.HotOp.ZhiSi:
                    defv = "327757";
                    break;
                }
                string hotOp = PersistentParams.GetParam("HotOp" + ((int)op).ToString(), defv);

                if (hotOp != "" && hotOp != "171")
                {
                    try
                    {
                        k  = (Keys)Convert.ToUInt32(hotOp);
                        rt = true;
                    }
                    catch (Exception e)
                    {
                        Log.Exception(e);
                    }
                }
                return(rt);
            }
Пример #2
0
        public static bool IsFirstLogin(string nick)
        {
            bool param2Key;

            if (param2Key = PersistentParams.GetParam2Key("IsFirstLogin", nick, true))
            {
                PersistentParams.TrySaveParam2Key("IsFirstLogin", nick, false);
            }
            return(param2Key);
        }
Пример #3
0
            public static void SetPreUploadSynTick(string dbAccount, long synTicks)
            {
                DateTime now = DateTime.Now;

                PersistentParams.TrySaveParam2Key("PreUploadSynTick", dbAccount, synTicks);
                if (!SynParams._hadLogSetPreClientUploadSynTick)
                {
                    SynParams._hadLogSetPreClientUploadSynTick = true;
                    Log.Info(string.Format("SetPreClientUploadSynTick,timeElapse={0}ms", now.xElapse().TotalMilliseconds));
                }
            }
Пример #4
0
 public static void SetSuperAccounts(string nick, string accounts)
 {
     PersistentParams.TrySaveParam2Key <string>("Auth.SuperAccounts", nick, accounts);
 }
Пример #5
0
 public static long PreServerSynTick(string dbAccount)
 {
     return(PersistentParams.GetParam2Key("PreServerSynTick", dbAccount, 0L));
 }
Пример #6
0
 public static void SetBottomPanelHeight(string seller, int height)
 {
     Util.Assert(height >= 100);
     PersistentParams.TrySaveParam2Key("PanelBottomHeight", seller, height);
 }
Пример #7
0
 public static void SetRightPanelWidth(string seller, int width)
 {
     Util.Assert(width >= 365);
     PersistentParams.TrySaveParam2Key("PanelRightWidth", seller, width);
 }
Пример #8
0
 public static void SaveLatestCheckDbDeleteTime(string dbAccount)
 {
     PersistentParams.TrySaveParam2Key("LatestCheckDbDeleteTime", dbAccount, BatTime.Now);
 }
Пример #9
0
 public static string GetAutoModeNoAnswerTip(string nick)
 {
     return(PersistentParams.GetParam2Key <string>("Robot.AutoModeNoAnswerTip", nick, "亲,目前是机器人值班.这个问题机器人无法回答,等人工客服回来后再回复您."));
 }
Пример #10
0
 public static void SetShowType(string nick, Params.Shortcut.ShowType showType)
 {
     PersistentParams.TrySaveParam2Key <Params.Shortcut.ShowType>("Shortcut.ShowType", nick, showType);
 }
Пример #11
0
 public static Params.Shortcut.ShowType GetShowType(string nick)
 {
     return(PersistentParams.GetParam2Key <Params.Shortcut.ShowType>("Shortcut.ShowType", nick, Params.Shortcut.ShowTypeDefault));
 }
Пример #12
0
 public static void SetIsShowTitleButtons(string nick, bool isShowTitleButtons)
 {
     PersistentParams.TrySaveParam2Key("Robot.IsShowTitleButtons", nick, isShowTitleButtons);
 }
Пример #13
0
 public static bool GetIsShowTitleButtons(string nick)
 {
     return(PersistentParams.GetParam2Key("Robot.IsShowTitleButtons", nick, false));
 }
Пример #14
0
 public static void SetIsAllAccountEditRobot(string nick, bool isAllAccountEditRobot)
 {
     PersistentParams.TrySaveParam2Key <bool>("IsAllAccountEditRobot", AccountHelper.GetPubDbAccount(nick), isAllAccountEditRobot);
 }
Пример #15
0
 public static bool GetIsAllAccountEditRobot(string nick)
 {
     return(PersistentParams.GetParam2Key <bool>("IsAllAccountEditRobot", AccountHelper.GetPubDbAccount(nick), Params.Auth.IsAllAccountEditRobotDefault));
 }
Пример #16
0
 public static Params.Robot.OperationEnum GetOperation(string nick)
 {
     return(PersistentParams.GetParam2Key <Params.Robot.OperationEnum>("Robot.Operation", nick, Params.Robot.OperationEnum.None));
 }
Пример #17
0
 public static void SetOperation(string nick, Params.Robot.OperationEnum operation)
 {
     PersistentParams.GetParam2Key <Params.Robot.OperationEnum>("Robot.Operation", nick, operation);
 }
Пример #18
0
 public static bool GetRuleIncludeExcept(string nick)
 {
     return(PersistentParams.GetParam2Key <bool>("RuleIncludeExcept", AccountHelper.GetPubDbAccount(nick), false));
 }
Пример #19
0
 public static void SetAutoModeNoAnswerTip(string nick, string autoModeNoAnswerTip)
 {
     PersistentParams.GetParam2Key <string>("Robot.AutoModeNoAnswerTip", nick, autoModeNoAnswerTip);
 }
Пример #20
0
 public static void SetRuleIncludeExcept(string nick, bool ruleIncludeExcept)
 {
     PersistentParams.TrySaveParam2Key <bool>("RuleIncludeExcept", AccountHelper.GetPubDbAccount(nick), ruleIncludeExcept);
 }
Пример #21
0
 public static void SaveHotKey(HotKeyHelper.HotOp op, bool isclear, Keys keys)
 {
     PersistentParams.TrySaveParam("HotOp" + ((int)op).ToString(), isclear ? "" : ((uint)keys).ToString());
 }
Пример #22
0
 public static void SetAutoModeReplyDelaySec(string nick, int autoModeReplyDelaySec)
 {
     PersistentParams.TrySaveParam2Key <int>("AutoModeReplyDelaySec", nick, autoModeReplyDelaySec);
 }
Пример #23
0
 public static int GetRightPanelWidth(string seller)
 {
     return(PersistentParams.GetParam2Key("PanelRightWidth", seller, 400));
 }
Пример #24
0
 public static int GetSendModeReplyDelaySec(string nick)
 {
     return(PersistentParams.GetParam2Key <int>("SendModeReplyDelaySec", nick, 0));
 }
Пример #25
0
 public static int GetBottomPanelHeight(string seller)
 {
     return(PersistentParams.GetParam2Key("PanelBottomHeight", seller, 150));
 }
Пример #26
0
 public static void SetSendModeReplyDelaySec(string nick, int sendModeReplyDelaySec)
 {
     PersistentParams.TrySaveParam2Key <int>("SendModeReplyDelaySec", nick, sendModeReplyDelaySec);
 }
Пример #27
0
 public static bool GetQuoteModeSendAnswerWhenFullMatch(string nick)
 {
     return(PersistentParams.GetParam2Key <bool>("QuoteModeSendAnswerWhenFullMatch", nick, false));
 }
Пример #28
0
 public static void SetQuoteModeSendAnswerWhenFullMatch(string nick, bool quoteModeSendAnswerWhenFullMatch)
 {
     PersistentParams.TrySaveParam2Key <bool>("QuoteModeSendAnswerWhenFullMatch", nick, quoteModeSendAnswerWhenFullMatch);
 }
Пример #29
0
 public static void SetPreServerSynTick(string dbAccount, long synTicks)
 {
     PersistentParams.TrySaveParam2Key("PreServerSynTick", dbAccount, synTicks);
 }
Пример #30
0
 public static HashSet <string> GetSuperAccounts(string mainnick)
 {
     //TbNickHelper.AssertMainNick(mainnick);
     return(PersistentParams.GetParam2Key <HashSet <string> >("Auth.SuperAccounts", mainnick, null));
 }