/// <summary> /// 显示加载图片 /// </summary> void timer_Tick(object sender, EventArgs e) { Image image = AppResource.GetImage(string.Format(RES_PATH, _res_index)); if (_res_index == 8) { _res_index = 1; } else { _res_index++; } this.picCode.Image = image; }
/// <summary> /// 显示验证码 /// </summary> /// <param name="stream">验证码数据流</param> private void ShowValidateCode(Stream stream) { try { if (stream == null) { this.picCode.Image = AppResource.GetImage("Images.Loading.error.png"); } this.StopTimer(); this.picCode.Image = Image.FromStream(stream); } catch (Exception ex) { throw ex; } }
protected override void OnLoad(EventArgs e) { base.OnLoad(e); this.dtpTrainDate.MaxDate = DateTime.Now.AddDays(19); this.dtpTrainDate.MinDate = DateTime.Now; this.dtpAuto.MaxDate = DateTime.Now.AddDays(19); this.dtpAuto.MinDate = DateTime.Now; this.lblNotify.Image = AppResource.GetImage("Images.icon_date_notice.png"); this.lblNotify.Text = string.Format( " 今天可以抢{0} - {1}的票", this.dtpTrainDate.MinDate.ToString("MM月dd日"), this.dtpTrainDate.MaxDate.ToString("MM月dd日")); this.tpCenter.Image = AppResource.GetImage("Images.tab.appbar.user.png"); this.tpBuyTicket.Image = AppResource.GetImage("Images.tab.appbar.train.png"); this.tpAuto.Image = AppResource.GetImage("Images.tab.appbar.timer.png"); this.dtpAuto.Value = DateTime.Now; this.dtpStartDate.Value = DateTime.Now; this.cboPriority.SelectedIndex = 0; }
protected override void OnLoad(EventArgs e) { base.OnLoad(e); this.pictureBox1.Image = AppResource.GetImage("Images.logo.logo.png"); }