public RTAmTBTimeComponent(LiveSplitState state) { Settings = new RTAmTBTimeSettings(); GameTimeForm = new ShitSplitter(state, Settings); state.OnStart += state_OnStart; state.OnReset += state_OnReset; state.OnUndoSplit += State_OnUndoSplit; CurrentState = state; }
void state_OnStart(object sender, EventArgs e) { GameTimeForm = new ShitSplitter(CurrentState, Settings); CurrentState.Form.Invoke(new Action(() => GameTimeForm.Show(CurrentState.Form))); if (!PreviousLocation.IsEmpty) { GameTimeForm.Location = PreviousLocation; } CurrentState.IsGameTimePaused = true; CurrentState.SetGameTime(TimeSpan.Zero); }