Esempio n. 1
0
        //////////////////////////////////////////////////

        /// <summary>
        /// Initialises the underlying database
        /// </summary>
        public DatabaseController()
        {
            try
            {
                Database = new DistributedGameDB();
                Database.InitDB();
            } catch (IndexOutOfRangeException ex) {
                throw new DatabaseException(ECode.ConnectionError, "Invalid user file format!", ex);
            } catch (FileNotFoundException ex) {
                throw new DatabaseException(ECode.ConnectionError, ERRMSG_CONNECTION, ex);
            } catch (DllNotFoundException ex) {
                throw new DatabaseException(ECode.ConnectionError, ERRMSG_CONNECTION, ex);
            }
        }
 /// <summary>
 /// DGDataControllerImpl
 /// Constructer for Data Server Object calls
 /// DGDLLWrapper.InitBD to initialise the DataBase
 /// </summary>
 public DGDataControllerImpl()
 {
     try
     {
         m_gameDB = new DistributedGameDB();
         m_gameDB.InitDB();
     }
     catch (DllNotFoundException e1)
     {
         Console.WriteLine(e1.Message);
     }
     catch (DirectoryNotFoundException e2)
     {
         Console.WriteLine(e2.Message);
     }
     catch (FileNotFoundException e3)
     {
         Console.WriteLine(e3.Message);
     }
 }