Exemplo n.º 1
0
        private FrameworkElement CreateTab()
        {
            _patternsGroupBox = new FilterGroupBox("Cut Patterns", UDT_DLL.udtStringArray.CutPatterns, 2);
            _patternsGroupBox.SetBitMask((uint)_app.Config.PatternsSelectionBitMask);

            var spectatedPlayerSelectionRadioButton = new RadioButton();
            _spectatedPlayerSelectionRadioButton = spectatedPlayerSelectionRadioButton;
            spectatedPlayerSelectionRadioButton.HorizontalAlignment = HorizontalAlignment.Left;
            spectatedPlayerSelectionRadioButton.VerticalAlignment = VerticalAlignment.Center;
            spectatedPlayerSelectionRadioButton.Margin = new Thickness(0, 0, 0, 5);
            spectatedPlayerSelectionRadioButton.GroupName = "PlayerSelection";
            spectatedPlayerSelectionRadioButton.Content = " First Person Player";
            spectatedPlayerSelectionRadioButton.ToolTip = "Whoever is being followed in first-person in the demo";
            spectatedPlayerSelectionRadioButton.IsChecked = true;

            var demoTakerPlayerSelectionRadioButton = new RadioButton();
            _demoTakerPlayerSelectionRadioButton = demoTakerPlayerSelectionRadioButton;
            demoTakerPlayerSelectionRadioButton.HorizontalAlignment = HorizontalAlignment.Left;
            demoTakerPlayerSelectionRadioButton.VerticalAlignment = VerticalAlignment.Center;
            demoTakerPlayerSelectionRadioButton.GroupName = "PlayerSelection";
            demoTakerPlayerSelectionRadioButton.Content = " Demo Taker";
            demoTakerPlayerSelectionRadioButton.ToolTip = "The player who recorded the demo";
            demoTakerPlayerSelectionRadioButton.IsChecked = false;

            var manualIndexPlayerSelectionRadioButton = new RadioButton();
            _manualIndexPlayerSelectionRadioButton = manualIndexPlayerSelectionRadioButton;
            manualIndexPlayerSelectionRadioButton.HorizontalAlignment = HorizontalAlignment.Left;
            manualIndexPlayerSelectionRadioButton.VerticalAlignment = VerticalAlignment.Center;
            manualIndexPlayerSelectionRadioButton.GroupName = "PlayerSelection";
            manualIndexPlayerSelectionRadioButton.Content = " This Player Index";
            manualIndexPlayerSelectionRadioButton.IsChecked = false;

            var manualNamePlayerSelectionRadioButton = new RadioButton();
            _manualNamePlayerSelectionRadioButton = manualNamePlayerSelectionRadioButton;
            manualNamePlayerSelectionRadioButton.HorizontalAlignment = HorizontalAlignment.Left;
            manualNamePlayerSelectionRadioButton.VerticalAlignment = VerticalAlignment.Center;
            manualNamePlayerSelectionRadioButton.GroupName = "PlayerSelection";
            manualNamePlayerSelectionRadioButton.Content = " This Player Name";
            manualNamePlayerSelectionRadioButton.IsChecked = false;

            var playerIndexComboBox = new ComboBox();
            _playerIndexComboBox = playerIndexComboBox;
            playerIndexComboBox.HorizontalAlignment = HorizontalAlignment.Left;
            playerIndexComboBox.VerticalAlignment = VerticalAlignment.Center;
            playerIndexComboBox.Margin = new Thickness(5, 0, 0, 0);
            playerIndexComboBox.Width = 40;
            for(var i = 0; i < 64; ++i)
            {
                playerIndexComboBox.Items.Add(i.ToString());
            }
            playerIndexComboBox.SelectedIndex = 0;

            var manualIndexPlayerSelectionRow = new StackPanel();
            manualIndexPlayerSelectionRow.Margin = new Thickness(0, 5, 0, 0);
            manualIndexPlayerSelectionRow.Orientation = Orientation.Horizontal;
            manualIndexPlayerSelectionRow.HorizontalAlignment = HorizontalAlignment.Stretch;
            manualIndexPlayerSelectionRow.VerticalAlignment = VerticalAlignment.Stretch;
            manualIndexPlayerSelectionRow.Children.Add(manualIndexPlayerSelectionRadioButton);
            manualIndexPlayerSelectionRow.Children.Add(playerIndexComboBox);

            var playerNameTextBox = new TextBox();
            _playerNameTextBox = playerNameTextBox;
            playerNameTextBox.HorizontalAlignment = HorizontalAlignment.Left;
            playerNameTextBox.VerticalAlignment = VerticalAlignment.Center;
            playerNameTextBox.Margin = new Thickness(5, 0, 0, 0);
            playerNameTextBox.Width = 100;

            var manualNamePlayerSelectionRow = new StackPanel();
            manualNamePlayerSelectionRow.Margin = new Thickness(0, 5, 0, 0);
            manualNamePlayerSelectionRow.Orientation = Orientation.Horizontal;
            manualNamePlayerSelectionRow.HorizontalAlignment = HorizontalAlignment.Stretch;
            manualNamePlayerSelectionRow.VerticalAlignment = VerticalAlignment.Stretch;
            manualNamePlayerSelectionRow.ToolTip = "Name comparisons are case insensitive\nThe name must contain no color codes";
            manualNamePlayerSelectionRow.Children.Add(manualNamePlayerSelectionRadioButton);
            manualNamePlayerSelectionRow.Children.Add(playerNameTextBox);

            var playerSelectionPanel = new StackPanel();
            playerSelectionPanel.Margin = new Thickness(10);
            playerSelectionPanel.HorizontalAlignment = HorizontalAlignment.Stretch;
            playerSelectionPanel.VerticalAlignment = VerticalAlignment.Stretch;
            playerSelectionPanel.Children.Add(spectatedPlayerSelectionRadioButton);
            playerSelectionPanel.Children.Add(demoTakerPlayerSelectionRadioButton);
            playerSelectionPanel.Children.Add(manualNamePlayerSelectionRow);
            playerSelectionPanel.Children.Add(manualIndexPlayerSelectionRow);

            var playerSelectionGroupBox = new GroupBox();
            playerSelectionGroupBox.Margin = new Thickness(5);
            playerSelectionGroupBox.Header = "Player Selection";
            playerSelectionGroupBox.HorizontalAlignment = HorizontalAlignment.Left;
            playerSelectionGroupBox.VerticalAlignment = VerticalAlignment.Top;
            playerSelectionGroupBox.Content = playerSelectionPanel;

            var cutButton = new Button();
            cutButton.HorizontalAlignment = HorizontalAlignment.Left;
            cutButton.VerticalAlignment = VerticalAlignment.Top;
            cutButton.Content = "Cut!";
            cutButton.Width = 75;
            cutButton.Height = 25;
            cutButton.Margin = new Thickness(5);
            cutButton.Click += (obj, args) => OnCutClicked();

            var actionsGroupBox = new GroupBox();
            actionsGroupBox.HorizontalAlignment = HorizontalAlignment.Left;
            actionsGroupBox.VerticalAlignment = VerticalAlignment.Top;
            actionsGroupBox.Margin = new Thickness(5);
            actionsGroupBox.Header = "Actions";
            actionsGroupBox.Content = cutButton;

            var helpTextBlock = new TextBlock();
            helpTextBlock.Margin = new Thickness(5);
            helpTextBlock.TextWrapping = TextWrapping.WrapWithOverflow;
            helpTextBlock.Text =
                "UDT will create a cut section for each pattern match during parsing." +
                "When parsing is done, overlapping cut sections get merged together and a new parsing pass is applied to do the actual cutting." +
                "\n\nNote: The \"Player Selection\" settings are respected by all filters except the \"Global Chat\" one." +
                "That is, it matches chat from anyone." +
                "\n\nExample of cut section merging: suppose we have 2 matches, the first at 1:27 and the second at 1:30 with " +
                "start and end time offsets 10 and 8." +
                "UDT will create 2 cut sections: 1:17-1:35 and 1:20-1:38, which then get merged into 1: 1:17-1:38.";

            var helpGroupBox = new GroupBox();
            helpGroupBox.Margin = new Thickness(5);
            helpGroupBox.Header = "Help";
            helpGroupBox.HorizontalAlignment = HorizontalAlignment.Left;
            helpGroupBox.VerticalAlignment = VerticalAlignment.Top;
            helpGroupBox.Content = helpTextBlock;

            var rootPanel = new WrapPanel();
            rootPanel.HorizontalAlignment = HorizontalAlignment.Stretch;
            rootPanel.VerticalAlignment = VerticalAlignment.Stretch;
            rootPanel.Margin = new Thickness(5);
            rootPanel.Orientation = Orientation.Horizontal;
            rootPanel.Children.Add(_patternsGroupBox.RootElement);
            rootPanel.Children.Add(playerSelectionGroupBox);
            rootPanel.Children.Add(actionsGroupBox);
            rootPanel.Children.Add(helpGroupBox);

            var scrollViewer = new ScrollViewer();
            scrollViewer.HorizontalAlignment = HorizontalAlignment.Stretch;
            scrollViewer.VerticalAlignment = VerticalAlignment.Stretch;
            scrollViewer.Margin = new Thickness(5);
            scrollViewer.HorizontalScrollBarVisibility = ScrollBarVisibility.Disabled;
            scrollViewer.VerticalScrollBarVisibility = ScrollBarVisibility.Auto;
            scrollViewer.Content = rootPanel;

            return scrollViewer;
        }
