예제 #1
0
            public static void GenerateUplayLibraryList()
            {
                try
                {
                    // If we don't have any SLM libraries available
                    if (Properties.Settings.Default.UplayLibraries == null)
                    {
                        return;
                    }

                    if (Properties.Settings.Default.UplayLibraries.Count == 0)
                    {
                        return;
                    }

                    // for each backup library we have, do a loop
                    foreach (var backupPath in Properties.Settings.Default.UplayLibraries)
                    {
                        Uplay.AddNewLibraryAsync(backupPath);
                    }
                }
                catch (Exception ex)
                {
                    Logger.Fatal(ex);
                    MessageBox.Show(ex.ToString());
                }
            }
예제 #2
0
        public static async Task <bool> LoadUplayAsync()
        {
            try
            {
                if (Definitions.Global.Uplay.IsStateChanging || Definitions.Global.Uplay.Loaded)
                {
                    return(false);
                }

                Definitions.Global.Uplay.IsStateChanging = true;

                Uplay.PopulateLibraryCMenuItems();

                Uplay.PopulateAppCMenuItems();

                Uplay.UpdateInstallationPath();

                await Uplay.InitializeUplayDb();

                Uplay.GenerateLibraryList();

                Library.GenerateUplayLibraryList();

                Definitions.Global.Uplay.IsStateChanging = false;
                Definitions.Global.Uplay.Loaded          = true;

                return(true);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
                Logger.Fatal(ex);
                Definitions.Global.Uplay.IsStateChanging = false;

                return(false);
            }
        }