Add ISmartTestMethod interface and initial designer file for iPerlCommunicationForm in SharedDialogs
This commit is contained in:
parent
22fffe602c
commit
ab4025e55f
@ -60,6 +60,7 @@
|
||||
|
||||
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=TBF_002FRig_002FRegisterReaders_002FiPerlReaderUNI_002Ftest_002FiPerlCommunicationForm/@EntryIndexedValue">True</s:Boolean>
|
||||
|
||||
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=TBF_002FRig_002FUni_002FSharedDialogs_002FiPerlCommunication_002FiPerlCommunicationForm/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=TBF_002FUI_002FBench_002FComponents_002FComponentsManagerDlg/@EntryIndexedValue">False</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=TBF_002FUI_002FBench_002FMetrology_002FMetrologyDlgAdjustableScaleTab/@EntryIndexedValue">False</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=TBF_002FUI_002FBench_002FMetrology_002FMetrologyDlgPressMeterTab/@EntryIndexedValue">False</s:Boolean>
|
||||
|
||||
44
TBF/Boxes/CheckBoxImage.cs
Normal file
44
TBF/Boxes/CheckBoxImage.cs
Normal file
@ -0,0 +1,44 @@
|
||||
///
|
||||
/// Copyright (c) 2017 Sensus Metering Systems
|
||||
///
|
||||
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace TBF.Boxes
|
||||
{
|
||||
public class CheckBoxImage : PictureBox
|
||||
{
|
||||
private bool cbChecked;
|
||||
private readonly Image checkedImg;
|
||||
private readonly Image uncheckedImg;
|
||||
|
||||
public CheckBoxImage()
|
||||
: this(new Bitmap(TBF.Properties.Resources.SwitchOn), new Bitmap(TBF.Properties.Resources.SwitchOff), true)
|
||||
{
|
||||
SizeMode = PictureBoxSizeMode.StretchImage;
|
||||
}
|
||||
|
||||
public CheckBoxImage(Image checkedImg, Image uncheckedImg, bool initState)
|
||||
: base()
|
||||
{
|
||||
this.checkedImg = checkedImg;
|
||||
this.uncheckedImg = uncheckedImg;
|
||||
Click += (sender, e) => { Checked = !Checked; };
|
||||
Checked = initState;
|
||||
}
|
||||
|
||||
public bool Checked
|
||||
{
|
||||
get { return cbChecked; }
|
||||
set
|
||||
{
|
||||
if (Enabled)
|
||||
{
|
||||
Image = value ? checkedImg : uncheckedImg;
|
||||
cbChecked = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,28 @@
|
||||
namespace TBF.Rig.Uni.SharedDialogs.iPerlCommunication
|
||||
{
|
||||
public enum ConditionID
|
||||
{
|
||||
A,
|
||||
B,
|
||||
C,
|
||||
Count,
|
||||
}
|
||||
|
||||
public abstract class ISequenceConditionOp
|
||||
{
|
||||
const string ConditionNameFmt = "iPERL communication milestone {0}";
|
||||
public static string GetConditionNameFmt(int id)
|
||||
{
|
||||
return string.Format(ConditionNameFmt, id);
|
||||
}
|
||||
|
||||
private ConditionID id;
|
||||
private ISmartTestMethod testMethodComponent;
|
||||
|
||||
public ISequenceConditionOp(ISmartTestMethod testMethodComponent, ConditionID id)
|
||||
{
|
||||
this.testMethodComponent = testMethodComponent;
|
||||
this.id = id;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,9 @@
|
||||
namespace TBF.Rig.Uni.SharedDialogs.iPerlCommunication
|
||||
{
|
||||
|
||||
|
||||
public interface ISmartTestMethod
|
||||
{
|
||||
void MeterCommMilestone(int iItem, bool bValue);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
namespace TBF.Rig.Uni.SharedDialogs.iPerlCommunication
|
||||
{
|
||||
public interface ISmartWrapper
|
||||
{
|
||||
CommErr ResetQ2Correction(int threadId, IperlHead ihead, WaterMeter wm, ref string resultStr)
|
||||
CommErr WriteDefaultQ2Corrections(int threadId, IperlHead ihead, WaterMeter wm, ref string resultStr);
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
2905
TBF/Rig/Uni/SharedDialogs/iPerlCommunication/iPerlCommunicationForm.designer.cs
generated
Normal file
2905
TBF/Rig/Uni/SharedDialogs/iPerlCommunication/iPerlCommunicationForm.designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -157,6 +157,9 @@
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Boxes\CheckBoxImage.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Boxes\DateTimeBox.cs" />
|
||||
<Compile Include="Data.cs" />
|
||||
<Compile Include="DB.cs" />
|
||||
|
||||
Loading…
Reference in New Issue
Block a user