public void ApplyChangesToComponent(Components.ComposerComponent component) { if (!(component is Components.TVComposer)) { return; } Components.TVComposer temp = component as Components.TVComposer; (temp.Configuration as Configurations.TVConfiguration).Frequency = this.frequency; (temp.Configuration as Configurations.TVConfiguration).TunerDevicePath = this.device; }
/// <summary> /// Sets the option values from a player object /// </summary> /// <param name="configuration"></param> /// <exception cref="System.ArgumentException">Thrown when the player object doesn't match the expected type</exception> public override void SetValues(Components.ComposerComponent component) { if (!(component is Markee)) { throw new ArgumentException(string.Format("Given parameter was of type {0}. {1} expected", component.GetType().ToString(), typeof(Markee).ToString()), "config"); } Markee temp = component as Markee; ToolTip up = new ToolTip(); ToolTip down = new ToolTip(); ToolTip remove = new ToolTip(); up.SetToolTip(buttonMoveItemsUp, "Mover os items seleccionados para cima"); down.SetToolTip(buttonMoveItemsDown, "Mover os items seleccionados para baixo"); remove.SetToolTip(buttonRemoveItems, "Remover os items seleccionados"); footer = new Markee(ComponentTargetSite.OptionsMenu) { TextList = temp.TextList, Speed = temp.Speed, BackColor = temp.BackColor, TextColor = temp.TextColor, MarkeeFont = temp.MarkeeFont, Direction = footer.Direction }; listBoxTextList.Items.Clear(); foreach (var item in footer.TextList) { listBoxTextList.Items.Add(item); } foreach (var item in groupBoxPreview.Controls) { if (item is Markee) { groupBoxPreview.Controls.Remove(item as Markee); } } groupBoxPreview.Controls.Add(footer); footer.Dock = DockStyle.Fill; trackBarSpeed.Value = footer.Speed; footer.Run(); }