ITrainingPlanTreeFiller getFiller(TrainingPlansTreeGroup group)
        {
            switch (group)
            {
            case TrainingPlansTreeGroup.Difficult:
                return(new TrainingPlanDifficultFiller());

            case TrainingPlansTreeGroup.Author:
                return(new TrainingPlanAuthorFiller());
            }
            return(new TrainingPlanTypeFiller());
        }
        public void Fill(TrainingPlansTreeGroup treeFiller)
        {
            var parentWnd = this.GetParentControl <BaseWindow>();

            //var plans = ServiceManager.Instance.GetWorkoutPlans(UserContext.Token,null);
            //if (parentWnd == null)
            //{
            //    return;
            //}
            //parentWnd.SynchronizationContext.Send(delegate
            //             {
            //                 FocusedNode = null;
            //                 Nodes.Clear();
            //                 var mainNodes = getFiller(treeFiller).Fill(plans);
            //                 foreach (Node value in mainNodes)
            //                 {
            //                     if (value.Nodes.Count > 0)
            //                     {
            //                         Nodes.Add(value);
            //                     }
            //                 }
            //                 RecalcLayout();
            //             },null);
        }