public static event WechatEventHandler <CorpRecEventPic_sysphoto> OnEventPic_sysphoto; //声明事件 public CorpRecEventPic_sysphoto(string sMsg) { try { XmlDocument doc = new XmlDocument(); doc.LoadXml(sMsg); XmlNode root = doc.FirstChild; this.ToUserName = root["ToUserName"].InnerText; this.FromUserName = root["FromUserName"].InnerText; this.CreateTime = root["CreateTime"].InnerText; this.MsgType = root["MsgType"].InnerText; this.Event = root["Event"].InnerText; this.EventKey = root["EventKey"].InnerText; this.AgentID = root["AgentID"].InnerText; XmlNode nodeSendPicsInfo = root["SendPicsInfo"]; this.sendPicsInfo = new SendPicsInfo(); this.sendPicsInfo.Count = nodeSendPicsInfo["Count"].InnerText; this.picList = new List <PicList>(); foreach (XmlNode childnode in nodeSendPicsInfo["PicList"].ChildNodes) { PicList piclist = new PicList(); piclist.item = new Item(); piclist.item.PicMd5Sum = childnode["PicMd5Sum"].InnerText; this.picList.Add(piclist); } } catch (Exception e) { log.Error("CorpRecEventPic_sysphoto", e); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { NotAllowedPlaceHolder.Visible = false; NotAllowedPlaceHolder_Racy.Visible = false; NotAllowedPlaceHolder_Adult.Visible = false; NoPicturePlaceHolder.Visible = false; SuccessMessagePlaceHolder.Visible = false; var image = Request.QueryString["img"]; var stop = image != null && image.Contains("stop"); var adult = image != null && image.Contains("adult"); var racy = image != null && image.Contains("racy"); showImage(image, !stop, adult, racy); } if (Session["Uploadsuccses"] != null) { SuccessMessagePlaceHolder.Visible = true; Session.Remove("Uploadsuccses"); } PicList.DataSource = Gallery.GetImageNames(); PicList.DataBind(); }
private void ShowFileSelect_Click(object sender, RoutedEventArgs e) { System.Windows.Forms.FolderBrowserDialog fbd = new System.Windows.Forms.FolderBrowserDialog(); fbd.ShowDialog(); if (fbd.SelectedPath != string.Empty) { PictureManager.Instance.FindDirectFromPath(fbd.SelectedPath); FolderPath.Text = fbd.SelectedPath; PicList.SelectedPath(); } }
private void UnAutoWidth_Check(object sender, RoutedEventArgs e) { PicList.SetAutoWidth(false); }