diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-04-18 13:25:48 +0300 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-04-18 13:25:48 +0300 |
| commit | 1356c4682507fe3c7bdfebc7316fcad1b67594a1 (patch) | |
| tree | 4c1f3db6588dc1be3d323f09779a532dd2c848d7 /Software/Visual_Studio | |
| parent | a5ec5d754dd516dfadbb34fe1b167eff817ded6e (diff) | |
| download | Tango-1356c4682507fe3c7bdfebc7316fcad1b67594a1.tar.gz Tango-1356c4682507fe3c7bdfebc7316fcad1b67594a1.zip | |
Modified Tech_IOS according to Avidan spec.
Added Tango.Documents library.
Implemented Ports List Generator.
Diffstat (limited to 'Software/Visual_Studio')
28 files changed, 1264 insertions, 178 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/DigitalInElementEditor.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/DigitalInElementEditor.xaml index 29eab7042..8c72798d5 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/DigitalInElementEditor.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/DigitalInElementEditor.xaml @@ -45,7 +45,7 @@ </Border> <Border VerticalAlignment="Bottom" Grid.Row="1" Margin="0 0 0 0"> - <TextBlock TextWrapping="Wrap" FontSize="14" Foreground="DimGray" HorizontalAlignment="Center" Text="{Binding TechIo.Description}"></TextBlock> + <TextBlock TextWrapping="Wrap" FontSize="14" Foreground="DimGray" HorizontalAlignment="Center" Text="{Binding TechName}"></TextBlock> </Border> </Grid> <!--Content--> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/DigitalOutElementEditor.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/DigitalOutElementEditor.xaml index dcf78ca69..5fd92c336 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/DigitalOutElementEditor.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/DigitalOutElementEditor.xaml @@ -56,7 +56,7 @@ </Border> <Border VerticalAlignment="Bottom" Grid.Row="1" Margin="0 0 0 0"> - <TextBlock TextWrapping="Wrap" FontSize="14" Foreground="DimGray" HorizontalAlignment="Center" Text="{Binding TechIo.Description}"></TextBlock> + <TextBlock TextWrapping="Wrap" FontSize="14" Foreground="DimGray" HorizontalAlignment="Center" Text="{Binding TechName}"></TextBlock> </Border> </Grid> <!--Content--> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/DigitalInTemplate.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/DigitalInTemplate.xaml index 1121fe9e1..3f830de65 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/DigitalInTemplate.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/DigitalInTemplate.xaml @@ -25,7 +25,7 @@ <GroupBox Header="INPUT"> <StackPanel> <TextBlock FontSize="10">Selected Pin</TextBlock> - <ComboBox Margin="0 5 0 0" ItemsSource="{Binding Adapter.TechIos,Converter={StaticResource TechIosToDigitalInsConverter}}" SelectedItem="{Binding TechIo,Mode=TwoWay}" DisplayMemberPath="Description" /> + <ComboBox Margin="0 5 0 0" ItemsSource="{Binding Adapter.TechIos,Converter={StaticResource TechIosToDigitalInsConverter}}" SelectedItem="{Binding TechIo,Mode=TwoWay}" DisplayMemberPath="InterfaceName" /> </StackPanel> </GroupBox> </StackPanel> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/DigitalOutTemplate.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/DigitalOutTemplate.xaml index dafceefcb..13840d4b1 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/DigitalOutTemplate.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/DigitalOutTemplate.xaml @@ -25,7 +25,7 @@ <GroupBox Header="OUTPUT"> <StackPanel> <TextBlock FontSize="10">Selected Pin</TextBlock> - <ComboBox Margin="0 5 0 0" ItemsSource="{Binding Adapter.TechIos,Converter={StaticResource TechIosToDigitalOutsConverter}}" SelectedItem="{Binding TechIo,Mode=TwoWay}" DisplayMemberPath="Description" /> + <ComboBox Margin="0 5 0 0" ItemsSource="{Binding Adapter.TechIos,Converter={StaticResource TechIosToDigitalOutsConverter}}" SelectedItem="{Binding TechIo,Mode=TwoWay}" DisplayMemberPath="InterfaceName" /> </StackPanel> </GroupBox> </StackPanel> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/DigitalInItem.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/DigitalInItem.cs index b7231b10f..177d44489 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/DigitalInItem.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/DigitalInItem.cs @@ -25,7 +25,7 @@ namespace Tango.MachineStudio.Technician.TechItems public TechIo TechIo { get { return _techIo; } - set { _techIo = value; RaisePropertyChangedAuto(); TechName = _techIo != null ? _techIo.Description : null; ItemGuid = value != null ? value.Guid : null; } + set { _techIo = value; RaisePropertyChangedAuto(); TechName = _techIo != null ? _techIo.InterfaceName : null; ItemGuid = value != null ? value.Guid : null; } } private bool _value; diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/DigitalOutItem.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/DigitalOutItem.cs index 5fd02c4a9..84e727b97 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/DigitalOutItem.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/DigitalOutItem.cs @@ -30,7 +30,7 @@ namespace Tango.MachineStudio.Technician.TechItems public TechIo TechIo { get { return _techIo; } - set { _techIo = value; RaisePropertyChangedAuto(); TechName = _techIo != null ? _techIo.Description : null; ItemGuid = value != null ? value.Guid : null; } + set { _techIo = value; RaisePropertyChangedAuto(); TechName = _techIo != null ? _techIo.InterfaceName : null; ItemGuid = value != null ? value.Guid : null; } } private bool _value; diff --git a/Software/Visual_Studio/Resources/PortsList.xlsx b/Software/Visual_Studio/Resources/PortsList.xlsx Binary files differnew file mode 100644 index 000000000..1c8c7b1cc --- /dev/null +++ b/Software/Visual_Studio/Resources/PortsList.xlsx diff --git a/Software/Visual_Studio/Tango.BL/Entities/TechIo.cs b/Software/Visual_Studio/Tango.BL/Entities/TechIo.cs index 4175b4965..f902d5a2b 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/TechIo.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/TechIo.cs @@ -14,102 +14,162 @@ namespace Tango.BL.Entities public partial class TechIo : ObservableEntity<TechIo> { - protected Int32 _code; + protected Int32 _port; /// <summary> - /// Gets or sets the techio code. + /// Gets or sets the techio port. /// </summary> - [Column("CODE")] + [Column("PORT")] - public Int32 Code + public Int32 Port { get { - return _code; + return _port; } set { - _code = value; RaisePropertyChanged(nameof(Code)); + _port = value; RaisePropertyChanged(nameof(Port)); } } - protected String _name; + protected Int32 _type; /// <summary> - /// Gets or sets the techio name. + /// Gets or sets the techio type. /// </summary> - [Column("NAME")] + [Column("TYPE")] - public String Name + public Int32 Type { get { - return _name; + return _type; } set { - _name = value; RaisePropertyChanged(nameof(Name)); + _type = value; RaisePropertyChanged(nameof(Type)); } } - protected String _description; + protected String _designator; /// <summary> - /// Gets or sets the techio description. + /// Gets or sets the techio designator. /// </summary> - [Column("DESCRIPTION")] + [Column("DESIGNATOR")] - public String Description + public String Designator { get { - return _description; + return _designator; } set { - _description = value; RaisePropertyChanged(nameof(Description)); + _designator = value; RaisePropertyChanged(nameof(Designator)); } } - protected Int32 _port; + protected String _asm; /// <summary> - /// Gets or sets the techio port. + /// Gets or sets the techio asm. /// </summary> - [Column("PORT")] + [Column("ASM")] - public Int32 Port + public String Asm { get { - return _port; + return _asm; } set { - _port = value; RaisePropertyChanged(nameof(Port)); + _asm = value; RaisePropertyChanged(nameof(Asm)); } } - protected Int32 _type; + protected String _interfacename; /// <summary> - /// Gets or sets the techio type. + /// Gets or sets the techio interface name. /// </summary> - [Column("TYPE")] + [Column("INTERFACE_NAME")] - public Int32 Type + public String InterfaceName { get { - return _type; + return _interfacename; } set { - _type = value; RaisePropertyChanged(nameof(Type)); + _interfacename = value; RaisePropertyChanged(nameof(InterfaceName)); + } + + } + + protected String _sensor; + /// <summary> + /// Gets or sets the techio sensor. + /// </summary> + [Column("SENSOR")] + + public String Sensor + { + get + { + return _sensor; + } + + set + { + _sensor = value; RaisePropertyChanged(nameof(Sensor)); + } + + } + + protected Double _initvalue; + /// <summary> + /// Gets or sets the techio init value. + /// </summary> + [Column("INIT_VALUE")] + + public Double InitValue + { + get + { + return _initvalue; + } + + set + { + _initvalue = value; RaisePropertyChanged(nameof(InitValue)); + } + + } + + protected Int32 _averaging; + /// <summary> + /// Gets or sets the techio averaging. + /// </summary> + [Column("AVERAGING")] + + public Int32 Averaging + { + get + { + return _averaging; + } + + set + { + _averaging = value; RaisePropertyChanged(nameof(Averaging)); } } diff --git a/Software/Visual_Studio/Tango.BL/Enumerations/IOType.cs b/Software/Visual_Studio/Tango.BL/Enumerations/IOType.cs index 56c4a252c..7c413e59b 100644 --- a/Software/Visual_Studio/Tango.BL/Enumerations/IOType.cs +++ b/Software/Visual_Studio/Tango.BL/Enumerations/IOType.cs @@ -10,8 +10,15 @@ namespace Tango.BL.Enumerations { DigitalOutput, DigitalInput, - AnalogOut, + AnalogOutput, AnalogInput, - PWM, + Valve3Way, + COM, + Motor, + MotorHighCurrent, + I2C, + ROT_ENC_ABZ, + ROT_ENC_SSI, + TACHO } } diff --git a/Software/Visual_Studio/Tango.Core/Helpers/ColorHelper.cs b/Software/Visual_Studio/Tango.Core/Helpers/ColorHelper.cs index 6e7e03729..07e1c70c2 100644 --- a/Software/Visual_Studio/Tango.Core/Helpers/ColorHelper.cs +++ b/Software/Visual_Studio/Tango.Core/Helpers/ColorHelper.cs @@ -21,8 +21,7 @@ namespace Tango.Core.Helpers /// <returns></returns> public static int ColorToInteger(Color color) { - return (int)((color.A << 24) | (color.R << 16) | - (color.G << 8) | (color.B << 0)); + return (int)((color.A << 24) | (color.R << 16) | (color.G << 8) | (color.B << 0)); } /// <summary> diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx index 0d889d4ae..4af57cfdd 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx @@ -864,11 +864,14 @@ <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" /> <Property Name="GUID" Type="varchar" MaxLength="36" Nullable="false" /> <Property Name="LAST_UPDATED" Type="datetime2" Precision="3" Nullable="false" /> - <Property Name="CODE" Type="int" Nullable="false" /> - <Property Name="NAME" Type="varchar" MaxLength="100" Nullable="false" /> - <Property Name="DESCRIPTION" Type="varchar" MaxLength="100" Nullable="false" /> <Property Name="PORT" Type="int" Nullable="false" /> <Property Name="TYPE" Type="int" Nullable="false" /> + <Property Name="DESIGNATOR" Type="varchar" MaxLength="30" /> + <Property Name="ASM" Type="varchar" MaxLength="30" /> + <Property Name="INTERFACE_NAME" Type="varchar" MaxLength="100" /> + <Property Name="SENSOR" Type="varchar" MaxLength="100" /> + <Property Name="INIT_VALUE" Type="float" Nullable="false" /> + <Property Name="AVERAGING" Type="int" Nullable="false" /> <Property Name="MIN" Type="float" Nullable="false" /> <Property Name="MAX" Type="float" Nullable="false" /> </EntityType> @@ -3570,11 +3573,14 @@ <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" /> <Property Name="GUID" Type="String" Nullable="false" MaxLength="36" FixedLength="false" Unicode="false" /> <Property Name="LAST_UPDATED" Type="DateTime" Nullable="false" Precision="3" /> - <Property Name="CODE" Type="Int32" Nullable="false" /> - <Property Name="NAME" Type="String" Nullable="false" MaxLength="100" FixedLength="false" Unicode="false" /> - <Property Name="DESCRIPTION" Type="String" Nullable="false" MaxLength="100" FixedLength="false" Unicode="false" /> <Property Name="PORT" Type="Int32" Nullable="false" /> <Property Name="TYPE" Type="Int32" Nullable="false" /> + <Property Name="DESIGNATOR" Type="String" MaxLength="30" FixedLength="false" Unicode="false" /> + <Property Name="ASM" Type="String" MaxLength="30" FixedLength="false" Unicode="false" /> + <Property Name="INTERFACE_NAME" Type="String" MaxLength="100" FixedLength="false" Unicode="false" /> + <Property Name="SENSOR" Type="String" MaxLength="100" FixedLength="false" Unicode="false" /> + <Property Name="INIT_VALUE" Type="Double" Nullable="false" /> + <Property Name="AVERAGING" Type="Int32" Nullable="false" /> <Property Name="MIN" Type="Double" Nullable="false" /> <Property Name="MAX" Type="Double" Nullable="false" /> </EntityType> @@ -5506,11 +5512,14 @@ <MappingFragment StoreEntitySet="TECH_IOS"> <ScalarProperty Name="MAX" ColumnName="MAX" /> <ScalarProperty Name="MIN" ColumnName="MIN" /> + <ScalarProperty Name="AVERAGING" ColumnName="AVERAGING" /> + <ScalarProperty Name="INIT_VALUE" ColumnName="INIT_VALUE" /> + <ScalarProperty Name="SENSOR" ColumnName="SENSOR" /> + <ScalarProperty Name="INTERFACE_NAME" ColumnName="INTERFACE_NAME" /> + <ScalarProperty Name="ASM" ColumnName="ASM" /> + <ScalarProperty Name="DESIGNATOR" ColumnName="DESIGNATOR" /> <ScalarProperty Name="TYPE" ColumnName="TYPE" /> <ScalarProperty Name="PORT" ColumnName="PORT" /> - <ScalarProperty Name="DESCRIPTION" ColumnName="DESCRIPTION" /> - <ScalarProperty Name="NAME" ColumnName="NAME" /> - <ScalarProperty Name="CODE" ColumnName="CODE" /> <ScalarProperty Name="LAST_UPDATED" ColumnName="LAST_UPDATED" /> <ScalarProperty Name="GUID" ColumnName="GUID" /> <ScalarProperty Name="ID" ColumnName="ID" /> diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram index d6f37da08..5e2999f23 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram @@ -5,75 +5,75 @@ <!-- Diagram content (shape and connector positions) --> <edmx:Diagrams> <Diagram DiagramId="f9ae01d708754bbd997add25a4bacc79" Name="Diagram1"> - <EntityTypeShape EntityType="RemoteModel.ACTION_TYPES" Width="1.5" PointX="8" PointY="68.375" /> - <EntityTypeShape EntityType="RemoteModel.ADDRESS" Width="1.5" PointX="1.5" PointY="74.625" /> - <EntityTypeShape EntityType="RemoteModel.APPLICATION_DISPLAY_PANEL_VERSIONS" Width="1.5" PointX="1.5" PointY="39.375" /> - <EntityTypeShape EntityType="RemoteModel.APPLICATION_FIRMWARE_VERSIONS" Width="1.5" PointX="1.5" PointY="55.125" /> - <EntityTypeShape EntityType="RemoteModel.APPLICATION_OS_VERSIONS" Width="1.5" PointX="1.5" PointY="36.375" /> - <EntityTypeShape EntityType="RemoteModel.APPLICATION_VERSIONS" Width="1.5" PointX="1.5" PointY="64.75" /> - <EntityTypeShape EntityType="RemoteModel.BRUSH_STOPS" Width="1.5" PointX="12.75" PointY="13.625" /> - <EntityTypeShape EntityType="RemoteModel.CARTRIDGE_TYPES" Width="1.5" PointX="6" PointY="31.25" /> - <EntityTypeShape EntityType="RemoteModel.CAT" Width="1.5" PointX="5.25" PointY="13.125" /> - <EntityTypeShape EntityType="RemoteModel.CCT" Width="1.5" PointX="5.25" PointY="34.375" /> - <EntityTypeShape EntityType="RemoteModel.COLOR_CATALOGS" Width="1.5" PointX="10.5" PointY="8" /> - <EntityTypeShape EntityType="RemoteModel.COLOR_SPACES" Width="1.5" PointX="8.25" PointY="9.75" /> - <EntityTypeShape EntityType="RemoteModel.CONFIGURATION" Width="1.5" PointX="0.75" PointY="43.875" /> - <EntityTypeShape EntityType="RemoteModel.CONTACT" Width="1.5" PointX="1.5" PointY="78.875" /> - <EntityTypeShape EntityType="RemoteModel.DISPENSER_TYPES" Width="1.5" PointX="6" PointY="62.5" /> - <EntityTypeShape EntityType="RemoteModel.EMBEDDED_FIRMWARE_VERSIONS" Width="1.5" PointX="1.5" PointY="61.75" /> - <EntityTypeShape EntityType="RemoteModel.EMBEDDED_SOFTWARE_VERSIONS" Width="1.5" PointX="1.5" PointY="52.25" /> - <EntityTypeShape EntityType="RemoteModel.EVENT_TYPES" Width="1.5" PointX="8" PointY="71.5" /> - <EntityTypeShape EntityType="RemoteModel.EVENT_TYPES_ACTIONS" Width="1.5" PointX="10.25" PointY="72.375" /> - <EntityTypeShape EntityType="RemoteModel.EVENT_TYPES_CATEGORIES" Width="1.5" PointX="5.75" PointY="72.375" /> - <EntityTypeShape EntityType="RemoteModel.EVENT_TYPES_GROUPS" Width="1.5" PointX="5.75" PointY="69.25" /> - <EntityTypeShape EntityType="RemoteModel.FIBER_SHAPES" Width="1.5" PointX="0.75" PointY="27" /> - <EntityTypeShape EntityType="RemoteModel.FIBER_SYNTHS" Width="1.5" PointX="0.75" PointY="24.125" /> - <EntityTypeShape EntityType="RemoteModel.HARDWARE_DANCER_TYPES" Width="1.5" PointX="4.5" PointY="79.375" /> - <EntityTypeShape EntityType="RemoteModel.HARDWARE_DANCERS" Width="1.5" PointX="6.75" PointY="57.625" /> - <EntityTypeShape EntityType="RemoteModel.HARDWARE_MOTOR_TYPES" Width="1.5" PointX="1.5" PointY="83.375" /> - <EntityTypeShape EntityType="RemoteModel.HARDWARE_MOTORS" Width="1.5" PointX="3.75" PointY="57.375" /> - <EntityTypeShape EntityType="RemoteModel.HARDWARE_PID_CONTROL_TYPES" Width="1.5" PointX="1.5" PointY="87.375" /> - <EntityTypeShape EntityType="RemoteModel.HARDWARE_PID_CONTROLS" Width="1.5" PointX="3.75" PointY="62.75" /> - <EntityTypeShape EntityType="RemoteModel.HARDWARE_VERSIONS" Width="1.5" PointX="1.5" PointY="58.125" /> - <EntityTypeShape EntityType="RemoteModel.HARDWARE_WINDER_TYPES" Width="1.5" PointX="4.5" PointY="53.375" /> - <EntityTypeShape EntityType="RemoteModel.HARDWARE_WINDERS" Width="1.5" PointX="6.75" PointY="54.25" /> - <EntityTypeShape EntityType="RemoteModel.HTML_PAGES" Width="1.5" PointX="5.75" PointY="75.375" /> - <EntityTypeShape EntityType="RemoteModel.IDS_PACK_FORMULAS" Width="1.5" PointX="6" PointY="39.25" /> - <EntityTypeShape EntityType="RemoteModel.IDS_PACKS" Width="1.5" PointX="8.25" PointY="34.25" /> - <EntityTypeShape EntityType="RemoteModel.JOB_RUNS" Width="1.5" PointX="10.5" PointY="19.25" /> - <EntityTypeShape EntityType="RemoteModel.JOB" Width="1.5" PointX="8.25" PointY="15.5" /> - <EntityTypeShape EntityType="RemoteModel.LINEAR_MASS_DENSITY_UNITS" Width="1.5" PointX="0.75" PointY="21.125" /> - <EntityTypeShape EntityType="RemoteModel.LIQUID_TYPES" Width="1.5" PointX="3" PointY="23.375" /> - <EntityTypeShape EntityType="RemoteModel.LIQUID_TYPES_RMLS" Width="1.5" PointX="5.25" PointY="17.5" /> - <EntityTypeShape EntityType="RemoteModel.MACHINE_STUDIO_VERSIONS" Width="1.5" PointX="8.25" PointY="6" /> - <EntityTypeShape EntityType="RemoteModel.MACHINE_VERSIONS" Width="1.5" PointX="0.75" PointY="33.125" /> - <EntityTypeShape EntityType="RemoteModel.MACHINE" Width="1.5" PointX="3" PointY="46.875" /> - <EntityTypeShape EntityType="RemoteModel.MACHINES_CONFIGURATIONS" Width="1.5" PointX="5.25" PointY="46.5" /> - <EntityTypeShape EntityType="RemoteModel.MACHINES_EVENTS" Width="1.5" PointX="10.25" PointY="27.875" /> - <EntityTypeShape EntityType="RemoteModel.MEDIA_COLORS" Width="1.5" PointX="0.75" PointY="17.5" /> - <EntityTypeShape EntityType="RemoteModel.MEDIA_CONDITIONS" Width="1.5" PointX="0.75" PointY="13.25" /> - <EntityTypeShape EntityType="RemoteModel.MEDIA_MATERIALS" Width="1.5" PointX="0.75" PointY="30" /> - <EntityTypeShape EntityType="RemoteModel.MEDIA_PURPOSES" Width="1.5" PointX="0.75" PointY="10.375" /> - <EntityTypeShape EntityType="RemoteModel.MID_TANK_TYPES" Width="1.5" PointX="6" PointY="43.125" /> - <EntityTypeShape EntityType="RemoteModel.ORGANIZATION" Width="1.5" PointX="0.75" PointY="70" /> - <EntityTypeShape EntityType="RemoteModel.PERMISSION" Width="1.5" PointX="9" PointY="39.875" /> - <EntityTypeShape EntityType="RemoteModel.PROCESS_PARAMETERS_TABLES" Width="1.5" PointX="7.5" PointY="24.5" /> - <EntityTypeShape EntityType="RemoteModel.PROCESS_PARAMETERS_TABLES_GROUPS" Width="1.5" PointX="5.25" PointY="25.75" /> - <EntityTypeShape EntityType="RemoteModel.RML" Width="1.5" PointX="3" PointY="14.875" /> - <EntityTypeShape EntityType="RemoteModel.ROLE" Width="1.5" PointX="9" PointY="2.625" /> - <EntityTypeShape EntityType="RemoteModel.ROLES_PERMISSIONS" Width="1.5" PointX="11.25" PointY="0.75" /> - <EntityTypeShape EntityType="RemoteModel.SEGMENT" Width="1.5" PointX="10.5" PointY="15.75" /> - <EntityTypeShape EntityType="RemoteModel.SPOOL_TYPES" Width="1.5" PointX="6" PointY="3" /> - <EntityTypeShape EntityType="RemoteModel.SYNC_CONFIGURATIONS" Width="1.5" PointX="0.75" PointY="3.625" /> - <EntityTypeShape EntityType="RemoteModel.TECH_CONTROLLERS" Width="1.5" PointX="2.75" PointY="3.625" /> - <EntityTypeShape EntityType="RemoteModel.TECH_DISPENSERS" Width="1.5" PointX="2.75" PointY="7.625" /> - <EntityTypeShape EntityType="RemoteModel.TECH_IOS" Width="1.5" PointX="12.75" PointY="8.625" /> - <EntityTypeShape EntityType="RemoteModel.TECH_MONITORS" Width="1.5" PointX="13.75" PointY="3.625" /> - <EntityTypeShape EntityType="RemoteModel.TECH_MOTORS" Width="1.5" PointX="14.75" PointY="8.625" /> - <EntityTypeShape EntityType="RemoteModel.TECH_VALVES" Width="1.5" PointX="14.75" PointY="12.625" /> - <EntityTypeShape EntityType="RemoteModel.USER" Width="1.5" PointX="6" PointY="7.75" /> - <EntityTypeShape EntityType="RemoteModel.USERS_ROLES" Width="1.5" PointX="11.25" PointY="4.625" /> - <EntityTypeShape EntityType="RemoteModel.WINDING_METHODS" Width="1.5" PointX="6" PointY="20.875" /> + <EntityTypeShape EntityType="RemoteModel.ACTION_TYPES" Width="1.5" PointX="6" PointY="75.75" /> + <EntityTypeShape EntityType="RemoteModel.ADDRESS" Width="1.5" PointX="1.5" PointY="78.125" /> + <EntityTypeShape EntityType="RemoteModel.APPLICATION_DISPLAY_PANEL_VERSIONS" Width="1.5" PointX="1.5" PointY="34.75" /> + <EntityTypeShape EntityType="RemoteModel.APPLICATION_FIRMWARE_VERSIONS" Width="1.5" PointX="1.5" PointY="64.125" /> + <EntityTypeShape EntityType="RemoteModel.APPLICATION_OS_VERSIONS" Width="1.5" PointX="1.5" PointY="31.875" /> + <EntityTypeShape EntityType="RemoteModel.APPLICATION_VERSIONS" Width="1.5" PointX="1.5" PointY="58.25" /> + <EntityTypeShape EntityType="RemoteModel.BRUSH_STOPS" Width="1.5" PointX="12.75" PointY="12.125" /> + <EntityTypeShape EntityType="RemoteModel.CARTRIDGE_TYPES" Width="1.5" PointX="6" PointY="0.75" /> + <EntityTypeShape EntityType="RemoteModel.CAT" Width="1.5" PointX="5.25" PointY="15.625" /> + <EntityTypeShape EntityType="RemoteModel.CCT" Width="1.5" PointX="5.25" PointY="32.875" /> + <EntityTypeShape EntityType="RemoteModel.COLOR_CATALOGS" Width="1.5" PointX="10.5" PointY="6.5" /> + <EntityTypeShape EntityType="RemoteModel.COLOR_SPACES" Width="1.5" PointX="8.25" PointY="8.25" /> + <EntityTypeShape EntityType="RemoteModel.CONFIGURATION" Width="1.5" PointX="0.75" PointY="39.375" /> + <EntityTypeShape EntityType="RemoteModel.CONTACT" Width="1.5" PointX="1.5" PointY="74.125" /> + <EntityTypeShape EntityType="RemoteModel.DISPENSER_TYPES" Width="1.5" PointX="6" PointY="62.625" /> + <EntityTypeShape EntityType="RemoteModel.EMBEDDED_FIRMWARE_VERSIONS" Width="1.5" PointX="1.5" PointY="61.25" /> + <EntityTypeShape EntityType="RemoteModel.EMBEDDED_SOFTWARE_VERSIONS" Width="1.5" PointX="1.5" PointY="55.375" /> + <EntityTypeShape EntityType="RemoteModel.EVENT_TYPES" Width="1.5" PointX="6" PointY="70.875" /> + <EntityTypeShape EntityType="RemoteModel.EVENT_TYPES_ACTIONS" Width="1.5" PointX="8.25" PointY="71.75" /> + <EntityTypeShape EntityType="RemoteModel.EVENT_TYPES_CATEGORIES" Width="1.5" PointX="3.75" PointY="75" /> + <EntityTypeShape EntityType="RemoteModel.EVENT_TYPES_GROUPS" Width="1.5" PointX="3.75" PointY="71.875" /> + <EntityTypeShape EntityType="RemoteModel.FIBER_SHAPES" Width="1.5" PointX="0.75" PointY="28.375" /> + <EntityTypeShape EntityType="RemoteModel.FIBER_SYNTHS" Width="1.5" PointX="0.75" PointY="19.625" /> + <EntityTypeShape EntityType="RemoteModel.HARDWARE_DANCER_TYPES" Width="1.5" PointX="1.5" PointY="83" /> + <EntityTypeShape EntityType="RemoteModel.HARDWARE_DANCERS" Width="1.5" PointX="3.75" PointY="51.25" /> + <EntityTypeShape EntityType="RemoteModel.HARDWARE_MOTOR_TYPES" Width="1.5" PointX="1.5" PointY="87" /> + <EntityTypeShape EntityType="RemoteModel.HARDWARE_MOTORS" Width="1.5" PointX="3.75" PointY="55.875" /> + <EntityTypeShape EntityType="RemoteModel.HARDWARE_PID_CONTROL_TYPES" Width="1.5" PointX="4.5" PointY="83" /> + <EntityTypeShape EntityType="RemoteModel.HARDWARE_PID_CONTROLS" Width="1.5" PointX="6.75" PointY="55.375" /> + <EntityTypeShape EntityType="RemoteModel.HARDWARE_VERSIONS" Width="1.5" PointX="1.5" PointY="51.625" /> + <EntityTypeShape EntityType="RemoteModel.HARDWARE_WINDER_TYPES" Width="1.5" PointX="4.5" PointY="79" /> + <EntityTypeShape EntityType="RemoteModel.HARDWARE_WINDERS" Width="1.5" PointX="6.75" PointY="51.875" /> + <EntityTypeShape EntityType="RemoteModel.HTML_PAGES" Width="1.5" PointX="3.75" PointY="68.5" /> + <EntityTypeShape EntityType="RemoteModel.IDS_PACK_FORMULAS" Width="1.5" PointX="6" PointY="47.25" /> + <EntityTypeShape EntityType="RemoteModel.IDS_PACKS" Width="1.5" PointX="8.25" PointY="21.625" /> + <EntityTypeShape EntityType="RemoteModel.JOB_RUNS" Width="1.5" PointX="10.5" PointY="17.625" /> + <EntityTypeShape EntityType="RemoteModel.JOB" Width="1.5" PointX="8.25" PointY="14" /> + <EntityTypeShape EntityType="RemoteModel.LINEAR_MASS_DENSITY_UNITS" Width="1.5" PointX="0.75" PointY="8.75" /> + <EntityTypeShape EntityType="RemoteModel.LIQUID_TYPES" Width="1.5" PointX="3" PointY="8.625" /> + <EntityTypeShape EntityType="RemoteModel.LIQUID_TYPES_RMLS" Width="1.5" PointX="5.25" PointY="11.875" /> + <EntityTypeShape EntityType="RemoteModel.MACHINE_STUDIO_VERSIONS" Width="1.5" PointX="8.25" PointY="37.875" /> + <EntityTypeShape EntityType="RemoteModel.MACHINE_VERSIONS" Width="1.5" PointX="0.75" PointY="47.375" /> + <EntityTypeShape EntityType="RemoteModel.MACHINE" Width="1.5" PointX="3" PointY="45.625" /> + <EntityTypeShape EntityType="RemoteModel.MACHINES_CONFIGURATIONS" Width="1.5" PointX="5.25" PointY="43.625" /> + <EntityTypeShape EntityType="RemoteModel.MACHINES_EVENTS" Width="1.5" PointX="8.25" PointY="33.25" /> + <EntityTypeShape EntityType="RemoteModel.MEDIA_COLORS" Width="1.5" PointX="0.75" PointY="15.875" /> + <EntityTypeShape EntityType="RemoteModel.MEDIA_CONDITIONS" Width="1.5" PointX="0.75" PointY="22.5" /> + <EntityTypeShape EntityType="RemoteModel.MEDIA_MATERIALS" Width="1.5" PointX="0.75" PointY="11.625" /> + <EntityTypeShape EntityType="RemoteModel.MEDIA_PURPOSES" Width="1.5" PointX="0.75" PointY="25.5" /> + <EntityTypeShape EntityType="RemoteModel.MID_TANK_TYPES" Width="1.5" PointX="6" PointY="37.625" /> + <EntityTypeShape EntityType="RemoteModel.ORGANIZATION" Width="1.5" PointX="0.75" PointY="69.375" /> + <EntityTypeShape EntityType="RemoteModel.PERMISSION" Width="1.5" PointX="9" PointY="41.625" /> + <EntityTypeShape EntityType="RemoteModel.PROCESS_PARAMETERS_TABLES" Width="1.5" PointX="7.5" PointY="26.875" /> + <EntityTypeShape EntityType="RemoteModel.PROCESS_PARAMETERS_TABLES_GROUPS" Width="1.5" PointX="5.25" PointY="28.125" /> + <EntityTypeShape EntityType="RemoteModel.RML" Width="1.5" PointX="3" PointY="13.25" /> + <EntityTypeShape EntityType="RemoteModel.ROLE" Width="1.5" PointX="9" PointY="2.5" /> + <EntityTypeShape EntityType="RemoteModel.ROLES_PERMISSIONS" Width="1.5" PointX="11.25" PointY="2.625" /> + <EntityTypeShape EntityType="RemoteModel.SEGMENT" Width="1.5" PointX="10.5" PointY="14.125" /> + <EntityTypeShape EntityType="RemoteModel.SPOOL_TYPES" Width="1.5" PointX="6" PointY="7.25" /> + <EntityTypeShape EntityType="RemoteModel.SYNC_CONFIGURATIONS" Width="1.5" PointX="0.75" PointY="2" /> + <EntityTypeShape EntityType="RemoteModel.TECH_CONTROLLERS" Width="1.5" PointX="2.75" PointY="2" /> + <EntityTypeShape EntityType="RemoteModel.TECH_DISPENSERS" Width="1.5" PointX="12.75" PointY="6" /> + <EntityTypeShape EntityType="RemoteModel.TECH_IOS" Width="1.5" PointX="14.75" PointY="2" /> + <EntityTypeShape EntityType="RemoteModel.TECH_MONITORS" Width="1.5" PointX="14.75" PointY="7" /> + <EntityTypeShape EntityType="RemoteModel.TECH_MOTORS" Width="1.5" PointX="14.75" PointY="12" /> + <EntityTypeShape EntityType="RemoteModel.TECH_VALVES" Width="1.5" PointX="14.75" PointY="16" /> + <EntityTypeShape EntityType="RemoteModel.USER" Width="1.5" PointX="6" PointY="19.625" /> + <EntityTypeShape EntityType="RemoteModel.USERS_ROLES" Width="1.5" PointX="11.25" PointY="21.5" /> + <EntityTypeShape EntityType="RemoteModel.WINDING_METHODS" Width="1.5" PointX="6" PointY="3.75" /> <AssociationConnector Association="RemoteModel.FK_EVENTS_ACTIONS_ACTIONS" /> <AssociationConnector Association="RemoteModel.FK_ORGANIZATIONS_ADDRESSES" /> <AssociationConnector Association="RemoteModel.FK_USERS_ADDRESSES" /> diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/TECH_IOS.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/TECH_IOS.cs index 7f7fd4045..8da805d5a 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/TECH_IOS.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/TECH_IOS.cs @@ -17,11 +17,14 @@ namespace Tango.DAL.Remote.DB public int ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public int CODE { get; set; } - public string NAME { get; set; } - public string DESCRIPTION { get; set; } public int PORT { get; set; } public int TYPE { get; set; } + public string DESIGNATOR { get; set; } + public string ASM { get; set; } + public string INTERFACE_NAME { get; set; } + public string SENSOR { get; set; } + public double INIT_VALUE { get; set; } + public int AVERAGING { get; set; } public double MIN { get; set; } public double MAX { get; set; } } diff --git a/Software/Visual_Studio/Tango.Documents/ExcelReader.cs b/Software/Visual_Studio/Tango.Documents/ExcelReader.cs new file mode 100644 index 000000000..b212678ae --- /dev/null +++ b/Software/Visual_Studio/Tango.Documents/ExcelReader.cs @@ -0,0 +1,427 @@ +using DocumentFormat.OpenXml.Packaging; +using DocumentFormat.OpenXml.Spreadsheet; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Globalization; +using System.IO; +using System.Linq; +using System.Reflection; +using System.Text.RegularExpressions; + +namespace Tango.Documents +{ + /// <summary> + /// Represents a class for reading excel document rows by the specified model. + /// </summary> + public class ExcelReader : IDisposable + { + private SpreadsheetDocument document; //Will contain the Excel document. + private List<DefinedName> names; //Will contain the collection of Excel defined names. + private bool throwError; //Determines whether to throw exceptions while parsing the Excel file. + private string sheetN; //Will contain the specified Excel sheet name. + private Stream fileStream; //Will contain the Excel file stream. + + #region Constructors + + /// <summary> + /// Initializes a new instance of the ExcelReader. + /// </summary> + /// <param name="source">Document Stream.</param> + /// <param name="throwOnError">Throw exceptions if encountering an error while parsing the document.</param> + public ExcelReader(Stream source, bool throwOnError = true) + { + sheetN = String.Empty; + fileStream = source; + document = SpreadsheetDocument.Open(source, false); + names = new List<DefinedName>(); + if (document.WorkbookPart.Workbook.GetFirstChild<DefinedNames>() != null) + { + foreach (DefinedName name in document.WorkbookPart.Workbook.GetFirstChild<DefinedNames>()) + names.Add(name); + } + throwError = throwOnError; + } + + /// <summary> + /// Initializes a new instance of ExcelReader. + /// </summary> + /// <param name="templatePath">File path to the Excel document.</param> + /// <param name="throwOnError">Throw exceptions if encountering an error while parsing the document.</param> + public ExcelReader(string templatePath, bool throwOnError = true) + : this(File.OpenRead(templatePath), throwOnError) { } + + + #endregion + + #region Public Methods + + public List<T> GetDataByIndex<T>(String sheetName, int firstRowIndex) + { + sheetN = sheetName; + + List<T> results = new List<T>(); + + Worksheet currWorksheet = GetWorkSheetPart().Worksheet; + int rowCount = currWorksheet.Descendants<Row>().Count(); + + PropertyInfo[] properties = typeof(T).GetProperties(BindingFlags.Public | BindingFlags.Instance); + + for (int rowIndex = firstRowIndex; rowIndex < rowCount; rowIndex++) + { + Row row = GetRow(currWorksheet, rowIndex); + if (row == null) + break; + + T newObj = (T)Activator.CreateInstance<T>(); + + List<Cell> cells = GetRowCells(row).ToList(); + + for (int cellIndex = 0; cellIndex < Math.Min(properties.Count(), cells.Count); cellIndex++) + { + Cell cell = cells[cellIndex] as Cell; + String value = CellValue(cell); + + properties[cellIndex].SetValue(newObj, value); + } + + results.Add(newObj); + } + + return results; + } + + /// <summary> + /// Parse the document and populate the specified model collection using reflections. + /// </summary> + /// <typeparam name="T">Type of model.</typeparam> + /// <param name="sheetName">Document Sheet name.</param> + /// <returns>Collection of models reflecting the parsed rows.</returns> + public List<T> GetData<T>(String sheetName) + { + sheetN = sheetName; + + List<T> ret = new List<T>(); + + PropertyInfo[] PropColl = typeof(T).GetProperties(); + names = (from pr in PropColl + join n in names + on pr.Name equals n.Name.ToString() + select n).ToList(); + + if (this.names.Any()) + { + int Rowindex = GetFirstRowNumber() + 1; + Worksheet currWorksheet = GetWorkSheetPart().Worksheet; + int rowCount = currWorksheet.Descendants<Row>().Count(); + while (Rowindex <= rowCount) + { + string a = ""; + try + { + Row curr = GetRow(currWorksheet, Rowindex); + if (curr == null) + break; + + bool isEmptyRow = true; + T newObj = (T)Activator.CreateInstance<T>(); + + foreach (DefinedName name in names) + { + Stopwatch watchCol = new Stopwatch(); + watchCol.Start(); + + + var t = curr.ElementAtOrDefault(12); + + Cell theCell = + curr.Descendants<Cell>().Where(c => c.CellReference == GetColumn(name) + Rowindex.ToString()).FirstOrDefault(); + PropertyInfo Prop = PropColl.FirstOrDefault(pr => pr.Name == name.Name); + + a = CellValue(theCell); + if (a != null) + { + isEmptyRow = false; + SetPropValue(a, newObj, Prop); + } + } + if (isEmptyRow) + break; + ret.Add(newObj); + } + catch (Exception ex) + { + if (throwError) + { + throw ex; + } + } + Rowindex++; + } + } + return ret.ToList(); + } + + /// <summary> + /// Disposes the document stream. + /// </summary> + public void Close() + { + fileStream.Close(); + fileStream.Dispose(); + } + + #endregion + + #region Private Methods + + ///<summary>returns an empty cell when a blank cell is encountered + ///</summary> + public static IEnumerable<Cell> GetRowCells(Row row) + { + int currentCount = 0; + + foreach (Cell cell in row.Descendants<Cell>()) + { + string columnName = GetColumnName(cell.CellReference); + + int currentColumnIndex = ConvertColumnNameToNumber(columnName); + + for (; currentCount < currentColumnIndex; currentCount++) + { + yield return new DocumentFormat.OpenXml.Spreadsheet.Cell(); + } + + yield return cell; + currentCount++; + } + } + + /// <summary> + /// Given a cell name, parses the specified cell to get the column name. + /// </summary> + /// <param name="cellReference">Address of the cell (ie. B2)</param> + /// <returns>Column Name (ie. B)</returns> + public static string GetColumnName(string cellReference) + { + // Match the column name portion of the cell name. + var regex = new System.Text.RegularExpressions.Regex("[A-Za-z]+"); + var match = regex.Match(cellReference); + + return match.Value; + } + + /// <summary> + /// Given just the column name (no row index), + /// it will return the zero based column index. + /// </summary> + /// <param name="columnName">Column Name (ie. A or AB)</param> + /// <returns>Zero based index if the conversion was successful</returns> + /// <exception cref="ArgumentException">thrown if the given string + /// contains characters other than uppercase letters</exception> + public static int ConvertColumnNameToNumber(string columnName) + { + var alpha = new System.Text.RegularExpressions.Regex("^[A-Z]+$"); + if (!alpha.IsMatch(columnName)) throw new ArgumentException(); + + char[] colLetters = columnName.ToCharArray(); + Array.Reverse(colLetters); + + int convertedValue = 0; + for (int i = 0; i < colLetters.Length; i++) + { + char letter = colLetters[i]; + int current = i == 0 ? letter - 65 : letter - 64; // ASCII 'A' = 65 + convertedValue += current * (int)Math.Pow(26, i); + } + + return convertedValue; + } + + /// <summary> + /// Cells the value. + /// </summary> + /// <param name="cell">The cell.</param> + /// <returns></returns> + private string CellValue(Cell cell) + { + if (cell == null) return null; + string value = (cell.CellFormula == null) ? cell.InnerText : cell.CellValue.InnerText; + if (String.IsNullOrEmpty(value)) return null; + + if (cell.DataType != null) + { + switch (cell.DataType.Value) + { + case CellValues.SharedString: + var stringTable = document.WorkbookPart.SharedStringTablePart; + if (stringTable != null) + { + value = stringTable.SharedStringTable. + ElementAt(int.Parse(value)).InnerText; + } + break; + + case CellValues.Boolean: + switch (value) + { + case "0": + value = "FALSE"; + break; + default: + value = "TRUE"; + break; + } + break; + } + } + return value; + } + + /// <summary> + /// Determines whether [is empty row] [the specified row]. + /// </summary> + /// <param name="row">The row.</param> + /// <returns></returns> + private bool IsEmptyRow(Row row) + { + Worksheet currWorksheet = GetWorkSheetPart().Worksheet; + foreach (DefinedName name in names) + { + Cell theCell = row.Descendants<Cell>(). + Where(c => c.CellReference == GetColumn(name) + row.RowIndex.ToString()).FirstOrDefault(); + + if (theCell == null || theCell.CellValue == null) + continue; + if (!string.IsNullOrEmpty(theCell.CellValue.Text)) + return false; + } + return true; + } + + /// <summary> + /// Gets the first row number. + /// </summary> + /// <returns></returns> + private int GetFirstRowNumber() + { + Regex rowPatern = new Regex("^.*\\!\\$.*\\$(\\d*)$"); + Match match = rowPatern.Match(names[0].Text); + return Convert.ToInt32(match.Groups[1].Value); + } + + /// <summary> + /// Gets the column. + /// </summary> + /// <param name="name">The name.</param> + /// <returns></returns> + private string GetColumn(DefinedName name) + { + Regex rowPatern = new Regex("^.*\\!\\$(.*)\\$\\d*$"); + Match match = rowPatern.Match(name.Text); + return match.Groups[1].Value; + } + + /// <summary> + /// Gets the row. + /// </summary> + /// <param name="worksheet">The worksheet.</param> + /// <param name="rowIndex">Index of the row.</param> + /// <returns></returns> + private Row GetRow(Worksheet worksheet, int rowIndex) + { + var row = worksheet.GetFirstChild<SheetData>(). + Elements<Row>().Where(r => r.RowIndex == rowIndex).FirstOrDefault(); + return row; + } + + /// <summary> + /// Gets the work sheet part. + /// </summary> + /// <returns></returns> + private WorksheetPart GetWorkSheetPart() + { + //get worksheet based on defined name + var sheet = document.WorkbookPart.Workbook.Descendants<Sheet>().FirstOrDefault(x => x.Name.Value == sheetN); + string relId = sheet.Id; + + return (WorksheetPart)document.WorkbookPart.GetPartById(relId); + } + + + /// <summary> + /// Gets the name of the sheet. + /// </summary> + /// <returns></returns> + private string GetSheetName() + { + Regex rowPatern = new Regex("^(.*)\\!\\$.*\\$\\d*$"); + Match match = rowPatern.Match(names[0].Text); + return match.Groups[1].Value; + } + + /// <summary> + /// Sets the property value. + /// </summary> + /// <typeparam name="T"></typeparam> + /// <param name="val">The value.</param> + /// <param name="obj">The object.</param> + /// <param name="prop">The property.</param> + private static void SetPropValue<T>(object val, T obj, PropertyInfo prop) + { + try + { + Type PType = prop.PropertyType; + if (val == null) + prop.SetValue(obj, null, null); + else if (PType == typeof(int) || PType == typeof(int?)) + prop.SetValue(obj, Convert.ToInt32(val), null); + else if (PType == typeof(Int16) || PType == typeof(Int16?)) + prop.SetValue(obj, Convert.ToInt16(val), null); + else if (PType == typeof(Int64) || PType == typeof(Int64?)) + prop.SetValue(obj, Convert.ToInt64(val), null); + else if (PType == typeof(Double) || PType == typeof(Double?)) + { + double? tDouble = null; + if (val.ToString().ToLower().Contains("e")) + tDouble = double.Parse(val.ToString(), NumberStyles.Any); + else + tDouble = Convert.ToDouble(val); + prop.SetValue(obj, tDouble, null); + } + else if (PType == typeof(decimal) || PType == typeof(decimal?)) + { + decimal? tDecimal = null; + if (val.ToString().ToLower().Contains("e")) + tDecimal = decimal.Parse(val.ToString(), NumberStyles.Any); + else + tDecimal = Convert.ToDecimal(val); + prop.SetValue(obj, tDecimal, null); + } + else if (PType == typeof(DateTime) || PType == typeof(DateTime?)) + prop.SetValue(obj, Convert.ToDateTime(val), null); + else if (PType == typeof(bool) || PType == typeof(bool?)) + prop.SetValue(obj, Convert.ToBoolean(val), null); + else if (PType == typeof(byte) || PType == typeof(byte?)) + prop.SetValue(obj, Convert.ToByte(val), null); + else + prop.SetValue(obj, val, null); + } + catch (Exception ex) + { + throw ex; + } + } + + #endregion + + #region IDisposable + + public void Dispose() + { + Close(); + } + + #endregion + } +}
\ No newline at end of file diff --git a/Software/Visual_Studio/Tango.Documents/Properties/AssemblyInfo.cs b/Software/Visual_Studio/Tango.Documents/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..6d98f948c --- /dev/null +++ b/Software/Visual_Studio/Tango.Documents/Properties/AssemblyInfo.cs @@ -0,0 +1,6 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +[assembly: AssemblyTitle("Tango - Documents Library")] +[assembly: ComVisible(false)]
\ No newline at end of file diff --git a/Software/Visual_Studio/Tango.Documents/Properties/Resources.Designer.cs b/Software/Visual_Studio/Tango.Documents/Properties/Resources.Designer.cs new file mode 100644 index 000000000..b9679f298 --- /dev/null +++ b/Software/Visual_Studio/Tango.Documents/Properties/Resources.Designer.cs @@ -0,0 +1,62 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace Tango.Documents.Properties { + + + /// <summary> + /// A strongly-typed resource class, for looking up localized strings, etc. + /// </summary> + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// <summary> + /// Returns the cached ResourceManager instance used by this class. + /// </summary> + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if ((resourceMan == null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Tango.Documents.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// <summary> + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// </summary> + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + } +} diff --git a/Software/Visual_Studio/Tango.Documents/Properties/Resources.resx b/Software/Visual_Studio/Tango.Documents/Properties/Resources.resx new file mode 100644 index 000000000..af7dbebba --- /dev/null +++ b/Software/Visual_Studio/Tango.Documents/Properties/Resources.resx @@ -0,0 +1,117 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> +</root>
\ No newline at end of file diff --git a/Software/Visual_Studio/Tango.Documents/Properties/Settings.Designer.cs b/Software/Visual_Studio/Tango.Documents/Properties/Settings.Designer.cs new file mode 100644 index 000000000..30a9edec0 --- /dev/null +++ b/Software/Visual_Studio/Tango.Documents/Properties/Settings.Designer.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace Tango.Documents.Properties +{ + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase + { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default + { + get + { + return defaultInstance; + } + } + } +} diff --git a/Software/Visual_Studio/Tango.Documents/Properties/Settings.settings b/Software/Visual_Studio/Tango.Documents/Properties/Settings.settings new file mode 100644 index 000000000..033d7a5e9 --- /dev/null +++ b/Software/Visual_Studio/Tango.Documents/Properties/Settings.settings @@ -0,0 +1,7 @@ +<?xml version='1.0' encoding='utf-8'?> +<SettingsFile xmlns="uri:settings" CurrentProfile="(Default)"> + <Profiles> + <Profile Name="(Default)" /> + </Profiles> + <Settings /> +</SettingsFile>
\ No newline at end of file diff --git a/Software/Visual_Studio/Tango.Documents/Tango.Documents.csproj b/Software/Visual_Studio/Tango.Documents/Tango.Documents.csproj new file mode 100644 index 000000000..0eb8d366e --- /dev/null +++ b/Software/Visual_Studio/Tango.Documents/Tango.Documents.csproj @@ -0,0 +1,90 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProjectGuid>{CA87A608-7B17-4C98-88F2-42ABEE10F4C1}</ProjectGuid> + <OutputType>library</OutputType> + <RootNamespace>Tango.Documents</RootNamespace> + <AssemblyName>Tango.Documents</AssemblyName> + <TargetFrameworkVersion>v4.6</TargetFrameworkVersion> + <FileAlignment>512</FileAlignment> + <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>..\Build\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <OutputPath>..\Build\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <ItemGroup> + <Reference Include="DocumentFormat.OpenXml, Version=2.7.2.0, Culture=neutral, PublicKeyToken=8fb06cb64d019a17, processorArchitecture=MSIL"> + <HintPath>..\packages\DocumentFormat.OpenXml.2.7.2\lib\net46\DocumentFormat.OpenXml.dll</HintPath> + </Reference> + <Reference Include="System" /> + <Reference Include="System.Data" /> + <Reference Include="System.IO.FileSystem.Primitives, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> + <HintPath>..\packages\System.IO.FileSystem.Primitives.4.0.1\lib\net46\System.IO.FileSystem.Primitives.dll</HintPath> + </Reference> + <Reference Include="System.IO.Packaging, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> + <HintPath>..\packages\System.IO.Packaging.4.0.0\lib\net46\System.IO.Packaging.dll</HintPath> + </Reference> + <Reference Include="System.Xml" /> + <Reference Include="Microsoft.CSharp" /> + <Reference Include="System.Core" /> + <Reference Include="System.Xml.Linq" /> + <Reference Include="System.Data.DataSetExtensions" /> + <Reference Include="System.Net.Http" /> + <Reference Include="System.Xaml"> + <RequiredTargetFramework>4.0</RequiredTargetFramework> + </Reference> + <Reference Include="WindowsBase" /> + <Reference Include="PresentationCore" /> + <Reference Include="PresentationFramework" /> + </ItemGroup> + <ItemGroup> + <Compile Include="..\Versioning\GlobalVersionInfo.cs"> + <Link>GlobalVersionInfo.cs</Link> + </Compile> + </ItemGroup> + <ItemGroup> + <Compile Include="ExcelReader.cs" /> + <Compile Include="Properties\AssemblyInfo.cs"> + <SubType> + </SubType> + </Compile> + <Compile Include="Properties\Resources.Designer.cs"> + <AutoGen>True</AutoGen> + <DesignTime>True</DesignTime> + <DependentUpon>Resources.resx</DependentUpon> + </Compile> + <Compile Include="Properties\Settings.Designer.cs"> + <AutoGen>True</AutoGen> + <DependentUpon>Settings.settings</DependentUpon> + <DesignTimeSharedInput>True</DesignTimeSharedInput> + </Compile> + <EmbeddedResource Include="Properties\Resources.resx"> + <Generator>ResXFileCodeGenerator</Generator> + <LastGenOutput>Resources.Designer.cs</LastGenOutput> + </EmbeddedResource> + <None Include="packages.config" /> + <None Include="Properties\Settings.settings"> + <Generator>SettingsSingleFileGenerator</Generator> + <LastGenOutput>Settings.Designer.cs</LastGenOutput> + </None> + </ItemGroup> + <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> +</Project>
\ No newline at end of file diff --git a/Software/Visual_Studio/Tango.Documents/packages.config b/Software/Visual_Studio/Tango.Documents/packages.config new file mode 100644 index 000000000..fd4d0d0aa --- /dev/null +++ b/Software/Visual_Studio/Tango.Documents/packages.config @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="utf-8"?> +<packages> + <package id="DocumentFormat.OpenXml" version="2.7.2" targetFramework="net46" /> + <package id="System.IO.FileSystem.Primitives" version="4.0.1" targetFramework="net46" /> + <package id="System.IO.Packaging" version="4.0.0" targetFramework="net46" /> +</packages>
\ No newline at end of file diff --git a/Software/Visual_Studio/Tango.PMR/Printing/JobSpool.cs b/Software/Visual_Studio/Tango.PMR/Printing/JobSpool.cs index b67bd0fa8..afe846303 100644 --- a/Software/Visual_Studio/Tango.PMR/Printing/JobSpool.cs +++ b/Software/Visual_Studio/Tango.PMR/Printing/JobSpool.cs @@ -23,17 +23,17 @@ namespace Tango.PMR.Printing { byte[] descriptorData = global::System.Convert.FromBase64String( string.Concat( "Cg5Kb2JTcG9vbC5wcm90bxISVGFuZ28uUE1SLlByaW50aW5nGhJKb2JTcG9v", - "bFR5cGUucHJvdG8ihQIKCEpvYlNwb29sEjYKDEpvYlNwb29sVHlwZRgBIAEo", + "bFR5cGUucHJvdG8i+QEKCEpvYlNwb29sEjYKDEpvYlNwb29sVHlwZRgBIAEo", "DjIgLlRhbmdvLlBNUi5QcmludGluZy5Kb2JTcG9vbFR5cGUSDgoGTGVuZ3Ro", "GAIgASgBEg4KBldlaWdodBgDIAEoARIQCghEaWFtZXRlchgEIAEoARIZChFT", "dGFydE9mZnNldFB1bHNlcxgFIAEoBRITCgtCYWNraW5nUmF0ZRgGIAEoBRIb", - "ChNTZWdtZW50T2Zmc2V0UHVsc2VzGAcgASgFEh4KFlNwb29sQm90dG9tQmFj", - "a2luZ1JhdGUYCCABKAUSIgoaTnVtYmVyT2ZSb3RhdGlvblBlclBhc3NhZ2UY", - "CSABKAFCHgocY29tLnR3aW5lLnRhbmdvLnBtci5wcmludGluZ2IGcHJvdG8z")); + "ChNTZWdtZW50T2Zmc2V0UHVsc2VzGAcgASgFEhkKEUJvdHRvbUJhY2tpbmdS", + "YXRlGAggASgFEhsKE1JvdGF0aW9uc1BlclBhc3NhZ2UYCSABKAFCHgocY29t", + "LnR3aW5lLnRhbmdvLnBtci5wcmludGluZ2IGcHJvdG8z")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { global::Tango.PMR.Printing.JobSpoolTypeReflection.Descriptor, }, new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { - new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Printing.JobSpool), global::Tango.PMR.Printing.JobSpool.Parser, new[]{ "JobSpoolType", "Length", "Weight", "Diameter", "StartOffsetPulses", "BackingRate", "SegmentOffsetPulses", "SpoolBottomBackingRate", "NumberOfRotationPerPassage" }, null, null, null) + new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Printing.JobSpool), global::Tango.PMR.Printing.JobSpool.Parser, new[]{ "JobSpoolType", "Length", "Weight", "Diameter", "StartOffsetPulses", "BackingRate", "SegmentOffsetPulses", "BottomBackingRate", "RotationsPerPassage" }, null, null, null) })); } #endregion @@ -71,8 +71,8 @@ namespace Tango.PMR.Printing { startOffsetPulses_ = other.startOffsetPulses_; backingRate_ = other.backingRate_; segmentOffsetPulses_ = other.segmentOffsetPulses_; - spoolBottomBackingRate_ = other.spoolBottomBackingRate_; - numberOfRotationPerPassage_ = other.numberOfRotationPerPassage_; + bottomBackingRate_ = other.bottomBackingRate_; + rotationsPerPassage_ = other.rotationsPerPassage_; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -94,9 +94,6 @@ namespace Tango.PMR.Printing { /// <summary>Field number for the "Length" field.</summary> public const int LengthFieldNumber = 2; private double length_; - /// <summary> - /// the spool winding initial length in mm - /// </summary> [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public double Length { get { return length_; } @@ -119,9 +116,6 @@ namespace Tango.PMR.Printing { /// <summary>Field number for the "Diameter" field.</summary> public const int DiameterFieldNumber = 4; private double diameter_; - /// <summary> - /// in mm initial data required for speed calculation - /// </summary> [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public double Diameter { get { return diameter_; } @@ -133,9 +127,6 @@ namespace Tango.PMR.Printing { /// <summary>Field number for the "StartOffsetPulses" field.</summary> public const int StartOffsetPulsesFieldNumber = 5; private int startOffsetPulses_; - /// <summary> - /// distance between the limit switch and the initial spool home position - /// </summary> [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public int StartOffsetPulses { get { return startOffsetPulses_; } @@ -147,9 +138,6 @@ namespace Tango.PMR.Printing { /// <summary>Field number for the "BackingRate" field.</summary> public const int BackingRateFieldNumber = 6; private int backingRate_; - /// <summary> - /// the angle of the top of the spool - /// </summary> [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public int BackingRate { get { return backingRate_; } @@ -161,9 +149,6 @@ namespace Tango.PMR.Printing { /// <summary>Field number for the "SegmentOffsetPulses" field.</summary> public const int SegmentOffsetPulsesFieldNumber = 7; private int segmentOffsetPulses_; - /// <summary> - /// the spool winding initial length in mm - /// </summary> [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public int SegmentOffsetPulses { get { return segmentOffsetPulses_; } @@ -172,31 +157,25 @@ namespace Tango.PMR.Printing { } } - /// <summary>Field number for the "SpoolBottomBackingRate" field.</summary> - public const int SpoolBottomBackingRateFieldNumber = 8; - private int spoolBottomBackingRate_; - /// <summary> - /// the angle of the bottom of the spool - /// </summary> + /// <summary>Field number for the "BottomBackingRate" field.</summary> + public const int BottomBackingRateFieldNumber = 8; + private int bottomBackingRate_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int SpoolBottomBackingRate { - get { return spoolBottomBackingRate_; } + public int BottomBackingRate { + get { return bottomBackingRate_; } set { - spoolBottomBackingRate_ = value; + bottomBackingRate_ = value; } } - /// <summary>Field number for the "NumberOfRotationPerPassage" field.</summary> - public const int NumberOfRotationPerPassageFieldNumber = 9; - private double numberOfRotationPerPassage_; - /// <summary> - /// how many rotations per spool passage - /// </summary> + /// <summary>Field number for the "RotationsPerPassage" field.</summary> + public const int RotationsPerPassageFieldNumber = 9; + private double rotationsPerPassage_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public double NumberOfRotationPerPassage { - get { return numberOfRotationPerPassage_; } + public double RotationsPerPassage { + get { return rotationsPerPassage_; } set { - numberOfRotationPerPassage_ = value; + rotationsPerPassage_ = value; } } @@ -220,8 +199,8 @@ namespace Tango.PMR.Printing { if (StartOffsetPulses != other.StartOffsetPulses) return false; if (BackingRate != other.BackingRate) return false; if (SegmentOffsetPulses != other.SegmentOffsetPulses) return false; - if (SpoolBottomBackingRate != other.SpoolBottomBackingRate) return false; - if (NumberOfRotationPerPassage != other.NumberOfRotationPerPassage) return false; + if (BottomBackingRate != other.BottomBackingRate) return false; + if (RotationsPerPassage != other.RotationsPerPassage) return false; return true; } @@ -235,8 +214,8 @@ namespace Tango.PMR.Printing { if (StartOffsetPulses != 0) hash ^= StartOffsetPulses.GetHashCode(); if (BackingRate != 0) hash ^= BackingRate.GetHashCode(); if (SegmentOffsetPulses != 0) hash ^= SegmentOffsetPulses.GetHashCode(); - if (SpoolBottomBackingRate != 0) hash ^= SpoolBottomBackingRate.GetHashCode(); - if (NumberOfRotationPerPassage != 0D) hash ^= NumberOfRotationPerPassage.GetHashCode(); + if (BottomBackingRate != 0) hash ^= BottomBackingRate.GetHashCode(); + if (RotationsPerPassage != 0D) hash ^= RotationsPerPassage.GetHashCode(); return hash; } @@ -275,13 +254,13 @@ namespace Tango.PMR.Printing { output.WriteRawTag(56); output.WriteInt32(SegmentOffsetPulses); } - if (SpoolBottomBackingRate != 0) { + if (BottomBackingRate != 0) { output.WriteRawTag(64); - output.WriteInt32(SpoolBottomBackingRate); + output.WriteInt32(BottomBackingRate); } - if (NumberOfRotationPerPassage != 0D) { + if (RotationsPerPassage != 0D) { output.WriteRawTag(73); - output.WriteDouble(NumberOfRotationPerPassage); + output.WriteDouble(RotationsPerPassage); } } @@ -309,10 +288,10 @@ namespace Tango.PMR.Printing { if (SegmentOffsetPulses != 0) { size += 1 + pb::CodedOutputStream.ComputeInt32Size(SegmentOffsetPulses); } - if (SpoolBottomBackingRate != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(SpoolBottomBackingRate); + if (BottomBackingRate != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(BottomBackingRate); } - if (NumberOfRotationPerPassage != 0D) { + if (RotationsPerPassage != 0D) { size += 1 + 8; } return size; @@ -344,11 +323,11 @@ namespace Tango.PMR.Printing { if (other.SegmentOffsetPulses != 0) { SegmentOffsetPulses = other.SegmentOffsetPulses; } - if (other.SpoolBottomBackingRate != 0) { - SpoolBottomBackingRate = other.SpoolBottomBackingRate; + if (other.BottomBackingRate != 0) { + BottomBackingRate = other.BottomBackingRate; } - if (other.NumberOfRotationPerPassage != 0D) { - NumberOfRotationPerPassage = other.NumberOfRotationPerPassage; + if (other.RotationsPerPassage != 0D) { + RotationsPerPassage = other.RotationsPerPassage; } } @@ -389,11 +368,11 @@ namespace Tango.PMR.Printing { break; } case 64: { - SpoolBottomBackingRate = input.ReadInt32(); + BottomBackingRate = input.ReadInt32(); break; } case 73: { - NumberOfRotationPerPassage = input.ReadDouble(); + RotationsPerPassage = input.ReadDouble(); break; } } diff --git a/Software/Visual_Studio/Tango.sln b/Software/Visual_Studio/Tango.sln index 8beafb979..602d41f92 100644 --- a/Software/Visual_Studio/Tango.sln +++ b/Software/Visual_Studio/Tango.sln @@ -161,6 +161,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tango.CircularGauge", "Tang EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tango.MachineStudio.Logging", "MachineStudio\Modules\Tango.MachineStudio.Logging\Tango.MachineStudio.Logging.csproj", "{1674F726-0E66-414F-B9FD-C6F20D7F07C7}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tango.PortsListGenerator", "Utilities\Tango.PortsListGenerator\Tango.PortsListGenerator.csproj", "{12CC222B-D0F5-4048-B790-D283235F540D}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tango.Documents", "Tango.Documents\Tango.Documents.csproj", "{CA87A608-7B17-4C98-88F2-42ABEE10F4C1}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -2130,6 +2134,66 @@ Global {1674F726-0E66-414F-B9FD-C6F20D7F07C7}.Release|x64.Build.0 = Release|Any CPU {1674F726-0E66-414F-B9FD-C6F20D7F07C7}.Release|x86.ActiveCfg = Release|Any CPU {1674F726-0E66-414F-B9FD-C6F20D7F07C7}.Release|x86.Build.0 = Release|Any CPU + {12CC222B-D0F5-4048-B790-D283235F540D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {12CC222B-D0F5-4048-B790-D283235F540D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {12CC222B-D0F5-4048-B790-D283235F540D}.Debug|ARM.ActiveCfg = Debug|Any CPU + {12CC222B-D0F5-4048-B790-D283235F540D}.Debug|ARM.Build.0 = Debug|Any CPU + {12CC222B-D0F5-4048-B790-D283235F540D}.Debug|ARM64.ActiveCfg = Debug|Any CPU + {12CC222B-D0F5-4048-B790-D283235F540D}.Debug|ARM64.Build.0 = Debug|Any CPU + {12CC222B-D0F5-4048-B790-D283235F540D}.Debug|x64.ActiveCfg = Debug|Any CPU + {12CC222B-D0F5-4048-B790-D283235F540D}.Debug|x64.Build.0 = Debug|Any CPU + {12CC222B-D0F5-4048-B790-D283235F540D}.Debug|x86.ActiveCfg = Debug|Any CPU + {12CC222B-D0F5-4048-B790-D283235F540D}.Debug|x86.Build.0 = Debug|Any CPU + {12CC222B-D0F5-4048-B790-D283235F540D}.DefaultBuild|Any CPU.ActiveCfg = Debug|Any CPU + {12CC222B-D0F5-4048-B790-D283235F540D}.DefaultBuild|Any CPU.Build.0 = Debug|Any CPU + {12CC222B-D0F5-4048-B790-D283235F540D}.DefaultBuild|ARM.ActiveCfg = Debug|Any CPU + {12CC222B-D0F5-4048-B790-D283235F540D}.DefaultBuild|ARM.Build.0 = Debug|Any CPU + {12CC222B-D0F5-4048-B790-D283235F540D}.DefaultBuild|ARM64.ActiveCfg = Debug|Any CPU + {12CC222B-D0F5-4048-B790-D283235F540D}.DefaultBuild|ARM64.Build.0 = Debug|Any CPU + {12CC222B-D0F5-4048-B790-D283235F540D}.DefaultBuild|x64.ActiveCfg = Debug|Any CPU + {12CC222B-D0F5-4048-B790-D283235F540D}.DefaultBuild|x64.Build.0 = Debug|Any CPU + {12CC222B-D0F5-4048-B790-D283235F540D}.DefaultBuild|x86.ActiveCfg = Debug|Any CPU + {12CC222B-D0F5-4048-B790-D283235F540D}.DefaultBuild|x86.Build.0 = Debug|Any CPU + {12CC222B-D0F5-4048-B790-D283235F540D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {12CC222B-D0F5-4048-B790-D283235F540D}.Release|Any CPU.Build.0 = Release|Any CPU + {12CC222B-D0F5-4048-B790-D283235F540D}.Release|ARM.ActiveCfg = Release|Any CPU + {12CC222B-D0F5-4048-B790-D283235F540D}.Release|ARM.Build.0 = Release|Any CPU + {12CC222B-D0F5-4048-B790-D283235F540D}.Release|ARM64.ActiveCfg = Release|Any CPU + {12CC222B-D0F5-4048-B790-D283235F540D}.Release|ARM64.Build.0 = Release|Any CPU + {12CC222B-D0F5-4048-B790-D283235F540D}.Release|x64.ActiveCfg = Release|Any CPU + {12CC222B-D0F5-4048-B790-D283235F540D}.Release|x64.Build.0 = Release|Any CPU + {12CC222B-D0F5-4048-B790-D283235F540D}.Release|x86.ActiveCfg = Release|Any CPU + {12CC222B-D0F5-4048-B790-D283235F540D}.Release|x86.Build.0 = Release|Any CPU + {CA87A608-7B17-4C98-88F2-42ABEE10F4C1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CA87A608-7B17-4C98-88F2-42ABEE10F4C1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CA87A608-7B17-4C98-88F2-42ABEE10F4C1}.Debug|ARM.ActiveCfg = Debug|Any CPU + {CA87A608-7B17-4C98-88F2-42ABEE10F4C1}.Debug|ARM.Build.0 = Debug|Any CPU + {CA87A608-7B17-4C98-88F2-42ABEE10F4C1}.Debug|ARM64.ActiveCfg = Debug|Any CPU + {CA87A608-7B17-4C98-88F2-42ABEE10F4C1}.Debug|ARM64.Build.0 = Debug|Any CPU + {CA87A608-7B17-4C98-88F2-42ABEE10F4C1}.Debug|x64.ActiveCfg = Debug|Any CPU + {CA87A608-7B17-4C98-88F2-42ABEE10F4C1}.Debug|x64.Build.0 = Debug|Any CPU + {CA87A608-7B17-4C98-88F2-42ABEE10F4C1}.Debug|x86.ActiveCfg = Debug|Any CPU + {CA87A608-7B17-4C98-88F2-42ABEE10F4C1}.Debug|x86.Build.0 = Debug|Any CPU + {CA87A608-7B17-4C98-88F2-42ABEE10F4C1}.DefaultBuild|Any CPU.ActiveCfg = Debug|Any CPU + {CA87A608-7B17-4C98-88F2-42ABEE10F4C1}.DefaultBuild|Any CPU.Build.0 = Debug|Any CPU + {CA87A608-7B17-4C98-88F2-42ABEE10F4C1}.DefaultBuild|ARM.ActiveCfg = Debug|Any CPU + {CA87A608-7B17-4C98-88F2-42ABEE10F4C1}.DefaultBuild|ARM.Build.0 = Debug|Any CPU + {CA87A608-7B17-4C98-88F2-42ABEE10F4C1}.DefaultBuild|ARM64.ActiveCfg = Debug|Any CPU + {CA87A608-7B17-4C98-88F2-42ABEE10F4C1}.DefaultBuild|ARM64.Build.0 = Debug|Any CPU + {CA87A608-7B17-4C98-88F2-42ABEE10F4C1}.DefaultBuild|x64.ActiveCfg = Debug|Any CPU + {CA87A608-7B17-4C98-88F2-42ABEE10F4C1}.DefaultBuild|x64.Build.0 = Debug|Any CPU + {CA87A608-7B17-4C98-88F2-42ABEE10F4C1}.DefaultBuild|x86.ActiveCfg = Debug|Any CPU + {CA87A608-7B17-4C98-88F2-42ABEE10F4C1}.DefaultBuild|x86.Build.0 = Debug|Any CPU + {CA87A608-7B17-4C98-88F2-42ABEE10F4C1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CA87A608-7B17-4C98-88F2-42ABEE10F4C1}.Release|Any CPU.Build.0 = Release|Any CPU + {CA87A608-7B17-4C98-88F2-42ABEE10F4C1}.Release|ARM.ActiveCfg = Release|Any CPU + {CA87A608-7B17-4C98-88F2-42ABEE10F4C1}.Release|ARM.Build.0 = Release|Any CPU + {CA87A608-7B17-4C98-88F2-42ABEE10F4C1}.Release|ARM64.ActiveCfg = Release|Any CPU + {CA87A608-7B17-4C98-88F2-42ABEE10F4C1}.Release|ARM64.Build.0 = Release|Any CPU + {CA87A608-7B17-4C98-88F2-42ABEE10F4C1}.Release|x64.ActiveCfg = Release|Any CPU + {CA87A608-7B17-4C98-88F2-42ABEE10F4C1}.Release|x64.Build.0 = Release|Any CPU + {CA87A608-7B17-4C98-88F2-42ABEE10F4C1}.Release|x86.ActiveCfg = Release|Any CPU + {CA87A608-7B17-4C98-88F2-42ABEE10F4C1}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -2178,6 +2242,7 @@ Global {4D183ACA-552B-4135-AE81-7C5A8E5FC3B1} = {B2AF4F3F-2828-47C3-8F3E-A0EA0BD66FF8} {88028F14-0028-4DED-B119-19B8EE23CF32} = {B2AF4F3F-2828-47C3-8F3E-A0EA0BD66FF8} {1674F726-0E66-414F-B9FD-C6F20D7F07C7} = {B2AF4F3F-2828-47C3-8F3E-A0EA0BD66FF8} + {12CC222B-D0F5-4048-B790-D283235F540D} = {5F6BBAA8-EAD0-4B18-97E5-55B4F56DD760} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {7986F7F4-A86A-4994-B1B6-0988D7F057B6} diff --git a/Software/Visual_Studio/Utilities/Tango.PortsListGenerator/App.config b/Software/Visual_Studio/Utilities/Tango.PortsListGenerator/App.config new file mode 100644 index 000000000..92aa00bf9 --- /dev/null +++ b/Software/Visual_Studio/Utilities/Tango.PortsListGenerator/App.config @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="utf-8"?> +<configuration> + <configSections> + <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 --> + <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" /> + </configSections> + <startup> + <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6" /> + </startup> + <entityFramework> + <defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" /> + <providers> + <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" /> + </providers> + </entityFramework> +</configuration>
\ No newline at end of file diff --git a/Software/Visual_Studio/Utilities/Tango.PortsListGenerator/Program.cs b/Software/Visual_Studio/Utilities/Tango.PortsListGenerator/Program.cs new file mode 100644 index 000000000..274a3a95e --- /dev/null +++ b/Software/Visual_Studio/Utilities/Tango.PortsListGenerator/Program.cs @@ -0,0 +1,112 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.BL; +using Tango.BL.Enumerations; +using Tango.Core.Helpers; +using Tango.Documents; + +namespace Tango.PortsListGenerator +{ + class Program + { + private class PortItem + { + public String Designator { get; set; } + public String Asm { get; set; } + public String InterfaceName { get; set; } + public String Type { get; set; } + public String Sensor { get; set; } + public String SampleRate { get; set; } + public String Averaging { get; set; } + public String InitValue { get; set; } + + public override string ToString() + { + return String.Format("{0}, {1}, {2}, {3}, {4}, {5}, {6}", Designator, Asm, InterfaceName, Type, Sensor, Averaging, InitValue); + } + } + + static void Main(string[] args) + { + Console.WriteLine("Generating Ports List..."); + + ExcelReader reader = new ExcelReader(PathHelper.GetStartupPath() + "\\PortsList.xlsx"); + var results = reader.GetDataByIndex<PortItem>("Ports List", 2); + + Console.WriteLine("Emptying TECH_IOS table..."); + using (ObservablesContext db = ObservablesContext.CreateDefault()) + { + db.Database.ExecuteSqlCommand("DELETE FROM TECH_IOS"); + } + + using (ObservablesContext db = ObservablesContext.CreateDefault()) + { + foreach (var item in results) + { + Console.WriteLine("Adding " + item.ToString()); + + db.TechIos.Add(new BL.Entities.TechIo() + { + Designator = item.Designator, + Asm = item.Asm, + InterfaceName = item.InterfaceName, + Sensor = item.Sensor, + Type = (int)TypeNameToIOType(item.Type), + Averaging = (int)StringToNumber(item.Averaging), + InitValue = StringToNumber(item.InitValue), + }); + } + + Console.WriteLine("Saving changes to db..."); + db.SaveChanges(); + } + + reader.Dispose(); + + Console.WriteLine("Done!"); + Console.ReadLine(); + } + + private static double StringToNumber(String str) + { + if (str == null) return 0; + return Convert.ToDouble(str); + } + + private static IOType TypeNameToIOType(String name) + { + switch (name) + { + case "3Y Valve": + return IOType.Valve3Way; + case "AI": + return IOType.AnalogInput; + case "AO": + return IOType.AnalogOutput; + case "COM": + return IOType.COM; + case "GPI": + return IOType.DigitalInput; + case "GPO": + return IOType.DigitalOutput; + case "I2C": + return IOType.I2C; + case "Motor": + return IOType.Motor; + case "Motor - High Current": + return IOType.MotorHighCurrent; + case "ROT-ENC-ABZ": + return IOType.ROT_ENC_ABZ; + case "ROT-ENC-SSI": + return IOType.ROT_ENC_SSI; + case "TACHO": + return IOType.TACHO; + default: + return IOType.AnalogOutput; + } + } + } +} diff --git a/Software/Visual_Studio/Utilities/Tango.PortsListGenerator/Properties/AssemblyInfo.cs b/Software/Visual_Studio/Utilities/Tango.PortsListGenerator/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..9e4452498 --- /dev/null +++ b/Software/Visual_Studio/Utilities/Tango.PortsListGenerator/Properties/AssemblyInfo.cs @@ -0,0 +1,6 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +[assembly: AssemblyTitle("Tango - Ports List DB table generator.")] +[assembly: ComVisible(false)]
\ No newline at end of file diff --git a/Software/Visual_Studio/Utilities/Tango.PortsListGenerator/Tango.PortsListGenerator.csproj b/Software/Visual_Studio/Utilities/Tango.PortsListGenerator/Tango.PortsListGenerator.csproj new file mode 100644 index 000000000..5a5a17017 --- /dev/null +++ b/Software/Visual_Studio/Utilities/Tango.PortsListGenerator/Tango.PortsListGenerator.csproj @@ -0,0 +1,81 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProjectGuid>{12CC222B-D0F5-4048-B790-D283235F540D}</ProjectGuid> + <OutputType>Exe</OutputType> + <RootNamespace>Tango.PortsListGenerator</RootNamespace> + <AssemblyName>Tango.PortsListGenerator</AssemblyName> + <TargetFrameworkVersion>v4.6</TargetFrameworkVersion> + <FileAlignment>512</FileAlignment> + <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <PlatformTarget>AnyCPU</PlatformTarget> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>..\..\Build\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <PlatformTarget>AnyCPU</PlatformTarget> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <OutputPath>..\..\Build\Debug\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <ItemGroup> + <Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"> + <HintPath>..\..\packages\EntityFramework.6.0.0\lib\net45\EntityFramework.dll</HintPath> + </Reference> + <Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"> + <HintPath>..\..\packages\EntityFramework.6.0.0\lib\net45\EntityFramework.SqlServer.dll</HintPath> + </Reference> + <Reference Include="System" /> + <Reference Include="System.ComponentModel.DataAnnotations" /> + <Reference Include="System.Core" /> + <Reference Include="System.Xml.Linq" /> + <Reference Include="System.Data.DataSetExtensions" /> + <Reference Include="Microsoft.CSharp" /> + <Reference Include="System.Data" /> + <Reference Include="System.Net.Http" /> + <Reference Include="System.Xml" /> + </ItemGroup> + <ItemGroup> + <Compile Include="..\..\Versioning\GlobalVersionInfo.cs"> + <Link>GlobalVersionInfo.cs</Link> + </Compile> + <Compile Include="Program.cs" /> + <Compile Include="Properties\AssemblyInfo.cs" /> + </ItemGroup> + <ItemGroup> + <None Include="..\..\Resources\PortsList.xlsx"> + <Link>PortsList.xlsx</Link> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </None> + <None Include="App.config" /> + <None Include="packages.config" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\..\Tango.BL\Tango.BL.csproj"> + <Project>{f441feee-322a-4943-b566-110e12fd3b72}</Project> + <Name>Tango.BL</Name> + </ProjectReference> + <ProjectReference Include="..\..\Tango.Core\Tango.Core.csproj"> + <Project>{a34ee0f0-649d-41c8-8489-b6f1cc6924ee}</Project> + <Name>Tango.Core</Name> + </ProjectReference> + <ProjectReference Include="..\..\Tango.Documents\Tango.Documents.csproj"> + <Project>{ca87a608-7b17-4c98-88f2-42abee10f4c1}</Project> + <Name>Tango.Documents</Name> + </ProjectReference> + </ItemGroup> + <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> +</Project>
\ No newline at end of file diff --git a/Software/Visual_Studio/Utilities/Tango.PortsListGenerator/packages.config b/Software/Visual_Studio/Utilities/Tango.PortsListGenerator/packages.config new file mode 100644 index 000000000..9256e1591 --- /dev/null +++ b/Software/Visual_Studio/Utilities/Tango.PortsListGenerator/packages.config @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<packages> + <package id="EntityFramework" version="6.0.0" targetFramework="net46" /> +</packages>
\ No newline at end of file |
