CheckLabelWidthsOnForm() публичный статический Метод

public static CheckLabelWidthsOnForm ( Control parentControl ) : void
parentControl System.Windows.Forms.Control
Результат void
Пример #1
0
 public WizardDialog(string wizardName, string introText, List <WizardPage> pages)
 {
     InitializeComponent();
     this.Text                 = wizardName;
     this.lblTitle.Text        = "Welcome to the " + wizardName + " Wizard";
     this.lblIntroText.Text    = introText;
     this.lblHeader1.Text      = wizardName;
     this.pnlMainPages.Visible = false;
     this.btnBack.Enabled      = false;
     _pageNumber               = 0;
     _pages = pages;
     Utilities.CheckLabelWidthsOnForm(this);
 }
Пример #2
0
 public AssignToView()
 {
     InitializeComponent();
     udView.Minimum = 1;
     udView.Maximum = Factory.AGSEditor.CurrentGame.ViewCount;
     if ((_LastViewNumber > 0) && (_LastViewNumber <= udView.Maximum))
     {
         udView.Value = _LastViewNumber;
     }
     else
     {
         _LastLoopNumber = 0;
     }
     PopulateLoopList(_LastLoopNumber);
     radOverwrite.Checked     = true;
     radStopAssigning.Checked = true;
     Utilities.CheckLabelWidthsOnForm(this);
 }
Пример #3
0
        public PreferencesEditor()
        {
            InitializeComponent();
            // just in case they had it set to something silly in 2.72
            if (Factory.AGSEditor.Settings.TabSize < udTabWidth.Minimum)
            {
                Factory.AGSEditor.Settings.TabSize = (int)udTabWidth.Minimum;
            }
            if (Factory.AGSEditor.Settings.TabSize > udTabWidth.Maximum)
            {
                Factory.AGSEditor.Settings.TabSize = (int)udTabWidth.Maximum;
            }

            udTabWidth.Value = Factory.AGSEditor.Settings.TabSize;
            cmbTestGameStyle.SelectedIndex                = (int)Factory.AGSEditor.Settings.TestGameWindowStyle;
            cmbEditorStartup.SelectedIndex                = (int)Factory.AGSEditor.Settings.StartupPane;
            radFolderPath.Checked                         = (Factory.AGSEditor.Settings.DefaultImportPath != string.Empty);
            txtImportPath.Text                            = Factory.AGSEditor.Settings.DefaultImportPath;
            txtImportPath.Enabled                         = radFolderPath.Checked;
            btnChooseFolder.Enabled                       = txtImportPath.Enabled;
            radNewGameSpecificPath.Checked                = (Factory.AGSEditor.Settings.NewGamePath != string.Empty);
            txtNewGamePath.Text                           = Factory.AGSEditor.Settings.NewGamePath;
            txtNewGamePath.Enabled                        = radNewGameSpecificPath.Checked;
            btnNewGameChooseFolder.Enabled                = radNewGameSpecificPath.Checked;
            cmbMessageOnCompile.SelectedIndex             = (int)Factory.AGSEditor.Settings.MessageBoxOnCompile;
            cmbIndentStyle.SelectedIndex                  = Factory.AGSEditor.Settings.IndentUseTabs ? 1 : 0;
            chkAlwaysShowViewPreview.Checked              = Factory.AGSEditor.Settings.ShowViewPreviewByDefault;
            txtPaintProgram.Text                          = Factory.AGSEditor.Settings.PaintProgramPath;
            radPaintProgram.Checked                       = (Factory.AGSEditor.Settings.PaintProgramPath != string.Empty);
            txtPaintProgram.Enabled                       = radPaintProgram.Checked;
            btnSelectPaintProgram.Enabled                 = txtPaintProgram.Enabled;
            cmbSpriteImportTransparency.SelectedIndex     = (int)Factory.AGSEditor.Settings.SpriteImportMethod;
            cmbColorTheme.DataSource                      = Factory.GUIController.ColorThemes.Themes;
            cmbColorTheme.SelectedIndex                   = Factory.GUIController.ColorThemes.Themes.ToList().FindIndex(t => t.Name == Factory.AGSEditor.Settings.ColorTheme);
            chkUsageInfo.Checked                          = Factory.AGSEditor.Settings.SendAnonymousStats;
            chkBackupReminders.Checked                    = (Factory.AGSEditor.Settings.BackupWarningInterval != 0);
            udBackupInterval.Value                        = (Factory.AGSEditor.Settings.BackupWarningInterval > 0) ? Factory.AGSEditor.Settings.BackupWarningInterval : 1;
            udBackupInterval.Enabled                      = chkBackupReminders.Checked;
            chkRemapBgImport.Checked                      = Factory.AGSEditor.Settings.RemapPalettizedBackgrounds;
            chkKeepHelpOnTop.Checked                      = Factory.AGSEditor.Settings.KeepHelpOnTop;
            chkPromptDialogOnTabsClose.Checked            = Factory.AGSEditor.Settings.DialogOnMultipleTabsClose;
            cmbScriptReloadOnExternalChange.SelectedIndex = (int)Factory.AGSEditor.Settings.ReloadScriptOnExternalChange;
            Utilities.CheckLabelWidthsOnForm(this);
        }
Пример #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);
        }
Пример #5
0
        public GlobalVariableDialog(GlobalVariable variable, Game game)
        {
            InitializeComponent();
            _variable = variable;
            _game     = game;
            PopulateTypeList();
            txtName.Text         = variable.Name ?? string.Empty;
            txtDefaultValue.Text = variable.DefaultValue ?? string.Empty;

            foreach (GlobalVariableType varType in cmbType.Items)
            {
                if (varType.TypeName == variable.Type)
                {
                    cmbType.SelectedItem = varType;
                    break;
                }
            }

            Utilities.CheckLabelWidthsOnForm(this);
        }
Пример #6
0
        public PreferencesEditor()
        {
            InitializeComponent();

            UpdateAndroidKeystorePasswordState();

            _settings = Factory.AGSEditor.Settings.CloneAppSettings();
            // just in case they had it set to something silly in 2.72
            if (_settings.TabSize < udTabWidth.Minimum)
            {
                _settings.TabSize = (int)udTabWidth.Minimum;
            }
            if (_settings.TabSize > udTabWidth.Maximum)
            {
                _settings.TabSize = (int)udTabWidth.Maximum;
            }

            UpdateControlsForPreferences();

            propertyGridPreferences.SelectedObject = _settings;
            Utilities.CheckLabelWidthsOnForm(this);
        }
Пример #7
0
        private void UpdatePanels()
        {
            if (_pageNumber >= _pages.Count)
            {
                btnNext.Text = "&Finish";
            }
            else
            {
                btnNext.Text = "&Next >";
            }

            if (_pageNumber > 0)
            {
                this.pnlMainPages.Controls.Clear();
                this.pnlMainPages.Controls.Add(this.pnlHeader);
                this.pnlMainPages.Controls.Add(_pages[_pageNumber - 1]);
                _pages[_pageNumber - 1].BringToFront();
                _pages[_pageNumber - 1].PageShown();
                this.lblHeader2.Text = _pages[_pageNumber - 1].TitleText;
                Utilities.CheckLabelWidthsOnForm(this);
            }
        }