You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
62 lines
1.3 KiB
62 lines
1.3 KiB
using System;
|
|
using System.Collections.Generic;
|
|
using System.Windows.Forms;
|
|
using System.IO;
|
|
using System.Text.Json;
|
|
|
|
|
|
namespace AssistDB
|
|
{
|
|
public partial class SplashScreen : Form
|
|
{
|
|
public SplashScreen()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
Timer tmr;
|
|
private void SplashScreen_Shown(object sender, EventArgs e)
|
|
{
|
|
tmr = new Timer();
|
|
|
|
//set time interval 3 sec
|
|
|
|
tmr.Interval = 3000;
|
|
|
|
//starts the timer
|
|
|
|
tmr.Start();
|
|
|
|
tmr.Tick += tmr_Tick;
|
|
|
|
}
|
|
|
|
void tmr_Tick(object sender, EventArgs e)
|
|
|
|
{
|
|
|
|
//var path = System.IO.Path.Combine(Application.StartupPath, @"Sources\tableSchema.json");
|
|
//List<Class1> jsonFile = JsonSerializer.Deserialize<List<Class1>>(File.ReadAllText(path));
|
|
|
|
//AssitDB assit = new AssitDB(jsonFile);
|
|
DirectoryInfo dir = new DirectoryInfo(@"Sources\json");
|
|
FileInfo[] files = dir.GetFiles("*.json");
|
|
|
|
Menu menu = new Menu(files);
|
|
|
|
//after 3 sec stop the timer
|
|
|
|
tmr.Stop();
|
|
|
|
//display mainform
|
|
|
|
//assit.Show();
|
|
menu.Show();
|
|
|
|
//hide this form
|
|
|
|
this.Hide();
|
|
|
|
}
|
|
}
|
|
}
|
|
|