Exemplo n.º 1
0
        private void Form_Marks_Closing(object sender, FormClosingEventArgs e)
        {
            var xml = new XMLProfileSettings();

            xml.PutSetting(XMLProfileSettings.SettingType.AppSettings, string.Format("{0}/StandardNudge", Name), Convert.ToInt32(numericUpDownStandardNudge.Value));
            xml.PutSetting(XMLProfileSettings.SettingType.AppSettings, string.Format("{0}/SuperNudge", Name), Convert.ToInt32(numericUpDownSuperNudge.Value));
        }
Exemplo n.º 2
0
        private void outputFormatComboBox_SelectedIndexChanged(object sender, EventArgs e)
        {
            ComboBox comboBox = (ComboBox)sender;

            _profile.PutSetting(XMLProfileSettings.SettingType.AppSettings, string.Format("{0}/ExportFormat", Name), (int)comboBox.SelectedIndex);
            chkCompress.Enabled = _exportOps.CanCompress(outputFormatComboBox.SelectedItem.ToString());
            SetUniverseVersionEnabled();
        }
Exemplo n.º 3
0
        private void SaveWindowState()
        {
            XMLProfileSettings xml = new XMLProfileSettings();

            xml.PutSetting(XMLProfileSettings.SettingType.AppSettings, string.Format("{0}/WindowHeight", Name), Size.Height);
            xml.PutSetting(XMLProfileSettings.SettingType.AppSettings, string.Format("{0}/WindowWidth", Name), Size.Width);
            xml.PutSetting(XMLProfileSettings.SettingType.AppSettings, string.Format("{0}/WindowLocationX", Name), Location.X);
            xml.PutSetting(XMLProfileSettings.SettingType.AppSettings, string.Format("{0}/WindowLocationY", Name), Location.Y);
            xml.PutSetting(XMLProfileSettings.SettingType.AppSettings, string.Format("{0}/WindowState", Name),
                           WindowState.ToString());
        }
Exemplo n.º 4
0
        private void Form_ToolPalette_FormClosing(object sender, FormClosingEventArgs e)
        {
            if (_colorGradientLibrary != null)
            {
                _colorGradientLibrary.GradientChanged -= GradientLibrary_GradientChanged;
            }
            var xml = new XMLProfileSettings();

            xml.PutSetting(XMLProfileSettings.SettingType.AppSettings, string.Format("{0}/GradientLibraryTextScale", Name), _gradientLibraryTextScale.ToString());
            xml.PutSetting(XMLProfileSettings.SettingType.AppSettings, string.Format("{0}/GradientLibraryImageScale", Name), _gradientLibraryImageScale.ToString());
        }
Exemplo n.º 5
0
        private void Form_ToolPalette_FormClosing(object sender, FormClosingEventArgs e)
        {
            if (_curveLibrary != null)
            {
                _curveLibrary.CurveChanged -= CurveLibrary_CurveChanged;
            }
            var xml = new XMLProfileSettings();

            xml.PutSetting(XMLProfileSettings.SettingType.AppSettings, string.Format("{0}/CurveLibraryImageScale", Name), _curveLibraryImageScale.ToString(CultureInfo.InvariantCulture));
            xml.PutSetting(XMLProfileSettings.SettingType.AppSettings, string.Format("{0}/CurveLibraryTextScale", Name), _curveLibraryTextScale.ToString(CultureInfo.InvariantCulture));
        }
Exemplo n.º 6
0
        private void SaveWindowState()
        {
            XMLProfileSettings xml = new XMLProfileSettings();
            var name = $"OpenGLPreview_{InstanceId}";

            xml.PutSetting(XMLProfileSettings.SettingType.AppSettings, string.Format("{0}/ClientHeight", name), ClientSize.Height);
            xml.PutSetting(XMLProfileSettings.SettingType.AppSettings, string.Format("{0}/ClientWidth", name), ClientSize.Width);
            xml.PutSetting(XMLProfileSettings.SettingType.AppSettings, string.Format("{0}/WindowLocationX", name), Location.X);
            xml.PutSetting(XMLProfileSettings.SettingType.AppSettings, string.Format("{0}/WindowLocationY", name), Location.Y);
            xml.PutSetting(XMLProfileSettings.SettingType.AppSettings, string.Format("{0}/CameraPositionX", name), _camera.Position.X);
            xml.PutSetting(XMLProfileSettings.SettingType.AppSettings, string.Format("{0}/CameraPositionY", name), _camera.Position.Y);
            xml.PutSetting(XMLProfileSettings.SettingType.AppSettings, string.Format("{0}/CameraPositionZ", name), _camera.Position.Z);
            //xml.PutSetting(XMLProfileSettings.SettingType.AppSettings, string.Format("{0}/WindowState", Name), WindowState.ToString());

            xml.PutSetting(XMLProfileSettings.SettingType.AppSettings, string.Format("{0}/ShowStatus", name), _showStatus);
            xml.PutSetting(XMLProfileSettings.SettingType.AppSettings, string.Format("{0}/AlwaysOnTop", name), _alwaysOnTop);
            xml.PutSetting(XMLProfileSettings.SettingType.AppSettings, string.Format("{0}/EnableLightScaling", name), _enableLightScaling);
        }
