Example #1
0
        void UpdateNeedsAttentionStatus()
        // Assumes changes have been Harvested to the LocAlternative
        {
            if (null == Item)
            {
                return;
            }
            LocAlternate alt = new LocAlternate(
                m_textYourLanguage.Text,
                m_comboShortcutKey.Text,
                m_textToolTip.Text);

            // Do the test
            string sNeedsMessage   = alt.NeedsAttention(Item);
            bool   bNeedsAttention = !string.IsNullOrEmpty(sNeedsMessage);

            // Update the tree node
            if (null != Tree.SelectedNode && null != Tree.SelectedNode.Tag as LocItem)
            {
                Tree.SelectedNode.ForeColor = (bNeedsAttention ? Color.Red : Color.Navy);
            }

            // Update the message
            m_labelNeedsAttention.Text = sNeedsMessage;
        }
Example #2
0
        // Internal Methods ------------------------------------------------------------------
        #region Method: bool ItemNeedsAttention(LocItem item)
        bool ItemNeedsAttention(LocItem item)
        {
            LocAlternate alt = item.GetAlternate(iLanguage);

            if (null == alt)
            {
                return(true);
            }
            bool bNeedsAttention = !string.IsNullOrEmpty(alt.NeedsAttention(item));

            return(bNeedsAttention);
        }