コード例 #1
0
 private void FrmHqPlayback_Load(object sender, EventArgs e)
 {
     trvStockInfo.Nodes.AddRange(LoadStockInfo.LoadSrcData());
     sendConnectionAdapter = Connection.CreateConnect("trade");
     bmp  = new Bitmap(pbShow.Width, pbShow.Height);
     grap = Graphics.FromImage(bmp);
 }
コード例 #2
0
        public MainWindow()
        {
            InitializeComponent();

            //加载证券模板数据
            if (!LoadStockInfo.LoadSrcData())
            {
                MessageBox.Show("证券模板数据加载失败!");
                Environment.Exit(0);
            }
            //建立中间件连接
            sendConnectionAdapter = ConnectionManager.Instance.NewConnection("config", 10000).Connect;

            mv = new MainViewModel(this.Dispatcher);
            this.DataContext = mv;

            mv.SetRichTextBox(this.PrintData);
        }