Exemplo n.º 2
0
        private FrameworkElement CreateCutByFragTab()
        {
            _playerMODFilters = new FilterGroupBox("Cause of Death Filters", UDT_DLL.udtStringArray.PlayerMeansOfDeath, 3);
            // @TODO: Power-up Filters

            var minFragCountEditBox = new TextBox();

            _minFragCountEditBox      = minFragCountEditBox;
            minFragCountEditBox.Width = 40;
            minFragCountEditBox.Text  = _app.Config.FragCutMinFragCount.ToString();

            var timeBetweenFragsEditBox = new TextBox();

            _timeBetweenFragsEditBox      = timeBetweenFragsEditBox;
            timeBetweenFragsEditBox.Width = 40;
            timeBetweenFragsEditBox.Text  = _app.Config.FragCutTimeBetweenFrags.ToString();

            var allowSelfKillsCheckBox = new CheckBox();

            _allowSelfKillsCheckBox = allowSelfKillsCheckBox;
            allowSelfKillsCheckBox.HorizontalAlignment = HorizontalAlignment.Left;
            allowSelfKillsCheckBox.VerticalAlignment   = VerticalAlignment.Center;
            allowSelfKillsCheckBox.IsChecked           = _app.Config.FragCutAllowSelfKills;
            allowSelfKillsCheckBox.ToolTip             = "Self kills are suicides where the player shot himself with a weapon";

            var allowTeamKillsCheckBox = new CheckBox();

            _allowTeamKillsCheckBox = allowTeamKillsCheckBox;
            allowTeamKillsCheckBox.HorizontalAlignment = HorizontalAlignment.Left;
            allowTeamKillsCheckBox.VerticalAlignment   = VerticalAlignment.Center;
            allowTeamKillsCheckBox.IsChecked           = _app.Config.FragCutAllowTeamKills;

            var allowAnyDeathCheckBox = new CheckBox();

            _allowAnyDeathCheckBox = allowAnyDeathCheckBox;
            allowAnyDeathCheckBox.HorizontalAlignment = HorizontalAlignment.Left;
            allowAnyDeathCheckBox.VerticalAlignment   = VerticalAlignment.Center;
            allowAnyDeathCheckBox.IsChecked           = _app.Config.FragCutAllowAnyDeath;
            allowAnyDeathCheckBox.ToolTip             = "This includes suicides where the killer is the world: lava, fall damage, hurt triggers, etc";

            var rulesPanelList = new List <Tuple <FrameworkElement, FrameworkElement> >();

            rulesPanelList.Add(App.CreateTuple("Min. Frag Count", minFragCountEditBox));
            rulesPanelList.Add(App.CreateTuple("Max. Time Between Frags [s]", timeBetweenFragsEditBox));
            rulesPanelList.Add(App.CreateTuple("Allow Self Kills?", allowSelfKillsCheckBox));
            rulesPanelList.Add(App.CreateTuple("Allow Any Death?", allowAnyDeathCheckBox));
            rulesPanelList.Add(App.CreateTuple("Allow Team Kills?", allowTeamKillsCheckBox));

            var rulesPanel = WpfHelper.CreateDualColumnPanel(rulesPanelList, 175, 5);

            rulesPanel.HorizontalAlignment = HorizontalAlignment.Center;
            rulesPanel.VerticalAlignment   = VerticalAlignment.Center;

            var rulesGroupBox = new GroupBox();

            rulesGroupBox.Header = "Frag Rules";
            rulesGroupBox.HorizontalAlignment = HorizontalAlignment.Left;
            rulesGroupBox.VerticalAlignment   = VerticalAlignment.Top;
            rulesGroupBox.Margin  = new Thickness(5);
            rulesGroupBox.Content = rulesPanel;

            var actionsGroupBox = CutByPatternComponent.CreateActionsGroupBox(UDT_DLL.udtPatternType.FragSequences);

            var helpTextBlock = new TextBlock();

            helpTextBlock.Margin       = new Thickness(5);
            helpTextBlock.TextWrapping = TextWrapping.WrapWithOverflow;
            helpTextBlock.Text         =
                "Self-kills are suicides where the player shot himself with a weapon." +
                "\nDeaths can include 'suicides' where the killer is the world: lava, fall damage, hurt triggers, etc.";

            var helpGroupBox = new GroupBox();

            helpGroupBox.Margin = new Thickness(5);
            helpGroupBox.Header = "Help";
            helpGroupBox.HorizontalAlignment = HorizontalAlignment.Left;
            helpGroupBox.VerticalAlignment   = VerticalAlignment.Top;
            helpGroupBox.Content             = helpTextBlock;

            var rootPanel = new WrapPanel();

            rootPanel.HorizontalAlignment = HorizontalAlignment.Stretch;
            rootPanel.VerticalAlignment   = VerticalAlignment.Stretch;
            rootPanel.Margin      = new Thickness(5);
            rootPanel.Orientation = Orientation.Horizontal;
            rootPanel.Children.Add(rulesGroupBox);
            rootPanel.Children.Add(actionsGroupBox);
            rootPanel.Children.Add(helpGroupBox);
            rootPanel.Children.Add(new WpfHelper.WrapPanelNewLine());
            rootPanel.Children.Add(_playerMODFilters.RootElement);

            var scrollViewer = new ScrollViewer();

            scrollViewer.HorizontalAlignment = HorizontalAlignment.Stretch;
            scrollViewer.VerticalAlignment   = VerticalAlignment.Stretch;
            scrollViewer.Margin = new Thickness(5);
            scrollViewer.HorizontalScrollBarVisibility = ScrollBarVisibility.Disabled;
            scrollViewer.VerticalScrollBarVisibility   = ScrollBarVisibility.Auto;
            scrollViewer.Content = rootPanel;

            return(scrollViewer);
        }
