private void button1_Click(object sender, EventArgs e)
        {
            string queryString = "SELECT * FROM Account where username ='******' and password ='******'";

            using (OleDbConnection connection = new OleDbConnection(connectionString))   //tạo lớp kết nối vào .mbd
                using (OleDbCommand command = new OleDbCommand(queryString, connection)) //tạo lớp lệnh sql sử dụng lớp kết nối trên
                {
                    try
                    {
                        connection.Open();                                //bắt đầu kết nối
                        OleDbDataReader reader = command.ExecuteReader(); //thực thi sql và trả về kết quả

                        if (reader.Read() == true)                        //đọc kết quả
                        {
                            FormClient client = new FormClient();
                            client.Text = txtUsername.Text;
                            client.Show();
                            this.Hide();
                            FormClient.texttt = txtUsername.Text;
                        }
                        else
                        {
                            MessageBox.Show("thong tin dang nhap sai");
                            txtPassword.Text = "";
                            txtUsername.Text = "";
                            txtUsername.Focus();
                        }
                        reader.Close();
                    }
                    catch (Exception ex)
                    {
                        MessageBox.Show(ex.Message);
                    }
                }
        }
Example #2
0
        private void login_Click(object sender, EventArgs e)
        {
            this._loginVO = this._loginBUS.getUser(textUser.Text, textPassw.Text);

            if (this._loginVO.type == null)
            {
                MessageBox.Show("Incorrect username or password!", "Not Found", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
            }
            else if (this._loginVO.type == "Customer")

            {
                //MessageBox.Show(_loginVO.idClient.ToString(), "Result", MessageBoxButtons.OK, MessageBoxIcon.Information);
                this.Hide();
                FormClient fc = new FormClient();
                fc.setId(this._loginVO.idClient);
                DataGridView dataGrid = fc.getGrid();
                fc.refreshGrid(this._loginVO.idClient);
                fc.Show();
            }
            else
            {
                this.Hide();
                FormAdmin fa = new FormAdmin();
                fa.refreshGrid();
                fa.Show();
            }
        }
Example #3
0
        private void itemSettingClient_Click(object sender, EventArgs e)
        {
            FormClient form = new FormClient();

            form.MdiParent = this;
            form.Show();
        }
Example #4
0
        public override void ShowUserInterface(out DialogResult dialogResult)
        {
            FormClient formClient = new FormClient();

            formClient.ShowDialog();
            dialogResult = formClient.DialogResult;
        }
Example #5
0
 private void GoToFormClient(object o)
 {
     formClient = new FormClient(o);
     formClient.AddClientClicked += formClient_AddClientClicked;
     Content.Content              = formClient;
     NotificationsButton.Content  = productBusiness.GetList().Count(x => x.Quantity < 10);
 }
	public void Upload (Photo photo, string gallery)
	{
		if (login == null || passwd == null)
			throw new Exception ("Must Login First");

		string path = string.Format ("/{0}/{1}/", login, gallery);
		
		FormClient client = new FormClient (cookies);
		client.SuppressCookiePath = true;
		client.Add ("cmd", "uploadns1");
		client.Add ("start", System.Web.HttpUtility.UrlEncode (path));
		client.Add ("photo", new FileInfo (photo.DefaultVersionUri.LocalPath));
		client.Add ("desc", photo.Description);
		if (photo.Tags != null) {
			StringBuilder taglist = new StringBuilder ();

			foreach (Tag t in photo.Tags) {
				taglist.Append (t.Name + " ");
			}
			
			client.Add ("keywords", taglist.ToString ());
		}

		string upload_url = UploadBaseUrl + path + "?";

		Stream response = client.Submit (upload_url).GetResponseStream ();
		StreamReader reader = new StreamReader (response, Encoding.UTF8);

		Console.WriteLine (reader.ReadToEnd ());
	}
 private void timer1_Tick(object sender, EventArgs e)
 {
     lock (listBoxUsable)
     {
         for (int i = listBoxUsable.Items.Count - 1; i >= 0; i--) // ClientInfo ci in listBoxUsable.Items)
         {
             try
             {
                 ClientInfo   ci = listBoxUsable.Items[i] as ClientInfo;
                 StreamWriter sw = new StreamWriter(new NetworkStream(ci.Socket));
                 sw.WriteLine("alive");
                 sw.Flush();
             }
             catch (Exception e2)
             {
                 if (DefaultShowDevice != null && (listBoxUsable.Items[i] as ClientInfo).IP == DefaultShowDevice.IP)
                 {
                     DefaultShowDevice = null;
                     status.Text       = "";
                 }
                 try
                 {
                     ClientInfo ciRevoced = listBoxUsable.Items[i] as ClientInfo;
                     listBoxUsable.Items.RemoveAt(i);
                     ciRevoced.Socket.Close();
                 }
                 catch (Exception e3) { FormClient.Log(e3.ToString()); }
             }
         }
     }
 }
        private void buttonClient_Click(object sender, EventArgs e)
        {
            FormClient OpenClient = new FormClient(this);

            OpenClient.Show();
            this.Hide();
        }
    public void Upload(Photo photo, string gallery)
    {
        if (login == null || passwd == null)
        {
            throw new Exception("Must Login First");
        }

        string path = string.Format("/{0}/{1}/", login, gallery);

        FormClient client = new FormClient(cookies);

        client.SuppressCookiePath = true;
        client.Add("cmd", "uploadns1");
        client.Add("start", System.Web.HttpUtility.UrlEncode(path));
        client.Add("photo", new FileInfo(photo.DefaultVersionUri.LocalPath));
        client.Add("desc", photo.Description);
        if (photo.Tags != null)
        {
            StringBuilder taglist = new StringBuilder();

            foreach (Tag t in photo.Tags)
            {
                taglist.Append(t.Name + " ");
            }

            client.Add("keywords", taglist.ToString());
        }

        string upload_url = UploadBaseUrl + path + "?";

        Stream       response = client.Submit(upload_url).GetResponseStream();
        StreamReader reader   = new StreamReader(response, Encoding.UTF8);

        Console.WriteLine(reader.ReadToEnd());
    }
Example #10
0
 private void AddG2Specific(FormClient client)
 {
     if (AuthToken != null && AuthToken != String.Empty)
     {
         client.Add("g2_authToken", AuthToken);
     }
     client.Add("g2_controller", "remote.GalleryRemote");
 }
Example #11
0
        private void metroLink16_Click(object sender, EventArgs e)
        {
            FormClient form = new FormClient();

            form.User = User;
            this.Hide();
            form.ShowDialog();
            this.Close();
        }
Example #12
0
        public override ArrayList FetchAlbums()
        {
            FormClient client = new FormClient(cookies);

            client.Add("cmd", "fetch-albums");
            client.Add("protocol_version", "2.3");

            return(ParseFetchAlbums(client.Submit(uri)));
        }
Example #13
0
        public override bool MoveAlbum(Album album, string end_name)
        {
            FormClient client = new FormClient(cookies);

            client.Add("cmd", "move-album");
            client.Add("protocol_version", "2.7");
            client.Add("set_albumName", album.Name);
            client.Add("set_destalbumName", end_name);

            return(ParseMoveAlbum(client.Submit(uri)));
        }
Example #14
0
        public override bool MoveAlbum(Album album, string end_name)
        {
            FormClient client = new FormClient(cookies);

            client.Add("g2_form[cmd]", "move-album");
            client.Add("g2_form[protocol_version]", "2.10");
            client.Add("g2_form[set_albumName]", album.Name);
            client.Add("g2_form[set_destalbumName]", end_name);
            AddG2Specific(client);

            return(ParseMoveAlbum(client.Submit(uri)));
        }
Example #15
0
        public override void Login(string username, string passwd)
        {
            //Console.WriteLine ("Gallery1: Attempting to login");
            FormClient client = new FormClient(cookies);

            client.Add("cmd", "login");
            client.Add("protocol_version", "2.3");
            client.Add("uname", username);
            client.Add("password", passwd);

            ParseLogin(client.Submit(uri));
        }
Example #16
0
        public override ArrayList FetchAlbumsPrune()
        {
            FormClient client = new FormClient(cookies);

            client.Add("cmd", "fetch-albums-prune");
            client.Add("protocol_version", "2.3");
            client.Add("check_writable", "no");
            ArrayList a = ParseFetchAlbums(client.Submit(uri));

            a.Sort();
            return(a);
        }
Example #17
0
        public override ArrayList FetchAlbumImages(Album album, bool include_ablums)
        {
            FormClient client = new FormClient(cookies);

            client.Add("cmd", "fetch-album-images");
            client.Add("protocol_version", "2.3");
            client.Add("set_albumName", album.Name);
            client.Add("albums_too", include_ablums ? "yes" : "no");

            album.Images = ParseFetchAlbumImages(client.Submit(uri), album);
            return(album.Images);
        }
Example #18
0
        public override void Login(string username, string passwd)
        {
            Console.WriteLine("Gallery2: Attempting to login");
            FormClient client = new FormClient(cookies);

            client.Add("g2_form[cmd]", "login");
            client.Add("g2_form[protocol_version]", "2.10");
            client.Add("g2_form[uname]", username);
            client.Add("g2_form[password]", passwd);
            AddG2Specific(client);

            ParseLogin(client.Submit(uri));
        }
Example #19
0
        private void clientToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FormClient formClient = new FormClient(this);

            formClient.tbId.Text        = dgv1.CurrentRow.Cells[1].Value.ToString();
            formClient.tbId.Enabled     = false;
            formClient.tbNom.Text       = dgv1.CurrentRow.Cells[2].Value.ToString();
            formClient.tbNom.Enabled    = false;
            formClient.tbPrenom.Text    = dgv1.CurrentRow.Cells[3].Value.ToString();
            formClient.tbPrenom.Enabled = false;
            formClient.tbAdr.Text       = dgv1.CurrentRow.Cells[4].Value.ToString();
            formClient.ShowDialog();
        }
