private void User_To_DLG() { photo = DBPhotosWebServices.GetPhoto(ID); TB_title.Text = photo.Title; TB_keyword.Text = photo.Keywords; RTBX_description.Text = photo.Description; DTP_Date.Value = photo.CreationDate; IBX_photo.BackgroundImage = photo.GetOriginalImage(); CB_Shared.Checked = photo.Shared; }
private void LoadSettings() { if (!Properties.Settings.Default.FirstUse_MainForm) { // Position du fureteur // Puisqu'il que Properties n'offre pas l'option de choisir des enums, il est stocké en string switch (Properties.Settings.Default.PositionFureteur.ToLower()) { case "bottom": PhotoBrowser.Placement = PhotoBrowserPlacement.Bottom; break; case "top": PhotoBrowser.Placement = PhotoBrowserPlacement.Top; break; case "left": PhotoBrowser.Placement = PhotoBrowserPlacement.Left; break; case "right": PhotoBrowser.Placement = PhotoBrowserPlacement.Right; break; } // Liste des photos du carousel foreach (string ID in Properties.Settings.Default.PhotoCarousel) { Photo Photo = DBPhotosWebServices.GetPhoto(int.Parse(ID)); if (Photo != null) { Slideshow.Add(Photo); } } // Liste des usagers dans la blacklist foreach (string ID in Properties.Settings.Default.Blacklist) { Blacklist.Add(int.Parse(ID)); } CBX_BlackList_Load(); // Position du MainForm Location = Properties.Settings.Default.PositionMainForm; //Taille du MainForm Size = Properties.Settings.Default.TailleMainForm; } }
private void User_To_DLG() { User = DBPhotosWebServices.GetUser(UID); photo = DBPhotosWebServices.GetPhoto(ID); TB_Title.Text = photo.Title; TB_keywords.Text = photo.Keywords; RTBX_Description.Text = photo.Description; dateTimePicker1.Value = photo.CreationDate; IBX_photo.BackgroundImage = photo.GetOriginalImage(); TB_Left.Text = photo.GetOriginalImage().Width.ToString(); TB_right.Text = photo.GetOriginalImage().Height.ToString(); User u = DBPhotosWebServices.GetUser(photo.OwnerId); LB_Nom.Text = u.Name; if (photo.Shared) { LB_Shared.Text = "Shared"; } else { LB_Shared.Text = "Private"; } }
private void Diaporama_Shown(object sender, EventArgs e) { WaitSplash.Show(this, "Loading slide show photos..."); Slides = new List <Photo>(); // PhotoPool = new List<Photo>(); foreach (int photoId in SlideShowList) { // Obtenir la photo du service Photo photo = DBPhotosWebServices.GetPhoto(photoId); if (photo != null) { if (bl.IndexOf(photo.OwnerId) == -1) { Slides.Add(photo); } } } WaitSplash.Hide(); // Définir l'ordre des photos SetPhotosOrder(); // Démarrer l'horloge SlideshowTimer.Start(); }