Exemplo n.º 7
0
        private void SaveWindowState()
        {
            XMLProfileSettings xml = new XMLProfileSettings();
            var name = $"Preview_{InstanceId}";

            if (WindowState != FormWindowState.Minimized)
            {
                xml.PutSetting(XMLProfileSettings.SettingType.AppSettings, string.Format("{0}/WindowHeight", name), Size.Height);
                xml.PutSetting(XMLProfileSettings.SettingType.AppSettings, string.Format("{0}/WindowWidth", name), Size.Width);
                xml.PutSetting(XMLProfileSettings.SettingType.AppSettings, string.Format("{0}/WindowLocationX", name), Location.X);
                xml.PutSetting(XMLProfileSettings.SettingType.AppSettings, string.Format("{0}/WindowLocationY", name), Location.Y);
            }

            xml.PutSetting(XMLProfileSettings.SettingType.AppSettings, string.Format("{0}/WindowState", name),
                           WindowState.ToString());
            xml.PutSetting(XMLProfileSettings.SettingType.AppSettings, string.Format("{0}/ShowStatus", name), _showStatus);
            xml.PutSetting(XMLProfileSettings.SettingType.AppSettings, string.Format("{0}/ShowBorders", name), _showBorders);
            xml.PutSetting(XMLProfileSettings.SettingType.AppSettings, string.Format("{0}/AlwaysOnTop", name), _alwaysOnTop);
            xml.PutSetting(XMLProfileSettings.SettingType.AppSettings, string.Format("{0}/LockPosition", name), _lockPosition);
            xml.PutSetting(XMLProfileSettings.SettingType.AppSettings, string.Format("{0}/ZoomLevel", name), ZoomLevel);
        }
Exemplo n.º 8
0
        private void SaveWindowState()
        {
            XMLProfileSettings xml = new XMLProfileSettings();
            var name = string.Format("Preview_{0}", XmlConvert.EncodeLocalName(DisplayName));

            if (WindowState != FormWindowState.Minimized)
            {
                xml.PutSetting(XMLProfileSettings.SettingType.AppSettings, string.Format("{0}/WindowHeight", name), Size.Height);
                xml.PutSetting(XMLProfileSettings.SettingType.AppSettings, string.Format("{0}/WindowWidth", name), Size.Width);
                xml.PutSetting(XMLProfileSettings.SettingType.AppSettings, string.Format("{0}/WindowLocationX", name), Location.X);
                xml.PutSetting(XMLProfileSettings.SettingType.AppSettings, string.Format("{0}/WindowLocationY", name), Location.Y);
            }

            xml.PutSetting(XMLProfileSettings.SettingType.AppSettings, string.Format("{0}/WindowState", name),
                           WindowState.ToString());
            xml.PutSetting(XMLProfileSettings.SettingType.AppSettings, string.Format("{0}/ShowStatus", name), _showStatus);
            xml.PutSetting(XMLProfileSettings.SettingType.AppSettings, string.Format("{0}/ShowBorders", name), _showBorders);
            xml.PutSetting(XMLProfileSettings.SettingType.AppSettings, string.Format("{0}/AlwaysOnTop", name), _alwaysOnTop);
            xml.PutSetting(XMLProfileSettings.SettingType.AppSettings, string.Format("{0}/LockPosition", name), _lockPosition);
        }
Exemplo n.º 9
0
        private void outputFormatComboBox_SelectedIndexChanged(object sender, EventArgs e)
        {
            ComboBox comboBox = (ComboBox)sender;

            _profile.PutSetting(XMLProfileSettings.SettingType.AppSettings, string.Format("{0}/ExportFormat", Name), (int)comboBox.SelectedIndex);
        }
Exemplo n.º 10
0
        private void Form_ColorLibrary_FormClosing(object sender, FormClosingEventArgs e)
        {
            var xml = new XMLProfileSettings();

            xml.PutSetting(XMLProfileSettings.SettingType.AppSettings, string.Format("{0}/ColorLibraryScale", Name), _colorLibraryScale.ToString(CultureInfo.InvariantCulture));
        }