예제 #1
0
 private void loggedinForm_Load(object sender, EventArgs e)
 {
     try
     {
         Program.matches.getData();
     }
     catch (Exception)
     {
         MessageBox.Show("Uw api sleutel klopt niet!");
         ApiForm apiForm = new ApiForm();
         this.Hide();
         apiForm.ShowDialog();
         this.Close();
     }
     updateListBox();
     for (int i = 0; i < Program.matches.matchInfo.Count; i++)
     {
         TreeNode gameTreeNode = treeView1.Nodes.Add("Wedstrijd " + (i + 1));
         gameTreeNode.Tag = Program.matches.matchInfo[i];
         gameTreeNode.Nodes.Add(Program.matches.matchInfo[i].team1);
         gameTreeNode.Nodes.Add(Program.matches.matchInfo[i].team2);
     }
     credit            = user.Credits;
     nameLabel.Text    = user.Username;
     balanceLabel.Text = credit.ToString();
     string      data  = File.ReadAllText(path);
     List <User> users = JsonConvert.DeserializeObject <List <User> >(data);
 }
예제 #2
0
 private void installForm_Load(object sender, EventArgs e)
 {   //Dit checked of je bestanden en folders bestaan. Als ze besstaan openent hij meteen de API Form
     if (Directory.Exists(dirpath) && File.Exists(pathusers) && File.Exists(pathapi))
     {
         ApiForm apiform = new ApiForm();
         this.Hide();
         apiform.ShowDialog();
         this.Close();
     }
     //================================================================================================
 }