public void AddTextOutput(string msg) { TextConsol.Dispatcher.Invoke( System.Windows.Threading.DispatcherPriority.Normal, new Action( delegate() { TextConsol.Text += "\n" + msg; ScrollText.ScrollToBottom(); } )); }
private void Awake() { if (Instance != null && Instance != this) { Destroy(gameObject); } else { Instance = this; } }
private void AddTextToList(string Text) { TextPatchinfo.Dispatcher.Invoke(DispatcherPriority.Background, new DispatcherOperationCallback(delegate { TextPatchinfo.Text += String.Format("{0}\r\n", Text); return(null); }), null); ScrollText.Dispatcher.Invoke(DispatcherPriority.Background, new DispatcherOperationCallback(delegate { ScrollText.ScrollToEnd(); return(null); }), null); }
internal static Shape Read(BinaryReaderEx br, DRBVersion version, Dictionary <int, string> strings, long shprStart) { int typeOffset = br.ReadInt32(); int shprOffset = br.ReadInt32(); string type = strings[typeOffset]; Shape result; br.StepIn(shprStart + shprOffset); { if (type == "Dialog") { result = new Dialog(br, version); } else if (type == "GouraudFrame") { result = new GouraudFrame(br, version); } else if (type == "GouraudRect") { result = new GouraudRect(br, version); } else if (type == "GouraudSprite") { result = new GouraudSprite(br, version); } else if (type == "Mask") { result = new Mask(br, version, strings); } else if (type == "MonoFrame") { result = new MonoFrame(br, version); } else if (type == "MonoRect") { result = new MonoRect(br, version); } else if (type == "Null") { result = new Null(br, version); } else if (type == "ScrollText") { result = new ScrollText(br, version, strings); } else if (type == "Sprite") { result = new Sprite(br, version); } else if (type == "Text") { result = new Text(br, version, strings); } else { throw new InvalidDataException($"Unknown shape type: {type}"); } } br.StepOut(); return(result); }