Пример #1
0
        private TreeControl CreateTreeControl(ProjectManager manager, string modelName)
        {
            var tree = new TreeControl(
                manager.GetExperimenterForModel(modelName), 
                manager.GetModel(modelName));

            tree.ShadowMaker.Up += (sender_, e_) => navigator.IsEnabled = false;
            tree.ShadowMaker.Down += (sender_, e_) => navigator.IsEnabled = true;

            tree.NodeAnalyzeOn += (s_, e_) =>
                {
                    var exp = (e_ as RoutedEventArgs<Experiment>).Value;
                    analyst.AnalyzeExperiment(modelName, exp);
                };

            tree.NodeAnalyzeOff += (s_, e_) =>
                {
                    analyst.RemoveExperiment(modelName, (e_ as RoutedEventArgs<int>).Value);
                };

            tree.Refresh();

            return tree;
        }
Пример #2
0
        private void LoadTreeControl()
        {
            if (treeCanvas1 == null)
            {
                treeCanvas1 = new TreeControl(pm);
            }
            else treeCanvas1.Refresh();

            ccControlsHost.Content = treeCanvas1;
        }