protected virtual async Task Write(IEnumerable <PluginRecord> data, IFileOutputFormatterOptions options) { if (options is null) { throw new ArgumentNullException(nameof(options)); } if (string.IsNullOrWhiteSpace(options.Path)) { throw new ArgumentException(nameof(options.Path)); } var document = Document.Create("List of VSTs"); var detailsList = data.ToList(); var projectSection = new ProjectSection(); projectSection.Add(detailsList); var pluginSection = new PluginSection(); pluginSection.Add(detailsList); var mainIndex = new MainIndex("main-index", "Main index"); mainIndex.Add(new ISection[] { projectSection, pluginSection }); document.AddMainIndex(mainIndex); document.AddSection(projectSection); document.AddSection(pluginSection); document.Save(options.Path); await Task.CompletedTask; }
internal void ChangeTab(MainIndex index) { if (InvokeRequired) { Invoke(new MethodInvoker(() => ChangeTab(index))); return; } hiddenMain.SelectedIndex = (int)index; if (index == MainIndex.Login) { this.AcceptButton = btnLogin; rtbChat.Clear(); rtbMessage.Clear(); regUsername.Clear(); regPassword.Clear(); regEmail.Clear(); } else if (index == MainIndex.Register) { this.AcceptButton = btnRegister; } else { this.AcceptButton = null; } }
public void AddMainIndex(MainIndex mainIndex) { Body.Add(mainIndex); }