Files
2020-09-12 16:11:43 +02:00

122 lines
4.3 KiB
C#

using CMS_CORE_Library.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Step.Model.ConfigModels
{
public class ToolManagerConfigModel
{
public string ToolMetricType { get; set; }
public bool FamilyOpt { get; set; }
public bool ShankOpt { get; set; }
public bool MagPosTypeOpt { get; set; }
public bool OffsetOpt { get; set; }
public bool ReviveOpt { get; set; }
public bool GammaOpt { get; set; }
public bool LifeOpt { get; set; }
public bool TcpOpt { get; set; }
public bool CoolingOpt { get; set; }
public bool MultidimensionalShankOpt { get; set; }
public bool SelfAdaptivePathOpt { get; set; }
public bool DynamicCompensationOpt { get; set; }
public bool BallufOpt { get; set; }
public bool IntegrityCheckOpt { get; set; }
public CooligTranslations CooligsTranslations { get; set; }
public List<MagazineNamesModel> MagazineNames { get; set; }
public List<ToolTypeConfigModel> ToolTypes { get; set; }
public List<OffsetCustomFieldConfigModel> OffsetCustomFields;
}
public class OffsetCustomFieldConfigModel
{
public int Id { get; set; }
public int PlcId { get; set; }
public int Order { get; set; }
public string Type { get; set; }
public Dictionary<string, string> LocalizedNames { get; set; }
}
public class CooligTranslations
{
public Dictionary<string, string> Cooling { get; set; }
public Dictionary<string, string> Cooling1 { get; set; }
public Dictionary<string, string> Cooling2 { get; set; }
public Dictionary<string, string> Cooling3 { get; set; }
public Dictionary<string, string> Cooling4 { get; set; }
public Dictionary<string, string> Cooling5 { get; set; }
public Dictionary<string, string> Cooling6 { get; set; }
public Dictionary<string, string> Cooling7 { get; set; }
}
// Override
public class ToolTableConfigurationModel : ToolTableConfiguration
{
// Override edgesClass, in order to add OSAI custom fields configuration
public new EdgeConfigurationModel EdgesConfiguration;
public ToolTableConfigurationModel() { }
public ToolTableConfigurationModel(ToolTableConfiguration obj)
{
// Edges data
this.EdgesConfiguration = new EdgeConfigurationModel
{
EdgeConfiguration = obj.EdgesConfiguration.EdgeConfiguration,
EdgesAdditionalParamsConfiguration = obj.EdgesConfiguration.EdgesAdditionalParamsConfiguration
};
// Options
this.FamilyOptionActive = obj.FamilyOptionActive;
this.LifeOption = obj.FamilyOptionActive;
this.SelfAdaptivePathOptionActive = obj.SelfAdaptivePathOptionActive;
this.MultitoolOptionActive = obj.MultitoolOptionActive;
this.OffsetOptionActive = obj.OffsetOptionActive;
this.MagPositionOptionActive = obj.MagPositionOptionActive;
this.RadiusMetricType = obj.RadiusMetricType;
// Max
this.MaxEdgesPerTools = obj.MaxEdgesPerTools;
this.MaxMultitools = obj.MaxMultitools;
this.MaxOffsets = obj.MaxOffsets;
this.MaxTools = obj.MaxTools;
this.MaxToolsPerFamily = obj.MaxToolsPerFamily;
this.MaxToolsPerMultitools = obj.MaxToolsPerMultitools;
// Fields Configurations
this.ShanksConfiguration = obj.ShanksConfiguration;
this.ToolsConfiguration = obj.ToolsConfiguration;
this.FamiliesConfiguration = obj.FamiliesConfiguration;
this.MagazinePosConfiguration = obj.MagazinePosConfiguration;
this.Magazines = obj.Magazines;
this.SiemensBallufOption = obj.SiemensBallufOption;
}
}
// Override edgesClass, in order to add OSAI custom fields configuration
public class EdgeConfigurationModel : EdgesConfiguration
{
public Dictionary<int, CustomFieldConfiguration> OffsetCustomFields;
}
public class CustomFieldConfiguration
{
public int plcId;
public string type;
}
}