internal static void CloseAll() { if (_timelineDock != null) { _timelineDock.Close(); MessageQueue.ContinueHandler -= _timelineDock.Continue_handler; FrameStatePool.UpdateAppLogHandler -= _timelineDock.FrameStatePool_UpdateAppLogHandler; _timelineDock = null; } }
internal static void Inspect() { if (_timelineDock == null || !_timelineDock.Visible) { _timelineDock = new TimelineDock(); _timelineDock.Show(MainWindow.Instance.DockPanel.DockWindows[DockState.DockTop].DockPanel, WeifenLuo.WinFormsUI.Docking.DockState.DockTop); _timelineDock.Show(); while (!_timelineDock._loaded && !_timelineDock.IsHandleCreated) { System.Threading.Thread.Sleep(10); } Debug.Check(_timelineDock.IsHandleCreated); } else { _timelineDock.Show(); } }
public TimelineDock() { InitializeComponent(); this.Enabled = (Plugin.EditMode != EditModes.Design); _timelineDock = this; _timelineDock.promptLabel.Text = ""; _loaded = false; MessageQueue.ContinueHandler += Continue_handler; FrameStatePool.UpdateAppLogHandler += FrameStatePool_UpdateAppLogHandler; this.Disposed += new EventHandler(TimelineDock_Disposed); }
public TimelineDock() { InitializeComponent(); this.Enabled = (Plugin.EditMode != EditModes.Design); _timelineDock = this; _timelineDock.promptLabel.Text = ""; _loaded = false; MessageQueue.ContinueHandler += Continue_handler; FrameStatePool.UpdateAppLogHandler += FrameStatePool_UpdateAppLogHandler; this.Disposed += new EventHandler(TimelineDock_Disposed); }
private void playButton_Click(object sender, EventArgs e) { if (Settings.Default.BreakAPP) { TimelineDock.Continue(); } else { if (Plugin.UpdateMode == UpdateModes.Continue) { setUpdateMode(UpdateModes.Break, "Break manually."); } else { setUpdateMode(UpdateModes.Continue, "."); } } }
internal static void Inspect() { if (_timelineDock == null || !_timelineDock.Visible) { _timelineDock = new TimelineDock(); _timelineDock.Show(MainWindow.Instance.DockPanel.DockWindows[DockState.DockTop].DockPanel, WeifenLuo.WinFormsUI.Docking.DockState.DockTop); _timelineDock.Show(); while (!_timelineDock._loaded && !_timelineDock.IsHandleCreated) { System.Threading.Thread.Sleep(10); } Debug.Check(_timelineDock.IsHandleCreated); } else { _timelineDock.Show(); } }
private static UpdateModes processMessage(string _msg) { try { //skip index //string msg = _msg.Substring(10); int pos = _msg.IndexOf("]["); string msg = _msg.Substring(pos + 1); //Console.WriteLine(msg.Trim()); if (msg.StartsWith("[workspace]")) { processWorkspace(msg); TimelineDock.Continue(); } else if (msg.StartsWith("[connected]")) { processConnected(); } else if (msg.StartsWith("[frame]")) { // [frame]0 AgentDataPool.TotalFrames = (int.Parse(msg.Substring(7))); } else if (msg.StartsWith("[property]")) { processProperty(msg); } else if (msg.StartsWith("[tick]")) { processTick(msg); } else if (msg.StartsWith("[jump]")) { processJump(msg); } else if (msg.StartsWith("[return]")) { processReturn(msg); } else if (msg.StartsWith("[plan_")) { string m = msg.Trim(); //Console.WriteLine(m); processPlanning(m); } else if (msg.StartsWith("[breaked]")) { processBreaked(msg); } else if (msg.StartsWith("[continue]")) { if (MessageQueue.ContinueHandler != null) { MessageQueue.ContinueHandler(msg); } } else if (msg.StartsWith("[applog]")) { int frame = AgentDataPool.TotalFrames; FrameStatePool.AddAppLog(frame, msg); } else if (msg.StartsWith("[log]")) { int frame = AgentDataPool.TotalFrames; FrameStatePool.AddLog(frame, msg); } else if (msg.StartsWith("[profiler]")) { //[profiler]ships\0_basic.xml->BehaviorTree[-1] 685 string[] tokens = msg.Substring(10).Split(new char[] { ' ', '\n' }, StringSplitOptions.RemoveEmptyEntries); if (tokens.Length == 2) { string[] nodes = tokens[0].Split(new string[] { "->" }, StringSplitOptions.RemoveEmptyEntries); if (nodes.Length == 2) { string behaviorFilename = nodes[0]; string[] ids = nodes[1].Split(new char[] { '[', ']' }, StringSplitOptions.RemoveEmptyEntries); if (ids.Length == 2) { FrameStatePool.SetProfileInfo(AgentDataPool.TotalFrames, behaviorFilename, ids[1], 0.001f * int.Parse(tokens[1])); } } } } } catch { string errorInfo = string.Format("The message \"{0}\" was not processed.", _msg); Console.WriteLine(errorInfo); MessageBox.Show(errorInfo, "Error", MessageBoxButtons.OK); } return(Plugin.UpdateMode); }
internal static void CloseAll() { if (_timelineDock != null) { _timelineDock.Close(); MessageQueue.ContinueHandler -= _timelineDock.Continue_handler; FrameStatePool.UpdateAppLogHandler -= _timelineDock.FrameStatePool_UpdateAppLogHandler; _timelineDock = null; } }