Exemplo n.º 1
0
        //----------------------------------------------------------------------
        // Initialize
        //----------------------------------------------------------------------

        public Form1()
        {
            InitializeComponent();
            m_pSKCenter  = new SKCenterLib();
            m_pSKCenter2 = new SKCenterLib();

            m_pSKOrder        = new SKOrderLib();
            skOrder1.OrderObj = m_pSKOrder;

            m_pSKReply          = new SKReplyLib();
            skReply1.SKReplyLib = m_pSKReply;

            m_pSKQuote          = new SKQuoteLib();
            skQuote1.SKQuoteLib = m_pSKQuote;
            SetQuoteAuto();

            m_pSKOSQuote            = new SKOSQuoteLib();
            skosQuote1.SKOSQuoteLib = m_pSKOSQuote;

            m_pSKOOQuote            = new SKOOQuoteLib();
            skooQuote1.SKOOQuoteLib = m_pSKOOQuote;

            m_pSKCenter2.OnShowAgreement           += new _ISKCenterLibEvents_OnShowAgreementEventHandler(this.OnShowAgreement);
            m_pSKCenter2.OnNotifySGXAPIOrderStatus += new _ISKCenterLibEvents_OnNotifySGXAPIOrderStatusEventHandler(this.m_pSKCenter_OnSGXAPIOrderStatus);
        }
Exemplo n.º 2
0
        /// <summary>
        /// 下單初始化(For 未平倉)
        /// </summary>
        private void OrderInitialize()
        {
            m_OrderLib = new SKOrderLib();
            m_OrderLib.OnOverseaFutureOpenInterest += OnOverseaFutureOpenInterest;
            m_OrderLib.OnAccount += OnAccount;

            int code;

            if ((code = m_OrderLib.SKOrderLib_Initialize()) == OK)
            {
                m_OrderLib.GetUserAccount();
                OpenInterest();
            }
            //int ret = -1;
            //ret = Functions.SKOrderLib_Initialize(m_Account, m_Password);
            //if (ret == 0)
            //{
            //    FOnGetBSTR fAccount = new FOnGetBSTR(OnAccount);
            //    Functions.RegisterOnAccountCallBack(fAccount);
            //    ret = Functions.GetUserAccount();

            //    Functions.RegisterOnOverseaFutureOpenInterestCallBack(m_fOnOverseaFutureOpenInterest);
            //    OpenInterest();
            //}
        }
Exemplo n.º 3
0
        //----------------------------------------------------------------------
        // Initialize
        //----------------------------------------------------------------------

        public Form1()
        {
            InitializeComponent();
            m_pSKCenter  = new SKCenterLib();
            m_pSKCenter2 = new SKCenterLib();

            m_pSKOrder        = new SKOrderLib();
            skOrder1.OrderObj = m_pSKOrder;

            m_pSKReply          = new SKReplyLib();
            skReply1.SKReplyLib = m_pSKReply;

            m_pSKCenter2.OnShowAgreement += new _ISKCenterLibEvents_OnShowAgreementEventHandler(this.OnShowAgreement);

            txtAccount.Text  = System.Configuration.ConfigurationManager.AppSettings.Get("Username");
            txtPassWord.Text = System.Configuration.ConfigurationManager.AppSettings.Get("Password");
        }
Exemplo n.º 4
0
        //----------------------------------------------------------------------
        // Initialize
        //----------------------------------------------------------------------

        public Form1()
        {
            InitializeComponent();
            m_pSKCenter = new SKCenterLib();

            m_pSKOrder        = new SKOrderLib();
            skOrder1.OrderObj = m_pSKOrder;

            m_pSKReply          = new SKReplyLib();
            skReply1.SKReplyLib = m_pSKReply;

            m_pSKQuote          = new SKQuoteLib();
            skQuote1.SKQuoteLib = m_pSKQuote;

            m_pSKOSQuote            = new SKOSQuoteLib();
            skosQuote1.SKOSQuoteLib = m_pSKOSQuote;

            m_pSKOOQuote            = new SKOOQuoteLib();
            skooQuote1.SKOOQuoteLib = m_pSKOOQuote;
        }
Exemplo n.º 5
0
        //----------------------------------------------------------------------
        // Initialize
        //----------------------------------------------------------------------

        public Form1()
        {
            InitializeComponent();
            m_pSKCenter = new SKCenterLib();

            m_pSKOrder        = new SKOrderLib();
            skOrder1.OrderObj = m_pSKOrder;

            m_pSKReply          = new SKReplyLib();
            skReply1.SKReplyLib = m_pSKReply;

            m_pSKQuote          = new SKQuoteLib();
            skQuote1.SKQuoteLib = m_pSKQuote;

            m_pSKOSQuote            = new SKOSQuoteLib();
            skosQuote1.SKOSQuoteLib = m_pSKOSQuote;

            m_pSKOOQuote            = new SKOOQuoteLib();
            skooQuote1.SKOOQuoteLib = m_pSKOOQuote;

            m_pSKCenter.OnShowAgreement += new _ISKCenterLibEvents_OnShowAgreementEventHandler(this.OnShowAgreement);
        }