void Fill(Theme theme)
        {
            foreach (Language language in theme.Languages)
            {
                listLang.Items.Add(language);
                BitArray ba = new BitArray(ColumnsHelper.GetColumns().Count(), false);

                foreach (IColumn column in language.VisibleColumns)
                {
                    ba[column.Index] = true;
                }

                columns.Add(language, ba);
            }

            int y = 47;

            foreach (IColumn column in theme.Languages.First().Columns)
            {
                KryptonCheckBox check = new KryptonCheckBox();
                check.Text            = column.Name;
                check.Location        = new Point(145, y);
                check.CheckedChanged += ColumnCheckedChanged;
                check.Tag             = column;
                check.Enabled         = false;
                Controls.Add(check);
                y += 22;
            }

            if (listLang.Items.Count > 0)
            {
                listLang.SelectedIndex = 0;
            }
        }
Exemple #2
0
        private void GetMetaData()
        {
            SetStatus("Fetching Columns...");
            ColumnsHelper.GetColumns();
            backgroundWorker1.ReportProgress(5, ObjectTypes.Columns);

            SetStatus("Fetching ForeignKeys...");
            ForeignKeysHelper.GetForeignKeys();
            backgroundWorker1.ReportProgress(10, ObjectTypes.ForeignKeys);

            SetStatus("Fetching IndexColumns...");
            IndexColumnsHelper.GetIndexColumns();
            backgroundWorker1.ReportProgress(15, ObjectTypes.IndexColumns);

            SetStatus("Fetching Indexes...");
            IndexesHelper.GetIndexes();
            backgroundWorker1.ReportProgress(20, ObjectTypes.Indexes);

            SetStatus("Fetching Tables...");
            TablesHelper.GetTables();
            backgroundWorker1.ReportProgress(25, ObjectTypes.Tables);

            SetStatus("Fetching ViewColumns...");
            ViewColumnsHelper.GetViewColumns();
            backgroundWorker1.ReportProgress(30, ObjectTypes.ViewColumns);

            SetStatus("Fetching Views...");
            ViewsHelper.GetViews();
            backgroundWorker1.ReportProgress(35, ObjectTypes.Views);

            SetStatus("Fetching ProcedureParameters...");
            ProcedureParametersHelper.GetProcedureParameters();
            backgroundWorker1.ReportProgress(40, ObjectTypes.ProcedureParameters);

            SetStatus("Fetching Procedures...");
            ProceduresHelper.GetProcedures();
            backgroundWorker1.ReportProgress(45, ObjectTypes.Procedures);

            SetStatus("Fetching Triggers...");
            SMOHelper.TriggersHelper.GetTriggers(Utility.DatabaseName);
            backgroundWorker1.ReportProgress(50, ObjectTypes.Triggers);

            SetStatus("Fetching UserDefinedDataTypes...");
            SMOHelper.UserDefinedDataTypesHelper.GetUserDefinedDataTypes(Utility.DatabaseName);
            backgroundWorker1.ReportProgress(55, ObjectTypes.UserDefinedDataTypes);

            SetStatus("Fetching InstanceInformation...");
            InstanceInformationHelper.GetInstanceInformation();
            backgroundWorker1.ReportProgress(60, ObjectTypes.InstanceInformation);

            SetStatus("Fetching DataSourceInformation...");
            DataSourceInformationHelper.GetDataSourceInformation();
            backgroundWorker1.ReportProgress(65, ObjectTypes.DataSourceInformation);

            SetStatus("Fetching DataTypes...");
            DataTypesHelper.GetDataTypes();
            backgroundWorker1.ReportProgress(70, ObjectTypes.DataTypes);

            SetStatus("Fetching Restrictions...");
            RestrictionsHelper.GetRestrictions();
            backgroundWorker1.ReportProgress(75, ObjectTypes.Restrictions);

            SetStatus("Fetching ReservedWords...");
            ReservedWordsHelper.GetReservedWords();
            backgroundWorker1.ReportProgress(80, ObjectTypes.ReservedWords);

            SetStatus("Fetching Users...");
            UsersHelper.GetUsers();
            backgroundWorker1.ReportProgress(85, ObjectTypes.Users);
        }