Exemplo n.º 1
0
        private void BuildManageInfoViews()
        {
            if (selectionGroupInfo == null)
            {
                return;
            }

            // 更新前の状態を保持.

            var opened = new Object[0];

            if (manageInfoviews != null)
            {
                opened = manageInfoviews
                         .Where(x => x.IsOpen)
                         .Select(x => x.ManageInfo.assetObject)
                         .ToArray();
            }

            var edited = new Object[0];

            if (manageInfoviews != null)
            {
                edited = manageInfoviews
                         .Where(x => x.IsEdit)
                         .Select(x => x.ManageInfo.assetObject)
                         .ToArray();
            }

            // グループ内の管理情報取得.

            var manageInfos = assetManageManager
                              .GetGroupManageInfo(selectionGroupInfo.groupName)
                              .ToArray();

            var views = new List <ManageInfoView>();

            var collectInfos = assetManageManager.GetAllAssetCollectInfo().ToArray();

            // グループ内で管理しているアセット管理情報.
            foreach (var manageInfo in manageInfos)
            {
                var manageAsset = manageInfo.assetObject;

                var open = opened.Any(x => x == manageAsset);
                var edit = edited.Any(x => x == manageAsset);

                var view = CreateManageInfoView(manageInfo, collectInfos, open, edit);

                views.Add(view);
            }

            manageInfoviews = views.ToArray();

            UpdateSearchedEntrys();
        }