Exemplo n.º 1
0
        /// <summary>
        /// The copy.
        /// </summary>
        /// <param name="testScriptCollection">
        /// The test script collection.
        /// </param>
        public void Copy(TestScriptCollection testScriptCollection)
        {
            if (this.Count > 0)
            {
                this.Clear();
            }

            foreach (var testScript in testScriptCollection)
            {
                this.Add(testScript.Copy());
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// The get parent check state.
        /// </summary>
        /// <param name="testScriptCollection">
        /// The feature collection.
        /// </param>
        private void GetParentCheckedState(TestScriptCollection testScriptCollection)
        {
            // Check state des übergeordneten Ordners setzten
            if (testScriptCollection != null)
            {
                if (testScriptCollection.Count > 0)
                {
                    foreach (var child in testScriptCollection)
                    {
                        var different = this.HasChildrenWithDifferentIsChecked(child.parent, child.IsChecked);

                        child.PropagateCheckedUp(different ? null : child.IsChecked);
                        break;
                    }
                }
                else
                {
                    // wenn es keine Child Elemente gibt -> deselectieren
                    this.IsChecked = false;
                }
            }
        }