Exemplo n.º 3
0
        private FrameworkElement CreateTab()
        {
            _patternsGroupBox = new FilterGroupBox("Cut Patterns", UDT_DLL.udtStringArray.CutPatterns, 2);
            _patternsGroupBox.SetBitMask((uint)_app.Config.PatternsSelectionBitMask);

            var spectatedPlayerSelectionRadioButton = new RadioButton();

            _spectatedPlayerSelectionRadioButton = spectatedPlayerSelectionRadioButton;
            spectatedPlayerSelectionRadioButton.HorizontalAlignment = HorizontalAlignment.Left;
            spectatedPlayerSelectionRadioButton.VerticalAlignment   = VerticalAlignment.Center;
            spectatedPlayerSelectionRadioButton.Margin    = new Thickness(0, 0, 0, 5);
            spectatedPlayerSelectionRadioButton.GroupName = "PlayerSelection";
            spectatedPlayerSelectionRadioButton.Content   = " First Person Player";
            spectatedPlayerSelectionRadioButton.ToolTip   = "Whoever is being followed in first-person in the demo";
            spectatedPlayerSelectionRadioButton.IsChecked = true;

            var demoTakerPlayerSelectionRadioButton = new RadioButton();

            _demoTakerPlayerSelectionRadioButton = demoTakerPlayerSelectionRadioButton;
            demoTakerPlayerSelectionRadioButton.HorizontalAlignment = HorizontalAlignment.Left;
            demoTakerPlayerSelectionRadioButton.VerticalAlignment   = VerticalAlignment.Center;
            demoTakerPlayerSelectionRadioButton.GroupName           = "PlayerSelection";
            demoTakerPlayerSelectionRadioButton.Content             = " Demo Taker";
            demoTakerPlayerSelectionRadioButton.ToolTip             = "The player who recorded the demo";
            demoTakerPlayerSelectionRadioButton.IsChecked           = false;

            var manualIndexPlayerSelectionRadioButton = new RadioButton();

            _manualIndexPlayerSelectionRadioButton = manualIndexPlayerSelectionRadioButton;
            manualIndexPlayerSelectionRadioButton.HorizontalAlignment = HorizontalAlignment.Left;
            manualIndexPlayerSelectionRadioButton.VerticalAlignment   = VerticalAlignment.Center;
            manualIndexPlayerSelectionRadioButton.GroupName           = "PlayerSelection";
            manualIndexPlayerSelectionRadioButton.Content             = " This Player Index";
            manualIndexPlayerSelectionRadioButton.IsChecked           = false;

            var manualNamePlayerSelectionRadioButton = new RadioButton();

            _manualNamePlayerSelectionRadioButton = manualNamePlayerSelectionRadioButton;
            manualNamePlayerSelectionRadioButton.HorizontalAlignment = HorizontalAlignment.Left;
            manualNamePlayerSelectionRadioButton.VerticalAlignment   = VerticalAlignment.Center;
            manualNamePlayerSelectionRadioButton.GroupName           = "PlayerSelection";
            manualNamePlayerSelectionRadioButton.Content             = " This Player Name";
            manualNamePlayerSelectionRadioButton.IsChecked           = false;

            var playerIndexComboBox = new ComboBox();

            _playerIndexComboBox = playerIndexComboBox;
            playerIndexComboBox.HorizontalAlignment = HorizontalAlignment.Left;
            playerIndexComboBox.VerticalAlignment   = VerticalAlignment.Center;
            playerIndexComboBox.Margin = new Thickness(5, 0, 0, 0);
            playerIndexComboBox.Width  = 40;
            for (var i = 0; i < 64; ++i)
            {
                playerIndexComboBox.Items.Add(i.ToString());
            }
            playerIndexComboBox.SelectedIndex = 0;

            var manualIndexPlayerSelectionRow = new StackPanel();

            manualIndexPlayerSelectionRow.Margin              = new Thickness(0, 5, 0, 0);
            manualIndexPlayerSelectionRow.Orientation         = Orientation.Horizontal;
            manualIndexPlayerSelectionRow.HorizontalAlignment = HorizontalAlignment.Stretch;
            manualIndexPlayerSelectionRow.VerticalAlignment   = VerticalAlignment.Stretch;
            manualIndexPlayerSelectionRow.Children.Add(manualIndexPlayerSelectionRadioButton);
            manualIndexPlayerSelectionRow.Children.Add(playerIndexComboBox);

            var playerNameTextBox = new TextBox();

            _playerNameTextBox = playerNameTextBox;
            playerNameTextBox.HorizontalAlignment = HorizontalAlignment.Left;
            playerNameTextBox.VerticalAlignment   = VerticalAlignment.Center;
            playerNameTextBox.Margin = new Thickness(5, 0, 0, 0);
            playerNameTextBox.Width  = 100;

            var manualNamePlayerSelectionRow = new StackPanel();

            manualNamePlayerSelectionRow.Margin              = new Thickness(0, 5, 0, 0);
            manualNamePlayerSelectionRow.Orientation         = Orientation.Horizontal;
            manualNamePlayerSelectionRow.HorizontalAlignment = HorizontalAlignment.Stretch;
            manualNamePlayerSelectionRow.VerticalAlignment   = VerticalAlignment.Stretch;
            manualNamePlayerSelectionRow.ToolTip             = "Name comparisons are case insensitive and color codes are ignored";
            manualNamePlayerSelectionRow.Children.Add(manualNamePlayerSelectionRadioButton);
            manualNamePlayerSelectionRow.Children.Add(playerNameTextBox);

            var playerSelectionPanel = new StackPanel();

            playerSelectionPanel.Margin = new Thickness(10);
            playerSelectionPanel.HorizontalAlignment = HorizontalAlignment.Stretch;
            playerSelectionPanel.VerticalAlignment   = VerticalAlignment.Stretch;
            playerSelectionPanel.Children.Add(spectatedPlayerSelectionRadioButton);
            playerSelectionPanel.Children.Add(demoTakerPlayerSelectionRadioButton);
            playerSelectionPanel.Children.Add(manualNamePlayerSelectionRow);
            playerSelectionPanel.Children.Add(manualIndexPlayerSelectionRow);

            var playerSelectionGroupBox = new GroupBox();

            playerSelectionGroupBox.Margin = new Thickness(5);
            playerSelectionGroupBox.Header = "Player Selection";
            playerSelectionGroupBox.HorizontalAlignment = HorizontalAlignment.Left;
            playerSelectionGroupBox.VerticalAlignment   = VerticalAlignment.Top;
            playerSelectionGroupBox.Content             = playerSelectionPanel;

            var actionsGroupBox = CreateActionsGroupBox(DoAction);

            var helpTextBlock = new TextBlock();

            helpTextBlock.Margin       = new Thickness(5);
            helpTextBlock.TextWrapping = TextWrapping.WrapWithOverflow;
            helpTextBlock.Text         =
                "UDT will create a cut section for each pattern match during parsing." +
                "When parsing is done, overlapping cut sections get merged together and a new parsing pass is applied to do the actual cutting." +
                "\n\nNote: The \"Player Selection\" settings are respected by all filters except \"Chat\". " +
                "In other words, it will use every chat message to look for matches." +
                "\n\nExample of cut section merging: suppose we have 2 matches, the first at 1:27 and the second at 1:30 with " +
                "start and end time offsets 10 and 8." +
                "UDT will create 2 cut sections: 1:17-1:35 and 1:20-1:38, which then get merged into 1: 1:17-1:38.";

            var helpGroupBox = new GroupBox();

            helpGroupBox.Margin = new Thickness(5);
            helpGroupBox.Header = "Help";
            helpGroupBox.HorizontalAlignment = HorizontalAlignment.Left;
            helpGroupBox.VerticalAlignment   = VerticalAlignment.Top;
            helpGroupBox.Content             = helpTextBlock;

            var rootPanel = new WrapPanel();

            rootPanel.HorizontalAlignment = HorizontalAlignment.Stretch;
            rootPanel.VerticalAlignment   = VerticalAlignment.Stretch;
            rootPanel.Margin      = new Thickness(5);
            rootPanel.Orientation = Orientation.Horizontal;
            rootPanel.Children.Add(_patternsGroupBox.RootElement);
            rootPanel.Children.Add(playerSelectionGroupBox);
            rootPanel.Children.Add(actionsGroupBox);
            rootPanel.Children.Add(helpGroupBox);

            var scrollViewer = new ScrollViewer();

            scrollViewer.HorizontalAlignment = HorizontalAlignment.Stretch;
            scrollViewer.VerticalAlignment   = VerticalAlignment.Stretch;
            scrollViewer.Margin = new Thickness(5);
            scrollViewer.HorizontalScrollBarVisibility = ScrollBarVisibility.Disabled;
            scrollViewer.VerticalScrollBarVisibility   = ScrollBarVisibility.Auto;
            scrollViewer.Content = rootPanel;

            return(scrollViewer);
        }
