public GameBoardWindow(string airdate)
 {
     //Make this a random game
     InitializeComponent();
     DB          = new JCluesFunctions();
     CurrentGame = DB.LoadGame(Convert.ToDateTime(airdate));
     PopulateBoard(1);
 }
        //Load
        public GameBoardWindow(int id)
        {
            InitializeComponent();
            DB = new JCluesFunctions();
            Scraper sc = new Scraper();

            CurrentGame = sc.Parse_Page(id);
            PopulateBoard(1);
        }
        public GameBoardWindow()
        {
            //Make this a random game
            InitializeComponent();
            DB          = new JCluesFunctions();
            CurrentGame = DB.LoadGame(Convert.ToDateTime("9/6/2004 12:00:00 AM"));

            PopulateBoard(1);
        }
Beispiel #4
0
        private void Commit_Pages()
        {
            string[]        paths = System.IO.Directory.GetFiles("downloaded_games/");
            JCluesFunctions DB    = new JCluesFunctions();

            Progress.Maximum = paths.Length;
            for (int i = 1; i < paths.Length; i++)
            {
                //DB.InsertGame(Parse_Page(i));
                Progress.Value++;
            }
        }
        public DBSelection()
        {
            InitializeComponent();
            if (System.IO.File.Exists("./Jclues.mdf"))
            {
                JCluesFunctions DB       = new JCluesFunctions();
                DataTable       airdates = DB.LoadAirdates();;
                dataGrid.DataContext = airdates.DefaultView;
                this.Show();
            }
            else
            {
                string           messageBoxText = "Database not found please download and scrape from j-archives before using this option";
                string           caption        = "Database Not Found!";
                MessageBoxImage  icon           = MessageBoxImage.Warning;
                MessageBoxButton button         = MessageBoxButton.OK;
                MessageBox.Show(messageBoxText, caption, button, icon);
                MainMenu window = new MainMenu();
                this.Close();
                window.Show();
            }

            //dataGrid.SelectedItem = dataGrid.Items[0];
        }