private void trackListContextMenuStrip_ItemClicked(object sender, ToolStripItemClickedEventArgs e) { var tl = (TrackList)sender; Debug.Assert(tl != null, "menu strip doesn't have a source control!"); var cmd = Command.CONFIG | Command.SETCONFIGVALUE | Command.CONFIG_USEVALUEMASK | (Command)tl.Channel; if (e.ClickedItem == BAPSChannel.automaticAdvanceToolStripMenuItem) { var oci = ConfigCache.getOption("Automatically advance"); var newSetting = "Yes"; if (BAPSChannelautomaticAdvanceToolStripMenuItem.Checked) { newSetting = "No"; } core.SendAsync(new BAPS.Client.Common.Message(cmd).Add(, (uint)oci.optionid, (uint)oci.type, (uint)(int)oci.choiceList[newSetting])); } else if (e.ClickedItem == BAPSChannelplayOnLoadToolStripMenuItem) { var oci = ConfigCache.getOption("Play on load"); var newSetting = "Yes"; if (playOnLoadToolStripMenuItem.Checked) { newSetting = "No"; } core.SendAsync(new BAPS.Client.Common.Message(cmd).Add(, (uint)oci.optionid, (uint)oci.type, (uint)(int)oci.choiceList[newSetting])); } else if (e.ClickedItem == repeatNoneToolStripMenuItem && !repeatNoneToolStripMenuItem.Checked) { var oci = ConfigCache.getOption("Repeat"); core.SendAsync(new BAPS.Client.Common.Message(cmd).Add(, (uint)oci.optionid, (uint)oci.type, (uint)(int)oci.choiceList["No repeat"])); } else if (e.ClickedItem == repeatOneToolStripMenuItem && !repeatOneToolStripMenuItem.Checked) { var oci = ConfigCache.getOption("Repeat"); core.SendAsync(new BAPS.Client.Common.Message(cmd).Add(, (uint)oci.optionid, (uint)oci.type, (uint)(int)oci.choiceList["Repeat one"])); } else if (e.ClickedItem == repeatAllToolStripMenuItem && !repeatAllToolStripMenuItem.Checked) { var oci = ConfigCache.getOption("Repeat"); core.SendAsync(new BAPS.Client.Common.Message(cmd).Add(, (uint)oci.optionid, (uint)oci.type, (uint)(int)oci.choiceList["Repeat all"])); } else if (e.ClickedItem == deleteItemToolStripMenuItem) { cmd = Command.PLAYLIST | Command.DELETEITEM | (Command)tl.Channel; core.SendAsync(new BAPS.Client.Common.Message(cmd).Add(, (uint)tl.LastIndexClicked)); } else if (e.ClickedItem == resetChannelStripMenuItem) { cmd = Command.PLAYLIST | Command.RESETPLAYLIST | (Command)tl.Channel; core.SendAsync(new BAPS.Client.Common.Message(cmd)); } else if (e.ClickedItem == showAudioWallToolStripMenuItem) { OpenAudioWall(tl); } }