<commit_before>﻿namespace FluentTest
{
    using System;
    using System.Diagnostics;
    using System.Linq;
    using System.Text;
    using System.Threading;
    using System.Windows;
    using System.Windows.Controls;
    using System.Windows.Input;
    using System.Windows.Threading;
    using Fluent;
    using FluentTest.ViewModels;
    using Button = Fluent.Button;

    /// <summary>
    /// Interaction logic for TestContent.xaml
    /// </summary>
    public partial class TestContent
    {
        public TestContent()
        {
            this.InitializeComponent();

            this.Loaded += this.HandleTestContentLoaded;

            //Ribbon.Localization.Culture = new CultureInfo("ru-RU");

            this.buttonBold.Checked += (s, e) => Debug.WriteLine("Checked");
            this.buttonBold.Unchecked += (s, e) => Debug.WriteLine("Unchecked");

            this.DataContext = new MainViewModel();
        }

        private static void OnScreenTipHelpPressed(object sender, ScreenTipHelpEventArgs e)
        {
            Process.Start((string)e.HelpTopic);
        }

        private void HandleTestContentLoaded(object sender, RoutedEventArgs e)
        {
            ScreenTip.HelpPressed += OnScreenTipHelpPressed;
        }

        private void OnLauncherButtonClick(object sender, RoutedEventArgs e)
        {
            var groupBox = (RibbonGroupBox)sender;

            var wnd = new Window
                {
                    Content = string.Format("Launcher-Window for: {0}", groupBox.Header),
                    Owner = Window.GetWindow(this)
                };

            wnd.Show();
        }

        private void OnSplitClick(object sender, RoutedEventArgs e)
        {
            MessageBox.Show("Split Clicked!!!");
        }

        private void OnEnlargeClick(object sender, RoutedEventArgs e)
        {
            this.InRibbonGallery.Enlarge();
        }

        private void OnReduceClick(object sender, RoutedEventArgs e)
        {
            this.InRibbonGallery.Reduce();
        }

        public Button CreateRibbonButton()
        {
            var button = new Button();
            var fooCommand1 = new FooCommand1();
            button.Command = fooCommand1.ItemCommand;

            button.Header = "Foo";

            this.CommandBindings.Add(fooCommand1.ItemCommandBinding);
            return button;
        }

        #region Theming

        private enum Theme
        {
            Office2010,
            Office2013,
			Windows8
        }

        private Theme? currentTheme;

        private void OnOffice2013Click(object sender, RoutedEventArgs e)
        {
            this.ChangeTheme(Theme.Office2013, "pack://application:,,,/Fluent;component/Themes/Office2013/Generic.xaml");
        }

        private void OnOffice2010SilverClick(object sender, RoutedEventArgs e)
        {
            this.ChangeTheme(Theme.Office2010, "pack://application:,,,/Fluent;component/Themes/Office2010/Silver.xaml");
        }

        private void OnOffice2010BlackClick(object sender, RoutedEventArgs e)
        {
            this.ChangeTheme(Theme.Office2010, "pack://application:,,,/Fluent;component/Themes/Office2010/Black.xaml");
        }

        private void OnOffice2010BlueClick(object sender, RoutedEventArgs e)
        {
            this.ChangeTheme(Theme.Office2010, "pack://application:,,,/Fluent;component/Themes/Office2010/Blue.xaml");
        }

		private void OnWindows8Click(object sender, RoutedEventArgs e)
		{
			//this.ChangeTheme(Theme.Windows8, "pack://application:,,,/Fluent;component/Themes/Windows8/Silver.xaml");
			this.ChangeTheme(Theme.Windows8, "pack://application:,,,/Fluent;component/Themes/Office2010/Silver.xaml");
		}


        private void ChangeTheme(Theme theme, string color)
        {
            this.Dispatcher.BeginInvoke(DispatcherPriority.ApplicationIdle, (ThreadStart)(() =>
            {
                var owner = Window.GetWindow(this);<commit_msg>Fix stupid error in test application.<commit_after>﻿namespace FluentTest
{
    using System;
    using System.Diagnostics;
    using System.Linq;
    using System.Text;
    using System.Threading;
    using System.Windows;
    using System.Windows.Controls;
    using System.Windows.Input;
    using System.Windows.Threading;
    using Fluent;
    using FluentTest.ViewModels;
    using Button = Fluent.Button;

    /// <summary>
    /// Interaction logic for TestContent.xaml
    /// </summary>
    public partial class TestContent
    {
        public TestContent()
        {
            this.InitializeComponent();

            this.Loaded += this.HandleTestContentLoaded;

            //Ribbon.Localization.Culture = new CultureInfo("ru-RU");

            this.buttonBold.Checked += (s, e) => Debug.WriteLine("Checked");
            this.buttonBold.Unchecked += (s, e) => Debug.WriteLine("Unchecked");

            this.DataContext = new MainViewModel();
        }

        private static void OnScreenTipHelpPressed(object sender, ScreenTipHelpEventArgs e)
        {
            Process.Start((string)e.HelpTopic);
        }

        private void HandleTestContentLoaded(object sender, RoutedEventArgs e)
        {
            ScreenTip.HelpPressed += OnScreenTipHelpPressed;
        }

        private void OnLauncherButtonClick(object sender, RoutedEventArgs e)
        {
            var groupBox = (RibbonGroupBox)sender;

            var wnd = new Window
                {
                    Content = string.Format("Launcher-Window for: {0}", groupBox.Header),
                    Owner = Window.GetWindow(this)
                };

            wnd.Show();
        }

        private void OnSplitClick(object sender, RoutedEventArgs e)
        {
            MessageBox.Show("Split Clicked!!!");
        }

        private void OnEnlargeClick(object sender, RoutedEventArgs e)
        {
            this.InRibbonGallery.Enlarge();
        }

        private void OnReduceClick(object sender, RoutedEventArgs e)
        {
            this.InRibbonGallery.Reduce();
        }

        public Button CreateRibbonButton()
        {
            var button = new Button();
            var fooCommand1 = new FooCommand1();
            button.Command = fooCommand1.ItemCommand;

            button.Header = "Foo";

            this.CommandBindings.Add(fooCommand1.ItemCommandBinding);
            return button;
        }

        #region Theming

        private enum Theme
        {
            Office2010,
            Office2013,
			Windows8
        }

        private Theme? currentTheme;

        private void OnOffice2013Click(object sender, RoutedEventArgs e)
        {
            this.ChangeTheme(Theme.Office2013, "pack://application:,,,/Fluent;component/Themes/Office2013/Generic.xaml");
        }

        private void OnOffice2010SilverClick(object sender, RoutedEventArgs e)
        {
            this.ChangeTheme(Theme.Office2010, "pack://application:,,,/Fluent;component/Themes/Office2010/Silver.xaml");
        }

        private void OnOffice2010BlackClick(object sender, RoutedEventArgs e)
        {
            this.ChangeTheme(Theme.Office2010, "pack://application:,,,/Fluent;component/Themes/Office2010/Black.xaml");
        }

        private void OnOffice2010BlueClick(object sender, RoutedEventArgs e)
        {
            this.ChangeTheme(Theme.Office2010, "pack://application:,,,/Fluent;component/Themes/Office2010/Blue.xaml");
        }

		private void OnWindows8Click(object sender, RoutedEventArgs e)
		{
			this.ChangeTheme(Theme.Windows8, "pack://application:,,,/Fluent;component/Themes/Windows8/Silver.xaml");
		}


        private void ChangeTheme(Theme theme, string color)
        {
            this.Dispatcher.BeginInvoke(DispatcherPriority.ApplicationIdle, (ThreadStart)(() =>
            {
                var owner = Window.GetWindow(this);
{'fraction_non_alphanumeric': 0.10035659704533877, 'fraction_numerical': 0.01719307182883342, 'mean_word_length': 2.1601609657947685, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '751554', 'n_tokens_mistral': 2278, 'n_tokens_neox': 2054, 'n_words': 396}