/// ------------------------------------------------------------------------------------
        /// <summary>
        /// This gets fired when the user clicks on the "Refresh Chart" on the drop-down
        /// showing suprasegmentals to ignore.
        /// </summary>
        /// ------------------------------------------------------------------------------------
        private void HandleRefreshChartClick(object sender, EventArgs e)
        {
            var oldList = Project.IgnoredSymbolsInCVCharts.OrderBy(s => s, StringComparer.Ordinal).ToList();
            var newList = _ignoredSymbolsDropDown.GetIgnoredSymbols().OrderBy(s => s, StringComparer.Ordinal).ToList();

            var listsAreDifferent = (oldList.Count != newList.Count);

            if (!listsAreDifferent)
            {
                for (int i = 0; i < oldList.Count; i++)
                {
                    listsAreDifferent = (oldList[i] != newList[i]);
                    if (listsAreDifferent)
                    {
                        break;
                    }
                }
            }

            _tmAdapter.HideBarItemsPopup("tbbIgnoredSymbols");
            Application.DoEvents();

            // Only refresh when the list changed.
            if (listsAreDifferent)
            {
                Project.IgnoredSymbolsInCVCharts = newList;
                Project.Save();
                ProjectInventoryBuilder.Process(Project);
                App.MsgMediator.SendMessage("RefreshCVChartAfterIgnoredSymbolsChanged", null);
            }
        }
Example #2
0
 /// ------------------------------------------------------------------------------------
 private void HandlePlaybackSpeedAdjusterPlayClick(object sender, EventArgs e)
 {
     m_tmAdapter.HideBarItemsPopup("tbbAdjustPlaybackSpeedParent");
     m_tmAdapter.HideBarItemsPopup("tbbPlayback");
     WordListGrid.OnPlayback(null);
 }