Beispiel #1
0
        internal void ExcludeSelected()
        {
            if (!string.IsNullOrEmpty(SelectedIncludedVariable))
            {
                var oldSelectedIndex = IncludedVariables.IndexOf(SelectedIncludedVariable);

                var whatToMove = SelectedIncludedVariable;
                ExcludedVariables.Add(whatToMove);
                IncludedVariables.Remove(whatToMove);
                SelectedExcludedVariable = whatToMove;

                if (oldSelectedIndex < IncludedVariables.Count)
                {
                    SelectedIncludedVariable = IncludedVariables[oldSelectedIndex];
                }
                else if (IncludedVariables.Count > 0)
                {
                    SelectedIncludedVariable = IncludedVariables[IncludedVariables.Count - 1];
                }
            }
        }