#pragma warning restore CS0649 public SettingsControl(IPluginInterface pluginInterface) { Eto.Serialization.Xaml.XamlReader.Load(this); var tt = pluginInterface.Timetable; settings = pluginInterface.Settings; var chooser = Plugin.GetTemplateChooser(pluginInterface); templateComboBox.ItemTextBinding = Binding.Delegate <ITemplate, string>(t => t.TemplateName); templateComboBox.DataStore = chooser.AvailableTemplates; var fntComboBox = new FontComboBox(fontComboBox, exampleLabel); attrs = BfplAttrs.GetAttrs(tt) ?? BfplAttrs.CreateAttrs(tt); fontComboBox.Text = attrs.Font ?? ""; cssTextBox.Text = attrs.Css ?? ""; commentCheckBox.Checked = attrs.ShowComments; daysCheckBox.Checked = attrs.ShowDays; var tmpl = chooser.GetTemplate(tt); templateComboBox.SelectedValue = tmpl; consoleCheckBox.Checked = settings.Get <bool>("bfpl.console"); }
public VelocityForm(IPluginInterface pluginInterface, Route route) : this() { this.pluginInterface = pluginInterface; tt = pluginInterface.Timetable; this.route = route; attrs = BfplAttrs.GetAttrs(tt); if (attrs == null) { attrs = BfplAttrs.CreateAttrs(tt); } backupHandle = pluginInterface.BackupTimetable(); UpdateListView(); }