Beispiel #1
0
 private void WriteGeneralNodes()
 {
     _preferences.SetString("MouseWheelVerticalDelta", textBoxMouseWheelVertical.Text);
     _preferences.SetString("MouseWheelHorizontalDelta", textBoxMouseWheelHorizontal.Text);
     _preferences.SetString("ShutdownTime",
                            !dateTimePickerAutoShutdownTime.Checked
                                ? string.Empty
                                : dateTimePickerAutoShutdownTime.Value.ToString("h:mm tt"));
     _preferences.SetString("AutoUpdateCheckFreq", cbUpdateFrequency.SelectedItem.ToString());
     _preferences.SetInteger("HistoryImages", (int)numericUpDownHistoryImages.Value);
     _preferences.SetInteger("RecentFiles", (int)nudRecentFiles.Value);
     _preferences.SetBoolean("AutoSaveToolbars", cbToolbarAutoSave.Checked);
 }
Beispiel #2
0
 private void buttonSet_Click(object sender, EventArgs e)
 {
     _preferences.SetInteger("SoundDevice", comboBoxDevice.SelectedIndex, 0);
     _preferences.SaveSettings();
     buttonSet.Enabled = false;
     MessageBox.Show(Resources.RestartForChange, Vendor.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
 }
Beispiel #3
0
        public void ExecuteStop(int contextHandle)
        {
            ExecutionContext context;

            if (!_registeredContexts.TryGetValue(contextHandle, out context))
            {
                return;
            }
            if (!(((context.SynchronousEngineInstance != null) && (context.Object != null)) && context.Object.CanBePlayed))
            {
                return;
            }
            try {
                context.SynchronousEngineInstance.Stop();
                if (_preferences.GetBoolean("SavePlugInDialogPositions"))
                {
                    var saveSettings = false;
                    foreach (var form in context.OutputPlugInForms)
                    {
                        var base2 = (OutputPlugInUIBase)form;
                        if (base2.WindowState == FormWindowState.Minimized)
                        {
                            continue;
                        }
                        _preferences.SetInteger(form.Name + ".x", base2.Location.X);
                        _preferences.SetInteger(form.Name + ".y", base2.Location.Y);
                        saveSettings = true;
                    }
                    if (saveSettings)
                    {
                        _preferences.SaveSettings();
                    }
                }
                context.OutputPlugInForms.Clear();
                GC.Collect();
            }
            catch (Exception exception) {
                LogError("ExecuteStop", exception);
            }
        }
Beispiel #4
0
        private void PreferencesPreferenceChange(string preferenceName)
        {
            switch (preferenceName)
            {
            case "EventPeriod":
                if (_preferences.GetInteger("EventPeriod") < Vendor.MinimumEventPeriod)
                {
                    _preferences.SetInteger("EventPeriod", Vendor.MinimumEventPeriod);
                    MessageBox.Show(String.Format(Resources.VixenPlusForm_EventPeriodMin, Vendor.MinimumEventPeriod), Vendor.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Hand);
                }
                break;

            case "ShutdownTime":
                SetShutdownTime(_preferences.GetString("ShutdownTime"));
                break;
            }
        }