コード例 #1
0
ファイル: MainWindow.cs プロジェクト: joncham/NDirStat
        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;
        }
コード例 #2
0
ファイル: MainWindow.cs プロジェクト: joncham/NDirStat
        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);
        }
コード例 #3
0
ファイル: MainWindow.cs プロジェクト: joncham/NDirStat
        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;
        }