Beispiel #1
0
 // Set the visibility of the expander icon
 private void ExpanderVisibility(bool state)
 {
     RenameTxt.ShowExpander(state);
     ReplaceTxt.ShowExpander(state);
     WithTxt.ShowExpander(state);
     PrefixTxt.ShowExpander(state);
     SuffixTxt.ShowExpander(state);
 }
Beispiel #2
0
        // Set the textbox historic to individual or common
        private void TextBoxHistoric_Click(object sender, RoutedEventArgs e)
        {
            // get the clicked submenu and show the expander when needed
            if ((e.OriginalSource as MenuItem) == CommonHistoric)
            {
                SetCommonHistoricMode(true);
                RenameTxt.ActiveHistory = ReplaceTxt.ActiveHistory = WithTxt.ActiveHistory = PrefixTxt.ActiveHistory = SuffixTxt.ActiveHistory = false;

                if (historicCommon.Count > 0)
                {
                    ExpanderVisibility(true);
                }
                else
                {
                    ExpanderVisibility(false);
                }
            }
            else
            {
                SetCommonHistoricMode(false);
                RenameTxt.ActiveHistory = ReplaceTxt.ActiveHistory = WithTxt.ActiveHistory = PrefixTxt.ActiveHistory = SuffixTxt.ActiveHistory = true;

                if (RenameTxt.History.Count > 0)
                {
                    RenameTxt.ShowExpander(true);
                }
                else
                {
                    RenameTxt.ShowExpander(false);
                }
                if (ReplaceTxt.History.Count > 0)
                {
                    ReplaceTxt.ShowExpander(true);
                }
                else
                {
                    ReplaceTxt.ShowExpander(false);
                }
                if (WithTxt.History.Count > 0)
                {
                    WithTxt.ShowExpander(true);
                }
                else
                {
                    WithTxt.ShowExpander(false);
                }
                if (PrefixTxt.History.Count > 0)
                {
                    PrefixTxt.ShowExpander(true);
                }
                else
                {
                    PrefixTxt.ShowExpander(false);
                }
                if (SuffixTxt.History.Count > 0)
                {
                    SuffixTxt.ShowExpander(true);
                }
                else
                {
                    SuffixTxt.ShowExpander(false);
                }
            }
        }