コード例 #1
0
    // Start is called before the first frame update
    void Start()
    {
        pathFinder = FindObjectOfType <PathFinder>();
        var path = pathFinder.GetPath();

        StartCoroutine(FollowPath(path));
        Base = FindObjectOfType <FBase>();
    }
コード例 #2
0
ファイル: Events.cs プロジェクト: Napo1985/File-Explorer
        public List <FBase> OnFFClick(TreeViewItem fatherItem)
        {
            try
            {
                FBase current = (FBase)fatherItem.DataContext;

                return(GetFromPath(current.FullPath));
            }
            catch (Exception ex)
            {
                return(null);
            }
        }
コード例 #3
0
        private void MasterItemSelected(object sender, RoutedEventArgs e)
        {
            TreeViewItem fatherItem = (TreeViewItem)myTree.SelectedItem;
            FBase        fof        = (FBase)fatherItem.DataContext;
            List <FBase> nextLevel  = clickEventsIns.OnFFClick(fatherItem);

            if (nextLevel != null)
            {
                fatherItem.Items.Clear();
                foreach (var ffItem in nextLevel)
                {
                    TreeViewItem x = new TreeViewItem();
                    x.DataContext = (object)ffItem;
                    x.Header      = ffItem.Name;
                    fatherItem.Items.Add(x);
                }
            }
        }
コード例 #4
0
 // Start is called before the first frame update
 void Start()
 {
     Base = FindObjectOfType <FBase>();
 }