コード例 #1
0
        static public void OpenAddMovieForm()
        {
            if (formAddMovie == null)
            {
                formAddMovie = new FormAddMovie();
                formAddMovie.Show();
            }

            formAddMovie.Focus();
        }
コード例 #2
0
        static void Main(string[] args)
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            var host     = args.Length > 0 ? args[0] : "localhost";
            var database = args.Length > 1 ? args[1] : "videoteka";
            var username = args.Length > 2 ? args[2] : "root";
            var password = args.Length > 3 ? args[3] : "";

            DB.Init(host, database, username, password);

            if (DB.ConnectionIsWorking())
            {
                Profile.Init();
                BindingManager.Init();

                formLogin   = new FormLogin();
                formMovies  = new FormMovies();
                formReviews = new FormReviews();

                formStats     = null;
                formWatchlist = null;
                formAddMovie  = null;

                formMovies.Show();
                formMovies.LoadMovies();
                //formLogin.ShowDialog();

                Application.Run();
            }
            else
            {
                Application.Exit();
            }
        }