diff --git a/TestBenchFramework/BenchControl/Elde/ControlBoardDev.cs b/TestBenchFramework/BenchControl/Elde/ControlBoardDev.cs index 090a59d40..8e4c2ac8f 100644 --- a/TestBenchFramework/BenchControl/Elde/ControlBoardDev.cs +++ b/TestBenchFramework/BenchControl/Elde/ControlBoardDev.cs @@ -154,7 +154,7 @@ namespace TBF.BenchControl.Elde #elif FUZHOU150 ControlComponent3Munich.UserControl1 ctrlBrdComponent, #elif FUZHOU300 - ControlComponent3Munich.UserControl1 ctrlBrdComponent, + ControlComponent3F300.UserControl1 ctrlBrdComponent, #endif float[] tankCapacities) { @@ -287,9 +287,10 @@ namespace TBF.BenchControl.Elde /// Regulation valve nr. (1..5) /// Valve regulation mode, see the enum /// Target position or target frequency or pulse duration - public void ValveMove(int valveNo, RegulValveMode valveMode, float[] valveValue) + /// Stabilization time when setting the flow: 0=200ms, step 50ms, max. 1.5 sec. + public void ValveMove(int valveNo, RegulValveMode valveMode, float[] valveValue, int stableTime) { - controlCom.ValveMove(valveNo, valveMode, valveValue); + controlCom.ValveMove(valveNo, valveMode, valveValue, stableTime); } diff --git a/TestBenchFramework/BenchControl/Elde/ControlComSim.cs b/TestBenchFramework/BenchControl/Elde/ControlComSim.cs index 49b070b1a..9a510b8b2 100644 --- a/TestBenchFramework/BenchControl/Elde/ControlComSim.cs +++ b/TestBenchFramework/BenchControl/Elde/ControlComSim.cs @@ -189,7 +189,8 @@ namespace TBF.BenchControl.Elde /// Regulating valve nr. (1..5) /// ??? /// ??? - public void ValveMove(int regulValveNo, RegulValveMode regulValveMode, float[] regulValveValue) + /// Stabilization time when setting the flow: 0=200ms, step 50ms, max. 1.5 sec. + public void ValveMove(int regulValveNo, RegulValveMode regulValveMode, float[] regulValveValue, int stableTime) { this.regulValveNo = regulValveNo; this.regulValveMode = regulValveMode; diff --git a/TestBenchFramework/BenchControl/Elde/ControlComWrap.cs b/TestBenchFramework/BenchControl/Elde/ControlComWrap.cs index 8da92b04a..746b7a288 100644 --- a/TestBenchFramework/BenchControl/Elde/ControlComWrap.cs +++ b/TestBenchFramework/BenchControl/Elde/ControlComWrap.cs @@ -11,8 +11,20 @@ namespace TBF.BenchControl.Elde /// Properties /// public StatusP StatusP { get { return (StatusP)ctrlBrdComponent.StatusP; } } +#if FUZHOU300 + /// + /// In case of I11, I12 + /// referenceFreq[0] = I11 + I12 + /// referenceFreq[1] = I11 + /// referenceFreq[2] = I12 + /// otherwise + /// referenceFreq[0] = I2 or I3 or I4 + /// + public float ReferenceFreq { get { return 1000.0f * ctrlBrdComponent.referenceFreq[0]; } } /// In [Hz] 0..2500, nom.=2000 +#else public float ReferenceFreq { get { return 1000.0f * ctrlBrdComponent.referenceFreq; } } /// In [Hz] 0..2500, nom.=2000 - public int EtPulses(int wmNr0) +#endif + public int EtPulses(int wmNr0) { return (int)ctrlBrdComponent.etPulses[wmNr0]; } @@ -28,7 +40,11 @@ namespace TBF.BenchControl.Elde public ulong RRoute { get { return ctrlBrdComponent.rRoute; } } public uint DivTime { get { return ctrlBrdComponent.divTime; } } public float TTime { get { return ctrlBrdComponent.Ttime; } } +#if FUZHOU300 + public uint FmState { get { return ctrlBrdComponent.fMState[0]; } } /// TODO: index +#else public uint FmState { get { return ctrlBrdComponent.fMState; } } +#endif public uint BeginState(int wmNr0) { return ctrlBrdComponent.beginSt[wmNr0]; } public float ReferenceFlow { get { return ctrlBrdComponent.referenceFlow; } } public float RValvePosition(int rvNr1) @@ -56,7 +72,7 @@ namespace TBF.BenchControl.Elde #elif FUZHOU150 private ControlComponent3Munich.UserControl1 ctrlBrdComponent; #elif FUZHOU300 - private ControlComponent3Munich.UserControl1 ctrlBrdComponent; + private ControlComponent3F300.UserControl1 ctrlBrdComponent; #endif /// @@ -70,7 +86,7 @@ namespace TBF.BenchControl.Elde #elif FUZHOU150 public ControlComWrap(ControlComponent3Munich.UserControl1 ctrlBrdComponent) #elif FUZHOU300 - public ControlComWrap(ControlComponent3Munich.UserControl1 ctrlBrdComponent) + public ControlComWrap(ControlComponent3F300.UserControl1 ctrlBrdComponent) #endif { this.ctrlBrdComponent = ctrlBrdComponent; @@ -127,24 +143,25 @@ namespace TBF.BenchControl.Elde /// Regulating valve nr. (1..5) /// Valve regulation mode, see the enum /// Target position or target frequency or pulse duration - public void ValveMove(int valveNo, RegulValveMode valveMode, float[] valveValue) + /// Stabilization time when setting the flow: 0=200ms, step 50ms, max. 1.5 sec. + public void ValveMove(int valveNo, RegulValveMode valveMode, float[] valveValue, int stableTime) { if (Program.MainWnd.InvokeRequired) { /// When ValveMove(...) called from the worker thread - object[] args = new object[] { valveNo, valveMode, valveValue }; + object[] args = new object[] { valveNo, valveMode, valveValue, stableTime }; Program.MainWnd.Invoke((ValveMoveDlgt)DoValveMove, args); /// When ValveMove called from a worker thread } else { /// When ValveMove(...) called from the UI thread - DoValveMove(valveNo, valveMode, valveValue); /// When ValveMove called from the UI thread + DoValveMove(valveNo, valveMode, valveValue, stableTime); /// When ValveMove called from the UI thread } } /// - delegate void ValveMoveDlgt(int valveNo, RegulValveMode valveMode, float[] valveValue); + delegate void ValveMoveDlgt(int valveNo, RegulValveMode valveMode, float[] valveValue, int stableTime); /// - private void DoValveMove(int valveNo, RegulValveMode valveMode, float[] valveValue) + private void DoValveMove(int valveNo, RegulValveMode valveMode, float[] valveValue, int stableTime) { //TBF.UiBridge.Bridge.OnLog(this, string.Format("{0} ValveMove({1}, {2}, [{3}, {4}])\r\n", // DateTime.Now.ToLongTimeString(), @@ -153,8 +170,11 @@ namespace TBF.BenchControl.Elde // valveValue[0], // valveValue[1])); log.InfoFormat("ValveMove(#={0}, md={1}, [{2}, {3}])", valveNo, valveMode, valveValue[0], valveValue[1]); - +#if FUZHOU300 + ctrlBrdComponent.ValveMove((byte)valveNo, (byte)valveMode, valveValue, stableTime); +#else ctrlBrdComponent.ValveMove((byte)valveNo, (byte)valveMode, valveValue); +#endif } @@ -220,7 +240,7 @@ namespace TBF.BenchControl.Elde regConst, shortImp, stopDevs); -#if (DN100 || MUNICH || FUZHOU300) +#if (DN100 || MUNICH) ctrlBrdComponent.SendCommand((uint)cmd, (byte)refFlowMeterNr, (ulong)route, (uint)totalRefPulses, (uint)testMethods, filterConstant, fmFreq[0], (uint)regConst, (uint)shortImp, (uint)stopDevs); #else diff --git a/TestBenchFramework/BenchControl/Elde/IControlCom.cs b/TestBenchFramework/BenchControl/Elde/IControlCom.cs index 5615ef8e9..050f900dc 100644 --- a/TestBenchFramework/BenchControl/Elde/IControlCom.cs +++ b/TestBenchFramework/BenchControl/Elde/IControlCom.cs @@ -61,7 +61,8 @@ namespace TBF.BenchControl.Elde /// Regulating valve nr. (1..5) /// ??? /// ??? - void ValveMove(int valveNo, RegulValveMode valveMode, float[] valveValue); + /// Stabilization time when setting the flow: 0=200ms, step 50ms, max. 1.5 sec. + void ValveMove(int valveNo, RegulValveMode valveMode, float[] valveValue, int stableTime); void RunDeviceBefore(); void RunDeviceAfter(); diff --git a/TestBenchFramework/BenchControl/Elde/RegulValve/ChangeValvePositionOp.cs b/TestBenchFramework/BenchControl/Elde/RegulValve/ChangeValvePositionOp.cs index 3c1adf65b..594b4d44c 100644 --- a/TestBenchFramework/BenchControl/Elde/RegulValve/ChangeValvePositionOp.cs +++ b/TestBenchFramework/BenchControl/Elde/RegulValve/ChangeValvePositionOp.cs @@ -55,7 +55,8 @@ namespace TBF.BenchControl.Elde.RegulValve controlBoard.ValveMove(regulValveNr, RegulValveMode.PulseWidth, - new float[2] { timePulseSec, timePulseSec }); + new float[2] { timePulseSec, timePulseSec }, + regulValve.StableTime); } /// Run this operation diff --git a/TestBenchFramework/BenchControl/Elde/RegulValve/RegulValve.cs b/TestBenchFramework/BenchControl/Elde/RegulValve/RegulValve.cs index 221dbac77..3c8b1d85e 100644 --- a/TestBenchFramework/BenchControl/Elde/RegulValve/RegulValve.cs +++ b/TestBenchFramework/BenchControl/Elde/RegulValve/RegulValve.cs @@ -32,7 +32,8 @@ namespace TBF.BenchControl.Elde.RegulValve public readonly int Position; /// 0..7 public readonly int DacValueClosed; /// 0..1023 - public readonly int DacValueOpen; /// 0..1023 + public readonly int DacValueOpen; /// 0..1023 + public readonly int StableTime; /// 0=200ms, step=50ms, max. 1500ms (max.26) public RegulValve(RegulValveCfg cfg, IList components) { @@ -45,6 +46,7 @@ namespace TBF.BenchControl.Elde.RegulValve this.Position = cfg.Position; this.DacValueClosed = cfg.DacValueClosed; this.DacValueOpen = cfg.DacValueOpen; + this.StableTime = cfg.StableTime; this.dict = new Dictionary(); this.controlBoard.RegValveCalib[Position - 1, 0] = (uint)DacValueClosed; diff --git a/TestBenchFramework/BenchControl/Elde/RegulValve/RegulValveCfg.cs b/TestBenchFramework/BenchControl/Elde/RegulValve/RegulValveCfg.cs index debb2f32b..ab0d0511f 100644 --- a/TestBenchFramework/BenchControl/Elde/RegulValve/RegulValveCfg.cs +++ b/TestBenchFramework/BenchControl/Elde/RegulValve/RegulValveCfg.cs @@ -7,15 +7,25 @@ namespace TBF.BenchControl.Elde.RegulValve { public class RegulValveCfg : ComponentCfgBase, IChildComponentCfg { + /// + /// Stored parameters + /// public int Position; /// 0..7 public int DacValueClosed; /// 0..1023 public int DacValueOpen; /// 0..1023 public int PidCoef; /// 1..100 + public int StableTimeMs; /// 200..1500 ms public bool StoredPositionReuse; /// true = store and re-use previous regulation valve positions + + /// + /// Stabilization time when setting the flow: 0=200ms, step 50ms, max. 1.5 sec. + /// + public int StableTime { get { return (StableTimeMs - 200) / 50; } } /// Parameterless constructor public RegulValveCfg() { + StableTimeMs = 500; } /// /// Regulation valve configuration parameters @@ -25,7 +35,7 @@ namespace TBF.BenchControl.Elde.RegulValve /// 0..1023 /// 0..1023 /// 1..100 - public RegulValveCfg(IComponentFactory factory, string name, string parentName, int position, int dacValueClosed, int dacValueOpen, int pidCoef, bool storedPositionReuse) + public RegulValveCfg(IComponentFactory factory, string name, string parentName, int position, int dacValueClosed, int dacValueOpen, int pidCoef, int stableTimeMs, bool storedPositionReuse) : base(factory, name, parentName) { if (position < 0 || position > 7) throw new ArgumentOutOfRangeException("position"); @@ -37,12 +47,13 @@ namespace TBF.BenchControl.Elde.RegulValve this.DacValueClosed = dacValueClosed; this.DacValueOpen = dacValueOpen; this.PidCoef = pidCoef; + this.StableTimeMs = stableTimeMs; this.StoredPositionReuse = storedPositionReuse; } public IComponentCfg Clone() { - return new RegulValveCfg(Factory, Name, ParentName, Position, DacValueClosed, DacValueOpen, PidCoef, StoredPositionReuse); + return new RegulValveCfg(Factory, Name, ParentName, Position, DacValueClosed, DacValueOpen, PidCoef, StableTimeMs, StoredPositionReuse); } public string ToString(int i) diff --git a/TestBenchFramework/BenchControl/Elde/RegulValve/RegulValveCfgCtrl.Designer.cs b/TestBenchFramework/BenchControl/Elde/RegulValve/RegulValveCfgCtrl.Designer.cs index 20eaac9b5..352d042b1 100644 --- a/TestBenchFramework/BenchControl/Elde/RegulValve/RegulValveCfgCtrl.Designer.cs +++ b/TestBenchFramework/BenchControl/Elde/RegulValve/RegulValveCfgCtrl.Designer.cs @@ -42,6 +42,8 @@ this.pidCoefLabel = new System.Windows.Forms.Label(); this.pidCoefTextBox = new System.Windows.Forms.TextBox(); this.storedPosReuseCheckBox = new System.Windows.Forms.CheckBox(); + this.stableTimeTextBox = new System.Windows.Forms.TextBox(); + this.stableTimeLabel = new System.Windows.Forms.Label(); this.SuspendLayout(); // // positionTextBox @@ -160,17 +162,36 @@ // this.storedPosReuseCheckBox.AutoSize = true; this.storedPosReuseCheckBox.Enabled = false; - this.storedPosReuseCheckBox.Location = new System.Drawing.Point(31, 174); + this.storedPosReuseCheckBox.Location = new System.Drawing.Point(31, 196); this.storedPosReuseCheckBox.Name = "storedPosReuseCheckBox"; this.storedPosReuseCheckBox.Size = new System.Drawing.Size(162, 17); this.storedPosReuseCheckBox.TabIndex = 13; this.storedPosReuseCheckBox.Text = "Enable stored position re-use"; this.storedPosReuseCheckBox.UseVisualStyleBackColor = true; // + // stableTimeTextBox + // + this.stableTimeTextBox.Enabled = false; + this.stableTimeTextBox.Location = new System.Drawing.Point(138, 170); + this.stableTimeTextBox.Name = "stableTimeTextBox"; + this.stableTimeTextBox.Size = new System.Drawing.Size(46, 20); + this.stableTimeTextBox.TabIndex = 15; + // + // stableTimeLabel + // + this.stableTimeLabel.AutoSize = true; + this.stableTimeLabel.Location = new System.Drawing.Point(28, 173); + this.stableTimeLabel.Name = "stableTimeLabel"; + this.stableTimeLabel.Size = new System.Drawing.Size(81, 13); + this.stableTimeLabel.TabIndex = 14; + this.stableTimeLabel.Text = "Stable time [ms]"; + // // RegulValveCfgCtrl // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.stableTimeTextBox); + this.Controls.Add(this.stableTimeLabel); this.Controls.Add(this.storedPosReuseCheckBox); this.Controls.Add(this.pidCoefTextBox); this.Controls.Add(this.pidCoefLabel); @@ -186,7 +207,7 @@ this.Controls.Add(this.nameLabel); this.Controls.Add(this.classNameLabel); this.Name = "RegulValveCfgCtrl"; - this.Size = new System.Drawing.Size(300, 200); + this.Size = new System.Drawing.Size(300, 250); this.Load += new System.EventHandler(this.RegulationValveCfgCtrl_Load); this.ResumeLayout(false); this.PerformLayout(); @@ -209,5 +230,7 @@ private System.Windows.Forms.Label pidCoefLabel; private System.Windows.Forms.TextBox pidCoefTextBox; private System.Windows.Forms.CheckBox storedPosReuseCheckBox; + private System.Windows.Forms.TextBox stableTimeTextBox; + private System.Windows.Forms.Label stableTimeLabel; } } diff --git a/TestBenchFramework/BenchControl/Elde/RegulValve/RegulValveCfgCtrl.cs b/TestBenchFramework/BenchControl/Elde/RegulValve/RegulValveCfgCtrl.cs index ad870b19f..1f075990a 100644 --- a/TestBenchFramework/BenchControl/Elde/RegulValve/RegulValveCfgCtrl.cs +++ b/TestBenchFramework/BenchControl/Elde/RegulValve/RegulValveCfgCtrl.cs @@ -56,6 +56,7 @@ namespace TBF.BenchControl.Elde.RegulValve dacClosedTextBox.Text = config.DacValueClosed.ToString(); dacOpenTextBox.Text = config.DacValueOpen.ToString(); pidCoefTextBox.Text = config.PidCoef.ToString(); + stableTimeTextBox.Text = config.StableTimeMs.ToString(); storedPosReuseCheckBox.Checked = config.StoredPositionReuse; } @@ -67,6 +68,7 @@ namespace TBF.BenchControl.Elde.RegulValve dacClosedTextBox.Enabled = true; dacOpenTextBox.Enabled = true; pidCoefTextBox.Enabled = true; + stableTimeTextBox.Enabled = true; storedPosReuseCheckBox.Enabled = true; } @@ -100,6 +102,11 @@ namespace TBF.BenchControl.Elde.RegulValve flags |= CfgVerifyFlags.Error; message += Environment.NewLine + "'PID Coefficient' should be between 0 and 100"; } + if (!int.TryParse(stableTimeTextBox.Text, out dummy) || dummy < 200 || dummy > 1500 || (dummy % 50) != 0) + { + flags |= CfgVerifyFlags.Error; + message += Environment.NewLine + "'Stable time' should be between 200 and 1500 ms in 50 ms steps"; + } return flags; } @@ -114,6 +121,7 @@ namespace TBF.BenchControl.Elde.RegulValve config.DacValueClosed = int.Parse(dacClosedTextBox.Text); config.DacValueOpen = int.Parse(dacOpenTextBox.Text); config.PidCoef = int.Parse(pidCoefTextBox.Text); + config.StableTimeMs = int.Parse(stableTimeTextBox.Text); config.StoredPositionReuse = storedPosReuseCheckBox.Checked; } } diff --git a/TestBenchFramework/BenchControl/Elde/RegulValve/RegulValveFactory.cs b/TestBenchFramework/BenchControl/Elde/RegulValve/RegulValveFactory.cs index 041e71e0e..3973cfffd 100644 --- a/TestBenchFramework/BenchControl/Elde/RegulValve/RegulValveFactory.cs +++ b/TestBenchFramework/BenchControl/Elde/RegulValve/RegulValveFactory.cs @@ -16,7 +16,7 @@ namespace TBF.BenchControl.Elde.RegulValve public IComponentCfg DefaultConfig(IList components) { - return new RegulValveCfg(this, "RegulationValve", "CB", 1, 100, 500, 20, false); + return new RegulValveCfg(this, "RegulationValve", "CB", 1, 100, 500, 20, 500, false); } public IComponentCfgCtrl CreateCfgCtrl() diff --git a/TestBenchFramework/BenchControl/Elde/RegulValve/SetFlowOp.cs b/TestBenchFramework/BenchControl/Elde/RegulValve/SetFlowOp.cs index dd7be0ddc..8ab5ee813 100644 --- a/TestBenchFramework/BenchControl/Elde/RegulValve/SetFlowOp.cs +++ b/TestBenchFramework/BenchControl/Elde/RegulValve/SetFlowOp.cs @@ -181,7 +181,8 @@ namespace TBF.BenchControl.Elde.RegulValve if (opState == OpState.ValveMoveToPosition) { controlBoard.ValveMove(regulValveNr, RegulValveMode.TargetPosition, - new float[2] { targetPositionLo, targetPositionHi }); + new float[2] { targetPositionLo, targetPositionHi }, + regulValve.StableTime); opState = OpState.SettingPosition; return Event.None; @@ -207,7 +208,8 @@ namespace TBF.BenchControl.Elde.RegulValve float freqLo = 2000.0f * reqFlowLo / flowMeter.NominalFlow; float freqHi = 2000.0f * reqFlowHi / flowMeter.NominalFlow; controlBoard.ValveMove(regulValveNr, RegulValveMode.TargetFrequency, - new float[2] { freqLo, freqHi }); + new float[2] { freqLo, freqHi }, + regulValve.StableTime); opState = OpState.SettingFlow; return Event.None; diff --git a/TestBenchFramework/BenchControl/Elde/RegulValve/SetRegulValvePositionOp.cs b/TestBenchFramework/BenchControl/Elde/RegulValve/SetRegulValvePositionOp.cs index 6d1121ddf..ecd8d5638 100644 --- a/TestBenchFramework/BenchControl/Elde/RegulValve/SetRegulValvePositionOp.cs +++ b/TestBenchFramework/BenchControl/Elde/RegulValve/SetRegulValvePositionOp.cs @@ -90,7 +90,8 @@ namespace TBF.BenchControl.Elde.RegulValve controlBoard.ValveMove(regulValveNr, RegulValveMode.TargetPosition, - new float[2] { posLoPct, posHiPct }); + new float[2] { posLoPct, posHiPct }, + regulValve.StableTime); return Event.None; } @@ -123,7 +124,8 @@ namespace TBF.BenchControl.Elde.RegulValve { controlBoard.ValveMove(regulValveNr, RegulValveMode.Stop, - new float[2] { posLoPct, posHiPct }); + new float[2] { posLoPct, posHiPct }, + regulValve.StableTime); } } } diff --git a/TestBenchFramework/BenchControl/StateMachine.cs b/TestBenchFramework/BenchControl/StateMachine.cs index c3660ee8e..1ab71d599 100644 --- a/TestBenchFramework/BenchControl/StateMachine.cs +++ b/TestBenchFramework/BenchControl/StateMachine.cs @@ -184,7 +184,7 @@ namespace TBF.BenchControl #elif FUZHOU150 public static void InitializeBoardEtc(ControlComponent3Munich.UserControl1 ctrlBrdComponent) #elif FUZHOU300 - public static void InitializeBoardEtc(ControlComponent3Munich.UserControl1 ctrlBrdComponent) + public static void InitializeBoardEtc(ControlComponent3F300.UserControl1 ctrlBrdComponent) #endif { /// Load the list of components (entities) from the database. diff --git a/TestBenchFramework/Forms/AboutDlg.Designer.cs b/TestBenchFramework/Forms/AboutDlg.Designer.cs index 06b1a1733..4b8c33c03 100644 --- a/TestBenchFramework/Forms/AboutDlg.Designer.cs +++ b/TestBenchFramework/Forms/AboutDlg.Designer.cs @@ -28,64 +28,72 @@ namespace TBF.Forms /// private void InitializeComponent() { - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AboutDlg)); - this.copyrightLabel = new System.Windows.Forms.Label(); - this.versionLabel = new System.Windows.Forms.Label(); - this.buildDateLabel = new System.Windows.Forms.Label(); - this.closeButton = new System.Windows.Forms.Button(); - this.logoPictureBox = new System.Windows.Forms.PictureBox(); - ((System.ComponentModel.ISupportInitialize)(this.logoPictureBox)).BeginInit(); - this.SuspendLayout(); - // - // copyrightLabel - // - resources.ApplyResources(this.copyrightLabel, "copyrightLabel"); - this.copyrightLabel.ImageKey = global::TBF.Resources.Strings.String1; - this.copyrightLabel.Name = "copyrightLabel"; - // - // versionLabel - // - resources.ApplyResources(this.versionLabel, "versionLabel"); - this.versionLabel.ImageKey = global::TBF.Resources.Strings.String1; - this.versionLabel.Name = "versionLabel"; - // - // buildDateLabel - // - resources.ApplyResources(this.buildDateLabel, "buildDateLabel"); - this.buildDateLabel.ImageKey = global::TBF.Resources.Strings.String1; - this.buildDateLabel.Name = "buildDateLabel"; - // - // closeButton - // - resources.ApplyResources(this.closeButton, "closeButton"); - this.closeButton.DialogResult = System.Windows.Forms.DialogResult.OK; - this.closeButton.ImageKey = global::TBF.Resources.Strings.String1; - this.closeButton.Name = "closeButton"; - this.closeButton.UseVisualStyleBackColor = true; - // - // logoPictureBox - // - resources.ApplyResources(this.logoPictureBox, "logoPictureBox"); - this.logoPictureBox.BackgroundImage = global::TBF.Properties.Resources.sensus_logo; - this.logoPictureBox.Name = "logoPictureBox"; - this.logoPictureBox.TabStop = false; - // - // AboutDlg - // - resources.ApplyResources(this, "$this"); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.BackColor = System.Drawing.SystemColors.Window; - this.Controls.Add(this.logoPictureBox); - this.Controls.Add(this.closeButton); - this.Controls.Add(this.buildDateLabel); - this.Controls.Add(this.versionLabel); - this.Controls.Add(this.copyrightLabel); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; - this.Name = "AboutDlg"; - this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide; - ((System.ComponentModel.ISupportInitialize)(this.logoPictureBox)).EndInit(); - this.ResumeLayout(false); - this.PerformLayout(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AboutDlg)); + this.copyrightLabel = new System.Windows.Forms.Label(); + this.versionLabel = new System.Windows.Forms.Label(); + this.buildDateLabel = new System.Windows.Forms.Label(); + this.closeButton = new System.Windows.Forms.Button(); + this.logoPictureBox = new System.Windows.Forms.PictureBox(); + this.secureHashLabel = new System.Windows.Forms.Label(); + ((System.ComponentModel.ISupportInitialize)(this.logoPictureBox)).BeginInit(); + this.SuspendLayout(); + // + // copyrightLabel + // + resources.ApplyResources(this.copyrightLabel, "copyrightLabel"); + this.copyrightLabel.ImageKey = global::TBF.Resources.Strings.String1; + this.copyrightLabel.Name = "copyrightLabel"; + // + // versionLabel + // + resources.ApplyResources(this.versionLabel, "versionLabel"); + this.versionLabel.ImageKey = global::TBF.Resources.Strings.String1; + this.versionLabel.Name = "versionLabel"; + // + // buildDateLabel + // + resources.ApplyResources(this.buildDateLabel, "buildDateLabel"); + this.buildDateLabel.ImageKey = global::TBF.Resources.Strings.String1; + this.buildDateLabel.Name = "buildDateLabel"; + // + // closeButton + // + this.closeButton.DialogResult = System.Windows.Forms.DialogResult.OK; + this.closeButton.ImageKey = global::TBF.Resources.Strings.String1; + resources.ApplyResources(this.closeButton, "closeButton"); + this.closeButton.Name = "closeButton"; + this.closeButton.UseVisualStyleBackColor = true; + // + // logoPictureBox + // + this.logoPictureBox.BackgroundImage = global::TBF.Properties.Resources.sensus_logo; + resources.ApplyResources(this.logoPictureBox, "logoPictureBox"); + this.logoPictureBox.Name = "logoPictureBox"; + this.logoPictureBox.TabStop = false; + // + // secureHashLabel + // + resources.ApplyResources(this.secureHashLabel, "secureHashLabel"); + this.secureHashLabel.ImageKey = global::TBF.Resources.Strings.String1; + this.secureHashLabel.Name = "secureHashLabel"; + // + // AboutDlg + // + resources.ApplyResources(this, "$this"); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.SystemColors.Window; + this.Controls.Add(this.secureHashLabel); + this.Controls.Add(this.logoPictureBox); + this.Controls.Add(this.closeButton); + this.Controls.Add(this.buildDateLabel); + this.Controls.Add(this.versionLabel); + this.Controls.Add(this.copyrightLabel); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; + this.Name = "AboutDlg"; + this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide; + ((System.ComponentModel.ISupportInitialize)(this.logoPictureBox)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); } @@ -96,5 +104,6 @@ namespace TBF.Forms private System.Windows.Forms.Label buildDateLabel; private System.Windows.Forms.Button closeButton; private System.Windows.Forms.PictureBox logoPictureBox; + private System.Windows.Forms.Label secureHashLabel; } } \ No newline at end of file diff --git a/TestBenchFramework/Forms/AboutDlg.cs b/TestBenchFramework/Forms/AboutDlg.cs index e7ad3131b..1f7c407ab 100644 --- a/TestBenchFramework/Forms/AboutDlg.cs +++ b/TestBenchFramework/Forms/AboutDlg.cs @@ -4,6 +4,7 @@ using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; +using System.Security.Cryptography; using System.Windows.Forms; namespace TBF.Forms @@ -23,6 +24,11 @@ namespace TBF.Forms InitializeComponent(); versionLabel.Text = versionLabel.Text.Replace("_VERSION_", version); buildDateLabel.Text = buildDateLabel.Text.Replace("_BUILD_DATE_", buildDate); + + byte[] sha1 = (new SHA1CryptoServiceProvider()).ComputeHash(Encoding.Default.GetBytes("nejaky text")); /// TODO: calculate SHA1 of real data + StringBuilder sb = new StringBuilder(); + foreach (byte oneByte in sha1) { sb.Append(oneByte.ToString("X2")); } + secureHashLabel.Text = string.Format("SHA1: {0}", sb); } } } \ No newline at end of file diff --git a/TestBenchFramework/Forms/AboutDlg.resx b/TestBenchFramework/Forms/AboutDlg.resx index a3a3d45f5..7139f2e35 100644 --- a/TestBenchFramework/Forms/AboutDlg.resx +++ b/TestBenchFramework/Forms/AboutDlg.resx @@ -117,163 +117,190 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - $this - - - About Test Bench Framework - - - $this - - - - 6, 13 - - - versionLabel - - - copyrightLabel - - - logoPictureBox - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - AboutDlg - - - $this - True + + + 145, 19 + + + 120, 13 + + + 4 + + + Copyright © 2013, 2014 + + + copyrightLabel + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 5 + True - - 103, 30 - - - 3 + + 145, 40 105, 13 + + 5 + + + Version _VERSION_ + + + versionLabel + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 4 + + + True + + + 145, 62 + + + 136, 13 + + + 6 + + + Build date _BUILD_DATE_ + + + buildDateLabel + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 3 + + + 341, 22 + + + 105, 28 + + + 11 + + + &Close + + + closeButton + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 2 + Stretch - - 458, 99 - - - 0 - - - 145, 41 - - - CenterParent - - - 341, 36 - - - 145, 64 - - - Version _VERSION_ - - - System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 136, 13 - - - closeButton - - - 11 - - - 4 - - - 12 - - - 105, 28 - - - 6 - - - Copyright © 2013 - - - 4 - - - &Close - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - True + + 12, 34 - - 2 + + 103, 30 - + + 12 + + + logoPictureBox + + + System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + $this - + 1 - + + True + + + NoControl + + + 145, 85 + + + 67, 13 + + + 13 + + + Secure hash + + + secureHashLabel + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + $this - - buildDateLabel - - - 90, 13 - - - - - - 145, 19 - - - 5 - - - Build date _BUILD_DATE_ + + 0 True - - de - + + 6, 13 + + + 458, 116 + + + CenterParent + + + About Test Bench Framework + + + AboutDlg + + + System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + \ No newline at end of file diff --git a/TestBenchFramework/MainWnd.Designer.cs b/TestBenchFramework/MainWnd.Designer.cs index 06c0e40b4..53d73242f 100644 --- a/TestBenchFramework/MainWnd.Designer.cs +++ b/TestBenchFramework/MainWnd.Designer.cs @@ -47,7 +47,7 @@ this.activityLabel = new System.Windows.Forms.Label(); this.mainTabControl = new System.Windows.Forms.TabControl(); this.homeTabPage = new System.Windows.Forms.TabPage(); - this.ctrlBrdComponent = new ControlComponent3Munich.UserControl1(); + this.ctrlBrdComponent = new ControlComponent3F300.UserControl1(); this.processTabPage = new System.Windows.Forms.TabPage(); this.processTabPageCtrl = new TBF.Screens.ProcessTabPageCtrl(); this.measurementTabPage = new System.Windows.Forms.TabPage(); @@ -562,7 +562,7 @@ #elif FUZHOU150 private ControlComponent3Munich.UserControl1 ctrlBrdComponent; #elif FUZHOU300 - private ControlComponent3Munich.UserControl1 ctrlBrdComponent; + private ControlComponent3F300.UserControl1 ctrlBrdComponent; #endif private System.Windows.Forms.ToolStripMenuItem benchTSMenuItem; diff --git a/TestBenchFramework/MainWnd.cs b/TestBenchFramework/MainWnd.cs index 170dbaa8a..dca10faf3 100644 --- a/TestBenchFramework/MainWnd.cs +++ b/TestBenchFramework/MainWnd.cs @@ -289,7 +289,10 @@ namespace TBF private void localSettingsTSMItem_Click(object s, EventArgs e) { new PreferencesDlg().ShowDialog(); } private void databaseSettingsTSMItem_Click(object s, EventArgs e) { new BenchesDlg().ShowDialog(); } private void usersTSMItem_Click(object s, EventArgs e) { new Forms.EditUsers().ShowDialog(); } - private void aboutTSMItem_Click(object s, EventArgs e) { new Forms.AboutDlg("1.0", "07.01.2014").ShowDialog(); } + private void aboutTSMItem_Click(object s, EventArgs e) + { + new Forms.AboutDlg("1.0.0.237", "05.09.2014").ShowDialog(); + } /// /// Read the database and re-initialize procedureComboBox items. diff --git a/TestBenchFramework/MainWnd.resx b/TestBenchFramework/MainWnd.resx index a868332dc..307bf5c87 100644 --- a/TestBenchFramework/MainWnd.resx +++ b/TestBenchFramework/MainWnd.resx @@ -1063,7 +1063,7 @@ 0, 0 - ControlComponent3Munich.UserControl1, ControlComponent3Munich, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + ControlComponent3F300.UserControl1, ControlComponent3F300, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 30 diff --git a/TestBenchFramework/TBF.csproj b/TestBenchFramework/TBF.csproj index b0d898fa9..c2f64bf1d 100644 --- a/TestBenchFramework/TBF.csproj +++ b/TestBenchFramework/TBF.csproj @@ -73,8 +73,8 @@ TBF.Program - - ..\packages\ControlBoard\Munich\ControlComponent3Munich.dll + + ..\packages\ControlBoard\Fuzhou300\ControlComponent3U.dll ..\packages\FluentNHibernate.1.3.0.733\lib\FluentNHibernate.dll diff --git a/packages/ControlBoard/Fuzhou300/ControlComponent3U.dll b/packages/ControlBoard/Fuzhou300/ControlComponent3U.dll index 9f7814652..708d80561 100644 Binary files a/packages/ControlBoard/Fuzhou300/ControlComponent3U.dll and b/packages/ControlBoard/Fuzhou300/ControlComponent3U.dll differ