/// <summary>
        /// ツリー再構築
        /// </summary>
        public void ReSetDbTree()
        {
            UserDbTreeDataSource dataSource = new UserDbTreeDataSource();
            List <TreeViewItem>  root       = new List <TreeViewItem>();
            TreeViewItem         rootNode   = UserDirTree.CreateDirectoryNode(new DirectoryInfo(Util.root + "/data"));

            root.Add(rootNode);
            dataSource.list             = root;
            UserDbDirOutline.DataSource = dataSource;
            UserDbDirOutline.ExpandItem(rootNode);
            UserTableDataSource data = (UserTableDataSource)UserTable.DataSource;

            data.dataList.Clear();
            UserTable.ReloadData();
        }
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            UserDbTreeDataSource dataSource = new UserDbTreeDataSource();
            List <TreeViewItem>  root       = new List <TreeViewItem>();
            TreeViewItem         rootNode   = UserDirTree.CreateDirectoryNode(new DirectoryInfo(Util.root + "/data"));

            root.Add(rootNode);
            dataSource.list = root;
            UserDbDirOutline.ScrollColumnToVisible(0);
            UserDbDirOutline.DataSource = dataSource;
            UserDbDirOutline.Delegate   = new UserDbTreeDelegate(dataSource);
            UserDbDirOutline.ExpandItem(rootNode);

            NSMenu menu = new NSMenu();

            menu.AutoEnablesItems = true;
            EventHandler addDirHandler = new EventHandler((object sender, EventArgs e) =>
            {
                AddDirectoryClick((NSObject)sender);
            });
            NSMenuItem addDirmenuItem = new NSMenuItem("ディレクトリ追加", addDirHandler);

            addDirmenuItem.Enabled = true;

            menu.AddItem(addDirmenuItem);

            EventHandler modifyDirHandler = new EventHandler((object sender, EventArgs e) =>
            {
                int row           = (int)UserDbDirOutline.SelectedRow;
                TreeViewItem item = (TreeViewItem)UserDbDirOutline.ItemAtRow(row);
                if (item.isDir)
                {
                    PerformSegue("modifyDir", this);
                }
            });
            NSMenuItem modifyDirmenuItem = new NSMenuItem("ディレクトリ名変更", modifyDirHandler);

            modifyDirmenuItem.Enabled = true;
            menu.AddItem(modifyDirmenuItem);

            EventHandler deleteDirHandler = new EventHandler((object sender, EventArgs e) =>
            {
                DeleteDirectoryClick((NSObject)sender);
            });
            NSMenuItem deleteDirmenuItem = new NSMenuItem("ディレクトリ削除", deleteDirHandler);

            deleteDirmenuItem.Enabled = true;

            menu.AddItem(deleteDirmenuItem);

            UserDbDirOutline.Menu = menu;

            CommonInstance.getInstance().SelectedDirectoryName     = "data";
            CommonInstance.getInstance().SelectedDirectoryFullPath = Util.root + "/data";

            ViewController vc = CommonInstance.getInstance().controller;

            User1Area.StringValue = vc.udata1.name + "\n" +
                                    String.Format("{0:0000}/{1:00}/{2:00}-{3:00}:{4:00}:{5:00}",
                                                  vc.udata1.time.Year,
                                                  vc.udata1.time.Month,
                                                  vc.udata1.time.Day,
                                                  vc.udata1.time.Hour,
                                                  vc.udata1.time.Minute,
                                                  vc.udata1.time.Second
                                                  );
            User2Area.StringValue = vc.udata2.name + "\n" +
                                    String.Format("{0:0000}/{1:00}/{2:00}-{3:00}:{4:00}:{5:00}",
                                                  vc.udata2.time.Year,
                                                  vc.udata2.time.Month,
                                                  vc.udata2.time.Day,
                                                  vc.udata2.time.Hour,
                                                  vc.udata2.time.Minute,
                                                  vc.udata2.time.Second
                                                  );
            Event1Area.StringValue = vc.edata1.name + "\n" +
                                     String.Format("{0:0000}/{1:00}/{2:00}-{3:00}:{4:00}:{5:00}",
                                                   vc.edata1.time.Year,
                                                   vc.edata1.time.Month,
                                                   vc.edata1.time.Day,
                                                   vc.edata1.time.Hour,
                                                   vc.edata1.time.Minute,
                                                   vc.edata1.time.Second
                                                   );
            Event2Area.StringValue = vc.edata2.name + "\n" +
                                     String.Format("{0:0000}/{1:00}/{2:00}-{3:00}:{4:00}:{5:00}",
                                                   vc.edata2.time.Year,
                                                   vc.edata2.time.Month,
                                                   vc.edata2.time.Day,
                                                   vc.edata2.time.Hour,
                                                   vc.edata2.time.Minute,
                                                   vc.edata2.time.Second
                                                   );
        }