예제 #1
0
 public StoreForm(User currentUser,UserManager usermanager, ItemManager itemmanager)
 {
     _currentUser = currentUser; //Assigns the current user.
     InitializeComponent();
     _itemManager = itemmanager; //Assigns the itemmanager.
     _userManager = usermanager; // Assings the usermanager.
     UpdateGUI(_currentUser);    //Updates the GUI with user information.
 }
예제 #2
0
 public SignInForm()
 {
     InitializeComponent();
     try
     {
         // Tires to deserialize the data saved in the debug folder. The char 'u' stands for usermanager and lets the DeserializeData method know that it is supposed
         // to deserialize the "userInfo.ser" file to get user information that has been saved to the userManager variable.
         userManager = StaticSerialize<UserManager>.DeserializeData('u');
     }
     catch (Exception)
     {
         // If the try block fails to deserialize the data it means there is no data to be deserialized in the "userInfo.ser" file and thus creates a new UserManager object
         // and assigns it to the userManager refrence.
         userManager = new UserManager();
     }
 }
예제 #3
0
 public PDFReceipt(UserManager usermanager)
 {
     _document = new Document(PageSize.LETTER); // Sets the doucment to a pagesize letter.
     _usermanager = usermanager;                 // Sets the usermanager.
 }
예제 #4
0
 public RegisterForm(UserManager usermanager,SignInForm logForm)
 {
     InitializeComponent();
     userManager = usermanager;        //Sets the usermanager sent from signIn form.
     signForm = logForm;              //Sets the SignIn form to control it from registerform.
 }