public List <SetOptionsEntry[]> GetSetOptionsEntryList(bool AllowBinary) { JB64Value[] Result = ReadRecord(); List <SetOptionsEntry[]> SetOptionsEntries = new List <SetOptionsEntry[]>(); SetOptionsEntries.Add(new SetOptionsEntry[this.Headers.Count]); int x = 0; foreach (JB64Header Header in this.Headers) { string Type = Header.Type; if (Type.Length > 7 && Type.Substring(0, 7) == "custom:") { Type = "binary"; } if (Type == "binary" && !AllowBinary) { Type = "string"; } Result[x].ConvertToNotNull(Type); SetOptionsEntries[0][x] = new SetOptionsEntry(Header.Name, Type, Result[x], true); x++; } return(SetOptionsEntries); }
private void SetOptions_SwitchActiveEntry(int NewActiveEntry) { this.SetOptionsActiveEntry = NewActiveEntry; options_col_list_box.Items.Clear(); for (int x = 0; x < this.SetOptionsEntries[this.SetOptionsActiveEntry].Length; x++) { SetOptionsEntry TempEntry = this.SetOptionsEntries[this.SetOptionsActiveEntry][x]; string Val = SetOptions_GetDisplayValue(TempEntry.OrigVal, TempEntry.Type); options_col_list_box.Items.Add(TempEntry.Name + " (" + TempEntry.Type + " - " + Val + ")" + (TempEntry.Type != TempEntry.OrigType ? " [Was " + TempEntry.OrigType + "]" : ""), TempEntry.Enabled); } options_col_list_box.SelectedIndex = 0; }
private void SetOptions_UpdateSelectedColumnInfo() { if (this.UpdatingOptions) { return; } this.UpdatingOptions = true; SetOptionsEntry TempEntry = this.SetOptionsEntries[this.SetOptionsActiveEntry][options_col_list_box.SelectedIndex]; options_name.Text = TempEntry.Name; string Val = SetOptions_GetDisplayValue(TempEntry.OrigVal, "boolean"); options_type_boolean.Text = "boolean (" + Val + ")"; Val = SetOptions_GetDisplayValue(TempEntry.OrigVal, "integer"); options_type_integer.Text = "integer (" + Val + ")"; Val = SetOptions_GetDisplayValue(TempEntry.OrigVal, "number"); options_type_number.Text = "number (" + Val + ")"; Val = SetOptions_GetDisplayValue(TempEntry.OrigVal, "date"); options_type_date.Text = "date (" + Val + ")"; Val = SetOptions_GetDisplayValue(TempEntry.OrigVal, "date-alt"); options_type_date_alt.Text = "date-alt (" + Val + ")"; Val = SetOptions_GetDisplayValue(TempEntry.OrigVal, "time"); options_type_time.Text = "time (" + Val + ")"; Val = SetOptions_GetDisplayValue(TempEntry.OrigVal, "time-alt"); options_type_time_alt.Text = "time-alt (" + Val + ")"; Val = SetOptions_GetDisplayValue(TempEntry.OrigVal, "string"); options_type_string.Text = "string (" + Val + ")"; Val = SetOptions_GetDisplayValue(TempEntry.OrigVal, "binary"); options_type_binary.Text = "binary (" + Val + ")"; if (TempEntry.Type == "boolean") { options_type_boolean.Checked = true; } else if (TempEntry.Type == "integer") { options_type_integer.Checked = true; } else if (TempEntry.Type == "number") { options_type_number.Checked = true; } else if (TempEntry.Type == "date") { options_type_date.Checked = true; } else if (TempEntry.Type == "date-alt") { options_type_date_alt.Checked = true; } else if (TempEntry.Type == "time") { options_type_time.Checked = true; } else if (TempEntry.Type == "time-alt") { options_type_time_alt.Checked = true; } else if (TempEntry.Type == "string") { options_type_string.Checked = true; } else if (TempEntry.Type == "binary") { options_type_binary.Checked = true; } options_name_info_label.Enabled = TempEntry.Enabled; options_name.Enabled = TempEntry.Enabled; options_type_info_label.Enabled = TempEntry.Enabled; options_type_boolean.Enabled = TempEntry.Enabled; options_type_integer.Enabled = TempEntry.Enabled; options_type_number.Enabled = TempEntry.Enabled; options_type_date.Enabled = TempEntry.Enabled; options_type_date_alt.Enabled = (this.ReadConvert.IsDateAltAllowed(TempEntry.OrigType) && TempEntry.Enabled); options_type_time.Enabled = TempEntry.Enabled; options_type_time_alt.Enabled = (this.ReadConvert.IsTimeAltAllowed(TempEntry.OrigType) && TempEntry.Enabled); options_type_string.Enabled = TempEntry.Enabled; options_type_binary.Enabled = (this.WriteConvert.IsBinaryAllowed() && TempEntry.Enabled); this.UpdatingOptions = false; }
public List<SetOptionsEntry[]> GetSetOptionsEntryList(bool AllowBinary) { JB64Value[] Result = ReadRecord(); List<SetOptionsEntry[]> SetOptionsEntries = new List<SetOptionsEntry[]>(); SetOptionsEntries.Add(new SetOptionsEntry[this.Headers.Count]); int x = 0; foreach (JB64Header Header in this.Headers) { string Type = Header.Type; if (Type.Length > 7 && Type.Substring(0, 7) == "custom:") Type = "binary"; if (Type == "binary" && !AllowBinary) Type = "string"; Result[x].ConvertToNotNull(Type); SetOptionsEntries[0][x] = new SetOptionsEntry(Header.Name, Type, Result[x], true); x++; } return SetOptionsEntries; }