예제 #1
0
 public GlimpseForm(MainWindowForm mainForm, Movie movie)
 {
     this.MainForm = mainForm;
     this.Movie    = movie;
     InitializeComponent();
     setUserId(MainWindowForm.getUserID());
 }
예제 #2
0
 public MovieContainer(MainWindowForm mainForm, Movie movie)
 {
     this.MainForm = mainForm;
     this.Movie    = movie;
     InitializeComponent();
     LoadMovieInfo();
 }
예제 #3
0
 public WatchlistContainer(MainWindowForm mainForm, Movie movie)
 {
     this.MainForm = mainForm;
     this.Movie    = movie;
     InitializeComponent();
     GlimpseForm_Load();
 }
예제 #4
0
        private void buttonSubmit_Click(object sender, EventArgs e)
        {
            try
            {
                string userComment = textBoxReview.Text;
                if (String.IsNullOrWhiteSpace(userComment))
                {
                    MessageBox.Show("Comment cannot be empty."); return;
                }
                Comments comm = new Comments();
                comm.setComment(MainWindowForm.getUserID(), m_id, userComment);
                List <Comments> com = comm.getComments(m_id);
                foreach (var comment in com)
                {
                    Debug.WriteLine("user: "******" Commnet: " + comment.Comment);
                }

                MessageBox.Show("Thanks for your comment.");
                textBoxReview.Text = "";
            }
            catch (Exception ex)
            {
                MessageBox.Show("An Error occured: " + ex.Message);
            }
        }
예제 #5
0
        public SingleMovieContainer(MainWindowForm mainForm, Movie movie)
        {
            Movie    = movie;
            MainForm = mainForm;

            InitializeComponent();
            LoadMovie();
        }
예제 #6
0
        private void RemoveBtn_Click(object sender, EventArgs e)
        {
            WishlistMovie wishlist = new WishlistMovie();

            if (wishlist.Remove(MainWindowForm.getUserID(), this.Movie.Id))
            {
                MessageBox.Show("Successfully removed movie from wishlist.", "Wishlist");
            }
            MainForm.LoadWatchlistPage();
        }
예제 #7
0
        public void checkUser()
        {
            int user = MainWindowForm.getUserID();

            if (user != 0)
            {
                buttonSubmit.Enabled = true;
                movieRating.Enabled  = true;
                userRating obj = new userRating();
                //Debug.WriteLine(user);
                // Debug.WriteLine(m_id);
                // Debug.WriteLine(obj.check(user, m_id));
                if (obj.check(user, m_id))
                {
                    movieRating.Enabled = false;
                    movieRating.setDefaultValue(obj.Rank);
                }
            }
        }
예제 #8
0
 private void pictureBox4_Click(object sender, EventArgs e)
 {
     if (star1_filled && star2_filled && star3_filled && star4_filled)
     {
         MessageBox.Show("Successfuly Rated with: 10");
         pictureBox1.Image = IMBD_adopse.Properties.Resources.star_24px;
         pictureBox2.Image = IMBD_adopse.Properties.Resources.star_24px;
         pictureBox3.Image = IMBD_adopse.Properties.Resources.star_24px;
         pictureBox4.Image = IMBD_adopse.Properties.Resources.star_24px;
         pictureBox5.Image = IMBD_adopse.Properties.Resources.star_24px;
         star1_filled      = false;
         star2_filled      = false;
         star3_filled      = false;
         star4_filled      = false;
         star5_filled      = false;
         rating            = 10;
         userRating rate = new userRating();
         if (rate.setRating(MainWindowForm.getUserID(), MoviePage.getMovieId(), rating))
         {
             obj_main.movieRating.Enabled = false;
             obj_main.checkUser();
         }
     }
 }
예제 #9
0
 public SearchFormResults(MainWindowForm mainWindow)
 {
     this.MainWindow = mainWindow;
     InitializeComponent();
 }
예제 #10
0
 public void MainWindowForm(MainWindowForm obj)
 {
     obj2 = obj;
 }
예제 #11
0
 public WatchlistForm(MainWindowForm mainForm, int userid)
 {
     this.MainForm = mainForm;
     InitializeComponent();
     sendObjHome(userid);
 }
예제 #12
0
 public DiscoveryForm(MainWindowForm mainForm)
 {
     MainForm = mainForm;
     InitializeComponent();
     LoadAllMovies();
 }
예제 #13
0
 public HomeForm(MainWindowForm mainWindow)
 {
     this.MainWindow = mainWindow;
     InitializeComponent();
     loadHome();
 }