private unsafe void LogCall(T value, int id, bool contains) { int type = value is float? 0 : value is int? 1 : value is bool? 2 : 3; string var = ""; string val = ""; switch (type) { case 0: var = "Float"; val = value.ToSingle(CultureInfo.InvariantCulture).ToString(); break; case 1: var = "Basic"; val = value.ToInt32(CultureInfo.InvariantCulture).ToString(); break; case 2: var = "Bit"; val = value.ToBoolean(CultureInfo.InvariantCulture).ToString(); break; default: return; } RunTime.Log(String.Format("{0}.{1}[{2}] returned {3} {4}", _name, var, id, val, contains ? "" : "(This variable is not supported)")); }
private unsafe void LogCall(T value, int id, bool set) { int type = value is float? 0 : value is int? 1 : value is bool? 2 : 3; string var = ""; string val = ""; switch (type) { case 0: var = "Float"; val = value.ToSingle(CultureInfo.InvariantCulture).ToString(); break; case 1: var = "Basic"; val = value.ToInt32(CultureInfo.InvariantCulture).ToString(); break; case 2: var = "Bit"; val = value.ToBoolean(CultureInfo.InvariantCulture).ToString(); break; default: return; } RunTime.Log(String.Format("{0}.{1}[{2}] {3} {4}", _name, var, id, set ? "set to" : "returned", val.ToString().ToLower())); }
internal static void RemoveFile(int x) { if (x >= 0 && x < _openedFilePaths.Count) { _openedFiles[x].Dispose(); RunTime.Log("Closed " + _openedFilePaths[x]); _openedFiles.RemoveAt(x); _openedFilePaths.RemoveAt(x); } }
public static void AddFile(ResourceNode r) { string path = r._origPath.Substring(Program.RootPath.Length).Replace('\\', '/'); if (!_openedFilePaths.Contains(path)) { _openedFiles.Add(r); _openedFilePaths.Add(path); RunTime.Log("Loaded " + path); } }
internal static void ModelIndexChanged() { MDL0Node model = null; if (SelectedInfo != null) { SelectedInfo.ModelIndexChanged(); model = SelectedInfo.SelectedModel; } MainForm.Instance._mainControl._resetCam = false; MainForm.Instance._mainControl.TargetModel = model; RunTime.ResetSubactionVariables(); MainForm.Instance._mainControl.UpdateModel(); }
public static void RemoveFile(ResourceNode r) { if (r == null) { return; } string path = r._origPath.Substring(Program.RootPath.Length).Replace('\\', '/'); if (_openedFilePaths.Contains(path)) { _openedFiles.Remove(r); _openedFilePaths.Remove(path); r.Dispose(); RunTime.Log("Closed " + path); } }