Exemplo n.º 1
0
        public FindReplaceDialog(string defaultSearchText,
                                 string defaultReplaceText, EditorPreferences preferences,
                                 FindReplace findReplace)
        {
            _findReplace = findReplace;
            _preferences = preferences;
            InitializeComponent();
            btnOK.Enabled = false;

            foreach (string previousSearch in preferences.RecentSearches)
            {
                cmbFind.Items.Add(previousSearch);
                cmbReplace.Items.Add(previousSearch);
            }

            cmbLookIn.Items.Add(LOOK_IN_CURRENT_DOCUMENT);
            cmbLookIn.Items.Add(LOOK_IN_CURRENT_PROJECT);
            cmbLookIn.Text = _lastSelectedLookIn ?? LOOK_IN_CURRENT_DOCUMENT;

            chkCaseSensitive.Checked = _lastSelectedCaseSensitive;

            cmbFind.Text    = defaultSearchText;
            cmbReplace.Text = defaultReplaceText;
            btnCancel.Left  = btnReplace.Left;
            cmbFind.Focus();
        }
Exemplo n.º 2
0
        public PreferencesEditor(EditorPreferences prefs)
        {
            InitializeComponent();
            _preferences = prefs;
			// just in case they had it set to something silly in 2.72
			if (_preferences.TabSize < udTabWidth.Minimum) _preferences.TabSize = (int)udTabWidth.Minimum;
			if (_preferences.TabSize > udTabWidth.Maximum) _preferences.TabSize = (int)udTabWidth.Maximum;

            udTabWidth.Value = _preferences.TabSize;
            cmbTestGameStyle.SelectedIndex = (int)_preferences.TestGameStyle;
			cmbEditorStartup.SelectedIndex = (int)_preferences.StartupPane;
			radFolderPath.Checked = (_preferences.DefaultImportPath != string.Empty);
			txtImportPath.Text = _preferences.DefaultImportPath;
			txtImportPath.Enabled = radFolderPath.Checked;
			btnChooseFolder.Enabled = txtImportPath.Enabled;
			radNewGameSpecificPath.Checked = (_preferences.ExplicitNewGamePath != string.Empty);
			txtNewGamePath.Text = _preferences.ExplicitNewGamePath;
			txtNewGamePath.Enabled = radNewGameSpecificPath.Checked;
			btnNewGameChooseFolder.Enabled = radNewGameSpecificPath.Checked;
			cmbMessageOnCompile.SelectedIndex = (int)_preferences.MessageBoxOnCompileErrors;
			cmbIndentStyle.SelectedIndex = _preferences.IndentUsingTabs ? 1 : 0;
			chkAlwaysShowViewPreview.Checked = _preferences.ShowViewPreviewByDefault;
			txtPaintProgram.Text = _preferences.PaintProgramPath;
			radPaintProgram.Checked = (_preferences.PaintProgramPath != string.Empty);
			txtPaintProgram.Enabled = radPaintProgram.Checked;
			btnSelectPaintProgram.Enabled = txtPaintProgram.Enabled;
			cmbSpriteImportTransparency.SelectedIndex = (int)_preferences.DefaultSpriteImportTransparency;
            chkUsageInfo.Checked = _preferences.SendAnonymousStats;
            chkBackupReminders.Checked = (_preferences.BackupWarningInterval != 0);
            udBackupInterval.Value = (_preferences.BackupWarningInterval > 0) ? _preferences.BackupWarningInterval : 1;
            udBackupInterval.Enabled = chkBackupReminders.Checked;
            chkRemapBgImport.Checked = _preferences.RemapPalettizedBackgrounds;
            chkKeepHelpOnTop.Checked = _preferences.KeepHelpOnTop;
            Utilities.CheckLabelWidthsOnForm(this);
		}
