Can anyone tell me how to save the values of structure to a file so that i can reaload them later?
Dim fxFixture as new Fixture
Dim fxFixture2 as new Fixture
fxFixture.Model = "ModelName"
fxFixture.SaveToFile("C:\test")
fxFixture2.LoadFromFile("C:\test")
Module Module1
Public Structure Fixture
Public Patch As Integer
Public Maker As String
Public Model As String
Public Mode As String
Public Channels As Integer
Public Fogger As Boolean
Public FanChannel As Integer
Public FogChannel As Integer
Public GoboWheel1 As GoboWheel
Public GoboWheel2 As GoboWheel
Public GoboWheel3 As GoboWheel
Public ColourWheel1 As ColourWheel
Public ColourWheel2 As ColourWheel
Public ColourWheel3 As ColourWheel
Public CMY As Boolean
Public RGB As Boolean
Public CyanChannel As Integer
Public MagentaChannel As Integer
Public YellowChannel As Integer
Public RedChannel As Integer
Public GreenChannel As Integer
Public BlueChannel As Integer
Public ChannelDescriptions As Collections.ObjectModel.Collection(Of String)
Public Pan8bit As Integer
Public Pan16bit As Integer
Public Tilt8bit As Integer
Public Tilt16bit As Integer
Public ResetChannel As Integer
Public ResetValue As Integer
Public ShutterChannel As Integer
Public ShutterOpenValue As Integer
Public ShutterClosedValue As Integer
Public StrobeChannel As Integer
Public StrobeLow As Integer
Public StrobeHigh As Integer
Public PulseChannel As Integer
Public PulseOpenSlow As Integer
Public PulseOpenFast As Integer
Public PulseClosedSlow As Integer
Public PulseClosedFast As Integer
Public IntensityChannel As Integer
Public LampChannel As Integer
Public LampOff As Integer
Public LampOn As Integer
Public IrisChannel As Integer
Public ZoomChannel As Integer
Public FocusChannel As Integer
Public FrostChannel As Integer
Public Frost2Channel As Integer
Public PrismChannel As Integer
Public PrismOn As Integer
Public PrismOff As Integer
Public PrismRotateChannel As Integer
Public PrismRotateClockwiseSlow As Integer
Public PrismRotateAntiClockwiseSlow As Integer
Public PrismRotateClockwiseFast As Integer
Public PrismRotateAntiClockwiseFast As Integer
Public Sub Start()
If Not LampChannel = 0 Then SetDMX(Patch - 1 + LampChannel, LampOn)
If Not Pan8bit = 0 Then SetDMX(Patch - 1 + Pan8bit, 128)
If Not Pan16bit = 0 Then SetDMX(Patch - 1 + Pan16bit, 128)
If Not Tilt8bit = 0 Then SetDMX(Patch - 1 + Tilt8bit, 128)
If Not Tilt16bit = 0 Then SetDMX(Patch - 1 + Tilt16bit, 128)
If Not IntensityChannel = 0 Then SetDMX(Patch - 1 + IntensityChannel, 0)
End Sub
Public Sub LoadFromFile(ByVal strFile As String)
End Sub
Public Sub SaveToFile(ByVal strFile As String)
End Sub
End Structure
Public Structure GoboWheel
Public GoboChannel As Integer
Public GoboCount As Integer
Public RotateChannel As Integer
Public RotateClockwiseSlow As Integer
Public RotateAntiClockwiseSlow As Integer
Public RotateClockwiseFast As Integer
Public RotateAntiClockwiseFast As Integer
Public Gobos As Collections.ObjectModel.Collection(Of Gobo)
End Structure
Public Structure Gobo
Public IndexValue As Integer
Public RotateValue As Integer
Public ShakeSlow As Integer
Public ShakeFast As Integer
Public Image As Image
End Structure
Public Structure ColourWheel
Public ColourChannel As Integer
Public ColourCount As Integer
Public Colours As Collections.ObjectModel.Collection(Of Colour)
Public RotateChannel As Integer
Public RotateClockwiseSlow As Integer
Public RotateAntiClockwiseSlow As Integer
Public RotateClockwiseFast As Integer
Public RotateAntiClockwiseFast As Integer
Public RandomSlow As Integer
Public RandomFast As Integer
End Structure
Public Structure Colour
Public ScrollingValue As Integer
Public SteppedValue
Public Red As Integer
Public Green As Integer
Public Blue As Integer
End Structure
Public Sub SetDMX(ByVal intPatchNumber As Integer, ByVal intValue As Integer)
End Sub
End Module