Example #20
0
        public override ArrayList FetchAlbumImages(Album album, bool include_ablums)
        {
            FormClient client = new FormClient(cookies);

            client.Add("g2_form[cmd]", "fetch-album-images");
            client.Add("g2_form[protocol_version]", "2.10");
            client.Add("g2_form[set_albumName]", album.Name);
            client.Add("g2_form[albums_too]", include_ablums ? "yes" : "no");
            AddG2Specific(client);

            album.Images = ParseFetchAlbumImages(client.Submit(uri), album);
            return(album.Images);
        }
Example #21
0
        public override ArrayList FetchAlbumsPrune()
        {
            FormClient client = new FormClient(cookies);

            client.Add("g2_form[cmd]", "fetch-albums-prune");
            client.Add("g2_form[protocol_version]", "2.10");
            client.Add("g2_form[check_writable]", "no");
            AddG2Specific(client);

            ArrayList a = ParseFetchAlbums(client.Submit(uri));

            a.Sort();
            return(a);
        }
Example #22
0
        private void 断开重连CToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ClientInfo ci = listBoxUsable.SelectedItem as ClientInfo;

            if (ci == null)
            {
                return;
            }
            try
            {
                listBoxUsable.Items.Remove(listBoxUsable.SelectedItem);
                ci.Socket.Close();
            }
            catch (Exception e1) { FormClient.Log(e1.ToString()); }
        }
	public void Login (string login, string passwd)
	{
		FormClient client = new FormClient (cookies);
		client.SuppressCookiePath = true;
		client.Add ("finish", String.Empty);
		client.Add ("check_cookies", String.Empty);
		client.Add ("login", login);
		client.Add ("password", passwd);

		Stream response = client.Submit (AuthUrl).GetResponseStream ();
		StreamReader reader = new StreamReader (response, Encoding.UTF8);
		
		Console.WriteLine (reader.ReadToEnd ());

		this.login = login;
		this.passwd = passwd;
	}
