private void _bakeButton_Click(object sender, EventArgs e) { // set selected category foreach (DB.Category category in Document.Settings.Categories) { if (category.Name == _categorySelector.SelectedKey) { AddinOptions.Current.CustomOptions.AddOption(OPTROOT, "LastSelectedCategory", category.Name); SelectedCategory = category.Id; } } // set selected workset if (Document.IsWorkshared) { foreach (DB.Workset workset in new DB.FilteredWorksetCollector(Document).OfKind(DB.WorksetKind.UserWorkset).ToWorksets()) { if (workset.Name == _worksetSelector.SelectedKey) { AddinOptions.Current.CustomOptions.AddOption(OPTROOT, "LastSelectedWorkset", workset.Name); SelectedWorkset = workset.Id; } } } IsCancelled = false; AddinOptions.Save(); Close(); }
private void ApplyButton_Click(object sender, EventArgs e) { GeneralPanel.ApplyChanges(); UpdatesPanel.ApplyChanges(); ScriptsPanel.ApplyChanges(); AddinOptions.Save(); Close(); }