public CalcKindControl(CalcKind calcKind) { InitializeComponent(); _calcKind = calcKind; tbCommandName.Text = _calcKind.KindName; tbAddition.Text = _calcKind.KindAddition; Width = 200; Height = 100; tbCommandName.Background = Brushes.LightBlue; }
public MainWindow() { InitializeComponent(); ProgrammSettings.InicializeNew(); List <CalcType> calcTypes = new List <CalcType>(); CalcType calcTypeRCC = new CalcType(); calcTypeRCC.TypeName = "Железобетон"; calcTypeRCC.ImageName = "Bridge.jpg"; calcTypeRCC.RegisterDelegate(new CalcType.AddCommandDelegate(AddItemWrapPanel)); calcTypes.Add(calcTypeRCC); CalcType calcTypeSC = new CalcType(); calcTypeSC.TypeName = "Металл"; calcTypeSC.ImageName = "Steel.jpg"; calcTypeSC.RegisterDelegate(new CalcType.AddCommandDelegate(AddItemWrapPanel)); calcTypes.Add(calcTypeSC); foreach (CalcType calcType in calcTypes) { CalcTypeControl calcTypeControl = new CalcTypeControl(calcType); stpCalcTypes.Children.Add(calcTypeControl); } CalcKind calcKindWall = new CalcKind(); calcKindWall.KindName = "Расчет железобетонных стен"; calcKindWall.KindAddition = "Подсчет объема бетона для железобетонных стен"; calcKindWall.RegisterDelegate(new CalcKind.CommandDelegate(ShowWall)); calcTypeRCC.CalcKinds.Add(calcKindWall); CalcKind calcKindSteelBase = new CalcKind(); calcKindSteelBase.KindName = "Расчет баз стальных колонн"; calcKindSteelBase.KindAddition = "Расчет параметров баз колонн с учетом давления под подошвой"; calcKindSteelBase.RegisterDelegate(new CalcKind.CommandDelegate(ShowSteelBase)); calcTypeSC.CalcKinds.Add(calcKindSteelBase); calcTypes[0].RunCommand(); }
public GroupMethods(Type t, CalcKind k) { methods = new List<CalcCheckBox>(); type = t; kind = k; }