static void Database(int Index) { Tracker.Add(Engines.DB_ShortName[Index - 1]); Engines.Load.Sqlite(Engines.DB_Path[Index - 1]); Engines.GetSchema(Engines.CurrentDatabase); Engines.GetColumnsofTable(Engines.CurrentDatabase, Engines.CurrentTable); LDControls.ComboBoxContent(GlobalStatic.ComboBox["FunctionList"], Engines.Functions(Engines.EnginesMode.SQLITE).ToPrimitiveArray()); Sorts(1); Table(1); LDControls.ComboBoxSelect(GlobalStatic.ComboBox["Sorts"], 1); LDControls.ComboBoxSelect(GlobalStatic.ComboBox["Table"], 1); if (GlobalStatic.SortBy == 4) { Engines.SetDefaultTable("sqlite_master"); Engines.GetColumnsofTable(Engines.CurrentDatabase, Engines.CurrentTable); LDControls.ComboBoxContent(GlobalStatic.ComboBox["Table"], "1=" + Engines.CurrentTable + ";2=sqlite_temp_master;"); return; } Engines.GetColumnsofTable(Engines.CurrentDatabase, Engines.CurrentTable); return; }
public static void Bind() { LDControls.ComboBoxContent(GlobalStatic.ComboBox["Sort"], Engines.Schema); LDControls.ComboBoxContent(GlobalStatic.ComboBox["ColumnList"], Engines.Schema); LDControls.ComboBoxContent(GlobalStatic.ComboBox["Search"], Engines.Schema); UI.Title(); Menu(Language.Localization["View"]); //Tasks }
static void ColumnsChanged(object sender, EventArgs e) { int StackPointer = Stack.Add("ColumnsChanged"); if (GlobalStatic.SortBy != 0) { LDControls.ComboBoxContent(GlobalStatic.ComboBox["Sort"], Engines.Schema); LDControls.ComboBoxContent(GlobalStatic.ComboBox["Search"], Engines.Schema); LDControls.ComboBoxContent(GlobalStatic.ComboBox["ColumnList"], Engines.Schema); } Stack.Exit(StackPointer); }
static void SchemaChanged(object sender, EventArgs e) { int StackPointer = Stack.Add("SchemaChanged"); if (GlobalStatic.SortBy >= 1 && GlobalStatic.SortBy <= 3) { Dictionary <int, IReadOnlyList <string> > dictionary = new Dictionary <int, IReadOnlyList <string> > { { 1, Engines.Tables }, { 2, Engines.Views }, { 3, Engines.Indexes } }; LDControls.ComboBoxContent(GlobalStatic.ComboBox["Table"], dictionary[GlobalStatic.SortBy].ToPrimitiveArray()); } Title(); Stack.Exit(StackPointer); }
static void Sorts(int Index) { GlobalStatic.SortBy = Index; //Sets GlobalStatic.SortBy. Count by 1 instead of zero if (Schema.ContainsKey(Index)) { CorrectList = Schema[Index]; if (CorrectList.Count > 0) { Engines.SetDefaultTable(CorrectList[0]); LDControls.ComboBoxContent(GlobalStatic.ComboBox["Table"], CorrectList.ToPrimitiveArray()); Engines.GetColumnsofTable(Engines.CurrentDatabase, Engines.CurrentTable); } } if (!string.IsNullOrWhiteSpace(Engines.CurrentTable)) { UI.HideDisplayResults(); Bind(); UI.Title(); return; } Events.LogMessage("In the current database no " + Language.Localization[TypeofSorts[GlobalStatic.SortBy]] + "s can be found.", Language.Localization["UI"]); }