Example #24
0
        /*
         * public override Album AlbumProperties (string album)
         * {
         *      FormClient client = new FormClient (cookies);
         *      client.Add ("cmd", "album-properties");
         *      client.Add ("protocol_version", "2.3");
         *      client.Add ("set_albumName", album);
         *
         *      return ParseAlbumProperties (client.Submit (uri));
         * }
         */

        public override bool NewAlbum(string parent_name,
                                      string name,
                                      string title,
                                      string description)
        {
            FormClient client = new FormClient(cookies);

            client.Multipart = true;
            client.Add("cmd", "new-album");
            client.Add("protocol_version", "2.8");
            client.Add("set_albumName", parent_name);
            client.Add("newAlbumName", name);
            client.Add("newAlbumTitle", title);
            client.Add("newAlbumDesc", description);

            return(ParseNewAlbum(client.Submit(uri)));
        }
Example #25
0
        /*
         * public override Album AlbumProperties (string album)
         * {
         *      FormClient client = new FormClient (cookies);
         *      client.Add ("cmd", "album-properties");
         *      client.Add ("protocol_version", "2.3");
         *      client.Add ("set_albumName", album);
         *
         *      return ParseAlbumProperties (client.Submit (uri));
         * }
         */

        public override bool NewAlbum(string parent_name,
                                      string name,
                                      string title,
                                      string description)
        {
            FormClient client = new FormClient(cookies);

            client.Multipart = true;
            client.Add("g2_form[cmd]", "new-album");
            client.Add("g2_form[protocol_version]", "2.10");
            client.Add("g2_form[set_albumName]", parent_name);
            client.Add("g2_form[newAlbumName]", name);
            client.Add("g2_form[newAlbumTitle]", title);
            client.Add("g2_form[newAlbumDesc]", description);
            AddG2Specific(client);

            return(ParseNewAlbum(client.Submit(uri)));
        }
    public void Login(string login, string passwd)
    {
        FormClient client = new FormClient(cookies);

        client.SuppressCookiePath = true;
        client.Add("finish", String.Empty);
        client.Add("check_cookies", String.Empty);
        client.Add("login", login);
        client.Add("password", passwd);

        Stream       response = client.Submit(AuthUrl).GetResponseStream();
        StreamReader reader   = new StreamReader(response, Encoding.UTF8);

        Console.WriteLine(reader.ReadToEnd());

        this.login  = login;
        this.passwd = passwd;
    }
        public override int AddItem(Album album,
                                    string path,
                                    string filename,
                                    string caption,
                                    bool autorotate)
        {
            FormClient client = new FormClient(cookies);

            client.Add("cmd", "add-item");
            client.Add("protocol_version", "2.9");
            client.Add("set_albumName", album.Name);
            client.Add("caption", caption);
            client.Add("userfile_name", filename);
            client.Add("force_filename", filename);
            client.Add("auto_rotate", autorotate ? "yes" : "no");
            client.Add("userfile", new FileInfo(path));

            return(ParseAddItem(client.Submit(uri, Progress)));
        }
