Пример #1
0
		public static Album[] GetAlbums (string session_id)
		{
			string url = FormatGetUrl (ALBUMS_GET_METHOD, new SmugMugParam(SESSION_ID, session_id));
			XmlDocument doc = GetResponseXml (url);
			XmlNodeList albumNodes = doc.SelectNodes ("/rsp/Albums/Album");

			Album[] albums = new Album[albumNodes.Count];

			for (int i = 0; i < albumNodes.Count; i++)
			{
				XmlNode current = albumNodes[i];
				albums[i] = new Album (current.SelectSingleNode (TITLE).InnerText, int.Parse (current.Attributes[ID].Value));
			}
			return albums;
		}
Пример #2
0
        private void HandleResponse(object sender, Gtk.ResponseArgs args)
        {
            if (args.ResponseId != Gtk.ResponseType.Ok) {
                Dialog.Destroy ();
                return;
            }

            if (scale_check != null) {
                scale = scale_check.Active;
                size = size_spin.ValueAsInt;
            } else
                scale = false;

            browser = browser_check.Active;

            if (account != null) {
                album = (Album) account.SmugMug.GetAlbums() [Math.Max (0, album_optionmenu.Active)];
                photo_index = 0;

                Dialog.Destroy ();

                command_thread = new System.Threading.Thread (new System.Threading.ThreadStart (this.Upload));
                command_thread.Name = Mono.Unix.Catalog.GetString ("Uploading Pictures");

                progress_dialog = new ThreadProgressDialog (command_thread, items.Length);
                progress_dialog.Start ();

                // Save these settings for next time
                Preferences.Set (SCALE_KEY, scale);
                Preferences.Set (SIZE_KEY, size);
                Preferences.Set (BROWSER_KEY, browser);
            }
        }
Пример #3
0
        private void HandleResponse(object sender, Gtk.ResponseArgs args)
        {
            if (args.ResponseId != Gtk.ResponseType.Ok) {
                                Dialog.Destroy ();
                                return;
                        }

                        if (scale_check != null) {
                                scale = scale_check.Active;
                                size = size_spin.ValueAsInt;
                        } else
                                scale = false;

                        browser = browser_check.Active;
                        rotate = rotate_check.Active;
            //                      meta = meta_check.Active;

                        if (account != null) {
                                //System.Console.WriteLine ("history = {0}", album_optionmenu.History);
                                album = (Album) account.SmugMug.GetAlbums() [Math.Max (0, album_optionmenu.History)];
                                photo_index = 0;

                                Dialog.Destroy ();

                                command_thread = new System.Threading.Thread (new System.Threading.ThreadStart (this.Upload));
                                command_thread.Name = Mono.Unix.Catalog.GetString ("Uploading Pictures");

                                progress_dialog = new FSpot.ThreadProgressDialog (command_thread, items.Length);
                                progress_dialog.Start ();

                                // Save these settings for next time
                                Preferences.Set (Preferences.EXPORT_SMUGMUG_SCALE, scale);
                                Preferences.Set (Preferences.EXPORT_SMUGMUG_SIZE, size);
                                Preferences.Set (Preferences.EXPORT_SMUGMUG_ROTATE, rotate);
                                Preferences.Set (Preferences.EXPORT_SMUGMUG_BROWSER, browser);
                        }
        }