Ejemplo n.º 1
0
        private async Task InitControls()
        {
            dgvFiles             = new DGVEnhancer <IFile>(dataFiles);
            dataFiles.DataSource = vm.BsFiles;
            dataFiles.ReadOnly   = true;
            dgvFiles.SetColumnLayout(new[] {
                new DGVColumnLayout(nameof(IFile.Path), "Path", 100, true, true),
            });

            InitHandlers();
        }
Ejemplo n.º 2
0
        private async Task InitControls()
        {
            if (StaticElements.DB == null)
            {
                return;
            }
            vm = new ViewModelClassBuilder();

            dgvTables = new DGVEnhancer <Table>(dataTables);
            dgvTables.UpdateDatasource(await vm.GetTables());
            dgvTables.SetColumnLayout(new[] {
                new DGVColumnLayout(nameof(Table.FullName), "Name", 100, true, true)
            });
            InitHandlers();
        }
Ejemplo n.º 3
0
        private void InitControls()
        {
            _toolTips.InitialDelay = 100;
            _toolTips.ReshowDelay  = 100;
            _toolTips.ShowAlways   = true;
            _toolTips.IsBalloon    = true;
            _toolTips.SetToolTip(txtNugetExePath, Properties.Resources.pref_nuget_exe_path);
            _toolTips.SetToolTip(txtDefaultOutputPath, Properties.Resources.pref_nuget_default_output_path);
            _toolTips.SetToolTip(txtLocalNugetServer, Properties.Resources.pref_nuget_local_nuget_server);
            _toolTips.SetToolTip(txtLocalDevNugetServer, Properties.Resources.pref_nuget_local_dev_nuget_server);
            _toolTips.SetToolTip(txtRootProjectFolder, Properties.Resources.pref_nuget_root_folder_path);
            dgvProjectFolders             = new DGVEnhancer <RootFolder>(dataProjectFolders);
            dataProjectFolders.DataSource = vm.BsRootFolders;
            var buttonColumn = new DataGridViewButtonColumn()
            {
                Text       = "✘",
                Name       = "RemovePath",
                HeaderText = "Remove",
                Visible    = true,
                UseColumnTextForButtonValue = true,
            };

            dgvProjectFolders.SetColumnLayout(new[] {
                new DGVColumnLayout(nameof(RootFolder.Path), "Path", 100, true, false),
                new DGVColumnLayout(buttonColumn, 70, false, false),
            });
            dgvIgnorePaths             = new DGVEnhancer <ScanIgnorePath>(dataIgnorePaths);
            dataIgnorePaths.DataSource = vm.BsIgnorePaths;
            var buttonColumn2 = new DataGridViewButtonColumn()
            {
                Text       = "✘",
                Name       = "RemovePath",
                HeaderText = "Remove",
                Visible    = true,
                UseColumnTextForButtonValue = true,
            };

            dgvIgnorePaths.SetColumnLayout(new[] {
                new DGVColumnLayout(nameof(ScanIgnorePath.Path), "Path", 100, true, false),
                new DGVColumnLayout(buttonColumn2, 70, false, false),
            });

            InitHandlers();
        }
Ejemplo n.º 4
0
        private void InitControls()
        {
            vm             = new ViewModelDBConnections();
            dgvConnections = new DGVEnhancer <ConnectionString>(dataConnections);
            dgvConnections.UpdateDatasource(vm.DbConnections);
            var buttonColumn = new DataGridViewButtonColumn()
            {
                Text       = "Connect",
                Name       = "ConnectColumn",
                HeaderText = "Connect",
                Visible    = true,
                UseColumnTextForButtonValue = true,
            };

            dgvConnections.SetColumnLayout(new [] {
                new DGVColumnLayout(nameof(ConnectionString.ConnectionName), "Name", 70, true, false),
                new DGVColumnLayout(nameof(ConnectionString.Server), "Server Address", 50, true, false),
                new DGVColumnLayout(nameof(ConnectionString.User), "Username", 50, true, false),
                new DGVColumnLayout(nameof(ConnectionString.Port), null, 60, false, false),
                new DGVColumnLayout(nameof(ConnectionString.Database), null, 50, true, false),
                new DGVColumnLayout(buttonColumn, 70, false, false),
            });
            InitHandlers();
        }