Ejemplo n.º 1
0
        private void CheckVersion()
        {
            try
            {
                if (TempFilesWorker.CheckVersion())
                {
                    float    code      = 0;
                    float    important = 0;
                    string   versiont  = "";
                    DateTime date;

                    WebWorker.GetVersionInfo(out code, out important, out versiont, out date);

                    if (code > Good_Teacher.MainWindow.VersionCode)
                    {
                        Window_CheckForUpdates checkForUpdates = new Window_CheckForUpdates(code, important, versiont, date);
                        checkForUpdates.Owner = this;
                        checkForUpdates.ShowDialog();
                    }


                    TempFilesWorker.WriteCurrentDay();
                }
            }
            catch (Exception ex)
            {
                Debug.WriteLine(ex);
            }
        }
Ejemplo n.º 2
0
        private void MainWindow_Loaded(object sender, RoutedEventArgs e)
        {
            CheckState();
            ((FrameworkElement)Toolbar_Main.Template.FindName("OverflowGrid", Toolbar_Main)).Visibility = Visibility.Collapsed;
            //PreviewKeyDown += MainWindow_KeyDown;

            BorderWindowSize.Visibility = Visibility.Collapsed;

            timer          = new DispatcherTimer();
            timer.Tick    += new EventHandler(Timer_Tick);
            timer.Interval = new TimeSpan(0, 0, 0, 5);
            timer.Start();

            FontWorker.RemoveTemporaryFolder();

            TempFilesWorker.RemoveUpdateFolder();

            if (OpenFileARG)
            {
                OpenFile(OpenFileARGPath);
            }
        }