Ejemplo n.º 1
0
        private void btnRemoveFromFavourites_Click(object sender, EventArgs e)
        {
            string userName = this.getSelectedName();

            if (userName != "")
            {
                this.btnAddToFavourites.Enabled      = this.btnRemove.Enabled = this.btnAdd.Enabled = this.listBoxFavourites.SelectedIndex == -1;
                this.btnRemoveFromFavourites.Enabled = false;
                GameEngine.Instance.playInterfaceSound("MailUserPopup_add_to_favourites");
                RemoteServices.Instance.RemoveUserFromFavourites(userName);
                this.listBoxFavourites.Items.Remove(userName);
                GenericReportPanelBasic.ForceHistoryRefresh();
            }
        }
Ejemplo n.º 2
0
        private void btnAddToFavourites_Click(object sender, EventArgs e)
        {
            string str = this.getSelectedName();

            if ((str != "") && !this.listBoxFavourites.Items.Contains(str))
            {
                GameEngine.Instance.playInterfaceSound("MailUserPopup_add_to_favourites");
                if (!this.listBoxFavourites.Items.Contains(str))
                {
                    this.listBoxFavourites.Items.Add(str);
                    RemoteServices.Instance.AddUserToFavourites(str);
                    GenericReportPanelBasic.ForceHistoryRefresh();
                    this.btnAddToFavourites.Enabled      = false;
                    this.btnRemoveFromFavourites.Enabled = true;
                }
            }
        }