public override SelfConfig ReturnSelfConfig() { SelfConfig self = new SelfConfig(); //self.sizeX = GetComponent<RectTransform>().sizeDelta.x ; //self.sizeY = GetComponent<RectTransform>().sizeDelta.y; //self.localpostionX= transform.localPosition.x ; //self.localpostionY= transform.localPosition.y; self.data = mydata; List <pointItemConfig> listconfig = new List <pointItemConfig>(); for (int i = 0; i < points.Count; i++) { pointItemConfig temp = new pointItemConfig(); temp.isStart = points[i].isStart; temp.isEnd = points[i].isEnd; temp.pointdata = points[i].data; temp.localpostionX = points[i].transform.localPosition.x; temp.localpostionY = points[i].transform.localPosition.y; listconfig.Add(temp); } self.pointsConfig = listconfig; return(self); }
// ReSharper disable once UnusedParameter.Global internal static void Main(string[] args) { // entry point for doorstop // At this point, literally nothing but mscorlib is loaded, // and since this class doesn't have any static fields that // aren't defined in mscorlib, we can control exactly what // gets loaded. try { if (Environment.GetCommandLineArgs().Contains("--verbose")) { WinConsole.Initialize(); } SetupLibraryLoading(); EnsureDirectories(); // this is weird, but it prevents Mono from having issues loading the type. // IMPORTANT: NO CALLS TO ANY LOGGER CAN HAPPEN BEFORE THIS var unused = StandardLogger.PrintFilter; #region // Above hack explaination /* * Due to an unknown bug in the version of Mono that Unity uses, if the first access to StandardLogger * is a call to a constructor, then Mono fails to load the type correctly. However, if the first access is to * the above static property (or maybe any, but I don't really know) it behaves as expected and works fine. */ #endregion log.Debug("Initializing logger"); SelfConfig.Load(); DisabledConfig.Load(); loader.Debug("Prepping bootstrapper"); InstallBootstrapPatch(); Updates.InstallPendingUpdates(); LibLoader.SetupAssemblyFilenames(true); pluginAsyncLoadTask = PluginLoader.LoadTask(); permissionFixTask = PermissionFix.FixPermissions(new DirectoryInfo(Environment.CurrentDirectory)); } catch (Exception e) { Console.WriteLine(e); } }
public override SelfConfig ReturnSelfConfig() { SelfConfig self = new SelfConfig(); //self.sizeX = GetComponent<RectTransform>().sizeDelta.x ; //self.sizeY = GetComponent<RectTransform>().sizeDelta.y; //self.localpostionX= transform.localPosition.x ; //self.localpostionY= transform.localPosition.y; self.data = mydata; self.data.type = 2; List <pointItemConfig> listconfig = new List <pointItemConfig>(); self.pointsConfig = listconfig; return(self); }
public void SaveSet() { if (!Globaldata.Global.Isrun) { SavaData savaData = new SavaData { DmxCOM = Globaldata.Global.dmxPort, isLoop = isloop }; List <SelfConfig> selfConfigs = new List <SelfConfig>(); for (int i = 0; i < Globaldata.Global.orthogons.Count; i++) { SelfConfig temp = Globaldata.Global.orthogons[i].ReturnSelfConfig(); selfConfigs.Add(temp); } savaData.lights = selfConfigs; List <float> pauseTimes = new List <float>(); for (int i = 0; i < Globaldata.Global.pauseTime.Count; i++) { pauseTimes.Add(Globaldata.Global.pauseTime[i].ReturnMyTime()); Globaldata.Global.StorePause(); } savaData.pauseTime = pauseTimes; savaData.showTitle = showText.text; //SaveXml(savaData); string s = XmlUtil.Serializer(savaData); File.WriteAllText(saveUrl + "save.xml", s); //Workbook workbook1 = new Workbook(); //workbook1.LoadFromXml(saveUrl + "save.xml"); //workbook1.SaveToFile(saveUrl+ "test.xlsx", ExcelVersion.Version2013); } }
//private static string otherNewtonsoftJson = null; // ReSharper disable once UnusedParameter.Global internal static void Main(string[] args) { // entry point for doorstop // At this point, literally nothing but mscorlib is loaded, // and since this class doesn't have any static fields that // aren't defined in mscorlib, we can control exactly what // gets loaded. try { if (Environment.GetCommandLineArgs().Contains("--verbose")) { WinConsole.Initialize(); } SetupLibraryLoading(); /*var otherNewtonsoft = Path.Combine( * Directory.EnumerateDirectories(Environment.CurrentDirectory, "*_Data").First(), * "Managed", * "Newtonsoft.Json.dll"); * if (File.Exists(otherNewtonsoft)) * { // this game ships its own Newtonsoft; force load ours and flag loading theirs * LibLoader.LoadLibrary(new AssemblyName("Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed")); * otherNewtonsoftJson = otherNewtonsoft; * }*/ EnsureDirectories(); // this is weird, but it prevents Mono from having issues loading the type. // IMPORTANT: NO CALLS TO ANY LOGGER CAN HAPPEN BEFORE THIS var unused = StandardLogger.PrintFilter; #region // Above hack explaination /* * Due to an unknown bug in the version of Mono that Unity uses, if the first access to StandardLogger * is a call to a constructor, then Mono fails to load the type correctly. However, if the first access is to * the above static property (or maybe any, but I don't really know) it behaves as expected and works fine. */ #endregion log.Debug("Initializing logger"); SelfConfig.ReadCommandLine(Environment.GetCommandLineArgs()); SelfConfig.Load(); DisabledConfig.Load(); /* Removing this crap just in case. * if (AntiPiracy.IsInvalid(Environment.CurrentDirectory)) * { * loader.Error("Invalid installation; please buy the game to run BSIPA."); * * return; * } */ CriticalSection.Configure(); loader.Debug("Prepping bootstrapper"); // updates backup InstallBootstrapPatch(); LibLoader.SetupAssemblyFilenames(true); GameVersionEarly.Load(); Updates.InstallPendingUpdates(); //HarmonyProtector.Protect(); pluginAsyncLoadTask = PluginLoader.LoadTask(); permissionFixTask = PermissionFix.FixPermissions(new DirectoryInfo(Environment.CurrentDirectory)); } catch (Exception e) { Console.WriteLine(e); } }
/// <summary> /// Configures internal debug settings based on the config passed in. /// </summary> /// <param name="cfg"></param> internal static void Configure(SelfConfig cfg) { showSourceClass = cfg.Debug.ShowCallSource; PrintFilter = cfg.Debug.ShowDebug ? LogLevel.All : LogLevel.InfoUp; }
private void OptHideButton(SelfConfig cfg) { enableDisableButton?.gameObject?.SetActive(cfg.ShowEnableDisable); }
/// <summary> /// Configures internal debug settings based on the config passed in. /// </summary> /// <param name="cfg"></param> internal static void Configure(SelfConfig cfg) { showSourceClass = SelfConfig.Debug_.ShowCallSource_; PrintFilter = SelfConfig.Debug_.ShowDebug_ ? LogLevel.All : LogLevel.InfoUp; showTrace = SelfConfig.Debug_.ShowTrace_; }