Beispiel #1
0
        public override PolicyInfo GetPolicyParam(UserInfo u, ForumInfo f)
        {
            Forum           forum = ForumFromInfo(f);
            PolicyInterface p     = forum.policy;

            return(PolicyToInfo((Policy)p));
        }
Beispiel #2
0
 public MTFrame()
 {
     policyInterface = new Policy1();
     mt = new MtApi5Client();
     mt.ConnectionStateChanged += mMtApiClient_ConnectionStateChanged;
     mt.QuoteAdded             += mMtApiClient_QuoteAdded;
     mt.QuoteRemoved           += mMtApiClient_QuoteRemoved;
     mt.QuoteUpdate            += mMtApiClient_QuoteUpdate;
     mt.OnTradeTransaction     += mMtApiClient_OnTradeTransaction;
     mt.OnBookEvent            += _mtApiClient_OnBookEvent;
     mt.OnLastTimeBar          += _mtApiClient_OnLastTimeBar;
     mt.OnLockTicks            += _mtApiClient_OnLockTicks;
     mt.BeginConnect("127.0.0.1", 8228);
 }
Beispiel #3
0
        public override bool SetPolicy(int index, string ForumName)
        {
            bool            OK = false;
            PolicyInterface p  = rep.GetByPolicyId(ToGuid(index));

            if (p == null)
            {
                p = new Policy(index);
                rep.Add <PolicyInterface>(p);
            }
            Forum f = rep.GetByForumName(ForumName);

            if (f != null)
            {
                f.policy = p;
                OK       = true;
                rep.Update <Forum>(f);
            }
            return(OK);
        }
Beispiel #4
0
 public virtual void ChangePolicy(PolicyInterface p)
 {
     this.policy = p;
 }