Exemplo n.º 3
0
        public FindReplaceDialog(string defaultSearchText, 
            string defaultReplaceText, EditorPreferences preferences,
            FindReplace findReplace)
        {
            _findReplace = findReplace;
            _preferences = preferences;
            InitializeComponent();
            btnOK.Enabled = false;

            foreach (string previousSearch in preferences.RecentSearches)
            {
                cmbFind.Items.Add(previousSearch);
                cmbReplace.Items.Add(previousSearch);
            }

            cmbLookIn.Items.Add(LOOK_IN_CURRENT_DOCUMENT);
            cmbLookIn.Items.Add(LOOK_IN_CURRENT_PROJECT);
            cmbLookIn.Text = _lastSelectedLookIn ?? LOOK_IN_CURRENT_DOCUMENT;

            chkCaseSensitive.Checked = _lastSelectedCaseSensitive;

            cmbFind.Text = defaultSearchText;
            cmbReplace.Text = defaultReplaceText;
            btnCancel.Left = btnReplace.Left;
            cmbFind.Focus();
        }
Exemplo n.º 4
0
        public PreferencesEditor(EditorPreferences prefs)
        {
            InitializeComponent();
            _preferences = prefs;
            // just in case they had it set to something silly in 2.72
            if (_preferences.TabSize < udTabWidth.Minimum)
            {
                _preferences.TabSize = (int)udTabWidth.Minimum;
            }
            if (_preferences.TabSize > udTabWidth.Maximum)
            {
                _preferences.TabSize = (int)udTabWidth.Maximum;
            }

            udTabWidth.Value = _preferences.TabSize;
            cmbTestGameStyle.SelectedIndex            = (int)_preferences.TestGameStyle;
            cmbEditorStartup.SelectedIndex            = (int)_preferences.StartupPane;
            radFolderPath.Checked                     = (_preferences.DefaultImportPath != string.Empty);
            txtImportPath.Text                        = _preferences.DefaultImportPath;
            txtImportPath.Enabled                     = radFolderPath.Checked;
            btnChooseFolder.Enabled                   = txtImportPath.Enabled;
            radNewGameSpecificPath.Checked            = (_preferences.ExplicitNewGamePath != string.Empty);
            txtNewGamePath.Text                       = _preferences.ExplicitNewGamePath;
            txtNewGamePath.Enabled                    = radNewGameSpecificPath.Checked;
            btnNewGameChooseFolder.Enabled            = radNewGameSpecificPath.Checked;
            cmbMessageOnCompile.SelectedIndex         = (int)_preferences.MessageBoxOnCompileErrors;
            cmbIndentStyle.SelectedIndex              = _preferences.IndentUsingTabs ? 1 : 0;
            chkAlwaysShowViewPreview.Checked          = _preferences.ShowViewPreviewByDefault;
            txtPaintProgram.Text                      = _preferences.PaintProgramPath;
            radPaintProgram.Checked                   = (_preferences.PaintProgramPath != string.Empty);
            txtPaintProgram.Enabled                   = radPaintProgram.Checked;
            btnSelectPaintProgram.Enabled             = txtPaintProgram.Enabled;
            cmbSpriteImportTransparency.SelectedIndex = (int)_preferences.DefaultSpriteImportTransparency;
            chkUsageInfo.Checked                      = _preferences.SendAnonymousStats;
            chkBackupReminders.Checked                = (_preferences.BackupWarningInterval != 0);
            udBackupInterval.Value                    = (_preferences.BackupWarningInterval > 0) ? _preferences.BackupWarningInterval : 1;
            udBackupInterval.Enabled                  = chkBackupReminders.Checked;
            chkRemapBgImport.Checked                  = _preferences.RemapPalettizedBackgrounds;
            chkKeepHelpOnTop.Checked                  = _preferences.KeepHelpOnTop;
            chkPromptDialogOnTabsClose.Checked        = _preferences.DialogOnMultibleTabsClose;
            chkUseLegacyCompiler.Checked              = _preferences.UseLegacyCompiler;
            Utilities.CheckLabelWidthsOnForm(this);
        }