Esempio n. 1
0
        /// <summary>
        /// Loads settings specific to this window.
        /// Done only once when the window is created.
        /// </summary>
        private void loadSettings()
        {
            Pref p = MainModule.Pref;

            // load settings
            p.Load();

            // tell Windows not to change this position automatically
            this.StartPosition = FormStartPosition.Manual;

            // load position of this window
            Rectangle r;

            if (p.GetRect(PrefConstants.kMainForm, out r))
            {
                // RM 20050307 No longer change the size of the window.
                // This is because the window cannot be resized manually,
                // instead it adapts to the size of the inner video preview.
                this.Location = r.Location;
            }

            // restore last dir path
            mEditTrackFilename.Text = p[PrefConstants.kLastKmxPath];
            mEditDestFilename.Text  = p[PrefConstants.kLastDestPath];

            // restore generate options with default values
            mEditFps.Text     = p.getString(PrefConstants.kLastFps, "30");
            mEditMovieSx.Text = p.getString(PrefConstants.kLastMovieSx, "1280");
            mEditMovieSy.Text = p.getString(PrefConstants.kLastMovieSy, "720");
            mEditTrackSx.Text = p.getString(PrefConstants.kLastTrackSx, "500");
            mEditTrackSy.Text = p.getString(PrefConstants.kLastTrackSy, "200");

            // restore preview or render.
            // check on "false/render" so that the initial default be true/preview.
            bool isRender = p[PrefConstants.kWasPreview] == Boolean.FalseString;

            mRadioPreview.Checked = !isRender;
            mRadioRender.Checked  = !mRadioPreview.Checked;

            // <insert other setting stuff here>
        }