Exemplo n.º 1
0
 public GARITS()
 {
     InitializeComponent();
     permissions = new Permissions();
     try
     {
         settingsFile = new SettingsFile();
         db = new Database(settingsFile.getSetting("dbserver"), settingsFile.getSetting("dbname"), settingsFile.getSetting("dbuser"), settingsFile.getSetting("dbpassword"));
         db.Connect();
         permissions.readPermissions(db);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
         Environment.Exit(1);
     }
     permissions.AddComponent(administrationToolStripMenuItem, "Administration Menu Item");
 }