Example #28
0
 private void metroLabel8_Click(object sender, EventArgs e)
 {
     if (User.isAdmin)
     {
         FormMain form = new FormMain();
         form.User = User;
         this.Hide();
         form.ShowDialog();
         this.Close();
     }
     else
     {
         FormClient form = new FormClient();
         form.User = User;
         this.Hide();
         form.ShowDialog();
         this.Close();
     }
 }
        public override int AddItem(Album album,
                                    string path,
                                    string filename,
                                    string caption,
                                    bool autorotate)
        {
            FormClient client = new FormClient(cookies);

            client.Add("g2_form[cmd]", "add-item");
            client.Add("g2_form[protocol_version]", "2.10");
            client.Add("g2_form[set_albumName]", album.Name);
            client.Add("g2_form[caption]", caption);
            client.Add("g2_form[userfile_name]", filename);
            client.Add("g2_form[force_filename]", filename);
            client.Add("g2_form[auto_rotate]", autorotate ? "yes" : "no");
            client.Add("g2_userfile", new FileInfo(path));
            AddG2Specific(client);

            return(ParseAddItem(client.Submit(uri, Progress)));
        }
Example #30
0
        private void metroButton1_Click(object sender, EventArgs e)
        {
            var username = metroTextBox1.Text;
            var password = metroTextBox2.Text;

            if (username == "")
            {
                error.SetError(metroTextBox1, "Campo Obrigatório");
            }
            if (password == "")
            {
                error.SetError(metroTextBox2, "Campo Obrigatório");
            }
            if (password != "" && username != "")
            {
                var user = _appUser.GetUser(userName: username, password: password);
                if (user.Id != 0)
                {
                    if (user.isAdmin)
                    {
                        FormMain admin = new FormMain();
                        admin.User = user;
                        this.Hide();
                        admin.ShowDialog();
                        this.Close();
                    }
                    else
                    {
                        FormClient client = new FormClient();
                        client.User = user;
                        this.Hide();
                        client.ShowDialog();
                        this.Close();
                    }
                }
                else
                {
                    MetroMessageBox.Show(this, "Usuário não encontrado", "Erro", MessageBoxButtons.OK, MessageBoxIcon.Error, 100);
                }
            }
        }
