public static DTSettings GetDTSettings() { if (dtSettings != null) { return(dtSettings); } var doc = new PlistDocument(); doc.LoadFromXmlFile(PLAT_PLIST); var dict = (PlistDictionary)doc.Root; var infos = (PlistDictionary)dict["AdditionalInfo"]; var vals = new DTSettings(); vals.DTPlatformVersion = ((PlistString)infos["DTPlatformVersion"]).Value; IntPtr pool = SendMessage(GetClass("NSAutoreleasePool"), GetSelector("new")); try { var bundle = SendMessage(GetClass("NSString"), GetSelector("stringWithUTF8String:"), "DTXcode"); var plist = SendMessage(GetClass("NSString"), GetSelector("stringWithUTF8String:"), "/Developer/Applications/Xcode.app/Contents/Info.plist"); var data = SendMessage(GetClass("NSDictionary"), GetSelector("dictionaryWithContentsOfFile:"), plist); var val = SendMessage(data, GetSelector("objectForKey:"), bundle); vals.DTXcode = Marshal.PtrToStringAuto(SendMessage(val, GetSelector("UTF8String"))); } finally { SendMessage(pool, GetSelector("release")); } vals.DTPlatformBuild = GrabRootString(PLAT_VERSION_PLIST, "ProductBuildVersion"); vals.DTXcodeBuild = GrabRootString(VERSION_PLIST, "ProductBuildVersion"); vals.BuildMachineOSBuild = GrabRootString(SYSTEM_VERSION_PLIST, "ProductBuildVersion"); return(dtSettings = vals); }
private void settingbtn_Click(object sender, EventArgs e) { if (saveDirectoryPath == "" || saveDirectoryPath == null) { MessageBox.Show("Please sign into steam first then try again.", "Steam not ON!"); return; } DTSettings dt = new DTSettings(); dt._HDpath = saveDirectoryPath; dt.Show(); }
public DTSettings GetDTSettings() { if (dtSettings != null) { return(dtSettings); } var dict = PDictionary.FromFile(Path.Combine(DesktopPlatform, "Info.plist")); var infos = dict.Get <PDictionary> ("AdditionalInfo"); var systemVersionPlist = Path.Combine(DeveloperRoot, SYSTEM_VERSION_PLIST); return(dtSettings = new DTSettings { DTPlatformVersion = infos.Get <PString> ("DTPlatformVersion").Value, DTPlatformBuild = GrabRootString(Path.Combine(DesktopPlatform, "version.plist"), "ProductBuildVersion") ?? GrabRootString(VersionPlist, "ProductBuildVersion"), DTXcodeBuild = GrabRootString(VersionPlist, "ProductBuildVersion"), BuildMachineOSBuild = GrabRootString(systemVersionPlist, "ProductBuildVersion"), }); }
static void CheckSdkCaches() { DateTime?lastWrite; try { lastWrite = File.GetLastWriteTime(VERSION_PLIST); } catch (IOException) { lastWrite = null; } if (lastWrite == lastSdkVersionWrite) { return; } lastSdkVersionWrite = lastWrite; installedSdkVersions = null; knownOSVersions = null; dtSettings = null; sdkSettingsCache.Clear(); }
private void SetupParameters() { DTSettings settings = UIDTSettings.instance.GetSettings(); seed = settings.seed; useRandomSeed = settings.useRandomSeed; numberOfStartingRooms = settings.initialRooms; startingRoomGenerationAreaWidth = settings.initialAreaWidth; startingRoomGenerationAreaHeight = settings.initialAreaHeight; widthLow = settings.initialRoomMinWidth; heightLow = settings.initialRoomMinHeight; widthHigh = settings.initialRoomMaxWidth; heightHigh = settings.initialRoomMaxHeight; minWidth = settings.minRoomWidth; minHeight = settings.minRoomHeight; alternativeMinCheck = settings.useOrCheck; additionalConnectionsPercent = settings.additionalConnections; }
private void settingbtn_Click(object sender, EventArgs e) { DTSettings dt = new DTSettings(); dt.Show(); }
public static DTSettings GetDTSettings () { if (dtSettings != null) return dtSettings; var doc = new PlistDocument (); doc.LoadFromXmlFile (PLAT_PLIST); var dict = (PlistDictionary) doc.Root; var infos = (PlistDictionary) dict["AdditionalInfo"]; var vals = new DTSettings (); vals.DTPlatformVersion = ((PlistString)infos["DTPlatformVersion"]).Value; var xcodeVersion = GrabRootString ("/Developer/Applications/Xcode.app/Contents/Info.plist", "CFBundleShortVersionString"); vals.DTXcode = "0" + xcodeVersion.Replace (".", ""); vals.DTXcodeBuild = GrabRootString ("/Developer/Library/version.plist", "ProductBuildVersion"); return (dtSettings = vals); }
static void CheckSdkCaches () { DateTime? lastWrite; try { lastWrite = File.GetLastWriteTime (VERSION_PLIST); } catch (IOException) { lastWrite = null; } if (lastWrite == lastSdkVersionWrite) return; lastSdkVersionWrite = lastWrite; installedSdkVersions = null; knownOSVersions = null; dtSettings = null; sdkSettingsCache.Clear (); }
public static DTSettings GetDTSettings () { if (dtSettings != null) return dtSettings; var doc = new PlistDocument (); doc.LoadFromXmlFile (PLAT_PLIST); var dict = (PlistDictionary) doc.Root; var infos = (PlistDictionary) dict["AdditionalInfo"]; var vals = new DTSettings (); vals.DTPlatformVersion = ((PlistString)infos["DTPlatformVersion"]).Value; var pool = SendMessage (GetClass ("NSAutoreleasePool"), GetSelector ("new")); var bundle = SendMessage (GetClass ("NSString"), GetSelector ("stringWithUTF8String:"), "CFBundleShortVersionString"); var plist = SendMessage (GetClass ("NSString"), GetSelector ("stringWithUTF8String:"), "/Developer/Applications/Xcode.app/Contents/Info.plist"); var data = SendMessage (GetClass ("NSDictionary"), GetSelector ("dictionaryWithContentsOfFile:"), plist); var val = SendMessage (data, GetSelector ("objectForKey:"), bundle); var xcodeVersion = Marshal.PtrToStringAuto (SendMessage (val, GetSelector ("UTF8String"))); SendMessage (pool, GetSelector ("release")); vals.DTXcode = "0" + xcodeVersion.Replace (".", ""); vals.DTXcodeBuild = GrabRootString (VERSION_PLIST, "ProductBuildVersion"); return (dtSettings = vals); }