Esempio n. 1
0
        private void GetCheckVersion(Object o, EventArgs e)//各网站行情信息:
        {
            if (Define.NewVersionUrl != "")
            {
                DialogResult dr;
                dr = MessageBox.Show("发现新版本,是否现在升级?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
                if (dr == DialogResult.No)
                {
                    Data.GetLoginResult = Define.Login_Falied;
                    this.Close();
                    return;
                }

                label_updatealert.Text = "正在下载升级包。";

                txt_Username.Enabled = false;
                txt_password.Enabled = false;
                button1.Enabled      = false;
                linkLabel3.Enabled   = false;
                linkLabel4.Enabled   = false;


                label_updatealert.Visible = true;


                ThreadEx threadex = new ThreadEx();
                threadex.Start(new ThreadStart(threadex.GetNewVersion), new EventHandler(GetNewVersion), this);
            }
        }
Esempio n. 2
0
        private void Login_Load(object sender, EventArgs e)
        {
            this.Text        = Define.TitleBase;
            this.MaximizeBox = false;
            //this.MaximizeBox = false;

            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;

            panel_login.Visible  = true;
            panel_google.Visible = false;
            panel_qq.Visible     = false;

            panel_login.Top  = 0;
            panel_login.Left = 0;

            panel_google.Top  = 0;
            panel_google.Left = 0;

            panel_qq.Top  = 0;
            panel_qq.Left = 0;


            ThreadEx threadex = new ThreadEx();

            threadex.Start(new ThreadStart(threadex.GetCheckVersion), new EventHandler(GetCheckVersion), this);
        }
Esempio n. 3
0
        //各网站行情信息:
        private void GetCheckVersion(Object o, EventArgs e)
        {
            if (Define.NewVersionUrl != "")
            {
                DialogResult dr;
                dr = MessageBox.Show("发现新版本,是否现在升级?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
                if (dr == DialogResult.No)
                {
                    Data.GetLoginResult = Define.Login_Falied;
                    this.Close();
                    return;
                }

                label_updatealert.Text = "正在下载升级包。";

                txt_Username.Enabled = false;
                txt_password.Enabled = false;
                button1.Enabled = false;
                linkLabel3.Enabled = false;
                linkLabel4.Enabled = false;

                label_updatealert.Visible = true;

                ThreadEx threadex = new ThreadEx();
                threadex.Start(new ThreadStart(threadex.GetNewVersion), new EventHandler(GetNewVersion), this);
            }
        }
Esempio n. 4
0
        private void Assets_Load(object sender, EventArgs e)
        {
            this.Text = Define.TitleBase;
            this.MaximizeBox = false;
            //this.MaximizeBox = false;

            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;

            ThreadEx threadex23 = new ThreadEx();
            threadex23.Start(new ThreadStart(threadex23.GetAssets), new EventHandler(GetAssets), this);
        }
Esempio n. 5
0
        private void OnGoogleCheck()
        {
            Define.GoogleCheck = txt_GoogleCheck.Text;
            if (Define.GoogleCheck != "")
            {
                GoogleCheckParm googlecheckparm = new GoogleCheckParm();
                googlecheckparm.totpCode = Define.GoogleCheck;

                ThreadEx threadex = new ThreadEx();
                threadex.Start(new ParameterizedThreadStart(threadex.GetGoogleCheck), (Object)googlecheckparm, new EventHandler(GetGoogleCheck), this);
            }
            button2.Enabled = false;
        }
Esempio n. 6
0
        private void Assets_Load(object sender, EventArgs e)
        {
            this.Text        = Define.TitleBase;
            this.MaximizeBox = false;
            //this.MaximizeBox = false;

            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;


            ThreadEx threadex23 = new ThreadEx();

            threadex23.Start(new ThreadStart(threadex23.GetAssets), new EventHandler(GetAssets), this);
        }
Esempio n. 7
0
        private void OnLogin()
        {
            if (txt_Username.Text == "" || txt_password.Text == "")
            {
                MessageBox.Show(this, "用户名或密不能为空!", "登录提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
                return;
            }


            LoginParm loginparm = new LoginParm();

            loginparm.Username = txt_Username.Text;
            loginparm.Password = txt_password.Text;

            ThreadEx threadex = new ThreadEx();

            threadex.Start(new ParameterizedThreadStart(threadex.GetLogin), (Object)loginparm, new EventHandler(GetLogin), this);
            button1.Enabled = false;
        }
Esempio n. 8
0
        //各网站行情信息:
        private void GetCheckVersion(Object o, EventArgs e)
        {
            if (Define.NewVersionUrl != "")
            {
                DialogResult dr;
                dr = MessageBox.Show("发现新版本,是否现在升级?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
                if (dr == DialogResult.No)
                {
                    return;
                }

                ThreadEx threadex = new ThreadEx();
                threadex.Start(new ThreadStart(threadex.GetNewVersion), new EventHandler(GetNewVersion), this);
            }
        }
Esempio n. 9
0
        private void Form1_Load(object sender, EventArgs e)
        {
            //String fdsa = Cookie.GetCookies(Define.Domain);
            //MessageBox.Show(fdsa);

            Data.init();

            Login login = new Login();  //新建一个NewForm窗口(NewForm是自己定义的Form)
            login.ShowDialog();         //新窗口显现

            if (Data.GetLoginResult != Define.Login_Succeed)
            {
                this.Close();
                return;
            }

            this.MaximizeBox = false;
            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
            //String  dda = Des.GetMachineInfo(channel.ToString());

            CreateColumnHeader(listView_Order);
            CreateColumnHeader(listView_Completed);

            ColumnHeader BTCc1 = new ColumnHeader();
            BTCc1.Text = "比特币BTC预警";
            BTCc1.Width = 210;
            listViewBTC.Columns.AddRange(new ColumnHeader[] { BTCc1 });//将这两列加入listView1
            listViewBTC.View = View.Details;

            ColumnHeader LTCc1 = new ColumnHeader();
            LTCc1.Text = "莱特币LTC预警";
            LTCc1.Width = 210;
            listViewLTC.Columns.AddRange(new ColumnHeader[] { LTCc1 });//将这两列加入listView1
            listViewLTC.View = View.Details;

            Title = Define.TitleBase;
            this.Text = Title;

            String mac = "";
            NetworkInterface[] netWorks = NetworkInterface.GetAllNetworkInterfaces();
            foreach (NetworkInterface netWork in netWorks)
            {
                mac += netWork.GetPhysicalAddress().ToString();
            }

            timer.Interval = 1000;
            timer.Enabled = true;

            timerWarnPlay.Interval = 60000;
            timerWarnPlay.Enabled = false;

            timerDepth.Interval = 1000;
            timerDepth.Enabled = true;

            timer_AccountRecord.Interval = 5000;
            timer_AccountRecord.Enabled = true;
            timer_order.Interval = 5000;
            timer_order.Enabled = true;

            timer_OrderHistory.Interval = 5000;
            timer_OrderHistory.Enabled = true;

            tabControl1.Width = 745;
            tabControl1.Height = 224;

            lab_alert.Text = "";
            lab_sell_alert.Text = "";

            cur_BTCorLTC(0);

            CSPList.Add(CSP5);
            CSPList.Add(CSP4);
            CSPList.Add(CSP3);
            CSPList.Add(CSP2);
            CSPList.Add(CSP1);

            CSNList.Add(CSN5);
            CSNList.Add(CSN4);
            CSNList.Add(CSN3);
            CSNList.Add(CSN2);
            CSNList.Add(CSN1);

            CBPList.Add(CBP1);
            CBPList.Add(CBP2);
            CBPList.Add(CBP3);
            CBPList.Add(CBP4);
            CBPList.Add(CBP5);

            CBNList.Add(CBN1);
            CBNList.Add(CBN2);
            CBNList.Add(CBN3);
            CBNList.Add(CBN4);
            CBNList.Add(CBN5);

            ThreadEx threadex = new ThreadEx();
            threadex.Start(new ThreadStart(threadex.GetCheckVersion), new EventHandler(GetCheckVersion), this);

            ThreadEx threadex2 = new ThreadEx();
            threadex2.Start(new ThreadStart(threadex2.GetUserConfig), new EventHandler(GetUserConfig), this);
        }
Esempio n. 10
0
        private void timer_OrderHistory_Tick(object sender, EventArgs e)
        {
            OrderParm orderparm = new OrderParm();
            orderparm.status = "2";
            orderparm.symbol = Define.coin_cur.ToString();
            orderparm.currentPage = "1";
            orderparm.pageLength = "100";

            ThreadEx threadex = new ThreadEx();
            threadex.Start(new ParameterizedThreadStart(threadex.GetOrderHistory), (Object)orderparm, new EventHandler(GetOrderHistory), this);
        }
Esempio n. 11
0
        private void timerDepth_Tick(object sender, EventArgs e)
        {
            DepthParm depthparm = new DepthParm();
            depthparm.symbol = Define.trade_symbol_cur;

            ThreadEx threadex = new ThreadEx();
            threadex.Start(new ParameterizedThreadStart(threadex.GetDepth), (Object)depthparm, new EventHandler(GetDepth), this);
        }
Esempio n. 12
0
        private void timer1_Tick(object sender, EventArgs e)
        {
            ThreadEx threadex = new ThreadEx();
            threadex.Start(new ThreadStart(threadex.GetUserInfo), new EventHandler(GetUserInfo), this);

            ThreadEx threadex2 = new ThreadEx();
            threadex2.Start(new ThreadStart(threadex2.GetTickerinfo), new EventHandler(GetTickerinfo), this);
        }
Esempio n. 13
0
        private void OnOrder()
        {
            //timer_order.Enabled = false;

            OrderParm orderparm = new OrderParm();
            orderparm.status = "0";
            orderparm.symbol = Define.coin_cur.ToString();
            orderparm.currentPage = "1";
            orderparm.pageLength = "100";

            ThreadEx threadex = new ThreadEx();
            threadex.Start(new ParameterizedThreadStart(threadex.GetOrderHistory), (Object)orderparm, new EventHandler(GetOrder), this);
        }
Esempio n. 14
0
        private void listView_BuyWait_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            ListView.SelectedListViewItemCollection items = listView_Order.SelectedItems;

            foreach (ListViewItem item in items)
            {
                CancelOrderParm cancelorderparm = new CancelOrderParm();
                cancelorderparm.Order_id = item.SubItems[8].Text;
                cancelorderparm.symbol = Define.trade_symbol_cur;

                ThreadEx threadex = new ThreadEx();
                threadex.Start(new ParameterizedThreadStart(threadex.GetCancelOrder), (Object)cancelorderparm, new EventHandler(GetCancelOrder), this);

                //GetTradeList(BuyOrSell.ENTRUST,ConsignState.WAIT, webBrowser3.Document, item.Index);
            }
            OnOrder();
        }
Esempio n. 15
0
        private void OnLogin()
        {
            if (txt_Username.Text == "" || txt_password.Text == "")
            {
                MessageBox.Show(this, "用户名或密不能为空!", "登录提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
                return;
            }

            LoginParm loginparm = new LoginParm();
            loginparm.Username = txt_Username.Text;
            loginparm.Password = txt_password.Text;

            ThreadEx threadex = new ThreadEx();
            threadex.Start(new ParameterizedThreadStart(threadex.GetLogin), (Object)loginparm, new EventHandler(GetLogin), this);
            button1.Enabled = false;
        }
Esempio n. 16
0
        private void OnGoogleCheck()
        {
            Define.GoogleCheck = txt_GoogleCheck.Text;
            if (Define.GoogleCheck != "")
            {
                GoogleCheckParm googlecheckparm = new GoogleCheckParm();
                googlecheckparm.totpCode = Define.GoogleCheck;

                ThreadEx threadex = new ThreadEx();
                threadex.Start(new ParameterizedThreadStart(threadex.GetGoogleCheck), (Object)googlecheckparm, new EventHandler(GetGoogleCheck), this);

            }
            button2.Enabled = false;
        }
Esempio n. 17
0
        private void Login_Load(object sender, EventArgs e)
        {
            this.Text = Define.TitleBase;
            this.MaximizeBox = false;
            //this.MaximizeBox = false;

            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;

            panel_login.Visible = true;
            panel_google.Visible = false;
            panel_qq.Visible = false;

            panel_login.Top = 0;
            panel_login.Left = 0;

            panel_google.Top = 0;
            panel_google.Left = 0;

            panel_qq.Top = 0;
            panel_qq.Left = 0;

            ThreadEx threadex = new ThreadEx();
            threadex.Start(new ThreadStart(threadex.GetCheckVersion), new EventHandler(GetCheckVersion), this);
        }