コード例 #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="DbObjectSelectionPanel"/> class.
        /// </summary>
        public DbObjectSelectionPanel()
        {
            _excelSelectionContainsData = false;
            _wbConnection    = null;
            Filter           = string.Empty;
            LoadedProcedures = new List <DbProcedure>();
            LoadedTables     = new List <DbTable>();
            LoadedViews      = new List <DbView>();
            InitializeComponent();

            ConnectionNameLabel.Paint += Label_Paint;
            UserIPLabel.Paint         += Label_Paint;
            SchemaLabel.Paint         += Label_Paint;

            InheritFontToControlsExceptionList.AddRange(new[]
            {
                ExportToNewTableHotLabel.Name,
                SelectDatabaseObjectHotLabel.Name,
                ImportDataHotLabel.Name,
                EditDataHotLabel.Name,
                AppendDataHotLabel.Name,
                ImportMultiHotLabel.Name
            });

            DBObjectList.AddHeaderNode("Tables");
            DBObjectList.AddHeaderNode("Views");
            DBObjectList.AddHeaderNode("Procedures");
        }
コード例 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SchemaSelectionPanel"/> class.
 /// </summary>
 public SchemaSelectionPanel()
 {
     InitializeComponent();
     AdjustColorsForColorTheme(false, null);
     DisplaySchemaCollationsToolStripMenuItem.Checked = Settings.Default.SchemasDisplayCollations;
     SetItemsAppearance(false);
     InheritFontToControlsExceptionList.Add(SelectSchemaHotLabel.Name);
     InheritFontToControlsExceptionList.Add(CreateNewSchemaHotLabel.Name);
     LoadedSchemas = new List <DbSchema>();
 }
コード例 #3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="SchemaSelectionPanel"/> class.
        /// </summary>
        public SchemaSelectionPanel()
        {
            _systemSchemasListValues = new[] { "mysql", "information_schema", "performance_schema" };
            InitializeComponent();

            DisplaySchemaCollationsToolStripMenuItem.Checked = Settings.Default.SchemasDisplayCollations;
            SetItemsAppearance(false);
            ConnectionNameLabel.Paint += Label_Paint;
            UserIPLabel.Paint         += Label_Paint;
            InheritFontToControlsExceptionList.Add(SelectSchemaHotLabel.Name);
            InheritFontToControlsExceptionList.Add(CreateNewSchemaHotLabel.Name);
            LoadedSchemas = new List <DbSchema>();
        }
コード例 #4
0
        /// <summary>
        /// Initializes a new instance of the <see cref="WelcomePanel"/> class.
        /// </summary>
        public WelcomePanel()
        {
            InitializeComponent();

            InheritFontToControlsExceptionList.Add(OpenConnectionHotLabel.Name);
            InheritFontToControlsExceptionList.Add(NewConnectionHotLabel.Name);
            InheritFontToControlsExceptionList.Add(ManageConnectionsHotLabel.Name);

            DoubleBuffered = true;
            ManageConnectionsHotLabel.Enabled = MySqlWorkbench.AllowsExternalConnectionsManagement;
            ConnectionsList.AddHeaderNode("Local Connections");
            ConnectionsList.AddHeaderNode("Remote Connections");
            LoadConnections(false);
        }
コード例 #5
0
        /// <summary>
        /// Initializes a new instance of the <see cref="WelcomePanel"/> class.
        /// </summary>
        public WelcomePanel()
        {
            InitializeComponent();

            LargeImagesList.Images.Add("Connection_SSH-Disabled.png", Resources.Connection_SSH.ToGrayscale());
            LargeImagesList.Images.Add("Connection_X_32x32-Disabled.png", Resources.Connection_X_32x32.ToGrayscale());

            InheritFontToControlsExceptionList.Add(OpenConnectionHotLabel.Name);
            InheritFontToControlsExceptionList.Add(NewConnectionHotLabel.Name);
            InheritFontToControlsExceptionList.Add(ManageConnectionsHotLabel.Name);

            DoubleBuffered = true;
            ManageConnectionsHotLabel.Enabled = MySqlWorkbench.AllowsExternalConnectionsManagement;
            ConnectionsList.AddHeaderNode("Local Connections");
            ConnectionsList.AddHeaderNode("Remote Connections");
            LoadConnections(false);
        }
コード例 #6
0
        /// <summary>
        /// Sets the font in all controls of the given controls collection to the given font.
        /// </summary>
        /// <param name="controls">A collection of controls to inherit a font to.</param>
        /// <param name="inheritingFont">A <see cref="Font"/> object to set it in each control of the given collection.</param>
        protected virtual void InheritFontToControls(ControlCollection controls, Font inheritingFont)
        {
            if (controls == null || controls.Count == 0)
            {
                return;
            }

            foreach (Control c in controls)
            {
                InheritFontToControls(c.Controls, inheritingFont);
                if (InheritFontToControlsExceptionList != null && InheritFontToControlsExceptionList.Contains(c.Name))
                {
                    continue;
                }

                if (c.Font.Name != inheritingFont.Name)
                {
                    c.Font = new Font(inheritingFont.FontFamily, c.Font.Size, c.Font.Style);
                }
            }
        }