Initialization( ) changed, is abstract in ComponentBase, builds OK.

This commit is contained in:
Milan Hanajik
2021-04-03 09:39:17 +02:00
parent a58fe1f997
commit c53cb8ace0
106 changed files with 441 additions and 312 deletions
+4 -3
View File
@@ -26,9 +26,8 @@ namespace TBF.Rig.Network.Adapter
public IPAddress NetMask { get { return netMask; } }
public IPAddress BroadcastAddress { get { return broadcastAddress; } }
public Netadapter()
{
}
public Netadapter() { }
public Netadapter(Generic.IComponentCfg cfg)
: base(cfg)
@@ -44,5 +43,7 @@ namespace TBF.Rig.Network.Adapter
log.Warn(this.ToString());
}
public override void Initialize() { }
}
}
+6 -13
View File
@@ -14,33 +14,26 @@ namespace TBF.Rig.Network.Camera.Display
public class Display : ComponentBase, IOperation, ICameraDisplay
{
private static readonly ILog log = LogManager.GetLogger(typeof(Display));
public override string ToString()
{
return string.Format("{0}({1})", this.GetType().Namespace.Substring(8), Cfg.ToString(1));
}
public override string ToString() { return string.Format("{0}({1})", ClassName, Cfg.ToString(1)); }
public readonly DisplayCfg DisplayCfg;
///
public Display()
{
}
///
public Display(Generic.IComponentCfg cfg, IList<Generic.IComponent> components)
public Display() { }
public Display(Generic.IComponentCfg cfg, IList<Generic.IComponent> components)
: base(cfg)
{
DisplayCfg = cfg as DisplayCfg;
log.Warn(this.ToString());
}
public override void Initialize() { }
public bool[] SelectedImages { get { return selectedImages; } }
bool[] selectedImages;
public enum CurrentOp
{
None,
+11 -13
View File
@@ -118,30 +118,28 @@ namespace TBF.Rig.Network.Camera.Roi
}
public Roi()
{
}
public Roi() { }
public Roi(Generic.IComponentCfg cfg, IList<Generic.IComponent> components)
: base(cfg)
{
RoiCfg = cfg as RoiCfg;
NetCamera = TbfComponents.FindComponent(cfg.ParentName, components) as CLP1611.Camera;
PreviousRoi = TbfComponents.FindComponent(RoiCfg.PreviousRoi, components) as Roi;
detected = false;
RoiX = new Boxes.IntBox();
RoiY = new Boxes.IntBox();
RoiWid = new Boxes.IntBox();
RoiHgh = new Boxes.IntBox();
Clear();
log.Warn(this.ToString());
}
public override void Initialize()
{
detected = false;
RoiX = new Boxes.IntBox();
RoiY = new Boxes.IntBox();
RoiWid = new Boxes.IntBox();
RoiHgh = new Boxes.IntBox();
Clear();
}
#region Configuration Change Handling
@@ -72,12 +72,13 @@ namespace TBF.Rig.Network.Camera.RoiForFixedStart
{
roiCfg = cfg as RoiCfg;
NetCamera = TbfComponents.FindComponent(cfg.ParentName, components) as CLP1611.Camera;
Clear();
log.Warn(this.ToString());
}
public override void Initialize()
{
Clear();
}
#region Configuration Change Handling