Beispiel #1
0
        public void Update(IInvalidator invalidator, LiveSplitState state, float width, float height, LayoutMode mode)
        {
            if (timer == null)
            {
                timer = new TimerModel();
                timer.CurrentState = state;

                state.OnStart += (sender, args) => { OnStart(); };

                state.OnSplit += (sender, args) =>
                {
                    splitCollection.OnSplit();
                    UpdateRunState();
                };

                state.OnUndoSplit += (sender, args) =>
                {
                    splitCollection.OnUndoSplit();
                    UpdateRunState();
                };

                state.OnSkipSplit += (sender, args) =>
                {
                    splitCollection.OnSkipSplit();
                    UpdateRunState();
                };

                state.OnReset += (sender, value) => { OnReset(); };
            }

            Refresh(state.CurrentPhase);
        }
Beispiel #2
0
 /// <summary>
 /// Called when a split is skipped.
 /// </summary>
 private void OnSkipSplit(object sender, EventArgs e)
 {
     splitCollection.OnSkipSplit();
 }