Esempio n. 1
0
 private void GetSteamData()
 {
     if (WindowsRegistryStuff.KeyHasSubkey("currentuser", @"Software\Valve\Steam"))
     {
         SteamPath     = (string)WindowsRegistryStuff.RegistryGetValue("currentuser", @"Software\Valve\Steam", "SteamPath");
         SteamUserName = (string)WindowsRegistryStuff.RegistryGetValue("currentuser", @"Software\Valve\Steam", "LastGameNameUsed");
         if (string.IsNullOrEmpty(providedName))
         {
             providedName = SteamUserName;
         }
         if (getSteamId)//ignore all this if an id was given
         {
             if (!(providedName.Equals(SteamUserName)))
             {
                 SteamUserName = providedName;
             }
             using (SoloProjects.Dudhit.SpaceEngineers.SEBP.SteamConfigReader.FindSteamID fsID =
                        new SoloProjects.Dudhit.SpaceEngineers.SEBP.SteamConfigReader.FindSteamID(SteamPath, SteamUserName)) { SteamUserId = fsID.SteamID; }
         }
     }
     else
     {
         MessageBox.Show("Windows could not return the location of your Steam installation\n manual entry required", "Unknown Steam Installation location", MessageBoxButton.OK, MessageBoxImage.Warning);
     }
 }
Esempio n. 2
0
 public void KnownKeysDoNotExist()
 {
     Assert.IsFalse(WindowsRegistryStuff.KeyHasSubkey("classesroot", "._sln81110"));
     Assert.IsFalse(WindowsRegistryStuff.KeyHasSubkey("currentuser", "Consolee"));
     Assert.IsFalse(WindowsRegistryStuff.KeyHasSubkey("localmachine", "HARDWAREe"));
     Assert.IsFalse(WindowsRegistryStuff.KeyHasSubkey("users", ".DEFAULTe"));
     Assert.IsFalse(WindowsRegistryStuff.KeyHasSubkey("currentconfig", "Softwaree"));
     Assert.IsFalse(WindowsRegistryStuff.KeyHasSubkey("currentconfig", @"System\CurrentControlSet\SERVICES\TSDDDD"));
 }
Esempio n. 3
0
 public void KnownDeepSubKeysExist()
 {
     Assert.IsTrue(WindowsRegistryStuff.KeyHasSubkey("currentconfig", @"System\CurrentControlSet\SERVICES\TSDDD"));
 }
Esempio n. 4
0
 public void KnownCurrentConfigKeysExist()
 {
     Assert.IsTrue(WindowsRegistryStuff.KeyHasSubkey("currentconfig", "Software"));
 }
Esempio n. 5
0
 public void KnownUsersKeysExist()
 {
     Assert.IsTrue(WindowsRegistryStuff.KeyHasSubkey("users", ".DEFAULT"));
 }
Esempio n. 6
0
 public void KnownLocalMachineKeysExist()
 {
     Assert.IsTrue(WindowsRegistryStuff.KeyHasSubkey("localmachine", "HARDWARE"));
 }
Esempio n. 7
0
 public void KnownCurrentUserKeysExist()
 {
     Assert.IsTrue(WindowsRegistryStuff.KeyHasSubkey("currentuser", "Console"));
 }
Esempio n. 8
0
 public void KnownClassesRootKeysExist()
 {
     Assert.IsTrue(WindowsRegistryStuff.KeyHasSubkey("classesroot", "._sln80"));
 }