Beispiel #1
0
        public Main_Window(StudentSkupina skupina, User user)
        {
            MaterialSkin.MaterialSkinManager skinManager = MaterialSkin.MaterialSkinManager.Instance;
            skinManager.EnforceBackcolorOnAllComponents = false;
            skinManager.AddFormToManage(this);
            skinManager.Theme       = MaterialSkin.MaterialSkinManager.Themes.LIGHT;
            skinManager.ColorScheme = new MaterialSkin.ColorScheme(MaterialSkin.Primary.BlueGrey500, MaterialSkin.Primary.BlueGrey500, MaterialSkin.Primary.BlueGrey500, MaterialSkin.Accent.Blue400,
                                                                   MaterialSkin.TextShade.WHITE);
            try
            {
                InitializeComponent();
                currentUser    = user;
                studentSkupina = skupina;

                SendEmailCheck emailCheck = new SendEmailCheck();
                emailCheck.AutomatedEmailSending(currentUser);

                var aTimer = new System.Timers.Timer(60 * 60 * 1000);
                aTimer.Elapsed += new ElapsedEventHandler(OnTimedEvent);
                aTimer.Start();

                GetTable();
                OnLoadStudent();
                CreateBlockedExtensionFile();
            }
            catch (Exception ex)
            {
                Logger newLog = new Logger();
                newLog.LogError(ex);
                MessageBox.Show(ex.Message);
            }
        }
Beispiel #2
0
 // Pravidelné spúšťanie kontroly toho, či má byť odoslané upozornenie študentom
 private static void OnTimedEvent(object source, ElapsedEventArgs e)
 {
     try
     {
         SendEmailCheck emailCheck = new SendEmailCheck();
         emailCheck.AutomatedEmailSending(currentUser);
     }
     catch (Exception)
     {
         return;
     }
 }