Пример #1
0
        private void UploadImages()
        {
            List <int>     delImage    = new List <int>();
            ListingManager listManager = new ListingManager();

            for (int i = 0; i < imageSource.Count; i++)
            {
                if (imageSource[i] == " " || imageSource[i] == "")
                {
                    delImage.Add(i);
                    listManager.EditListingImage(imageID[i], imageCaptions[i]);
                }
            }
            for (int i = delImage.Count - 1; i >= 0; i--)
            {
                if (delImage.IndexOf(i) != -1)
                {
                    imageSource.RemoveAt(i);
                    imageCaptions.RemoveAt(i);
                }
            }
            for (int i = 0; i < imageSource.Count; i++)
            {
                Console.WriteLine(i + " New " + imageID[i] + " - " + imageSource[i] + " with " + imageCaptions[i] + " of " + imageSource.Count);
            }
            Overlays.Listings.LoadingOverlay uploadImages = new Overlays.Listings.LoadingOverlay(propertyID, imageSource, imageCaptions);
            uploadImages.Owner = Framework.UI.Controls.Window.GetWindow(this);
            uploadImages.Show();
            (this.Tag as AgentWindow).HideEditListingView();
            (this.Tag as AgentWindow).ShowListingsView();
            ClearView();
        }