Ejemplo n.º 1
0
 private void cbLocation_SelectedIndexChanged(object sender, EventArgs e)
 {
     this.m_OsdLocation = (eLocation)cbLocation.SelectedIndex;
     tbLocation.Enabled = m_OsdLocation == eLocation.Manual;
     updateLocation();
 }
Ejemplo n.º 2
0
        private void loadSettings()
        {
            // Global config
            this.cbUseGlobalConfig.Checked = Properties.Settings.Default.UseGlobalConfig;

            // Registry
            this.checkBoxStartWithWindows.Checked = this.isOnStartup();

            // Sound
            this.m_EnableSound = Properties.Settings.Default.EnableSound;
            this.checkBoxEnableSound.Checked = this.m_EnableSound;

            if (this.m_EnableSound)
            {
                this.loadSound();
            }

            // Location
            try
            {
                this.m_OsdLocation = (eLocation)Enum.Parse(typeof(eLocation), Properties.Settings.Default.OsdLocation);
            }
            catch
            {
                this.m_OsdLocation = eLocation.BottomRight;
            }
            this.cbLocation.SelectedIndex = (int)this.m_OsdLocation;
            tbLocation.Text = new PointConverter().ConvertToString(Properties.Settings.Default.OsdPoint);

            // Text
            tbCapsLockOn.Text    = Properties.Settings.Default.CapsLockOn.Trim();
            tbCapsLockOff.Text   = Properties.Settings.Default.CapsLockOff.Trim();
            tbNumLockOn.Text     = Properties.Settings.Default.NumLockOn.Trim();
            tbNumLockOff.Text    = Properties.Settings.Default.NumLockOff.Trim();
            tbScrollLockOn.Text  = Properties.Settings.Default.ScrollLockOn.Trim();
            tbScrollLockOff.Text = Properties.Settings.Default.ScrollLockOff.Trim();
            tbInsert.Text        = Properties.Settings.Default.InsertPress.Trim();

            numOpacity.Value    = (decimal)Properties.Settings.Default.Opacity;
            cbOsdBorder.Checked = Properties.Settings.Default.OsdBorder;

            // Animation
            try
            {
                this.m_HideAnimation = (AnimateWindowFlags)Enum.Parse(typeof(AnimateWindowFlags), Properties.Settings.Default.HideAnimation);
            }
            catch
            {
                this.m_HideAnimation = AnimateWindowFlags.AW_CENTER;
            }
            this.selectAnimationCb(this.m_HideAnimation);
            this.numAnimationSpeed.Value = Properties.Settings.Default.AnimationSpeed;

            // Interval
            this.numInterval.Value = Properties.Settings.Default.Interval;

            // Style
            try
            {
                this.m_Style = (eStyle)Enum.Parse(typeof(eStyle), Properties.Settings.Default.OsdStyle);
            }
            catch
            {
                this.m_Style = eStyle.Normal;
            }
            this.selectStyleCb(this.m_Style);

            this.updateModifiers();
            this.applySettings();
            this.updateStickyOSD();
        }