示例#1
0
        private void OnGet()
        {
            _12306Proxy proxy = new _12306Proxy(_client);

            LoadVerifyImage();

            LoginModel = proxy.GetLoginModel();
            this.DataContext = LoginModel;
        }
示例#2
0
        private void LoadVerifyImage()
        {
            _12306Proxy proxy = new _12306Proxy(_client);

            byte[] data = proxy.GetVerifyImage();
            BitmapImage bi = new BitmapImage();
            bi.BeginInit();
            bi.StreamSource = new MemoryStream(data);
            bi.EndInit();
            image1.Source = bi;
        }
        public InputRandCodeWindow(HttpClient client)
        {
            InitializeComponent();



            _12306Proxy proxy = new _12306Proxy(client);
            byte[] data = proxy.GetVerifyImage2();
            BitmapImage bi = new BitmapImage();
            bi.BeginInit();
            bi.StreamSource = new MemoryStream(data);
            bi.EndInit();
            this.image1.Source = bi;

        }