添加项目文件。

This commit is contained in:
GG Z
2026-02-28 21:01:57 +08:00
parent 9fe4e5a9aa
commit 7a229067cc
175 changed files with 18060 additions and 0 deletions

View File

@@ -0,0 +1,60 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CustomOpenAddins.Models
{
/// <summary>
/// 表单
/// </summary>
public class SheetTable
{
public SheetTable(TypeOfSurrounding typeOfSurrounding)
{
TypeOfSurrounding = typeOfSurrounding;
MainCategories = new HashSet<PrimaryItem>();
}
public PrimaryItem this[int index]
{
get
{
if (index < 0 || index > MainCategories.Count - 1)
{
throw new ArgumentOutOfRangeException("索引越界");
}
return MainCategories.ElementAt(index);
}
}
public HashSet<PrimaryItem> MainCategories { get; private set; }
public string Name => $"{TypeOfSurrounding.GetDescription()}工程量";
public TypeOfSurrounding TypeOfSurrounding { get; set; }
///// <summary>
///// 围岩类型
///// </summary>
//public TypeOfSurrounding TypeOfSurrounding { get; }
//TypeOfSurrounding IItem.TypeOfSurrounding { get => TypeOfSurrounding; set => throw new NotImplementedException(); }
public PrimaryItem AddMain(string mainName)
{
PrimaryItem mainCategory = new PrimaryItem(mainName, this);
if (MainCategories == null)
{
MainCategories = new HashSet<PrimaryItem>();
}
MainCategories.Add(mainCategory);
return mainCategory;
}
}
}