Esempio n. 1
0
        /// <summary>
        /// Private constructor to insure that Controller is not created outside this class.
        /// </summary>
        private Controller()
        {
            session = Session.GetInstance();
            localPersistence = LocalPersistenceHandler.GetInstance();

            //Default when  not logged on
            session.RootFolderPath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + "\\sliceofpie\\";
            session.UserID = -1;
        }
Esempio n. 2
0
 /// <summary>
 /// Accessor method for accessing the single instance of controller.
 /// </summary>
 /// <returns>The only instance of controller</returns>
 public static Session GetInstance()
 {
     if (_instance == null)
     {
         _instance = new Session();
     }
     return _instance;
 }
 private LocalPersistenceHandler()
 {
     session = Session.GetInstance();
 }