Ejemplo n.º 1
0
        protected void HandleAddResponse(object sender, Gtk.ResponseArgs args)
        {
            if (args.ResponseId == Gtk.ResponseType.Ok)
            {
                public_album = public_check.Active;

                try {
                    if (public_album)
                    {
                        picasa.CreateAlbum(title, description, AlbumAccess.Public);
                    }
                    else
                    {
                        picasa.CreateAlbum(title, description, AlbumAccess.Private);
                    }
                } catch (System.Exception e) {
                    HigMessageDialog md =
                        new HigMessageDialog(Dialog,
                                             Gtk.DialogFlags.Modal |
                                             Gtk.DialogFlags.DestroyWithParent,
                                             Gtk.MessageType.Error, Gtk.ButtonsType.Ok,
                                             Catalog.GetString("Error while creating Album"),
                                             String.Format(Catalog.GetString("The following error was encountered while attempting to create an album: {0}"), e.Message));
                    md.Run();
                    md.Destroy();
                    return;
                }
                export.HandleAlbumAdded(title);
            }
            Dialog.Destroy();
        }
Ejemplo n.º 2
0
        private void createNewAlbumToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (null == pam || false == pam.LoggedIn)
            {
                NotifyDialog please_login = new NotifyDialog();
                please_login.NotificationMessage = "Please login, then proceed to create new albums.";
                please_login.ShowDialog();
            }
            else
            {
                NewAlbumDialog nad = new NewAlbumDialog();

                nad.ShowDialog();

                if (nad.DialogResult == DialogResult.OK)
                {
                    PicasaWeb   picasa    = pam.getWeb();
                    PicasaAlbum unique_id = picasa.CreateAlbum(nad.AlbumTitle, nad.AlbumDescription, nad.AlbumAcessMode, nad.AlbumDate);
                }
            }
        }