コード例 #1
0
        public bool ValidateTrees()
        {
            if (Trees == null)
            {
                return(true);
            }
            var worker = new TreeValidationWorker(Trees);

            return(worker.ValidateTrees());
        }
コード例 #2
0
        /// <summary>
        /// performs validation on each tree view and returns ture if validation passes
        /// </summary>
        /// <param name="invalidViewIndex">index to first invalid view</param>
        /// <returns></returns>
        protected bool ValidateTreeViews(out ITreeView invalidView)
        {
            invalidView = null;
            bool validationPass = true;

            foreach (var view in View.Layouts.OfType <ITreeView>())
            {
                if (view.Trees != null)
                {
                    view.EndEdit();
                    var worker = new TreeValidationWorker(view.Trees);
                    if (!worker.ValidateTrees())
                    {
                        invalidView    = view;
                        validationPass = false;
                    }
                }
            }

            return(validationPass);
        }
コード例 #3
0
ファイル: Plot.cs プロジェクト: FMSC-Measurements/FScruiserV2
 public bool ValidateTrees()
 {
     var worker = new TreeValidationWorker(Trees);
     return worker.ValidateTrees();
 }
コード例 #4
0
 public void ValidateTreesAsync()
 {
     var worker = new TreeValidationWorker(this.NonPlotTrees);
     worker.ValidateTreesAsync();
 }
コード例 #5
0
 public bool ValidateTrees()
 {
     var worker = new TreeValidationWorker(this.NonPlotTrees);
     return worker.ValidateTrees();
 }
コード例 #6
0
        /// <summary>
        /// performs validation on each tree view and returns ture if validation passes
        /// </summary>
        /// <param name="invalidViewIndex">index to first invalid view</param>
        /// <returns></returns>
        protected bool ValidateTreeViews(out int invalidViewIndex)
        {
            bool validationPass = true;
            invalidViewIndex = -1;
            for (int i = 0; i < this.View.Layouts.Count; i++)
            {
                ITreeView view = this.View.Layouts[i] as ITreeView;
                if (view != null && view.Trees != null)
                {
                    view.EndEdit();
                    var worker = new TreeValidationWorker(view.Trees);
                    if (!worker.ValidateTrees())
                    {
                        if (invalidViewIndex != -1)
                        {
                            invalidViewIndex = i;
                        }
                        validationPass = false;
                    }
                }
            }

            return validationPass;
        }