Beispiel #1
0
        public Statistics(Subtitle subtitle, string fileName, SubtitleFormat format)
        {
            UiUtil.PreInitialize(this);
            InitializeComponent();
            UiUtil.FixFonts(this);

            _subtitle = subtitle;
            _format   = format;

            _l   = Configuration.Settings.Language.Statistics;
            Text = string.IsNullOrEmpty(fileName) ? _l.Title : string.Format(_l.TitleWithFileName, fileName);
            groupBoxGeneral.Text    = _l.GeneralStatistics;
            groupBoxMostUsed.Text   = _l.MostUsed;
            labelMostUsedWords.Text = _l.MostUsedWords;
            labelMostUsedLines.Text = _l.MostUsedLines;
            buttonExport.Text       = _l.Export;
            buttonOK.Text           = Configuration.Settings.Language.General.Ok;
            UiUtil.FixLargeFonts(this, buttonOK);

            CalculateWordStatistics();
            CalculateGeneralStatistics();
            textBoxGeneral.Text            = _general;
            textBoxGeneral.SelectionStart  = 0;
            textBoxGeneral.SelectionLength = 0;
            textBoxGeneral.ScrollToCaret();
            textBoxMostUsedWords.Text = _mostUsedWords;

            CalculateMostUsedLines();
            textBoxMostUsedLines.Text = _mostUsedLines;
        }
Beispiel #2
0
        public Statistics(Subtitle subtitle, string fileName, SubtitleFormat format)
        {
            InitializeComponent();

            _subtitle = subtitle;
            _format   = format;

            _l = Configuration.Settings.Language.Statistics;
            if (string.IsNullOrEmpty(fileName))
            {
                Text = _l.Title;
            }
            else
            {
                Text = string.Format(_l.TitleWithFileName, fileName);
            }
            groupBoxGeneral.Text    = _l.GeneralStatistics;
            groupBoxMostUsed.Text   = _l.MostUsed;
            labelMostUsedWords.Text = _l.MostUsedWords;
            labelMostUsedLines.Text = _l.MostUsedLines;
            buttonOK.Text           = Configuration.Settings.Language.General.Ok;
            FixLargeFonts();

            CalculateGeneralStatistics();
            CalculateMostUsedWords();
            CalculateMostUsedLines();
        }
Beispiel #3
0
        public Statistics(Subtitle subtitle, string fileName, SubtitleFormat format)
        {
            InitializeComponent();

            _subtitle = subtitle;
            _format = format;

            _l = Configuration.Settings.Language.Statistics;
            if (string.IsNullOrEmpty(fileName))
                Text = _l.Title;
            else
                Text = string.Format(_l.TitleWithFileName, fileName);
            groupBoxGeneral.Text = _l.GeneralStatistics;
            groupBoxMostUsed.Text = _l.MostUsed;
            labelMostUsedWords.Text = _l.MostUsedWords;
            labelMostUsedLines.Text = _l.MostUsedLines;
            buttonExport.Text = _l.Export;
            buttonOK.Text = Configuration.Settings.Language.General.Ok;
            UiUtil.FixLargeFonts(this, buttonOK);

            CalculateGeneralStatistics();
            {
                textBoxGeneral.Text = _general;
                textBoxGeneral.SelectionStart = 0;
                textBoxGeneral.SelectionLength = 0;
                textBoxGeneral.ScrollToCaret();
            }
            CalculateMostUsedWords();
            {
                textBoxMostUsedWords.Text = _mostUsedWords;
            }
            CalculateMostUsedLines();
            {
                textBoxMostUsedLines.Text = _mostUsedLines;
            }
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="Statistics"/> class.
        /// </summary>
        /// <param name="subtitle">
        /// The subtitle.
        /// </param>
        /// <param name="fileName">
        /// The file name.
        /// </param>
        /// <param name="format">
        /// The format.
        /// </param>
        public Statistics(Subtitle subtitle, string fileName, SubtitleFormat format)
        {
            this.InitializeComponent();

            this._subtitle = subtitle;
            this._format = format;

            this._l = Configuration.Settings.Language.Statistics;
            if (string.IsNullOrEmpty(fileName))
            {
                this.Text = this._l.Title;
            }
            else
            {
                this.Text = string.Format(this._l.TitleWithFileName, fileName);
            }

            this.groupBoxGeneral.Text = this._l.GeneralStatistics;
            this.groupBoxMostUsed.Text = this._l.MostUsed;
            this.labelMostUsedWords.Text = this._l.MostUsedWords;
            this.labelMostUsedLines.Text = this._l.MostUsedLines;
            this.buttonExport.Text = this._l.Export;
            this.buttonOK.Text = Configuration.Settings.Language.General.Ok;
            Utilities.FixLargeFonts(this, this.buttonOK);

            this.CalculateGeneralStatistics();
            {
                this.textBoxGeneral.Text = this._general;
                this.textBoxGeneral.SelectionStart = 0;
                this.textBoxGeneral.SelectionLength = 0;
                this.textBoxGeneral.ScrollToCaret();
            }

            this.CalculateMostUsedWords();
            {
                this.textBoxMostUsedWords.Text = this._mostUsedWords;
            }

            this.CalculateMostUsedLines();
            {
                this.textBoxMostUsedLines.Text = this._mostUsedLines;
            }
        }