Exemple #1
0
 private void Loginnig()
 {
     if (Login.Text != "" && Password.Text != "")
     {
         bool found = false;
         int  i     = 0;
         for (i = 0; i < userbase.Count; i++)
         {
             if (Login.Text == userbase[i].name)
             {
                 found = true;
                 break;
             }
         }
         if (found == false || (found == true && Password.Text != userbase[i].pass))
         {
             MessageBox.Show("Wrong login or password");
             Login.Text    = "";
             Password.Text = "";
         }
         else
         {
             this.Visible = false;
             form2        = new MiddleForm(this, userbase[i])
             {
                 Visible = true
             };
             Login.Text    = "";
             Password.Text = "";
         }
     }
 }
Exemple #2
0
        public CreatingDoc(MiddleForm form2, BeginingForm form1)
        {
            InitializeComponent();
            this.form2 = form2;
            this.form1 = form1;

            foreach (User user in form1.userbase)
            {
                NextuserselectionBox.Items.Add(user.name);
            }
        }
Exemple #3
0
 public DetailsForm(BeginingForm form1, MiddleForm form2, File file)
 {
     InitializeComponent();
     this.form1 = form1;
     this.form2 = form2;
     this.file  = file;
     this.Text  = "Properties of " + "\"" + this.file.name + "\"";
     if (file.State == "Completed")
     {
         Controlfunc.Makeitinvisible(Finalizedocument, EditFile);
         Seefile.Visible = true;
     }
     else
     {
         if (form2.current.accesslevel != 0 && form2.current.name != file.touser)
         {
             Finalizedocument.Visible = false;
         }
     }
 }