Exemplo n.º 1
0
        void mnuContextNone_Click(object sender, EventArgs e)
        {
            try
            {
                DataOperation.SetFavoriteRate(0, repMovie, ref this.dataSource);

                if (this.RemoveOnNoneFavorite == true)
                {
                    int index = repMovie.CurrentItemIndex;
                    DataOperation.RemoveElement(ref this.dataSource, index);

                    this.DataSource = this.dataSource;
                }

                if (repMovie.ItemCount == 0)
                {
                    MessageBox.Show(Messages.FavoriteListEmpty, Messages.MessageBoxTitle, MessageBoxButtons.OK, MessageBoxIcon.Warning);

                    this.FindForm().Close();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, Messages.MessageBoxTitle, MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }
Exemplo n.º 2
0
 void mnuContextNone_Click(object sender, EventArgs e)
 {
     try
     {
         DataOperation.SetFavoriteRate(0, ref this.movie, lblFavValue);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, Messages.MessageBoxTitle, MessageBoxButtons.OK, MessageBoxIcon.Warning);
     }
 }
Exemplo n.º 3
0
 void mnuContext1_Click(object sender, EventArgs e)
 {
     try
     {
         DataOperation.SetFavoriteRate(1, repMovie, ref this.dataSource);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, Messages.MessageBoxTitle, MessageBoxButtons.OK, MessageBoxIcon.Warning);
     }
 }