LESs/MainWindow.xaml.cs
/// <summary>
/// Called on the initial loading of Lol Enhancement Suite.
/// </summary>
Called on the initial loading of Lol Enhancement Suite.
Called on the initial loading of Lol Enhancement Suite .
private async void MainGrid_Loaded(object sender, RoutedEventArgs e)
        {
            string AssemblyVersion = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();
            LeagueVersionLabel.Content = AssemblyVersion;
            BackupVersion = AssemblyVersion;
            _worker.DoWork += worker_DoWork;
            _worker.RunWorkerCompleted += worker_RunWorkerCompleted;
            if (!Debugger.IsAttached)
                AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
            if (Debugger.IsAttached && !Directory.Exists(_modsDirectory) && Directory.Exists("../../../mods"))
            {
                _modsDirectory = "../../../mods";
            }
#if DEBUG
            ReloadButton.Visibility = Visibility.Visible;
#endif
            if (!Directory.Exists(_modsDirectory))
            {
                MessageBox.Show("Missing mods directory. Ensure that all files were extracted properly.", "Missing files");
                Environment.Exit(0);
            }
            LoadMods();
            try
            {
                using (WebClient c = new WebClient())
                {
                    _supportedVersions = serializer.Deserialize<List<int>>(await c.DownloadStringTaskAsync($"{VersionURL}{AssemblyVersion}"));
                }
            }
            catch 
            { }
        }
private async void MainGrid_Loaded ( object sender , RoutedEventArgs e ) { string AssemblyVersion = System . Reflection . Assembly . GetExecutingAssembly ( ) . GetName ( ) . Version . ToString ( ) ; LeagueVersionLabel . Content = AssemblyVersion ; BackupVersion = AssemblyVersion ; _worker . DoWork += worker_DoWork ; _worker . RunWorkerCompleted += worker_RunWorkerCompleted ; if ( ! Debugger . IsAttached ) AppDomain . CurrentDomain . UnhandledException += CurrentDomain_UnhandledException ; if ( Debugger . IsAttached && ! Directory . Exists ( _modsDirectory ) && Directory . Exists ( " " ) ) { _modsDirectory = " " ; } if DEBUG ReloadButton . Visibility = Visibility . Visible ; endif if ( ! Directory . Exists ( _modsDirectory ) ) { MessageBox . Show ( " " , " " ) ; Environment . Exit ( 0 ) ; } LoadMods ( ) ; try { using ( WebClient c = new WebClient ( ) ) { _supportedVersions = serializer . Deserialize < List < int > > ( await c . DownloadStringTaskAsync ( $" { VersionURL } { AssemblyVersion } " ) ) ; } } catch { } }
Called on the initial loading of Lol Enhancement Suite.
Called on the initial loading of Lol Enhancement Suite .
//Set the events for the worker when the patching starts. //Enable exception logging if the debugger ISNT attached. //Try to find the mods in the base directory of the solution when the debugger is attached //Add a reload button if we are debugging //Make sure that the mods exist in the directory. Warn the user if they dont. //Couldn't load versions...
sender
object
e
RoutedEventArgs