Example #1
0
        private void FillCutByTimeFields()
        {
            var app  = App.Instance;
            var demo = app.SelectedDemo;

            if (demo == null)
            {
                return;
            }

            var matchIndex = _calcMatchSelectionComboBox.SelectedIndex;
            var gsIndex    = 0;

            if (matchIndex != -1 &&
                matchIndex < demo.MatchTimes.Count)
            {
                gsIndex = demo.MatchTimes[matchIndex].GameStateIndex;
            }

            var cutTime = 0;

            if (!App.ParseMinutesSeconds(_calcOutputTimeEditBox.Text, out cutTime))
            {
                return;
            }

            app.SetCutByTimeFields(gsIndex, cutTime, cutTime);
        }