/* This file is part of AHD Subtitles Maker Professional
   A program can create and edit subtitles

   Copyright © Ala I Hadid 2009 - 2012

   This program is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation, either version 3 of the License, or
   (at your option) any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace AHD.SM
{
    public partial class sc_General : ASMSettingsControl
    {
        public sc_General()
        {
            InitializeComponent();
            checkBox_editMoreThanOneSubtitleUsingEditor.Checked = Program.Settings.EditMoreThanOneSubtitleUsingEditorWindow;
            checkBox_ImportDeepSearch.Checked = Program.Settings.ImportDeepSearch;
            checkBox_newProject.Checked = Program.Settings.ShowNewProjectWizard;
            checkBox_autoCheckForErrors.Checked = Program.Settings.AutoCheckForErrors;
            checkBox_autoSelecteSubtitlesTrack.Checked = Program.Settings.AutoSelectFirstTrack;
            checkBox_askWhenChangingRTL.Checked = Program.Settings.AskWhenChangingRTL;
            checkBox_trackTemplate.Checked = Program.Settings.NewSubtitlesTrackTemplate;
            checkBox_editCreatedSubtitle.Checked = Program.Settings.EditSubtitleAfterAddUsingQuickMode;
            checkBox_pauseMedia.Checked = Program.Settings.PauseAfterAddUsingQuickMode;
            checkBox_warnWhenID3Detected.Checked = Program.Settings.WarnMeWhenID3Detected;
            checkBox_wanrMeWhenMKVLoaded.Checked = Program.Settings.WarnMeWhenMKVDetected;
        }
        public override string ToString()
        {
            return Program.ResourceManager.GetString("Title_General");
        }
        public override void SaveSettings()
        {
            Program.Settings.EditMoreThanOneSubtitleUsingEditorWindow = checkBox_editMoreThanOneSubtitleUsingEditor.Checked;
            Program.Settings.ImportDeepSearch = checkBox_ImportDeepSearch.Checked;
            Program.Settings.ShowNewProjectWizard = checkBox_newProject.Checked;
            Program.Settings.AutoCheckForErrors = checkBox_autoCheckForErrors.Checked;
            Program.Settings.AutoSelectFirstTrack = checkBox_autoSelecteSubtitlesTrack.Checked;
            Program.Settings.AskWhenChangingRTL = checkBox_askWhenChangingRTL.Checked;
            Program.Settings.NewSubtitlesTrackTemplate = checkBox_trackTemplate.Checked;
            Program.Settings.EditSubtitleAfterAddUsingQuickMode = checkBox_editCreatedSubtitle.Checked;
            Program.Settings.PauseAfterAddUsingQuickMode = checkBox_pauseMedia.Checked;
            Program.Settings.WarnMeWhenID3Detected = checkBox_warnWhenID3Detected.Checked;
            Program.Settings.WarnMeWhenMKVDetected = checkBox_wanrMeWhenMKVLoaded.Checked;
            base.SaveSettings();
        }
        public override void DefaultSettings()
        {
            checkBox_editMoreThanOneSubtitleUsingEditor.Checked = true;
            checkBox_ImportDeepSearch.Checked = false;
            checkBox_newProject.Checked = true;
            checkBox_autoCheckForErrors.Checked = true;
            checkBox_autoSelecteSubtitlesTrack.Checked = true;
            checkBox_askWhenChangingRTL.Checked = true;
            checkBox_trackTemplate.Checked = true;
            checkBox_editCreatedSubtitle.Checked = true;
            checkBox_pauseMedia.Checked = true;
            checkBox_warnWhenID3Detected.Checked = true;
            checkBox_wanrMeWhenMKVLoaded.Checked = true;
        }
    }
}
