/// <summary> /// Create a property dialog for an existing source /// </summary> /// <param name="source">Source of type ObsSource</param> public TestProperties(ObsSource source) : this() { this.source = source; ObsData sourceSettings = source.GetSettings(); view = new PropertiesView(sourceSettings, source, source.GetProperties, source.GetDefaults, source.Update); propertyPanel.Controls.Add(view); undoButton.Click += (sender, args) => { view.ResetChanges(); }; defaultButton.Click += (sender, args) => { view.ResetToDefaults(); }; okButton.Click += (o, args) => { view.UpdateSettings(); DialogResult = DialogResult.OK; Close(); }; cancelButton.Click += (o, args) => { view.ResetChanges(); DialogResult = DialogResult.Cancel; Close(); }; }
public SourcePreviewPanel(ObsSource source) { this.source = source; }
public ItemPreviewPanel(Item item, ObsSource source) { this._item = item; this._source = source; }