public void ImportFromPresetData(string data) { var entry = JsonConvert.DeserializeObject <Saveable>(data); Python.Import(entry.PythonData); Forms.Import(entry.FormsData); if (SettingsHolder.Drive.SaveDevAppsInAppsPresets && entry.DevApps.HasValue) { System.DeveloperApps = entry.DevApps.Value; } }
public bool Initialize(LaunchStage stage) { if (stage == LaunchStage.PostBlue) { Marshal = Python.Import("blue").Get("marshal"); LoadFunc = Marshal.Get("Load"); Marshal.IncRef(); LoadFunc.IncRef(); if (Marshal.IsValid && LoadFunc.IsValid) { Core.Log(LogSeverity.Minor, "initialized blue marshal functions"); } } return(true); }