<commit_before>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace WebImageDownloader
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {

        private Model model;

        public MainWindow()
        {
            InitializeComponent();
            model = Model.GetInstance();
            LoadSettings();
        }

        private void LoadSettings()
        {
            this.Topmost = Properties.Settings.Default.TopMost;
            OpacitySlider.Value = Properties.Settings.Default.WindowOpacity;
        }

        private void SaveSettings()
        {
            Properties.Settings.Default.WindowOpacity = this.Opacity;
            Properties.Settings.Default.TopMost = this.Topmost;
            Properties.Settings.Default.Save();
        }

        private void CloseButton_Click(object sender, RoutedEventArgs e)
        {
            SaveSettings();
            Close();
        }

        private void MinimizeButton_Click(object sender, RoutedEventArgs e)
        {
            WindowState = WindowState.Minimized;
        }

        private void WindowMain_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            DragMove();
        }

        private void WindowMain_Closing(object sender, System.ComponentModel.CancelEventArgs e)
        {
            SaveSettings();
        }
    }<commit_msg>Removes duplicate call to SaveSettings()<commit_after>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace WebImageDownloader
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {

        private Model model;

        public MainWindow()
        {
            InitializeComponent();
            model = Model.GetInstance();
            LoadSettings();
        }

        private void LoadSettings()
        {
            this.Topmost = Properties.Settings.Default.TopMost;
            OpacitySlider.Value = Properties.Settings.Default.WindowOpacity;
        }

        private void SaveSettings()
        {
            Properties.Settings.Default.WindowOpacity = this.Opacity;
            Properties.Settings.Default.TopMost = this.Topmost;
            Properties.Settings.Default.Save();
        }

        private void CloseButton_Click(object sender, RoutedEventArgs e)
        {
            Close();
        }

        private void MinimizeButton_Click(object sender, RoutedEventArgs e)
        {
            WindowState = WindowState.Minimized;
        }

        private void WindowMain_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            DragMove();
        }

        private void WindowMain_Closing(object sender, System.ComponentModel.CancelEventArgs e)
        {
            SaveSettings();
        }
    }
{'fraction_non_alphanumeric': 0.0855690482914431, 'fraction_numerical': 0.0, 'mean_word_length': 2.2796296296296297, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3730612', 'n_tokens_mistral': 893, 'n_tokens_neox': 875, 'n_words': 193}