Exemple #1
0
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            if (stockList.Contains(StockID))
            {
                MessageBox.Show("已经打开了一个股票编号为:" + StockID + "的窗口\n请勿重复开启");
                stockList.Add(StockID);
                this.Close();
                return;
            }
            else
            {
                stockList.Add(StockID);
            }
            string S_StockID;

            if (NetState.CheckName("0" + StockID, out StockName) == NET_ERROR.NET_REQ_OK)
            {
                S_StockID = "sh" + StockID;
                C_StockID = "0" + StockID;
            }
            else if (NetState.CheckName("1" + StockID, out StockName) == NET_ERROR.NET_REQ_OK)
            {
                S_StockID = "sz" + StockID;
                C_StockID = "1" + StockID;
            }
            else
            {
                MessageBox.Show("股票编号不存在或者网络异常!");
                this.Close();
                return;
            }
            this.Left       = (SystemParameters.PrimaryScreenWidth - this.ActualWidth) / 2;
            this.Top        = (SystemParameters.PrimaryScreenHeight - this.ActualHeight) / 2;
            StockTitle.Text = "股票:" + StockName + "(" + S_StockID + ")";
            NetDataController.backimage bimage = new NetDataController.backimage(UpdataImage);
            kchart k = kchart.time;

            NetSyncController.Handler().KchartImageGet(C_StockID, k, bimage);
            NetDataController.sync s = new NetDataController.sync(UpdataSync);
            NetSyncController.Handler().StockTempRefreshAdd(C_StockID, ref s);
        }
Exemple #2
0
 private void GetKchart(kchart k)
 {
     this.k.Source = null;
     NetDataController.backimage bimage = new NetDataController.backimage(UpdataImage);
     NetSyncController.Handler().KchartImageGet(C_StockID, k, bimage);
 }
Exemple #3
0
 private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
 {
     NetSyncController.Handler().StockTempRefreshDelete(C_StockID);
     stockList.Remove(StockID);
 }