Beispiel #1
0
        public static void ShowTab_AllMovie()
        {
            if (FRM.Main == null)
            {
                return;
            }

            ucMovieList movieList = new ucMovieList();

            movieList.Dock     = DockStyle.Fill;
            movieList.Location = new Point(0, 0);
            movieList.OnDoubleClickMovieList += new WhenDoubleClickMovieList(movieList_OnDoubleClickMovieList);
            movieList.OnKeyUpMovieList       += new WhenKeyUpMovieList(movieList_OnKeyUpMovieList);

            TabPage newTabPage = new TabPage();

            newTabPage.Tag = new string[] {
                "all_movies",
                "All Movies @ " + ptkGeneral.GetTodayDateTimeSqlFormat()
            };
            newTabPage.Controls.Add(movieList);

            FRM.Main.tabMain.TabPages.Add(newTabPage);
            FRM.Main.tabMain.SelectedTab = newTabPage;
            FRM.Main.generateTabFunctionKey();

            movieList.RefreshMovieList(MovieDB.GetMovieList(), "All Movie");
        }
Beispiel #2
0
 public void RefreshAllMovieTab()
 {
     if (this.tabMain.TabPages.Count < 1)
     {
         return;
     }
     for (int i = 0; i < tabMain.TabPages.Count; i++)
     {
         TabPage tab = tabMain.TabPages[i];
         if (!(tab.Tag is string[]))
         {
             continue;
         }
         if (((string[])tab.Tag)[0] != "all_movies")
         {
             continue;
         }
         foreach (Control ctl in tab.Controls)
         {
             if (!(ctl is ucMovieList))
             {
                 continue;
             }
             ((ucMovieList)ctl).RefreshMovieList(MovieDB.GetMovieList(), "All Movie");
             break;
         }
     }
 }
Beispiel #3
0
        public static void ShowTab_FilterMovie(string filterKey)
        {
            if (FRM.Main == null)
            {
                return;
            }
            if (!that.Filter.Contains(filterKey))
            {
                return;
            }
            MovieFilter filter = null;

            try
            {
                filter = JsonConvert.DeserializeObject <MovieFilter>(that.Filter[filterKey]);
                that.DebugAndLog("ShowFilterMovie()->Decode filter name [" + filterKey + "] Success");
            }
            catch (Exception ex) {
                that.DebugAndLog("ShowFilterMovie()->Decode filter name [" + filterKey + "] Fail");
                that.DebugAndLog("Exception: " + ex.Message);
                return;
            }
            if (filter == null)
            {
                return;                     // Second Trap for SAFE :P
            }
            ucMovieList movieList = new ucMovieList();

            movieList.Dock     = DockStyle.Fill;
            movieList.Location = new Point(0, 0);
            movieList.OnDoubleClickMovieList += new WhenDoubleClickMovieList(movieList_OnDoubleClickMovieList);
            movieList.OnKeyUpMovieList       += new WhenKeyUpMovieList(movieList_OnKeyUpMovieList);


            TabPage newTabPage = new TabPage();

            newTabPage.Tag = new string[] {
                "filter_movie",
                "Filter Movie"
            };
            newTabPage.Controls.Add(movieList);

            FRM.Main.tabMain.TabPages.Add(newTabPage);
            FRM.Main.tabMain.SelectedTab = newTabPage;
            FRM.Main.generateTabFunctionKey();

            movieList.RefreshMovieList(MovieDB.GetMovieList(filter), "Filter Movie by [" + filterKey + "]");
        }
Beispiel #4
0
        private void _DoApplySearchResult(MovieFilter filter)
        {
            that.DebugAndLog("frmMovieStat -> DoApplySearchResult()");
            List <MovieProfile> movieList = MovieDB.GetMovieList(filter);

            that.DebugAndLog("Total movie got from MovieDB = " + movieList.Count.ToString());

            string descMovie = "Filter: "
                               + ((filter.NeedCheckCode()) ? ("Code, ") : (""))
                               + ((filter.NeedCheckTitle()) ? ("Title, ") : (""))
                               + ((filter.NeedCheckStory()) ? ("Story, ") : (""))
                               + ((filter.NeedCheckType()) ? ("Type, ") : (""))
                               + ((filter.NeedCheckRating()) ? ("Rating, ") : (""))
                               + ((filter.NeedCheckCountry()) ? ("Country, ") : (""))
                               + ((filter.NeedCheckFileConnect()) ? ("FileConnect, ") : (""))
                               + ((filter.NeedCheckActress()) ? ("Actress, ") : (""))
                               + ((filter.NeedCheckTag()) ? ("Tag, ") : (""))
                               + ((filter.NeedCheckCountPlay()) ? ("CountPlay, ") : (""))
                               + ((filter.NeedCheckFilePath()) ? ("FilePath, ") : (""))
            ;

            __RefreshSearchResult(movieList, descMovie);
        }