Exemplo n.º 1
0
        private void ChangeSettings_Click(object sender, EventArgs e)
        {
            AcmeSettingsHost settings = new AcmeSettingsHost();

            settings.Telemetry = _telemetry;

            AcmeOptions tempOptions = new AcmeOptions(null);

            settings.TopLeft       = new Point(Left, Top);
            settings.EditorOptions = tempOptions;
            settings.Telemetry     = _telemetry;

            DialogResult dr = settings.ShowDialog();

            if (dr == DialogResult.OK)
            {
                _editorOptions = tempOptions.Clone();
                SetDisplayOptions();
                Display.Chemistry = _lastCml;
                RedoStack.SetOptions(_editorOptions);
                UndoStack.SetOptions(_editorOptions);
                UndoStack.ListOfDisplays.ItemsSource = StackToList(_undoStack);
                RedoStack.ListOfDisplays.ItemsSource = StackToList(_redoStack);
            }

            settings.Close();
        }
Exemplo n.º 2
0
        private void ChangeAcmeSettings_Click(object sender, EventArgs e)
        {
            AcmeSettingsHost settings = new AcmeSettingsHost();

            settings.Telemetry = _telemetry;
            settings.TopLeft   = new System.Windows.Point(Left + 24, Top + 24);

            var tempOptions = _editorOptions.Clone();

            settings.EditorOptions = tempOptions;

            DialogResult dr = settings.ShowDialog();

            if (dr == DialogResult.OK)
            {
                _editorOptions = tempOptions.Clone();
                OptionsChanged();
            }

            settings.Close();
        }