public Edit(Data data, ListBox user_ListBox, bool admin, AuthForm authForm)
 {
     editPassword      = new KeyValuePair <string, string>();
     this.data         = data;
     this.admin        = admin;
     this.user_ListBox = user_ListBox;
     this.authForm     = authForm;
 }
 public EditPasswordForm(Data data, bool admin, AuthForm authForm)
 {
     InitializeComponent();
     this.data     = data;
     this.admin    = admin;
     this.authForm = authForm;
     edit          = new Edit(data, user_ListBox, admin, authForm);
 }
Ejemplo n.º 3
0
 public MainForm()
 {
     InitializeComponent();
     blocked  = false;
     myDomain = Thread.GetDomain();
     myDomain.SetPrincipalPolicy(PrincipalPolicy.WindowsPrincipal);
     myPrincipal      = (WindowsPrincipal)Thread.CurrentPrincipal;
     identity         = (WindowsIdentity)myPrincipal.Identity;
     admin            = myPrincipal.IsInRole(WindowsBuiltInRole.Administrator);
     data             = new Data();
     authForm         = new AuthForm(data);
     addForm          = new AddForm(data);
     deleteForm       = new DeleteForm(data);
     editPasswordForm = new EditPasswordForm(data, admin, authForm);
     data.setLoginPassword();
 }