Beispiel #1
0
        static void Main(string[] args)
        {
            WriteLine(ConsoleColor.Magenta, "Start");
            SteamCmdContext steamcmd = SteamCmdContext.GetInstance();

            steamcmd.SteamCmdStatusChange += Steamcmd_SteamCmdStatusChange;
            WriteLine(new string('-', Console.WindowWidth - 1));

            WriteLine(ConsoleColor.Magenta, "Download if needed");
            steamcmd.Download();
            WriteLine(new string('-', Console.WindowWidth - 1));

            WriteLine(ConsoleColor.Magenta, "Status Check");
            List <WorkshopItemStatus> status = steamcmd.WorkshopStatus(624970);

            WriteLine("Count: " + status.Count);
            WriteLine("WorkshopId\tStatus   \tHasUpdate\tSize\tDateTime");
            foreach (var stat in status)
            {
                WriteLine($"{stat.WorkshopId}\t{stat.Status}\t{stat.HasUpdate}    \t{stat.Size}\t{stat.DateTime}");
            }
            WriteLine(new string('-', Console.WindowWidth - 1));

            WriteLine(ConsoleColor.Magenta, "Mod Download");
            string downloadString = steamcmd.WorkshopDownloadItem(624970, 1762479746);

            WriteLine(downloadString);
            WriteLine(new string('-', Console.WindowWidth - 1));

            WriteLine(ConsoleColor.Magenta, "Status Check");
            status = steamcmd.WorkshopStatus(624970);
            WriteLine("Count: " + status.Count);
            WriteLine("WorkshopId\tStatus   \tHasUpdate\tSize\tDateTime");
            foreach (var stat in status)
            {
                WriteLine($"{stat.WorkshopId}\t{stat.Status}\t{stat.HasUpdate}    \t{stat.Size}\t{stat.DateTime}");
            }
            WriteLine(new string('-', Console.WindowWidth - 1));

            WriteLine(ConsoleColor.Red, "End, Press any key to exit.");
            Console.ReadKey(true);
        }
Beispiel #2
0
 public void BaseSetUp()
 {
     steamcmd = SteamCmdContext.GetInstance();
     Assert.IsNotNull(steamcmd);
     steamcmd.Download();
 }