Exemplo n.º 1
0
        string RunDirectoryScan(string directory)
        {
            ModelBuilder builder = new ModelBuilder();
            DirStatModel model = builder.Build(new NDirInfo(directory));
            NDirStat.TreeModel treeModel = new NDirStat.TreeModel(model);

            string json = BuildJSON(treeModel.GetRoot());
            json = string.Format(@"{{ \""data\"": {0}}}", json);

            // call into script to 
            string func = "updateTree(\"" + json + "\")";
            return func;
        }
Exemplo n.º 2
0
        void RunDirectoryScan(string directory)
        {
            ModelBuilder builder = new ModelBuilder();
            DirStatModel model = builder.Build(new NDirInfo(directory));
            NDirStat.TreeModel treeModel = new NDirStat.TreeModel(model);

            QStandardItemModel itemModel = new QStandardItemModel();
            BuildSubTree(itemModel, treeModel.GetRoot());
            // Assign the model to the TreeView
            treeView.setModel(itemModel);

            QStandardItemModel listModel = new QStandardItemModel();
            BuildListView(listModel, new ListModel(model));
            listView.setModel(listModel);

            treeMap.SetModel(model);
        }
Exemplo n.º 3
0
        void RunDirectoryScan(string directory)
        {
            ModelBuilder builder = new ModelBuilder();
            DirStatModel model = builder.Build(new NDirInfo(directory));
            NDirStat.TreeModel treeModel = new NDirStat.TreeModel(model);

            Gtk.TreeStore fileListStore = new Gtk.TreeStore(typeof(string));
            BuildSubTree(fileListStore, treeModel.GetRoot());

            // Assign the model to the TreeView
            treeView.Model = fileListStore;
            treeMapView.SetModel(model);

            ListStore listStore = new ListStore(
                typeof(string),
                typeof(string),
                typeof(string),
                typeof(string),
                typeof(string),
                typeof(string)
                );
            BuildListStore(listStore, new ListModel(model));
            listView.Model = listStore;
        }