/// <summary>
    /// Increases the width of the dialog in case the <see cref="AutomaticMigrationDelayLabel"/> gets too big.
    /// </summary>
    private void SetAutomaticMigrationDelayText()
    {
      SuspendLayout();
      AutomaticMigrationDelayValueLabel.Text = MySqlWorkbench.GetConnectionsMigrationDelayText(Program.Notifier.NextAutomaticConnectionsMigration, Settings.Default.WorkbenchMigrationSucceeded);
      MigrateWorkbenchConnectionsButton.Enabled = MigrateConnectionsButtonEnabled;
      Width = _initialWidth;
      var spacingDelta = AutomaticMigrationDelayValueLabel.Location.X + AutomaticMigrationDelayValueLabel.Size.Width + DIALOG_RIGHT_SPACING_TO_CONTROLS + (DIALOG_BORDER_WIDTH * 2) - Width;
      if (spacingDelta > 0)
      {
        Width += spacingDelta;
      }

      ResumeLayout();
    }
Exemple #2
0
 /// <summary>
 /// Icnreases the width of the dialog in case the <see cref="AutomaticMigrationDelayLabel"/> gets too big.
 /// </summary>
 private void SetAutomaticMigrationDelayText()
 {
     AutomaticMigrationDelayValueLabel.Text    = MySqlWorkbench.GetConnectionsMigrationDelayText(MySqlDataProviderPackage.Instance.NextAutomaticConnectionsMigration, Settings.Default.WorkbenchMigrationSucceeded);
     MigrateWorkbenchConnectionsButton.Enabled = MigrateConnectionsButtonEnabled;
 }