Example #31
0
        public static GalleryVersion DetectGalleryVersion(string url)
        {
            //Figure out if the url is for G1 or G2
            Console.WriteLine("Detecting Gallery version");

            GalleryVersion version;

            if (url.EndsWith(Gallery1.script_name))
            {
                version = GalleryVersion.Version1;
            }
            else if (url.EndsWith(Gallery2.script_name))
            {
                version = GalleryVersion.Version2;
            }
            else
            {
                //check what script is available on the server

                FormClient client = new FormClient();

                try {
                    client.Submit(new Uri(Gallery.FixUrl(url, Gallery1.script_name)));
                    version = GalleryVersion.Version1;
                } catch (System.Net.WebException) {
                    try {
                        client.Submit(new Uri(Gallery.FixUrl(url, Gallery2.script_name)));
                        version = GalleryVersion.Version2;
                    } catch (System.Net.WebException) {
                        //Uh oh, neither version detected
                        version = GalleryVersion.VersionUnknown;
                    }
                }
            }

            Console.WriteLine("Detected: " + version.ToString());
            return(version);
        }
Example #32
0
        internal static bool TareasInicio()
        {
            const string methodName = "TareasInicio";

            try
            {
                Log.WriteEntry(ClassName, methodName, TraceEventType.Information, "Ejecutando Tareas de Inicio.");

                // Crear formularios
                _editForm       = new FormClient();
                _incidAsignForm = new FormAsigIncidencia();
                _usuariosForm   = new FormUsuarios();


                Log.WriteEntry(ClassName, methodName, TraceEventType.Information, "Terminadas Tareas de Inicio.");
                return(true);
            }
            catch (Exception ex)
            {
                Log.WriteEntry(ClassName, methodName, TraceEventType.Error, string.Format("Error: {0}", ex.Message));
                return(false);
            }
        }
        public override ArrayList FetchAlbums()
        {
            FormClient client = new FormClient (cookies);

            client.Add ("cmd", "fetch-albums");
            client.Add ("protocol_version", "2.3");

            return ParseFetchAlbums (client.Submit (uri));
        }
        public override int AddItem(Album album,
				     string path,
				     string filename,
				     string caption,
				     string description,
				     bool autorotate)
        {
            FormClient client = new FormClient (cookies);

            client.Add ("g2_form[cmd]", "add-item");
            client.Add ("g2_form[protocol_version]", "2.10");
            client.Add ("g2_form[set_albumName]", album.Name);
            client.Add ("g2_form[caption]", caption);
            client.Add ("g2_form[userfile_name]", filename);
            client.Add ("g2_form[force_filename]", filename);
            client.Add ("g2_form[auto_rotate]", autorotate ? "yes" : "no");
            client.Add ("g2_form[extrafield.Description]", description);
            client.Add ("g2_userfile", new FileInfo (path));
            client.expect_continue = expect_continue;
            AddG2Specific (client);

            return ParseAddItem (client.Submit (uri, Progress));
        }
        /*
        public override Album AlbumProperties (string album)
        {
            FormClient client = new FormClient (cookies);
            client.Add ("cmd", "album-properties");
            client.Add ("protocol_version", "2.3");
            client.Add ("set_albumName", album);

            return ParseAlbumProperties (client.Submit (uri));
        }
        */
        public override bool NewAlbum(string parent_name,
				      string name,
				      string title,
				      string description)
        {
            FormClient client = new FormClient (cookies);
            client.Multipart = true;
            client.Add ("cmd", "new-album");
            client.Add ("protocol_version", "2.8");
            client.Add ("set_albumName", parent_name);
            client.Add ("newAlbumName", name);
            client.Add ("newAlbumTitle", title);
            client.Add ("newAlbumDesc", description);

            return ParseNewAlbum (client.Submit (uri));
        }
        public override ArrayList FetchAlbumImages(Album album, bool include_ablums)
        {
            FormClient client = new FormClient (cookies);
            client.Add ("g2_form[cmd]", "fetch-album-images");
            client.Add ("g2_form[protocol_version]","2.10");
            client.Add ("g2_form[set_albumName]", album.Name);
            client.Add ("g2_form[albums_too]", include_ablums ? "yes" : "no");
            AddG2Specific (client);

            album.Images = ParseFetchAlbumImages (client.Submit (uri), album);
            return album.Images;
        }
        public override void Login(string username, string passwd)
        {
            //Console.WriteLine ("Gallery1: Attempting to login");
            FormClient client = new FormClient (cookies);

            client.Add ("cmd", "login");
            client.Add ("protocol_version", "2.3");
            client.Add ("uname", username);
            client.Add ("password", passwd);

            ParseLogin (client.Submit (uri));
        }
        public override bool MoveAlbum(Album album, string end_name)
        {
            FormClient client = new FormClient (cookies);

            client.Add ("cmd", "move-album");
            client.Add ("protocol_version", "2.7");
            client.Add ("set_albumName", album.Name);
            client.Add ("set_destalbumName", end_name);

            return ParseMoveAlbum (client.Submit (uri));
        }
        public override bool MoveAlbum(Album album, string end_name)
        {
            FormClient client = new FormClient (cookies);

            client.Add ("g2_form[cmd]", "move-album");
            client.Add ("g2_form[protocol_version]", "2.10");
            client.Add ("g2_form[set_albumName]", album.Name);
            client.Add ("g2_form[set_destalbumName]", end_name);
            AddG2Specific (client);

            return ParseMoveAlbum (client.Submit (uri));
        }
        public override void Login(string username, string passwd)
        {
            Log.Debug ("Gallery2: Attempting to login");
            FormClient client = new FormClient (cookies);

            client.Add ("g2_form[cmd]", "login");
            client.Add ("g2_form[protocol_version]", "2.10");
            client.Add ("g2_form[uname]", username);
            client.Add ("g2_form[password]", passwd);
            AddG2Specific (client);

            ParseLogin (client.Submit (uri));
        }
        public override ArrayList FetchAlbumImages(Album album, bool include_ablums)
        {
            FormClient client = new FormClient (cookies);
            client.Add ("cmd", "fetch-album-images");
            client.Add ("protocol_version","2.3");
            client.Add ("set_albumName", album.Name);
            client.Add ("albums_too", include_ablums ? "yes" : "no");

            album.Images = ParseFetchAlbumImages (client.Submit (uri), album);
            return album.Images;
        }
        public override int AddItem(Album album,
				     string path,
				     string filename,
				     string caption,
				     string description,
				     bool autorotate)
        {
            FormClient client = new FormClient (cookies);

            client.Add ("cmd", "add-item");
            client.Add ("protocol_version", "2.9");
            client.Add ("set_albumName", album.Name);
            client.Add ("caption", caption);
            client.Add ("userfile_name", filename);
            client.Add ("force_filename", filename);
            client.Add ("auto_rotate", autorotate ? "yes" : "no");
            client.Add ("userfile", new FileInfo (path));
            client.Add ("extrafield.Description", description);
            client.expect_continue = expect_continue;

            return ParseAddItem (client.Submit (uri, Progress));
        }
        public static GalleryVersion DetectGalleryVersion(string url)
        {
            //Figure out if the url is for G1 or G2
            Log.Debug ("Detecting Gallery version");

            GalleryVersion version;

            if (url.EndsWith (Gallery1.script_name)) {
                version = GalleryVersion.Version1;
            } else if (url.EndsWith (Gallery2.script_name)) {
                version = GalleryVersion.Version2;
            } else {
                //check what script is available on the server

                FormClient client = new FormClient ();

                try {
                    client.Submit (new Uri (Gallery.FixUrl (url, Gallery1.script_name)));
                    version =  GalleryVersion.Version1;

                } catch (System.Net.WebException) {
                    try {
                        client.Submit (new Uri (Gallery.FixUrl (url, Gallery2.script_name)));
                        version =  GalleryVersion.Version2;

                    } catch (System.Net.WebException) {
                        //Uh oh, neither version detected
                        version = GalleryVersion.VersionUnknown;
                    }
                }
            }

            Log.Debug ("Detected: " + version.ToString());
            return version;
        }
 private void AddG2Specific(FormClient client)
 {
     if (AuthToken != null && AuthToken != String.Empty)
         client.Add("g2_authToken", AuthToken);
     client.Add("g2_controller", "remote.GalleryRemote");
 }
        /*
        public override Album AlbumProperties (string album)
        {
            FormClient client = new FormClient (cookies);
            client.Add ("cmd", "album-properties");
            client.Add ("protocol_version", "2.3");
            client.Add ("set_albumName", album);

            return ParseAlbumProperties (client.Submit (uri));
        }
        */
        public override bool NewAlbum(string parent_name,
				      string name,
				      string title,
				      string description)
        {
            FormClient client = new FormClient (cookies);
            client.Multipart = true;
            client.Add ("g2_form[cmd]", "new-album");
            client.Add ("g2_form[protocol_version]", "2.10");
            client.Add ("g2_form[set_albumName]", parent_name);
            client.Add ("g2_form[newAlbumName]", name);
            client.Add ("g2_form[newAlbumTitle]", title);
            client.Add ("g2_form[newAlbumDesc]", description);
            AddG2Specific (client);

            return ParseNewAlbum (client.Submit (uri));
        }
 public override ArrayList FetchAlbumsPrune()
 {
     FormClient client = new FormClient (cookies);
     client.Add ("cmd", "fetch-albums-prune");
     client.Add ("protocol_version", "2.3");
     client.Add ("check_writable", "no");
     ArrayList a = ParseFetchAlbums (client.Submit (uri));
     a.Sort();
     return a;
 }
        public override ArrayList FetchAlbumsPrune()
        {
            FormClient client = new FormClient (cookies);
            client.Add ("g2_form[cmd]", "fetch-albums-prune");
            client.Add ("g2_form[protocol_version]", "2.10");
            client.Add ("g2_form[check_writable]", "no");
            AddG2Specific (client);

            ArrayList a = ParseFetchAlbums (client.Submit (uri));
            a.Sort();
            return a;
        }