Exemplo n.º 4
0
        private FrameworkElement CreateCutByFragTab()
        {
            _playerMODFilters = new FilterGroupBox("Cause of Death Filters", UDT_DLL.udtStringArray.PlayerMeansOfDeath, 3);
            // @TODO: Power-up Filters

            var minFragCountEditBox = new TextBox();
            _minFragCountEditBox = minFragCountEditBox;
            minFragCountEditBox.Width = 40;
            minFragCountEditBox.Text = _app.Config.FragCutMinFragCount.ToString();

            var timeBetweenFragsEditBox = new TextBox();
            _timeBetweenFragsEditBox = timeBetweenFragsEditBox;
            timeBetweenFragsEditBox.Width = 40;
            timeBetweenFragsEditBox.Text = _app.Config.FragCutTimeBetweenFrags.ToString();

            var allowSelfKillsCheckBox = new CheckBox();
            _allowSelfKillsCheckBox = allowSelfKillsCheckBox;
            allowSelfKillsCheckBox.HorizontalAlignment = HorizontalAlignment.Left;
            allowSelfKillsCheckBox.VerticalAlignment = VerticalAlignment.Center;
            allowSelfKillsCheckBox.IsChecked = _app.Config.FragCutAllowSelfKills;
            allowSelfKillsCheckBox.ToolTip = "Self kills are suicides where the player shot himself with a weapon";

            var allowTeamKillsCheckBox = new CheckBox();
            _allowTeamKillsCheckBox = allowTeamKillsCheckBox;
            allowTeamKillsCheckBox.HorizontalAlignment = HorizontalAlignment.Left;
            allowTeamKillsCheckBox.VerticalAlignment = VerticalAlignment.Center;
            allowTeamKillsCheckBox.IsChecked = _app.Config.FragCutAllowTeamKills;

            var allowAnyDeathCheckBox = new CheckBox();
            _allowAnyDeathCheckBox = allowAnyDeathCheckBox;
            allowAnyDeathCheckBox.HorizontalAlignment = HorizontalAlignment.Left;
            allowAnyDeathCheckBox.VerticalAlignment = VerticalAlignment.Center;
            allowAnyDeathCheckBox.IsChecked = _app.Config.FragCutAllowAnyDeath;
            allowAnyDeathCheckBox.ToolTip = "This includes suicides where the killer is the world: lava, fall damage, hurt triggers, etc";

            var rulesPanelList = new List<Tuple<FrameworkElement, FrameworkElement>>();
            rulesPanelList.Add(App.CreateTuple("Min. Frag Count", minFragCountEditBox));
            rulesPanelList.Add(App.CreateTuple("Max. Time Between Frags [s]", timeBetweenFragsEditBox));
            rulesPanelList.Add(App.CreateTuple("Allow Self Kills?", allowSelfKillsCheckBox));
            rulesPanelList.Add(App.CreateTuple("Allow Any Death?", allowAnyDeathCheckBox));
            rulesPanelList.Add(App.CreateTuple("Allow Team Kills?", allowTeamKillsCheckBox));

            var rulesPanel = WpfHelper.CreateDualColumnPanel(rulesPanelList, 175, 5);
            rulesPanel.HorizontalAlignment = HorizontalAlignment.Center;
            rulesPanel.VerticalAlignment = VerticalAlignment.Center;

            var rulesGroupBox = new GroupBox();
            rulesGroupBox.Header = "Frag Rules";
            rulesGroupBox.HorizontalAlignment = HorizontalAlignment.Left;
            rulesGroupBox.VerticalAlignment = VerticalAlignment.Top;
            rulesGroupBox.Margin = new Thickness(5);
            rulesGroupBox.Content = rulesPanel;

            var cutButton = new Button();
            cutButton.HorizontalAlignment = HorizontalAlignment.Left;
            cutButton.VerticalAlignment = VerticalAlignment.Top;
            cutButton.Content = "Cut!";
            cutButton.Width = 75;
            cutButton.Height = 25;
            cutButton.Margin = new Thickness(5);
            cutButton.Click += (obj, args) => OnCutByFragClicked();

            var actionsGroupBox = new GroupBox();
            actionsGroupBox.HorizontalAlignment = HorizontalAlignment.Left;
            actionsGroupBox.VerticalAlignment = VerticalAlignment.Top;
            actionsGroupBox.Margin = new Thickness(5);
            actionsGroupBox.Header = "Actions";
            actionsGroupBox.Content = cutButton;

            var helpTextBlock = new TextBlock();
            helpTextBlock.Margin = new Thickness(5);
            helpTextBlock.TextWrapping = TextWrapping.WrapWithOverflow;
            helpTextBlock.Text =
                "Self-kills are suicides where the player shot himself with a weapon." +
                "\nDeaths can include 'suicides' where the killer is the world: lava, fall damage, hurt triggers, etc.";

            var helpGroupBox = new GroupBox();
            helpGroupBox.Margin = new Thickness(5);
            helpGroupBox.Header = "Help";
            helpGroupBox.HorizontalAlignment = HorizontalAlignment.Left;
            helpGroupBox.VerticalAlignment = VerticalAlignment.Top;
            helpGroupBox.Content = helpTextBlock;

            var rootPanel = new WrapPanel();
            rootPanel.HorizontalAlignment = HorizontalAlignment.Stretch;
            rootPanel.VerticalAlignment = VerticalAlignment.Stretch;
            rootPanel.Margin = new Thickness(5);
            rootPanel.Orientation = Orientation.Horizontal;
            rootPanel.Children.Add(rulesGroupBox);
            rootPanel.Children.Add(actionsGroupBox);
            rootPanel.Children.Add(helpGroupBox);
            rootPanel.Children.Add(new WpfHelper.WrapPanelNewLine());
            rootPanel.Children.Add(_playerMODFilters.RootElement);

            var scrollViewer = new ScrollViewer();
            scrollViewer.HorizontalAlignment = HorizontalAlignment.Stretch;
            scrollViewer.VerticalAlignment = VerticalAlignment.Stretch;
            scrollViewer.Margin = new Thickness(5);
            scrollViewer.HorizontalScrollBarVisibility = ScrollBarVisibility.Disabled;
            scrollViewer.VerticalScrollBarVisibility = ScrollBarVisibility.Auto;
            scrollViewer.Content = rootPanel;

            return scrollViewer;
        }