ProductionUiCordonel: -ReSharper
This commit is contained in:
@@ -8,11 +8,6 @@ namespace ProductionUiCordonel
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class App : Application
|
public partial class App : Application
|
||||||
{
|
{
|
||||||
public App()
|
|
||||||
{
|
|
||||||
//this.StartupUri = new Uri("MainWindow.xaml");
|
|
||||||
//this.StartupUri = new Uri("MultiMode.xaml");
|
|
||||||
}
|
|
||||||
private void Application_Startup(Object sender, StartupEventArgs e)
|
private void Application_Startup(Object sender, StartupEventArgs e)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
using Newtonsoft.Json;
|
using System;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
namespace ProductionUiCordonel
|
namespace ProductionUiCordonel
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using System.Windows.Media;
|
||||||
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore;
|
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore;
|
||||||
using Xylem.Common.Hardware.WaterMeter.Genesis.Registers;
|
using Xylem.Common.Hardware.WaterMeter.Genesis.Registers;
|
||||||
|
|
||||||
@@ -24,23 +25,23 @@ public abstract class PickingResultBaseData : IPickingResultData
|
|||||||
|
|
||||||
public Boolean HasError { get; set; }
|
public Boolean HasError { get; set; }
|
||||||
|
|
||||||
public System.Windows.Media.Brush ResultColor { get { return getColorFromResult(); } }
|
public Brush ResultColor => getColorFromResult();
|
||||||
public abstract Func<PickingItemCheckReturn> Action { get; }
|
public abstract Func<PickingItemCheckReturn> Action { get; }
|
||||||
|
|
||||||
private System.Windows.Media.Brush getColorFromResult()
|
private Brush getColorFromResult()
|
||||||
{
|
{
|
||||||
var converter = new System.Windows.Media.BrushConverter();
|
var converter = new BrushConverter();
|
||||||
var brush = (System.Windows.Media.Brush)converter.ConvertFromString("#000000");
|
var brush = (Brush)converter.ConvertFromString("#000000");
|
||||||
|
|
||||||
if (Result.HasValue) // && a.Result.Value ))
|
if (Result.HasValue) // && a.Result.Value ))
|
||||||
{
|
{
|
||||||
if (!Result.Value)
|
if (!Result.Value)
|
||||||
{
|
{
|
||||||
brush = (System.Windows.Media.Brush)converter.ConvertFromString("#FF8000");
|
brush = (Brush)converter.ConvertFromString("#FF8000");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
brush = (System.Windows.Media.Brush)converter.ConvertFromString("#419C14");
|
brush = (Brush)converter.ConvertFromString("#419C14");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -61,7 +62,7 @@ public abstract class PickingResultBaseData : IPickingResultData
|
|||||||
|
|
||||||
Boolean HasError { get; set; }
|
Boolean HasError { get; set; }
|
||||||
|
|
||||||
System.Windows.Media.Brush ResultColor { get; }
|
Brush ResultColor { get; }
|
||||||
|
|
||||||
Func<PickingItemCheckReturn> Action { get; }
|
Func<PickingItemCheckReturn> Action { get; }
|
||||||
}
|
}
|
||||||
@@ -73,11 +74,11 @@ public abstract class PickingResultBaseData : IPickingResultData
|
|||||||
|
|
||||||
public Object CompareObject { get; set; }
|
public Object CompareObject { get; set; }
|
||||||
|
|
||||||
public override Func<PickingItemCheckReturn> Action { get { return staticReadAndCompareAction(); } }
|
public override Func<PickingItemCheckReturn> Action => staticReadAndCompareAction();
|
||||||
|
|
||||||
public Func<PickingItemCheckReturn> staticReadAndCompareAction()
|
public Func<PickingItemCheckReturn> staticReadAndCompareAction()
|
||||||
{
|
{
|
||||||
return delegate ()
|
return delegate
|
||||||
{
|
{
|
||||||
var retComp = new PickingItemCheckReturn();
|
var retComp = new PickingItemCheckReturn();
|
||||||
retComp.Result = null;
|
retComp.Result = null;
|
||||||
@@ -113,8 +114,7 @@ public abstract class PickingResultBaseData : IPickingResultData
|
|||||||
}
|
}
|
||||||
|
|
||||||
public readonly Func<PickingItemCheckReturn> _action;
|
public readonly Func<PickingItemCheckReturn> _action;
|
||||||
public override Func<PickingItemCheckReturn> Action { get { return _action; } }
|
public override Func<PickingItemCheckReturn> Action => _action;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ namespace ProductionUiCordonel.Data
|
|||||||
|
|
||||||
public Int32 Rev
|
public Int32 Rev
|
||||||
{
|
{
|
||||||
get { return rev; }
|
get => rev;
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
rev = value;
|
rev = value;
|
||||||
@@ -56,7 +56,7 @@ namespace ProductionUiCordonel.Data
|
|||||||
private Boolean? passed = false;
|
private Boolean? passed = false;
|
||||||
public Boolean? Passed
|
public Boolean? Passed
|
||||||
{
|
{
|
||||||
get { return passed; }
|
get => passed;
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
passed = value;
|
passed = value;
|
||||||
@@ -69,7 +69,7 @@ namespace ProductionUiCordonel.Data
|
|||||||
private String testerName = "C. Röhl";
|
private String testerName = "C. Röhl";
|
||||||
public String TesterName
|
public String TesterName
|
||||||
{
|
{
|
||||||
get { return testerName; }
|
get => testerName;
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
testerName = value;
|
testerName = value;
|
||||||
@@ -80,7 +80,7 @@ namespace ProductionUiCordonel.Data
|
|||||||
private String testPressure = "6";
|
private String testPressure = "6";
|
||||||
public String TestPressure
|
public String TestPressure
|
||||||
{
|
{
|
||||||
get { return testPressure; }
|
get => testPressure;
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
testPressure = value;
|
testPressure = value;
|
||||||
@@ -92,7 +92,7 @@ namespace ProductionUiCordonel.Data
|
|||||||
private String leakRate = " 0,00001";
|
private String leakRate = " 0,00001";
|
||||||
public String LeakRate
|
public String LeakRate
|
||||||
{
|
{
|
||||||
get { return leakRate; }
|
get => leakRate;
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
leakRate = value;
|
leakRate = value;
|
||||||
@@ -103,7 +103,7 @@ namespace ProductionUiCordonel.Data
|
|||||||
private String remark = "";
|
private String remark = "";
|
||||||
public String Remark
|
public String Remark
|
||||||
{
|
{
|
||||||
get { return remark; }
|
get => remark;
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
remark = value;
|
remark = value;
|
||||||
@@ -112,21 +112,22 @@ namespace ProductionUiCordonel.Data
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private ObservableCollection<PressureTestPoints> testpoints = new ObservableCollection<PressureTestPoints>() {
|
private ObservableCollection<PressureTestPoints> testpoints = new ObservableCollection<PressureTestPoints>
|
||||||
new PressureTestPoints() { Ident = 1, Input = "2E-07" },
|
{
|
||||||
new PressureTestPoints() { Ident = 2, Input = "2E-07" },
|
new PressureTestPoints { Ident = 1, Input = "2E-07" },
|
||||||
new PressureTestPoints() { Ident = 3, Input = "2E-07" },
|
new PressureTestPoints { Ident = 2, Input = "2E-07" },
|
||||||
new PressureTestPoints() { Ident = 4, Input = "2E-07" },
|
new PressureTestPoints { Ident = 3, Input = "2E-07" },
|
||||||
new PressureTestPoints() { Ident = 5, Input = "2E-07" },
|
new PressureTestPoints { Ident = 4, Input = "2E-07" },
|
||||||
new PressureTestPoints() { Ident = 6, Input = "2E-07" },
|
new PressureTestPoints { Ident = 5, Input = "2E-07" },
|
||||||
new PressureTestPoints() { Ident = 7, Input = "2E-07" },
|
new PressureTestPoints { Ident = 6, Input = "2E-07" },
|
||||||
new PressureTestPoints() { Ident = 8, Input = "2E-07" },
|
new PressureTestPoints { Ident = 7, Input = "2E-07" },
|
||||||
new PressureTestPoints() { Ident = 9, Input = "2E-07" },
|
new PressureTestPoints { Ident = 8, Input = "2E-07" },
|
||||||
new PressureTestPoints() { Ident = 10, Input = "2E-07" }
|
new PressureTestPoints { Ident = 9, Input = "2E-07" },
|
||||||
|
new PressureTestPoints { Ident = 10, Input = "2E-07" }
|
||||||
};
|
};
|
||||||
public ObservableCollection<PressureTestPoints> Testpoints
|
public ObservableCollection<PressureTestPoints> Testpoints
|
||||||
{
|
{
|
||||||
get { return testpoints; }
|
get => testpoints;
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
testpoints = value;
|
testpoints = value;
|
||||||
|
|||||||
@@ -209,10 +209,7 @@ namespace ProductionUiCordonel
|
|||||||
_lastMsg = value;
|
_lastMsg = value;
|
||||||
updateUi(lblMessage, _lastMsg);
|
updateUi(lblMessage, _lastMsg);
|
||||||
}
|
}
|
||||||
get
|
get => _lastMsg;
|
||||||
{
|
|
||||||
return _lastMsg;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
private void updateUi(ContentControl c, String content)
|
private void updateUi(ContentControl c, String content)
|
||||||
{
|
{
|
||||||
@@ -261,10 +258,7 @@ namespace ProductionUiCordonel
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
get
|
get => _currentPcbID;
|
||||||
{
|
|
||||||
return _currentPcbID;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
private void GetPcbMapping(String pcbID)
|
private void GetPcbMapping(String pcbID)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
using Newtonsoft.Json;
|
using System;
|
||||||
using ProductionUiCordonel.Model;
|
using System.ComponentModel;
|
||||||
using System;
|
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
@@ -9,6 +8,8 @@ using System.Timers;
|
|||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
using System.Windows.Threading;
|
using System.Windows.Threading;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using ProductionUiCordonel.Model;
|
||||||
using Xylem.Common.CommonCore.Configuration;
|
using Xylem.Common.CommonCore.Configuration;
|
||||||
using Xylem.Common.CommonCore.Consts;
|
using Xylem.Common.CommonCore.Consts;
|
||||||
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisConfig;
|
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisConfig;
|
||||||
@@ -96,10 +97,7 @@ namespace ProductionUiCordonel
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
get
|
get => _currentPcbID;
|
||||||
{
|
|
||||||
return _currentPcbID;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum uiState
|
public enum uiState
|
||||||
@@ -116,10 +114,7 @@ namespace ProductionUiCordonel
|
|||||||
_currentState = value;
|
_currentState = value;
|
||||||
updateUi(lblState, _currentState.ToString());
|
updateUi(lblState, _currentState.ToString());
|
||||||
}
|
}
|
||||||
get
|
get => _currentState;
|
||||||
{
|
|
||||||
return _currentState;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private String _lastMsg;
|
private String _lastMsg;
|
||||||
@@ -130,10 +125,7 @@ namespace ProductionUiCordonel
|
|||||||
_lastMsg = value;
|
_lastMsg = value;
|
||||||
updateUi(lblMessage, _lastMsg);
|
updateUi(lblMessage, _lastMsg);
|
||||||
}
|
}
|
||||||
get
|
get => _lastMsg;
|
||||||
{
|
|
||||||
return _lastMsg;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public MainWindow()
|
public MainWindow()
|
||||||
@@ -231,7 +223,7 @@ namespace ProductionUiCordonel
|
|||||||
|
|
||||||
private GenesisMeter CurrentMeter
|
private GenesisMeter CurrentMeter
|
||||||
{
|
{
|
||||||
get { return _currentMeter; }
|
get => _currentMeter;
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
_currentMeter = value;
|
_currentMeter = value;
|
||||||
@@ -279,7 +271,7 @@ namespace ProductionUiCordonel
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LastMsg = $"No Meter found";
|
LastMsg = "No Meter found";
|
||||||
DisposeAllConnections();
|
DisposeAllConnections();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -314,16 +306,14 @@ namespace ProductionUiCordonel
|
|||||||
}
|
}
|
||||||
return hasDetect;
|
return hasDetect;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
LastMsg = "Meter is still connected (locked)";
|
LastMsg = "Meter is still connected (locked)";
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private void Window_Closing(Object sender, System.ComponentModel.CancelEventArgs e)
|
private void Window_Closing(Object sender, CancelEventArgs e)
|
||||||
{
|
{
|
||||||
DisposeAllConnections();
|
DisposeAllConnections();
|
||||||
}
|
}
|
||||||
@@ -459,7 +449,7 @@ namespace ProductionUiCordonel
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
ucFinalRadioTest.OrderHasChanged += delegate (Object sender, EventArgs args)
|
ucFinalRadioTest.OrderHasChanged += delegate
|
||||||
{
|
{
|
||||||
txtOrderNr.Dispatcher.Invoke(DispatcherPriority.Normal, new Action(() => { txtOrderNr.Text = ucFinalRadioTest.OrderNumber.ToString(); }));
|
txtOrderNr.Dispatcher.Invoke(DispatcherPriority.Normal, new Action(() => { txtOrderNr.Text = ucFinalRadioTest.OrderNumber.ToString(); }));
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows;
|
||||||
using Xylem.Common.CommonCore.Configuration;
|
using Xylem.Common.CommonCore.Configuration;
|
||||||
using Xylem.Common.Hardware.WaterMeter.WaterMeterCore.Consts;
|
using Xylem.Common.Hardware.WaterMeter.WaterMeterCore.Consts;
|
||||||
using Xylem.Common.Logic.SoftwareAccessHelper;
|
using Xylem.Common.Logic.SoftwareAccessHelper;
|
||||||
@@ -13,11 +14,11 @@ namespace ProductionUiCordonel.Model
|
|||||||
private Boolean canMarry;
|
private Boolean canMarry;
|
||||||
public Boolean CanMarry
|
public Boolean CanMarry
|
||||||
{
|
{
|
||||||
get { return canMarry; }
|
get => canMarry;
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
canMarry = value;
|
canMarry = value;
|
||||||
NotifyPropertyChanged(nameof(CanMarry));
|
NotifyPropertyChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -25,11 +26,11 @@ namespace ProductionUiCordonel.Model
|
|||||||
private Int32 serialNr;
|
private Int32 serialNr;
|
||||||
public Int32 SerialNr
|
public Int32 SerialNr
|
||||||
{
|
{
|
||||||
get { return serialNr; }
|
get => serialNr;
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
serialNr = value;
|
serialNr = value;
|
||||||
NotifyPropertyChanged(nameof(SerialNr));
|
NotifyPropertyChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -37,8 +38,8 @@ namespace ProductionUiCordonel.Model
|
|||||||
private Boolean locked = false;
|
private Boolean locked = false;
|
||||||
public MarriageMultiModeViewModel(String ctrName, Int32 slotNR, List<String> barcodeTrigger, Int32? stationID = null) : base(ctrName, slotNR, barcodeTrigger, stationID)
|
public MarriageMultiModeViewModel(String ctrName, Int32 slotNR, List<String> barcodeTrigger, Int32? stationID = null) : base(ctrName, slotNR, barcodeTrigger, stationID)
|
||||||
{
|
{
|
||||||
base.VisibilityMarriage = System.Windows.Visibility.Visible;
|
VisibilityMarriage = Visibility.Visible;
|
||||||
base.MeterDetectedHandler += PickingMultiModeViewModel_MeterDetectedHandler;
|
MeterDetectedHandler += PickingMultiModeViewModel_MeterDetectedHandler;
|
||||||
}
|
}
|
||||||
|
|
||||||
internal async Task<Boolean> Store()
|
internal async Task<Boolean> Store()
|
||||||
@@ -74,11 +75,9 @@ namespace ProductionUiCordonel.Model
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
Log($"No result for {url} on Store");
|
Log($"No result for {url} on Store");
|
||||||
return false;
|
return false;
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
using NLog;
|
using System;
|
||||||
using ProductionUiCordonel.Model;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Runtime.CompilerServices;
|
using System.Runtime.CompilerServices;
|
||||||
using System.Timers;
|
using System.Timers;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
|
using NLog;
|
||||||
|
using ProductionUiCordonel.Model;
|
||||||
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore;
|
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore;
|
||||||
using Xylem.Common.Hardware.WaterMeter.WaterMeterCore;
|
using Xylem.Common.Hardware.WaterMeter.WaterMeterCore;
|
||||||
using Xylem.Common.Utils.Logging;
|
using Xylem.Common.Utils.Logging;
|
||||||
@@ -29,45 +29,36 @@ namespace ProductionUiCordonel
|
|||||||
private Visibility visibilityMarriage = Visibility.Collapsed;
|
private Visibility visibilityMarriage = Visibility.Collapsed;
|
||||||
public Visibility VisibilityMarriage
|
public Visibility VisibilityMarriage
|
||||||
{
|
{
|
||||||
get
|
get => visibilityMarriage;
|
||||||
{
|
|
||||||
return visibilityMarriage;
|
|
||||||
}
|
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
visibilityMarriage = value;
|
visibilityMarriage = value;
|
||||||
|
|
||||||
NotifyPropertyChanged(nameof(VisibilityMarriage));
|
NotifyPropertyChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private Visibility visibilityPicking = Visibility.Collapsed;
|
private Visibility visibilityPicking = Visibility.Collapsed;
|
||||||
public Visibility VisibilityPicking
|
public Visibility VisibilityPicking
|
||||||
{
|
{
|
||||||
get
|
get => visibilityPicking;
|
||||||
{
|
|
||||||
return visibilityPicking;
|
|
||||||
}
|
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
visibilityPicking = value;
|
visibilityPicking = value;
|
||||||
|
|
||||||
NotifyPropertyChanged(nameof(VisibilityPicking));
|
NotifyPropertyChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private Visibility visibilityPressure = Visibility.Collapsed;
|
private Visibility visibilityPressure = Visibility.Collapsed;
|
||||||
public Visibility VisibilityPressure
|
public Visibility VisibilityPressure
|
||||||
{
|
{
|
||||||
get
|
get => visibilityPressure;
|
||||||
{
|
|
||||||
return visibilityPressure;
|
|
||||||
}
|
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
visibilityPressure = value;
|
visibilityPressure = value;
|
||||||
|
|
||||||
NotifyPropertyChanged(nameof(VisibilityPressure));
|
NotifyPropertyChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -75,15 +66,12 @@ namespace ProductionUiCordonel
|
|||||||
public String currentSlotStateText = "none";
|
public String currentSlotStateText = "none";
|
||||||
public String CurrentSlotStateText
|
public String CurrentSlotStateText
|
||||||
{
|
{
|
||||||
get
|
get => currentSlotStateText;
|
||||||
{
|
|
||||||
return currentSlotStateText;
|
|
||||||
}
|
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
currentSlotStateText = value;
|
currentSlotStateText = value;
|
||||||
|
|
||||||
NotifyPropertyChanged(nameof(CurrentSlotStateText));
|
NotifyPropertyChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -93,10 +81,7 @@ namespace ProductionUiCordonel
|
|||||||
private SlotState currentSlotState = SlotState.None;
|
private SlotState currentSlotState = SlotState.None;
|
||||||
public SlotState CurrentSlotState
|
public SlotState CurrentSlotState
|
||||||
{
|
{
|
||||||
get
|
get => currentSlotState;
|
||||||
{
|
|
||||||
return currentSlotState;
|
|
||||||
}
|
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
currentSlotState = value;
|
currentSlotState = value;
|
||||||
@@ -126,10 +111,8 @@ namespace ProductionUiCordonel
|
|||||||
case SlotState.Fatal:
|
case SlotState.Fatal:
|
||||||
CurrentSlotStateText = "Schwerwiegender Fehler";
|
CurrentSlotStateText = "Schwerwiegender Fehler";
|
||||||
break;
|
break;
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
NotifyPropertyChanged(nameof(CurrentSlotState));
|
NotifyPropertyChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -137,11 +120,11 @@ namespace ProductionUiCordonel
|
|||||||
private String slotInfo = "-";
|
private String slotInfo = "-";
|
||||||
public String SlotInfo
|
public String SlotInfo
|
||||||
{
|
{
|
||||||
get { return slotInfo; }
|
get => slotInfo;
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
slotInfo = value;
|
slotInfo = value;
|
||||||
NotifyPropertyChanged(nameof(SlotInfo));
|
NotifyPropertyChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -160,37 +143,34 @@ namespace ProductionUiCordonel
|
|||||||
private String childName = "asd";
|
private String childName = "asd";
|
||||||
public String ChildName
|
public String ChildName
|
||||||
{
|
{
|
||||||
get { return childName; }
|
get => childName;
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
childName = value;
|
childName = value;
|
||||||
NotifyPropertyChanged(nameof(ChildName));
|
NotifyPropertyChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private String order;
|
private String order;
|
||||||
public String Order
|
public String Order
|
||||||
{
|
{
|
||||||
get { return order; }
|
get => order;
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
order = value;
|
order = value;
|
||||||
NotifyPropertyChanged(nameof(Order));
|
NotifyPropertyChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public String CurrentPcbID
|
public String CurrentPcbID
|
||||||
{
|
{
|
||||||
get
|
get => _currentPcbID;
|
||||||
{
|
|
||||||
return _currentPcbID;
|
|
||||||
}
|
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
_currentPcbID = value;
|
_currentPcbID = value;
|
||||||
|
|
||||||
NotifyPropertyChanged(nameof(CurrentPcbID));
|
NotifyPropertyChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -294,7 +274,7 @@ namespace ProductionUiCordonel
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Log($"No Meter found");
|
Log("No Meter found");
|
||||||
DisposeAllConnections();
|
DisposeAllConnections();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -325,12 +305,10 @@ namespace ProductionUiCordonel
|
|||||||
}
|
}
|
||||||
return hasDetect;
|
return hasDetect;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
Log("Meter is still connected (locked)");
|
Log("Meter is still connected (locked)");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private void DisposeAllConnections()
|
private void DisposeAllConnections()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
using Logic.ProductionToProductMapper.Cordonel;
|
using System;
|
||||||
using Newtonsoft.Json;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.IO.Ports;
|
using System.IO.Ports;
|
||||||
@@ -8,10 +6,14 @@ using System.Linq;
|
|||||||
using System.Runtime.CompilerServices;
|
using System.Runtime.CompilerServices;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Media;
|
||||||
|
using Logic.ProductionToProductMapper.Cordonel;
|
||||||
|
using Newtonsoft.Json;
|
||||||
using Xylem.Common.CommonCore.Configuration;
|
using Xylem.Common.CommonCore.Configuration;
|
||||||
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore;
|
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore;
|
||||||
using Xylem.Common.Hardware.WaterMeter.Genesis.Registers;
|
using Xylem.Common.Hardware.WaterMeter.Genesis.Registers;
|
||||||
using Xylem.Common.Hardware.WaterMeter.WaterMeterCore;
|
using Xylem.Common.Hardware.WaterMeter.WaterMeterCore;
|
||||||
|
using Xylem.Common.Hardware.WaterMeter.WaterMeterCore.Consts;
|
||||||
using Xylem.Common.Logic.SoftwareAccessHelper;
|
using Xylem.Common.Logic.SoftwareAccessHelper;
|
||||||
|
|
||||||
namespace ProductionUiCordonel.Model
|
namespace ProductionUiCordonel.Model
|
||||||
@@ -23,65 +25,50 @@ namespace ProductionUiCordonel.Model
|
|||||||
private String pickingSlot = "-";
|
private String pickingSlot = "-";
|
||||||
private String pickingResult = "-";
|
private String pickingResult = "-";
|
||||||
|
|
||||||
private System.Windows.Media.Brush pickingResultColor;
|
private Brush pickingResultColor;
|
||||||
public System.Windows.Media.Brush PickingResultColor
|
public Brush PickingResultColor
|
||||||
{
|
{
|
||||||
get
|
get => pickingResultColor;
|
||||||
{
|
|
||||||
return pickingResultColor;
|
|
||||||
}
|
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
pickingResultColor = value;
|
pickingResultColor = value;
|
||||||
NotifyPropertyChanged(nameof(PickingResultColor));
|
NotifyPropertyChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public String PickingState
|
public String PickingState
|
||||||
{
|
{
|
||||||
get
|
get => pickingState;
|
||||||
{
|
|
||||||
return pickingState;
|
|
||||||
}
|
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
pickingState = value;
|
pickingState = value;
|
||||||
NotifyPropertyChanged(nameof(PickingState));
|
NotifyPropertyChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public String PickingScanner
|
public String PickingScanner
|
||||||
{
|
{
|
||||||
get
|
get => pickingScanner;
|
||||||
{
|
|
||||||
return pickingScanner;
|
|
||||||
}
|
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
pickingScanner = value;
|
pickingScanner = value;
|
||||||
NotifyPropertyChanged(nameof(PickingScanner));
|
NotifyPropertyChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public String PickingSlot
|
public String PickingSlot
|
||||||
{
|
{
|
||||||
get
|
get => pickingSlot;
|
||||||
{
|
|
||||||
return pickingSlot;
|
|
||||||
}
|
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
pickingSlot = value;
|
pickingSlot = value;
|
||||||
NotifyPropertyChanged(nameof(PickingSlot));
|
NotifyPropertyChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public String PickingResult
|
public String PickingResult
|
||||||
{
|
{
|
||||||
get
|
get => pickingResult;
|
||||||
{
|
|
||||||
return pickingResult;
|
|
||||||
}
|
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
pickingResult = value;
|
pickingResult = value;
|
||||||
NotifyPropertyChanged(nameof(PickingResult));
|
NotifyPropertyChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public event PropertyChangedEventHandler PropertyChanged;
|
public event PropertyChangedEventHandler PropertyChanged;
|
||||||
@@ -147,15 +134,13 @@ namespace ProductionUiCordonel.Model
|
|||||||
isRuning = false;
|
isRuning = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
Input = a.ReadLine();
|
Input = a.ReadLine();
|
||||||
a.Close();
|
a.Close();
|
||||||
isRuning = false;
|
isRuning = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}, Cancellation);
|
}, Cancellation);
|
||||||
@@ -185,14 +170,14 @@ namespace ProductionUiCordonel.Model
|
|||||||
meter.SetupFromConfigFile(PickingSlotNr);
|
meter.SetupFromConfigFile(PickingSlotNr);
|
||||||
Batch.AddMeter(meter);
|
Batch.AddMeter(meter);
|
||||||
PickingState = "Am Zähler anmelden";
|
PickingState = "Am Zähler anmelden";
|
||||||
if ((Boolean)meter.Login())
|
if (meter.Login())
|
||||||
{
|
{
|
||||||
meter.SetProcessState(Xylem.Common.Hardware.WaterMeter.WaterMeterCore.Consts.DisplayCodes.PickingStarted);
|
meter.SetProcessState(DisplayCodes.PickingStarted);
|
||||||
var ret = RunCheck(checkAppsIdVersion, Frequency, MeterSize, PressurePresent, meter);
|
var ret = RunCheck(checkAppsIdVersion, Frequency, MeterSize, PressurePresent, meter);
|
||||||
|
|
||||||
if (ret)
|
if (ret)
|
||||||
{
|
{
|
||||||
meter.SetProcessState(Xylem.Common.Hardware.WaterMeter.WaterMeterCore.Consts.DisplayCodes.PickingTested);
|
meter.SetProcessState(DisplayCodes.PickingTested);
|
||||||
var url = $"{ServiceUrls.MeterProcessStateUrl()}SetPickingState?PcbID={meter.PcbId}&FertigungsauftragsNr={PickingOrder}";
|
var url = $"{ServiceUrls.MeterProcessStateUrl()}SetPickingState?PcbID={meter.PcbId}&FertigungsauftragsNr={PickingOrder}";
|
||||||
var RetString = LocalWebRequest.PostRequestAsyncAndGetContent(url);
|
var RetString = LocalWebRequest.PostRequestAsyncAndGetContent(url);
|
||||||
|
|
||||||
@@ -205,7 +190,7 @@ namespace ProductionUiCordonel.Model
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
meter.SetProcessState(Xylem.Common.Hardware.WaterMeter.WaterMeterCore.Consts.DisplayCodes.PickingFailed);
|
meter.SetProcessState(DisplayCodes.PickingFailed);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -215,7 +200,7 @@ namespace ProductionUiCordonel.Model
|
|||||||
|
|
||||||
private Boolean RunCheck(Dictionary<UInt32, UInt32> checkAppsIdVersion, UInt32 Frequency, UInt32 MeterSize, Boolean PressurePresent, GenesisMeter meter)
|
private Boolean RunCheck(Dictionary<UInt32, UInt32> checkAppsIdVersion, UInt32 Frequency, UInt32 MeterSize, Boolean PressurePresent, GenesisMeter meter)
|
||||||
{
|
{
|
||||||
PickingState = $"Üperprüfe Parameter";
|
PickingState = "Üperprüfe Parameter";
|
||||||
var FrequencyReadOut = RegisterConverter.ConvertTo<UInt32>(meter.ReadRegister("SENSUSRADIO_FrequencyIndicator"));
|
var FrequencyReadOut = RegisterConverter.ConvertTo<UInt32>(meter.ReadRegister("SENSUSRADIO_FrequencyIndicator"));
|
||||||
if (FrequencyReadOut != Frequency)
|
if (FrequencyReadOut != Frequency)
|
||||||
{
|
{
|
||||||
@@ -236,11 +221,11 @@ namespace ProductionUiCordonel.Model
|
|||||||
{
|
{
|
||||||
if (PressurePresent)
|
if (PressurePresent)
|
||||||
{
|
{
|
||||||
PickingState = $"Pcb mit Drucksensor. Laut Auftrag keine verbaut";
|
PickingState = "Pcb mit Drucksensor. Laut Auftrag keine verbaut";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
PickingState = $"Pcb ohne Drucksensor. Laut Auftrag soll eine verbaut werden";
|
PickingState = "Pcb ohne Drucksensor. Laut Auftrag soll eine verbaut werden";
|
||||||
}
|
}
|
||||||
//todo raus
|
//todo raus
|
||||||
return false;
|
return false;
|
||||||
@@ -254,14 +239,14 @@ namespace ProductionUiCordonel.Model
|
|||||||
var MeterFWApp = meter.MeterAppListVersion.First(a => item.Key == a.AppId);
|
var MeterFWApp = meter.MeterAppListVersion.First(a => item.Key == a.AppId);
|
||||||
if (MeterFWApp == null || MeterFWApp.Version != item.Value)
|
if (MeterFWApp == null || MeterFWApp.Version != item.Value)
|
||||||
{
|
{
|
||||||
PickingState = $"Falsche FW, bitte Updaten";
|
PickingState = "Falsche FW, bitte Updaten";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
PickingState = $"Fehler beim auslesen der FW";
|
PickingState = "Fehler beim auslesen der FW";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -276,14 +261,14 @@ namespace ProductionUiCordonel.Model
|
|||||||
var storeRet = meter.ReadRegister("METROLOGYASST_StoreConfiguration");
|
var storeRet = meter.ReadRegister("METROLOGYASST_StoreConfiguration");
|
||||||
if (!storeRet.All(a => a.Equals(0)))
|
if (!storeRet.All(a => a.Equals(0)))
|
||||||
{
|
{
|
||||||
PickingState = $"Filesystem corrupt";
|
PickingState = "Filesystem corrupt";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
PickingState = $"Fehler beim überprüfen des Filesystems";
|
PickingState = "Fehler beim überprüfen des Filesystems";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -347,7 +332,7 @@ namespace ProductionUiCordonel.Model
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
PickingState = $"Warte auf Pcb";
|
PickingState = "Warte auf Pcb";
|
||||||
PickingSlot = $"Öffne EP {PickingSlotNr}";
|
PickingSlot = $"Öffne EP {PickingSlotNr}";
|
||||||
tryMeter.SetupFromConfigFile(PickingSlotNr);
|
tryMeter.SetupFromConfigFile(PickingSlotNr);
|
||||||
Batch.AddMeter(tryMeter);
|
Batch.AddMeter(tryMeter);
|
||||||
@@ -367,7 +352,7 @@ namespace ProductionUiCordonel.Model
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
PickingSlot = $"Keine Konnektivität EP {PickingSlotNr}";
|
PickingSlot = $"Keine Konnektivität EP {PickingSlotNr}";
|
||||||
Log($"No Meter found");
|
Log("No Meter found");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -413,11 +398,11 @@ namespace ProductionUiCordonel.Model
|
|||||||
PickingState = $"Vergleiche Auftragsdaten {PickingOrder} mit Pcb Eigenschaften";
|
PickingState = $"Vergleiche Auftragsdaten {PickingOrder} mit Pcb Eigenschaften";
|
||||||
|
|
||||||
|
|
||||||
var converter = new System.Windows.Media.BrushConverter();
|
var converter = new BrushConverter();
|
||||||
if (Compare(PickingOrderDetails.CheckAppsIdVersion, PickingOrderDetails.FrequencyIndicator, PickingOrderDetails.MeterSize, PickingOrderDetails.PressurePresent))
|
if (Compare(PickingOrderDetails.CheckAppsIdVersion, PickingOrderDetails.FrequencyIndicator, PickingOrderDetails.MeterSize, PickingOrderDetails.PressurePresent))
|
||||||
{
|
{
|
||||||
//erfolg anzeigen und weiter
|
//erfolg anzeigen und weiter
|
||||||
var b = (System.Windows.Media.Brush)converter.ConvertFromString("#419C14");
|
var b = (Brush)converter.ConvertFromString("#419C14");
|
||||||
b.Freeze();
|
b.Freeze();
|
||||||
PickingResultColor = b;
|
PickingResultColor = b;
|
||||||
sm = PickingStateMachine.MeterDone;
|
sm = PickingStateMachine.MeterDone;
|
||||||
@@ -426,15 +411,15 @@ namespace ProductionUiCordonel.Model
|
|||||||
{
|
{
|
||||||
sm = PickingStateMachine.MeterError;
|
sm = PickingStateMachine.MeterError;
|
||||||
|
|
||||||
var b = (System.Windows.Media.Brush)converter.ConvertFromString("#FF8000");
|
var b = (Brush)converter.ConvertFromString("#FF8000");
|
||||||
b.Freeze();
|
b.Freeze();
|
||||||
PickingResultColor = b;
|
PickingResultColor = b;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case PickingStateMachine.MeterError:
|
case PickingStateMachine.MeterError:
|
||||||
PickingOrderDetails = null;
|
PickingOrderDetails = null;
|
||||||
PickingState = $"Vergleich abgeschlossen";
|
PickingState = "Vergleich abgeschlossen";
|
||||||
PickingResult = $"Vergleich fertig fehlgeschlagen";
|
PickingResult = "Vergleich fertig fehlgeschlagen";
|
||||||
Thread.Sleep(10000);
|
Thread.Sleep(10000);
|
||||||
sm = PickingStateMachine.StartCom;
|
sm = PickingStateMachine.StartCom;
|
||||||
|
|
||||||
@@ -442,7 +427,7 @@ namespace ProductionUiCordonel.Model
|
|||||||
case PickingStateMachine.MeterDone:
|
case PickingStateMachine.MeterDone:
|
||||||
|
|
||||||
|
|
||||||
PickingState = $"Vergleich abgeschlossen warten auf Montage Rückmeldung";
|
PickingState = "Vergleich abgeschlossen warten auf Montage Rückmeldung";
|
||||||
PickingResult = $"Pcb {PickingPcbId} wurde dem Auftrag {PickingOrder} hinzugefügt";
|
PickingResult = $"Pcb {PickingPcbId} wurde dem Auftrag {PickingOrder} hinzugefügt";
|
||||||
Thread.Sleep(10000);
|
Thread.Sleep(10000);
|
||||||
PickingScanner = $"Öfffne {PickingScannerPort}";
|
PickingScanner = $"Öfffne {PickingScannerPort}";
|
||||||
@@ -479,12 +464,12 @@ namespace ProductionUiCordonel.Model
|
|||||||
PickingBarScanner = new BarScanner(PickingScannerPort, token);
|
PickingBarScanner = new BarScanner(PickingScannerPort, token);
|
||||||
|
|
||||||
PickingBarScanner.Start();
|
PickingBarScanner.Start();
|
||||||
PickingState = $"Montage Rückmeldung erhalten, Montage des Drucksensors bestätigen";
|
PickingState = "Montage Rückmeldung erhalten, Montage des Drucksensors bestätigen";
|
||||||
sm = PickingStateMachine.WaitForBuildingPressureReady;
|
sm = PickingStateMachine.WaitForBuildingPressureReady;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
PickingState = $"Montage Rückmeldung erhalten, auftrag Scannen";
|
PickingState = "Montage Rückmeldung erhalten, auftrag Scannen";
|
||||||
sm = PickingStateMachine.StartCom;
|
sm = PickingStateMachine.StartCom;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -507,13 +492,11 @@ namespace ProductionUiCordonel.Model
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
PickingState = $"Montage Rückmeldung erhalten, auftrag Scannen";
|
PickingState = "Montage Rückmeldung erhalten, auftrag Scannen";
|
||||||
sm = PickingStateMachine.StartCom;
|
sm = PickingStateMachine.StartCom;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
Thread.Sleep(1000);
|
Thread.Sleep(1000);
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,4 @@
|
|||||||
using Logic.ProductionToProductMapper.Cordonel;
|
using System;
|
||||||
using Newtonsoft.Json;
|
|
||||||
using ProductionUiCordonel.Data;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
@@ -10,10 +7,15 @@ using System.Threading;
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Media;
|
using System.Windows.Media;
|
||||||
|
using Logic.ProductionToProductMapper.Cordonel;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using ProductionUiCordonel.Data;
|
||||||
using Xylem.Common.CommonCore.Configuration;
|
using Xylem.Common.CommonCore.Configuration;
|
||||||
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore;
|
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore;
|
||||||
|
using Xylem.Common.Hardware.WaterMeter.WaterMeterCore.Consts;
|
||||||
using Xylem.Common.Logic.ProductionOrderCore.OrderData;
|
using Xylem.Common.Logic.ProductionOrderCore.OrderData;
|
||||||
using Xylem.Common.Logic.SoftwareAccessHelper;
|
using Xylem.Common.Logic.SoftwareAccessHelper;
|
||||||
|
using MessageBox = System.Windows.Forms.MessageBox;
|
||||||
|
|
||||||
namespace ProductionUiCordonel.Model
|
namespace ProductionUiCordonel.Model
|
||||||
{
|
{
|
||||||
@@ -23,21 +25,20 @@ namespace ProductionUiCordonel.Model
|
|||||||
private Boolean inputIsEnabled;
|
private Boolean inputIsEnabled;
|
||||||
public Boolean InputIsEnabled
|
public Boolean InputIsEnabled
|
||||||
{
|
{
|
||||||
get { return inputIsEnabled; }
|
get => inputIsEnabled;
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
inputIsEnabled = value;
|
inputIsEnabled = value;
|
||||||
NotifyPropertyChanged(nameof(InputIsEnabled));
|
NotifyPropertyChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private Boolean locked;
|
private Boolean locked;
|
||||||
public PickingMultiModeViewModel(String ctrName, Int32 slotNR, List<String> barcodeTrigger, Int32? stationID = null) : base(ctrName, slotNR, barcodeTrigger, stationID, false)
|
public PickingMultiModeViewModel(String ctrName, Int32 slotNR, List<String> barcodeTrigger, Int32? stationID = null) : base(ctrName, slotNR, barcodeTrigger, stationID, false)
|
||||||
{
|
{
|
||||||
VisibilityPicking = Visibility.Visible;
|
VisibilityPicking = Visibility.Visible;
|
||||||
base.MeterDetectedHandler += PickingMultiModeViewModel_MeterDetectedHandler;
|
MeterDetectedHandler += PickingMultiModeViewModel_MeterDetectedHandler;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void PickingMultiModeViewModel_MeterDetectedHandler(Object sender, EventArgs e)
|
private void PickingMultiModeViewModel_MeterDetectedHandler(Object sender, EventArgs e)
|
||||||
@@ -54,20 +55,17 @@ namespace ProductionUiCordonel.Model
|
|||||||
public override void InputText(String text)
|
public override void InputText(String text)
|
||||||
{
|
{
|
||||||
Order = text;
|
Order = text;
|
||||||
ReloadData(false);
|
ReloadData();
|
||||||
TextForceUpdate();
|
TextForceUpdate();
|
||||||
}
|
}
|
||||||
internal void ReloadData(Boolean reset)
|
internal void ReloadData()
|
||||||
{
|
{
|
||||||
|
|
||||||
Task.Run(() =>
|
Task.Run(() =>
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
if (!locked && !string.IsNullOrEmpty(Order) && Order.Length > 6 && int.TryParse(Order, out var orderNR))
|
||||||
|
|
||||||
var orderNR = 0;
|
|
||||||
if (!locked && !string.IsNullOrEmpty(Order) && Order.Length > 6 && int.TryParse(Order, out orderNR))
|
|
||||||
{
|
{
|
||||||
|
|
||||||
var str = LocalWebRequest.GetRequest($"{ServiceUrls.GenesisFinalCheckServiceUrl()}GetOrderOverview?ProductionOrderNumber={orderNR}");
|
var str = LocalWebRequest.GetRequest($"{ServiceUrls.GenesisFinalCheckServiceUrl()}GetOrderOverview?ProductionOrderNumber={orderNR}");
|
||||||
@@ -81,12 +79,11 @@ namespace ProductionUiCordonel.Model
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var retCode = 0;
|
str = LocalWebRequest.GetRequestWithError($"{ServiceUrls.GenesisFinalCheckServiceUrl()}GetOrderDetails?ProductionOrderNumber={orderNR}&CheckPcbId={CurrentMeter.PcbId}", out var retCode, 15000);
|
||||||
str = LocalWebRequest.GetRequestWithError($"{ServiceUrls.GenesisFinalCheckServiceUrl()}GetOrderDetails?ProductionOrderNumber={orderNR}&CheckPcbId={CurrentMeter.PcbId}",out retCode, 15000);
|
|
||||||
|
|
||||||
if (retCode == 417)
|
if (retCode == 417)
|
||||||
{
|
{
|
||||||
System.Windows.Forms.MessageBox.Show("NO radio parameter found");
|
MessageBox.Show(@"NO radio parameter found");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (OrderOverView.Count == OrderOverView.AssignedPicking)
|
if (OrderOverView.Count == OrderOverView.AssignedPicking)
|
||||||
@@ -97,8 +94,6 @@ namespace ProductionUiCordonel.Model
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
var OrderDteails = JsonConvert.DeserializeObject<PickingCompareItem>(str);
|
var OrderDteails = JsonConvert.DeserializeObject<PickingCompareItem>(str);
|
||||||
|
|
||||||
|
|
||||||
@@ -146,13 +141,6 @@ namespace ProductionUiCordonel.Model
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception)
|
|
||||||
{
|
|
||||||
|
|
||||||
throw;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
UpdatePickingUi("Please input a valid order number", StatusColor, "no valid order!", 0, 0);
|
UpdatePickingUi("Please input a valid order number", StatusColor, "no valid order!", 0, 0);
|
||||||
@@ -166,7 +154,7 @@ namespace ProductionUiCordonel.Model
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UpdatePickingUi(String state, System.Windows.Media.Brush StateColor, String order, Int32 toDo, Int32 done)
|
private void UpdatePickingUi(String state, Brush StateColor, String order, Int32 toDo, Int32 done)
|
||||||
{
|
{
|
||||||
Message = state;
|
Message = state;
|
||||||
Order = order;
|
Order = order;
|
||||||
@@ -209,17 +197,19 @@ namespace ProductionUiCordonel.Model
|
|||||||
|
|
||||||
public event EventHandler OnDataChanged;
|
public event EventHandler OnDataChanged;
|
||||||
public event EventHandler OnUpdateUi;
|
public event EventHandler OnUpdateUi;
|
||||||
public event PropertyChangedEventHandler PropertyChanged;
|
public new event PropertyChangedEventHandler PropertyChanged;
|
||||||
|
|
||||||
private GenesisMeter currentMeter;
|
private GenesisMeter currentMeter;
|
||||||
private PickingCompareItem baseFile;
|
|
||||||
|
|
||||||
public ObservableCollection<IPickingResultData> Data { get; set; }
|
public ObservableCollection<IPickingResultData> Data
|
||||||
|
{
|
||||||
|
get; set;
|
||||||
|
}
|
||||||
|
|
||||||
private OverallStatus status = OverallStatus.NoDetect;
|
private OverallStatus status = OverallStatus.NoDetect;
|
||||||
private OverallStatus Status
|
private OverallStatus Status
|
||||||
{
|
{
|
||||||
get { return status; }
|
get => status;
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
status = value;
|
status = value;
|
||||||
@@ -227,7 +217,10 @@ namespace ProductionUiCordonel.Model
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public String Message { get; set; }
|
public String Message
|
||||||
|
{
|
||||||
|
get; set;
|
||||||
|
}
|
||||||
private enum OverallStatus
|
private enum OverallStatus
|
||||||
{
|
{
|
||||||
NoDetect,
|
NoDetect,
|
||||||
@@ -257,7 +250,7 @@ namespace ProductionUiCordonel.Model
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public System.Windows.Media.Brush StatusColor
|
public Brush StatusColor
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
@@ -277,8 +270,14 @@ namespace ProductionUiCordonel.Model
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public Int32 ToDo { get; private set; }
|
public Int32 ToDo
|
||||||
public Int32 Done { get; private set; }
|
{
|
||||||
|
get; private set;
|
||||||
|
}
|
||||||
|
public Int32 Done
|
||||||
|
{
|
||||||
|
get; private set;
|
||||||
|
}
|
||||||
|
|
||||||
public void Init(GenesisMeter meter, Dictionary<UInt32, UInt32> checkAppsIdVersion, UInt32 Frequency, UInt32 MeterSize, Boolean PressurePresent)
|
public void Init(GenesisMeter meter, Dictionary<UInt32, UInt32> checkAppsIdVersion, UInt32 Frequency, UInt32 MeterSize, Boolean PressurePresent)
|
||||||
{
|
{
|
||||||
@@ -287,48 +286,69 @@ namespace ProductionUiCordonel.Model
|
|||||||
currentMeter = meter;
|
currentMeter = meter;
|
||||||
var data = new List<IPickingResultData>();
|
var data = new List<IPickingResultData>();
|
||||||
|
|
||||||
data.Add(new PickingResultCustomCheckData(delegate ()
|
data.Add(new PickingResultCustomCheckData(delegate
|
||||||
{
|
{
|
||||||
|
|
||||||
var r = meter.Login();
|
meter.Login();
|
||||||
meter.SetProcessState(Xylem.Common.Hardware.WaterMeter.WaterMeterCore.Consts.DisplayCodes.PickingStarted);
|
meter.SetProcessState(DisplayCodes.PickingStarted);
|
||||||
return new PickingItemCheckReturn() { Result = true, Msg = "done" };
|
return new PickingItemCheckReturn { Result = true, Msg = "done" };
|
||||||
|
|
||||||
})
|
})
|
||||||
{ Index = data.Count, Ident = "Login", CheckText = "Try to access Meter", HasError = false, Result = null, CurrentValueText = "-" });
|
{
|
||||||
|
Index = data.Count, Ident = "Login", CheckText = "Try to access Meter", HasError = false, Result = null,
|
||||||
|
CurrentValueText = "-"
|
||||||
|
});
|
||||||
|
|
||||||
data.Add(new PickingResultRegisterData() { ReadMeter = meter, Index = data.Count, Ident = "Check Radio", CheckText = $"{Frequency}MHz", CompareObject = Frequency, CurrentValueText = "none", HasError = false, Result = null, RegisterIdent = "SENSUSRADIO_FrequencyIndicator" }); ;
|
data.Add(new PickingResultRegisterData
|
||||||
|
{
|
||||||
|
ReadMeter = meter, Index = data.Count, Ident = "Check Radio", CheckText = $"{Frequency}MHz",
|
||||||
|
CompareObject = Frequency, CurrentValueText = "none", HasError = false, Result = null,
|
||||||
|
RegisterIdent = "SENSUSRADIO_FrequencyIndicator"
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
data.Add(new PickingResultRegisterData() { ReadMeter = meter, Index = data.Count, Ident = "MeterSize", CheckText = "DN40-50", CompareObject = MeterSize, CurrentValueText = "none", HasError = false, Result = null, RegisterIdent = "GENESISFLOW_MeterSize" });
|
data.Add(new PickingResultRegisterData
|
||||||
|
{
|
||||||
|
ReadMeter = meter, Index = data.Count, Ident = "MeterSize",
|
||||||
|
CheckText = "DN40-50", CompareObject = MeterSize, CurrentValueText = "none", HasError = false,
|
||||||
|
Result = null, RegisterIdent = "GENESISFLOW_MeterSize"
|
||||||
|
});
|
||||||
|
|
||||||
data.Add(new PickingResultRegisterData() { ReadMeter = meter, Index = data.Count, Ident = "Pressure", CheckText = "Pressure Sensor", CompareObject = PressurePresent, CurrentValueText = "-", HasError = false, Result = null, RegisterIdent = "METROLOGYASST_PressurePresent" });
|
data.Add(new PickingResultRegisterData
|
||||||
|
{
|
||||||
|
ReadMeter = meter, Index = data.Count, Ident = "Pressure",
|
||||||
|
CheckText = "Pressure Sensor", CompareObject = PressurePresent, CurrentValueText = "-", HasError = false,
|
||||||
|
Result = null, RegisterIdent = "METROLOGYASST_PressurePresent"
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
foreach (var item in checkAppsIdVersion)
|
foreach (var item in checkAppsIdVersion)
|
||||||
{
|
{
|
||||||
data.Add(new PickingResultCustomCheckData(delegate ()
|
data.Add(new PickingResultCustomCheckData(delegate
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var MeterFWApp = meter.MeterAppListVersion.First(a => item.Key == a.AppId);
|
var MeterFWApp = meter.MeterAppListVersion.First(a => item.Key == a.AppId);
|
||||||
if (MeterFWApp == null || MeterFWApp.Version != item.Value)
|
if (MeterFWApp.Version != item.Value)
|
||||||
{
|
{
|
||||||
return new PickingItemCheckReturn() { Result = false, Msg = MeterFWApp.StrVersion };
|
return new PickingItemCheckReturn { Result = false, Msg = MeterFWApp.StrVersion };
|
||||||
}
|
}
|
||||||
return new PickingItemCheckReturn() { Result = true, Msg = MeterFWApp.StrVersion };
|
return new PickingItemCheckReturn { Result = true, Msg = MeterFWApp.StrVersion };
|
||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
return new PickingItemCheckReturn() { Result = false, Msg = "error" };
|
return new PickingItemCheckReturn { Result = false, Msg = "error" };
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
{ Index = data.Count, Ident = $"Check AppId {item.Key}", CheckText = $"Version {item.Value}", HasError = false, Result = null, CurrentValueText = "-" }); ;
|
{
|
||||||
|
Index = data.Count, Ident = $"Check AppId {item.Key}", CheckText = $"Version {item.Value}",
|
||||||
|
HasError = false, Result = null, CurrentValueText = "-"
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
data.Add(new PickingResultCustomCheckData(delegate ()
|
data.Add(new PickingResultCustomCheckData(delegate
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -337,19 +357,22 @@ namespace ProductionUiCordonel.Model
|
|||||||
var storeRet = meter.ReadRegister("METROLOGYASST_StoreConfiguration");
|
var storeRet = meter.ReadRegister("METROLOGYASST_StoreConfiguration");
|
||||||
if (storeRet.All(a => a.Equals(0)))
|
if (storeRet.All(a => a.Equals(0)))
|
||||||
{
|
{
|
||||||
return new PickingItemCheckReturn() { Result = true, Msg = "Filesystem OK" };
|
return new PickingItemCheckReturn { Result = true, Msg = "Filesystem OK" };
|
||||||
}
|
}
|
||||||
|
|
||||||
return new PickingItemCheckReturn() { Result = false, Msg = "Filesystem corrupt" };
|
return new PickingItemCheckReturn { Result = false, Msg = "Filesystem corrupt" };
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
return new PickingItemCheckReturn() { Result = false, Msg = "error" };
|
return new PickingItemCheckReturn { Result = false, Msg = "error" };
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
{ Index = data.Count, Ident = $"Check Filesystem", CheckText = $"Check Filesystem", HasError = false, Result = null, CurrentValueText = "checking" }); ;
|
{
|
||||||
|
Index = data.Count, Ident = "Check Filesystem", CheckText = "Check Filesystem", HasError = false,
|
||||||
|
Result = null, CurrentValueText = "checking"
|
||||||
|
});
|
||||||
|
|
||||||
Status = OverallStatus.CheckingIsRunning;
|
Status = OverallStatus.CheckingIsRunning;
|
||||||
ChangeDataData(data);
|
ChangeDataData(data);
|
||||||
@@ -373,12 +396,11 @@ namespace ProductionUiCordonel.Model
|
|||||||
|
|
||||||
if (tmpData.All(a => !a.HasError && a.Result.HasValue && a.Result.Value))
|
if (tmpData.All(a => !a.HasError && a.Result.HasValue && a.Result.Value))
|
||||||
{
|
{
|
||||||
currentMeter.SetProcessState(Xylem.Common.Hardware.WaterMeter.WaterMeterCore.Consts.DisplayCodes.PickingTested);
|
currentMeter.SetProcessState(DisplayCodes.PickingTested);
|
||||||
var url = $"{ServiceUrls.MeterProcessStateUrl()}SetPickingState?PcbID={pcbID}&FertigungsauftragsNr={OrderNr}";
|
var url = $"{ServiceUrls.MeterProcessStateUrl()}SetPickingState?PcbID={pcbID}&FertigungsauftragsNr={OrderNr}";
|
||||||
var RetString = LocalWebRequest.PostRequestAsyncAndGetContent(url);
|
var RetString = LocalWebRequest.PostRequestAsyncAndGetContent(url);
|
||||||
|
|
||||||
var result = false;
|
if (bool.TryParse(RetString, out var result))
|
||||||
if (bool.TryParse(RetString, out result))
|
|
||||||
{
|
{
|
||||||
Status = OverallStatus.CheckingIsDone;
|
Status = OverallStatus.CheckingIsDone;
|
||||||
return result;
|
return result;
|
||||||
@@ -390,9 +412,8 @@ namespace ProductionUiCordonel.Model
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
currentMeter.SetProcessState(DisplayCodes.PickingFailed);
|
||||||
currentMeter.SetProcessState(Xylem.Common.Hardware.WaterMeter.WaterMeterCore.Consts.DisplayCodes.PickingFailed);
|
|
||||||
if (tmpData.All(a => a.HasError))
|
if (tmpData.All(a => a.HasError))
|
||||||
{
|
{
|
||||||
Status = OverallStatus.CheckingIsHasError;
|
Status = OverallStatus.CheckingIsHasError;
|
||||||
@@ -405,15 +426,15 @@ namespace ProductionUiCordonel.Model
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
internal void Empty()
|
internal void Empty()
|
||||||
{
|
{
|
||||||
Status = OverallStatus.NoDetect;
|
Status = OverallStatus.NoDetect;
|
||||||
ChangeDataData(new List<IPickingResultData>());
|
ChangeDataData(new List<IPickingResultData>());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected virtual void OnPropertyChanged(PropertyChangedEventArgs e)
|
||||||
|
{
|
||||||
|
PropertyChanged?.Invoke(this, e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,14 +1,15 @@
|
|||||||
using Logic.ProductionToProductMapper.Cordonel;
|
using System;
|
||||||
using ProductionUiCordonel.Data;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Windows.Media;
|
using System.Windows.Media;
|
||||||
|
using Logic.ProductionToProductMapper.Cordonel;
|
||||||
|
using ProductionUiCordonel.Data;
|
||||||
using Xylem.Common.CommonCore.Configuration;
|
using Xylem.Common.CommonCore.Configuration;
|
||||||
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore;
|
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore;
|
||||||
|
using Xylem.Common.Hardware.WaterMeter.WaterMeterCore.Consts;
|
||||||
using Xylem.Common.Logic.SoftwareAccessHelper;
|
using Xylem.Common.Logic.SoftwareAccessHelper;
|
||||||
|
|
||||||
namespace ProductionUiCordonel.Model
|
namespace ProductionUiCordonel.Model
|
||||||
@@ -23,14 +24,10 @@ namespace ProductionUiCordonel.Model
|
|||||||
|
|
||||||
public ObservableCollection<IPickingResultData> Data { get; set; }
|
public ObservableCollection<IPickingResultData> Data { get; set; }
|
||||||
|
|
||||||
public PickingViewModel()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
private OverallStatus status = OverallStatus.NoDetect;
|
private OverallStatus status = OverallStatus.NoDetect;
|
||||||
private OverallStatus Status
|
private OverallStatus Status
|
||||||
{
|
{
|
||||||
get { return status; }
|
get => status;
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
status = value;
|
status = value;
|
||||||
@@ -68,7 +65,7 @@ namespace ProductionUiCordonel.Model
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public System.Windows.Media.Brush StatusColor
|
public Brush StatusColor
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
@@ -96,39 +93,39 @@ namespace ProductionUiCordonel.Model
|
|||||||
currentMeter = meter;
|
currentMeter = meter;
|
||||||
var data = new List<IPickingResultData>();
|
var data = new List<IPickingResultData>();
|
||||||
|
|
||||||
data.Add(new PickingResultCustomCheckData(delegate ()
|
data.Add(new PickingResultCustomCheckData(delegate
|
||||||
{
|
{
|
||||||
|
|
||||||
var r = meter.Login();
|
var r = meter.Login();
|
||||||
meter.SetProcessState(Xylem.Common.Hardware.WaterMeter.WaterMeterCore.Consts.DisplayCodes.PickingStarted);
|
meter.SetProcessState(DisplayCodes.PickingStarted);
|
||||||
return new PickingItemCheckReturn() { Result = true, Msg = "done" };
|
return new PickingItemCheckReturn { Result = true, Msg = "done" };
|
||||||
|
|
||||||
})
|
})
|
||||||
{ Index = data.Count, Ident = "Login", CheckText = "Try to access Meter", HasError = false, Result = null, CurrentValueText = "-" });
|
{ Index = data.Count, Ident = "Login", CheckText = "Try to access Meter", HasError = false, Result = null, CurrentValueText = "-" });
|
||||||
if (Frequency != 0)
|
if (Frequency != 0)
|
||||||
{
|
{
|
||||||
data.Add(new PickingResultRegisterData() { ReadMeter = meter, Index = data.Count, Ident = "Check Radio", CheckText = "433", CompareObject = Frequency, CurrentValueText = "none", HasError = false, Result = null, RegisterIdent = "SENSUSRADIO_FrequencyIndicator" }); ;
|
data.Add(new PickingResultRegisterData { ReadMeter = meter, Index = data.Count, Ident = "Check Radio", CheckText = "433", CompareObject = Frequency, CurrentValueText = "none", HasError = false, Result = null, RegisterIdent = "SENSUSRADIO_FrequencyIndicator" }); ;
|
||||||
|
|
||||||
|
|
||||||
data.Add(new PickingResultRegisterData() { ReadMeter = meter, Index = data.Count, Ident = "MeterSize", CheckText = "DN40-50", CompareObject = MeterSize, CurrentValueText = "none", HasError = false, Result = null, RegisterIdent = "GENESISFLOW_MeterSize" });
|
data.Add(new PickingResultRegisterData { ReadMeter = meter, Index = data.Count, Ident = "MeterSize", CheckText = "DN40-50", CompareObject = MeterSize, CurrentValueText = "none", HasError = false, Result = null, RegisterIdent = "GENESISFLOW_MeterSize" });
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (var item in checkAppsIdVersion)
|
foreach (var item in checkAppsIdVersion)
|
||||||
{
|
{
|
||||||
data.Add(new PickingResultCustomCheckData(delegate ()
|
data.Add(new PickingResultCustomCheckData(delegate
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var MeterFWApp = meter.MeterAppListVersion.First(a => item.Key == a.AppId);
|
var MeterFWApp = meter.MeterAppListVersion.First(a => item.Key == a.AppId);
|
||||||
if (MeterFWApp == null || MeterFWApp.Version != item.Value)
|
if (MeterFWApp == null || MeterFWApp.Version != item.Value)
|
||||||
{
|
{
|
||||||
return new PickingItemCheckReturn() { Result = false, Msg = MeterFWApp.StrVersion };
|
return new PickingItemCheckReturn { Result = false, Msg = MeterFWApp.StrVersion };
|
||||||
}
|
}
|
||||||
return new PickingItemCheckReturn() { Result = true, Msg = MeterFWApp.StrVersion };
|
return new PickingItemCheckReturn { Result = true, Msg = MeterFWApp.StrVersion };
|
||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
return new PickingItemCheckReturn() { Result = false, Msg = "error" };
|
return new PickingItemCheckReturn { Result = false, Msg = "error" };
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
@@ -136,7 +133,7 @@ namespace ProductionUiCordonel.Model
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
data.Add(new PickingResultCustomCheckData(delegate ()
|
data.Add(new PickingResultCustomCheckData(delegate
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -145,19 +142,19 @@ namespace ProductionUiCordonel.Model
|
|||||||
var storeRet = meter.ReadRegister("METROLOGYASST_StoreConfiguration");
|
var storeRet = meter.ReadRegister("METROLOGYASST_StoreConfiguration");
|
||||||
if (storeRet.All(a => a.Equals(0)))
|
if (storeRet.All(a => a.Equals(0)))
|
||||||
{
|
{
|
||||||
return new PickingItemCheckReturn() { Result = true, Msg = "Filesystem OK" };
|
return new PickingItemCheckReturn { Result = true, Msg = "Filesystem OK" };
|
||||||
}
|
}
|
||||||
|
|
||||||
return new PickingItemCheckReturn() { Result = false, Msg = "Filesystem corrupt" };
|
return new PickingItemCheckReturn { Result = false, Msg = "Filesystem corrupt" };
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
return new PickingItemCheckReturn() { Result = false, Msg = "error" };
|
return new PickingItemCheckReturn { Result = false, Msg = "error" };
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
{ Index = data.Count, Ident = $"Check Filesystem", CheckText = $"Check Filesystem", HasError = false, Result = null, CurrentValueText = "checking" }); ;
|
{ Index = data.Count, Ident = "Check Filesystem", CheckText = "Check Filesystem", HasError = false, Result = null, CurrentValueText = "checking" }); ;
|
||||||
|
|
||||||
Status = OverallStatus.CheckingIsRunning;
|
Status = OverallStatus.CheckingIsRunning;
|
||||||
ChangeDataData(data);
|
ChangeDataData(data);
|
||||||
@@ -181,7 +178,7 @@ namespace ProductionUiCordonel.Model
|
|||||||
|
|
||||||
if (tmpData.All(a => !a.HasError && a.Result.HasValue && a.Result.Value))
|
if (tmpData.All(a => !a.HasError && a.Result.HasValue && a.Result.Value))
|
||||||
{
|
{
|
||||||
currentMeter.SetProcessState(Xylem.Common.Hardware.WaterMeter.WaterMeterCore.Consts.DisplayCodes.PickingTested);
|
currentMeter.SetProcessState(DisplayCodes.PickingTested);
|
||||||
var url = $"{ServiceUrls.MeterProcessStateUrl()}SetPickingState?PcbID={pcbID}&FertigungsauftragsNr={OrderNr}";
|
var url = $"{ServiceUrls.MeterProcessStateUrl()}SetPickingState?PcbID={pcbID}&FertigungsauftragsNr={OrderNr}";
|
||||||
var RetString = LocalWebRequest.PostRequestAsyncAndGetContent(url);
|
var RetString = LocalWebRequest.PostRequestAsyncAndGetContent(url);
|
||||||
|
|
||||||
@@ -198,9 +195,8 @@ namespace ProductionUiCordonel.Model
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
currentMeter.SetProcessState(DisplayCodes.PickingFailed);
|
||||||
currentMeter.SetProcessState(Xylem.Common.Hardware.WaterMeter.WaterMeterCore.Consts.DisplayCodes.PickingFailed);
|
|
||||||
if (tmpData.All(a => a.HasError))
|
if (tmpData.All(a => a.HasError))
|
||||||
{
|
{
|
||||||
Status = OverallStatus.CheckingIsHasError;
|
Status = OverallStatus.CheckingIsHasError;
|
||||||
@@ -211,7 +207,6 @@ namespace ProductionUiCordonel.Model
|
|||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,14 @@
|
|||||||
using Newtonsoft.Json;
|
using System;
|
||||||
using ProductionUiCordonel.Data;
|
|
||||||
using ProductionUiCordonel.Event;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using ProductionUiCordonel.Data;
|
||||||
|
using ProductionUiCordonel.Event;
|
||||||
using Xylem.Common.CommonCore.Configuration;
|
using Xylem.Common.CommonCore.Configuration;
|
||||||
|
using Xylem.Common.Hardware.WaterMeter.WaterMeterCore.Consts;
|
||||||
using Xylem.Common.Logic.ProductionOrderCore.ProcessState;
|
using Xylem.Common.Logic.ProductionOrderCore.ProcessState;
|
||||||
using Xylem.Common.Logic.ProductionOrderCore.TestResults;
|
using Xylem.Common.Logic.ProductionOrderCore.TestResults;
|
||||||
using Xylem.Common.Logic.SoftwareAccessHelper;
|
using Xylem.Common.Logic.SoftwareAccessHelper;
|
||||||
@@ -21,11 +23,11 @@ namespace ProductionUiCordonel.Model
|
|||||||
private PressureResultDataNotifyable result = new PressureResultDataNotifyable();
|
private PressureResultDataNotifyable result = new PressureResultDataNotifyable();
|
||||||
public PressureResultDataNotifyable Result
|
public PressureResultDataNotifyable Result
|
||||||
{
|
{
|
||||||
get { return result; }
|
get => result;
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
result = value;
|
result = value;
|
||||||
NotifyPropertyChanged(nameof(Result));
|
NotifyPropertyChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -33,11 +35,11 @@ namespace ProductionUiCordonel.Model
|
|||||||
private Boolean inputIsEnabled;
|
private Boolean inputIsEnabled;
|
||||||
public Boolean InputIsEnabled
|
public Boolean InputIsEnabled
|
||||||
{
|
{
|
||||||
get { return inputIsEnabled; }
|
get => inputIsEnabled;
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
inputIsEnabled = value;
|
inputIsEnabled = value;
|
||||||
NotifyPropertyChanged(nameof(InputIsEnabled));
|
NotifyPropertyChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -47,7 +49,7 @@ namespace ProductionUiCordonel.Model
|
|||||||
|
|
||||||
public PressureMultiModeViewModel(String ctrName, Int32 slotNR, List<String> barcodeTrigger, Int32? stationID = null) : base(ctrName, slotNR, barcodeTrigger, stationID)
|
public PressureMultiModeViewModel(String ctrName, Int32 slotNR, List<String> barcodeTrigger, Int32? stationID = null) : base(ctrName, slotNR, barcodeTrigger, stationID)
|
||||||
{
|
{
|
||||||
base.VisibilityPressure = System.Windows.Visibility.Visible;
|
VisibilityPressure = Visibility.Visible;
|
||||||
StationID = stationID;
|
StationID = stationID;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -75,7 +77,7 @@ namespace ProductionUiCordonel.Model
|
|||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
Result = new PressureResultDataNotifyable() { Remark = "loading", Testpoints = new ObservableCollection<PressureTestPoints>(), PcbId = "" };
|
Result = new PressureResultDataNotifyable { Remark = "loading", Testpoints = new ObservableCollection<PressureTestPoints>(), PcbId = "" };
|
||||||
Task<PressureResultDataNotifyable>.Run(() =>
|
Task<PressureResultDataNotifyable>.Run(() =>
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
@@ -98,7 +100,7 @@ namespace ProductionUiCordonel.Model
|
|||||||
return new PressureResultDataNotifyable();
|
return new PressureResultDataNotifyable();
|
||||||
}
|
}
|
||||||
|
|
||||||
}).ContinueWith((a) =>
|
}).ContinueWith(a =>
|
||||||
{
|
{
|
||||||
var res = a.Result;
|
var res = a.Result;
|
||||||
res.PcbId = CurrentPcbID;
|
res.PcbId = CurrentPcbID;
|
||||||
@@ -119,7 +121,7 @@ namespace ProductionUiCordonel.Model
|
|||||||
{
|
{
|
||||||
InputIsEnabled = false;
|
InputIsEnabled = false;
|
||||||
var isStored = false;
|
var isStored = false;
|
||||||
var status = Xylem.Common.Hardware.WaterMeter.WaterMeterCore.Consts.DisplayCodes.PressureTestedFailed;
|
var status = DisplayCodes.PressureTestedFailed;
|
||||||
|
|
||||||
Task.Run(() =>
|
Task.Run(() =>
|
||||||
{
|
{
|
||||||
@@ -127,13 +129,13 @@ namespace ProductionUiCordonel.Model
|
|||||||
|
|
||||||
if (successfull)
|
if (successfull)
|
||||||
{
|
{
|
||||||
status = Xylem.Common.Hardware.WaterMeter.WaterMeterCore.Consts.DisplayCodes.PressureTested;
|
status = DisplayCodes.PressureTested;
|
||||||
}
|
}
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (StationID == 1)
|
if (StationID == 1)
|
||||||
{
|
{
|
||||||
var addResult = new PressureTestResult()
|
var addResult = new PressureTestResult
|
||||||
{
|
{
|
||||||
FreeText = Result.Remark,
|
FreeText = Result.Remark,
|
||||||
Passed = successfull,
|
Passed = successfull,
|
||||||
@@ -145,19 +147,19 @@ namespace ProductionUiCordonel.Model
|
|||||||
|
|
||||||
if (!LocalWebRequest.PostRequestAsync(url, json: addResult))
|
if (!LocalWebRequest.PostRequestAsync(url, json: addResult))
|
||||||
{
|
{
|
||||||
throw new ApplicationException($"PressureState: NOT successful");
|
throw new ApplicationException("PressureState: NOT successful");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
url = url + $"SetPressureStateDetailed";
|
url = url + "SetPressureStateDetailed";
|
||||||
var mutedResult = Result.ToBase();
|
var mutedResult = Result.ToBase();
|
||||||
isStored = LocalWebRequest.PostRequestAsync(url, json: mutedResult);
|
isStored = LocalWebRequest.PostRequestAsync(url, json: mutedResult);
|
||||||
if (!isStored)
|
if (!isStored)
|
||||||
{
|
{
|
||||||
OnStoreDone?.Invoke(null, new StringArgs("Can not store Result"));
|
OnStoreDone?.Invoke(null, new StringArgs("Can not store Result"));
|
||||||
status = Xylem.Common.Hardware.WaterMeter.WaterMeterCore.Consts.DisplayCodes.PressureTestedFailed;
|
status = DisplayCodes.PressureTestedFailed;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -168,12 +170,12 @@ namespace ProductionUiCordonel.Model
|
|||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
Log(ex.Message);
|
Log(ex.Message);
|
||||||
status = Xylem.Common.Hardware.WaterMeter.WaterMeterCore.Consts.DisplayCodes.PressureTestedFailed;
|
status = DisplayCodes.PressureTestedFailed;
|
||||||
OnStoreDone?.Invoke(null, new StringArgs("Can not store Result"));
|
OnStoreDone?.Invoke(null, new StringArgs("Can not store Result"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (status == Xylem.Common.Hardware.WaterMeter.WaterMeterCore.Consts.DisplayCodes.PressureTested)
|
if (status == DisplayCodes.PressureTested)
|
||||||
{
|
{
|
||||||
OnStoreDone?.Invoke(null, new StringArgs("Pressure test stored successfully. Meter can passed"));
|
OnStoreDone?.Invoke(null, new StringArgs("Pressure test stored successfully. Meter can passed"));
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
using ProductionUiCordonel.Model;
|
using System;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
|
using System.Windows.Controls;
|
||||||
using System.Windows.Input;
|
using System.Windows.Input;
|
||||||
|
using ProductionUiCordonel.Model;
|
||||||
|
|
||||||
namespace ProductionUiCordonel
|
namespace ProductionUiCordonel
|
||||||
{
|
{
|
||||||
@@ -45,7 +46,7 @@ namespace ProductionUiCordonel
|
|||||||
DataContext = multiModeMasterViewModel;
|
DataContext = multiModeMasterViewModel;
|
||||||
|
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
this.Topmost = false;
|
Topmost = false;
|
||||||
}
|
}
|
||||||
private void keyUp(Object sender, KeyEventArgs e)
|
private void keyUp(Object sender, KeyEventArgs e)
|
||||||
{
|
{
|
||||||
@@ -165,7 +166,7 @@ namespace ProductionUiCordonel
|
|||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void TxtBarcodeInput_TextChanged(Object sender, System.Windows.Controls.TextChangedEventArgs e)
|
private void TxtBarcodeInput_TextChanged(Object sender, TextChangedEventArgs e)
|
||||||
{
|
{
|
||||||
//if (sender is TextBox text)
|
//if (sender is TextBox text)
|
||||||
//{
|
//{
|
||||||
@@ -188,7 +189,7 @@ namespace ProductionUiCordonel
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Window_Closed(Object sender, System.EventArgs e)
|
private void Window_Closed(Object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
|
||||||
cts.Cancel();
|
cts.Cancel();
|
||||||
|
|||||||
@@ -1,11 +1,12 @@
|
|||||||
using ProductionUiCordonel.Model;
|
using System;
|
||||||
using System;
|
|
||||||
using System.IO.Ports;
|
using System.IO.Ports;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
using System.Windows.Threading;
|
using System.Windows.Threading;
|
||||||
|
using ProductionUiCordonel.Event;
|
||||||
|
using ProductionUiCordonel.Model;
|
||||||
|
|
||||||
namespace ProductionUiCordonel
|
namespace ProductionUiCordonel
|
||||||
{
|
{
|
||||||
@@ -24,33 +25,33 @@ namespace ProductionUiCordonel
|
|||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
ViewModel = viewModel;
|
ViewModel = viewModel;
|
||||||
this.DataContext = ViewModel;
|
DataContext = ViewModel;
|
||||||
if (ViewModel is PressureMultiModeViewModel pressureModel)
|
if (ViewModel is PressureMultiModeViewModel pressureModel)
|
||||||
{
|
{
|
||||||
PressureControl.setViewModel(pressureModel);
|
PressureControl.setViewModel(pressureModel);
|
||||||
|
|
||||||
this.Left = 0;
|
Left = 0;
|
||||||
this.Top = 250;
|
Top = 250;
|
||||||
this.Height = SystemParameters.PrimaryScreenHeight - 300;
|
Height = SystemParameters.PrimaryScreenHeight - 300;
|
||||||
this.Width = SystemParameters.PrimaryScreenWidth / 2;
|
Width = SystemParameters.PrimaryScreenWidth / 2;
|
||||||
}
|
}
|
||||||
if (ViewModel is PickingMultiModeViewModel pickingModel)
|
if (ViewModel is PickingMultiModeViewModel pickingModel)
|
||||||
{
|
{
|
||||||
PickingControl.setViewModel(pickingModel);
|
PickingControl.setViewModel(pickingModel);
|
||||||
|
|
||||||
this.Left = SystemParameters.VirtualScreenLeft;
|
Left = SystemParameters.VirtualScreenLeft;
|
||||||
this.Top = SystemParameters.VirtualScreenTop;
|
Top = SystemParameters.VirtualScreenTop;
|
||||||
this.Height = SystemParameters.VirtualScreenHeight;
|
Height = SystemParameters.VirtualScreenHeight;
|
||||||
this.Width = SystemParameters.VirtualScreenWidth - SystemParameters.PrimaryScreenWidth;
|
Width = SystemParameters.VirtualScreenWidth - SystemParameters.PrimaryScreenWidth;
|
||||||
}
|
}
|
||||||
if (ViewModel is MarriageMultiModeViewModel marriageModel)
|
if (ViewModel is MarriageMultiModeViewModel marriageModel)
|
||||||
{
|
{
|
||||||
MarriageControl.setViewModel(marriageModel);
|
MarriageControl.setViewModel(marriageModel);
|
||||||
|
|
||||||
this.Left = SystemParameters.PrimaryScreenWidth / 2;
|
Left = SystemParameters.PrimaryScreenWidth / 2;
|
||||||
this.Top = 250;
|
Top = 250;
|
||||||
this.Height = SystemParameters.PrimaryScreenHeight - 300;
|
Height = SystemParameters.PrimaryScreenHeight - 300;
|
||||||
this.Width = SystemParameters.PrimaryScreenWidth / 2;
|
Width = SystemParameters.PrimaryScreenWidth / 2;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -72,17 +73,14 @@ namespace ProductionUiCordonel
|
|||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
|
|
||||||
var resText = a.ReadLine();
|
var resText = a.ReadLine();
|
||||||
this.Dispatcher.Invoke(DispatcherPriority.Normal,
|
Dispatcher.Invoke(DispatcherPriority.Normal,
|
||||||
new Action(() =>
|
new Action(() =>
|
||||||
{
|
{
|
||||||
ViewModel.InputText(resText);
|
ViewModel.InputText(resText);
|
||||||
}
|
}
|
||||||
));
|
));
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -110,7 +108,7 @@ namespace ProductionUiCordonel
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void PressureControl_OnBarcodeInput(Object sender, Event.StringArgs e)
|
private void PressureControl_OnBarcodeInput(Object sender, StringArgs e)
|
||||||
{
|
{
|
||||||
InputText(e.Content);
|
InputText(e.Content);
|
||||||
}
|
}
|
||||||
@@ -125,7 +123,7 @@ namespace ProductionUiCordonel
|
|||||||
{
|
{
|
||||||
if (sender is Button btn)
|
if (sender is Button btn)
|
||||||
{
|
{
|
||||||
btn.Content = $"POS L{this.Left},T{this.Top },H{this.Height},W{this.Width}";
|
btn.Content = $"POS L{Left},T{Top },H{Height},W{Width}";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+11
-10
@@ -1,9 +1,10 @@
|
|||||||
using ProductionUiCordonel.ProductionProcesses.Enum;
|
using System;
|
||||||
using ProductionUiCordonel.UserControls.FinalTest;
|
|
||||||
using System;
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
using System.Windows.Threading;
|
using System.Windows.Threading;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using ProductionUiCordonel.ProductionProcesses.Enum;
|
||||||
|
using ProductionUiCordonel.UserControls.FinalTest;
|
||||||
using Xylem.Common.CommonCore.Configuration;
|
using Xylem.Common.CommonCore.Configuration;
|
||||||
using Xylem.Common.Logic.SoftwareAccessHelper;
|
using Xylem.Common.Logic.SoftwareAccessHelper;
|
||||||
|
|
||||||
@@ -52,7 +53,7 @@ namespace ProductionUiCordonel.ProductionProcesses.Actions
|
|||||||
var url = $"{ServiceUrls.MeterInfoForTestBench()}{Meter.PcbId}";
|
var url = $"{ServiceUrls.MeterInfoForTestBench()}{Meter.PcbId}";
|
||||||
var csdRet = LocalWebRequest.GetRequest(url);
|
var csdRet = LocalWebRequest.GetRequest(url);
|
||||||
|
|
||||||
var res = Newtonsoft.Json.JsonConvert.DeserializeObject<String[]>(csdRet);
|
var res = JsonConvert.DeserializeObject<String[]>(csdRet);
|
||||||
|
|
||||||
var CalibrationRun = res[4];
|
var CalibrationRun = res[4];
|
||||||
var LastTestBechState = 0;
|
var LastTestBechState = 0;
|
||||||
@@ -88,7 +89,7 @@ namespace ProductionUiCordonel.ProductionProcesses.Actions
|
|||||||
UserControl.lblText.Dispatcher.Invoke(DispatcherPriority.Send,
|
UserControl.lblText.Dispatcher.Invoke(DispatcherPriority.Send,
|
||||||
new Action(() =>
|
new Action(() =>
|
||||||
{
|
{
|
||||||
UserControl.lblText.Content = $"Zähler nicht erfolgreich geprüft";
|
UserControl.lblText.Content = "Zähler nicht erfolgreich geprüft";
|
||||||
}
|
}
|
||||||
));
|
));
|
||||||
|
|
||||||
@@ -99,7 +100,7 @@ namespace ProductionUiCordonel.ProductionProcesses.Actions
|
|||||||
UserControl.lblText.Dispatcher.Invoke(DispatcherPriority.Send,
|
UserControl.lblText.Dispatcher.Invoke(DispatcherPriority.Send,
|
||||||
new Action(() =>
|
new Action(() =>
|
||||||
{
|
{
|
||||||
UserControl.lblText.Content = $"Zähler nicht erfolgreich vorbehandelt";
|
UserControl.lblText.Content = "Zähler nicht erfolgreich vorbehandelt";
|
||||||
}
|
}
|
||||||
));
|
));
|
||||||
currentProcessState = ProductionProcessState.Error;
|
currentProcessState = ProductionProcessState.Error;
|
||||||
@@ -115,10 +116,10 @@ namespace ProductionUiCordonel.ProductionProcesses.Actions
|
|||||||
UserControl.lblText.Dispatcher.Invoke(DispatcherPriority.Send,
|
UserControl.lblText.Dispatcher.Invoke(DispatcherPriority.Send,
|
||||||
new Action(() =>
|
new Action(() =>
|
||||||
{
|
{
|
||||||
UserControl.lblText.Content = $"Batterie nicht lesbar";
|
UserControl.lblText.Content = "Batterie nicht lesbar";
|
||||||
}
|
}
|
||||||
));
|
));
|
||||||
Meter.WriteLog($"Batterie nicht lesbar");
|
Meter.WriteLog("Batterie nicht lesbar");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
var nowChargeV = BitConverter.ToUInt64(nowCharge.ToArray(), 0);
|
var nowChargeV = BitConverter.ToUInt64(nowCharge.ToArray(), 0);
|
||||||
@@ -139,8 +140,8 @@ namespace ProductionUiCordonel.ProductionProcesses.Actions
|
|||||||
if (totalUsed > 10)
|
if (totalUsed > 10)
|
||||||
{
|
{
|
||||||
currentProcessState = ProductionProcessState.Error;
|
currentProcessState = ProductionProcessState.Error;
|
||||||
UserControl.lblText.Content = $"Batterie über 15% entladen";
|
UserControl.lblText.Content = "Batterie über 15% entladen";
|
||||||
Meter.WriteLog($"Batterie über 15% entladen");
|
Meter.WriteLog("Batterie über 15% entladen");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (currentProcessState != ProductionProcessState.Error)
|
if (currentProcessState != ProductionProcessState.Error)
|
||||||
|
|||||||
+5
-4
@@ -1,11 +1,12 @@
|
|||||||
using ProductionUiCordonel.ProductionProcesses.Enum;
|
using System;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using ProductionUiCordonel.ProductionProcesses.Enum;
|
||||||
using ProductionUiCordonel.UserControls.FinalTest;
|
using ProductionUiCordonel.UserControls.FinalTest;
|
||||||
using Xylem.Common.Logic.SoftwareAccessHelper;
|
|
||||||
using Xylem.Common.CommonCore.Configuration;
|
using Xylem.Common.CommonCore.Configuration;
|
||||||
using Xylem.Common.Logic.ProductionOrderCore.Vako;
|
using Xylem.Common.Logic.ProductionOrderCore.Vako;
|
||||||
|
using Xylem.Common.Logic.SoftwareAccessHelper;
|
||||||
|
|
||||||
namespace ProductionUiCordonel.ProductionProcesses.Actions
|
namespace ProductionUiCordonel.ProductionProcesses.Actions
|
||||||
{
|
{
|
||||||
@@ -66,7 +67,7 @@ namespace ProductionUiCordonel.ProductionProcesses.Actions
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
var a = LocalWebRequest.GetRequest($"{ServiceUrls.GenesisFinalCheckServiceUrl()}GetSingleVakoKey?ProductionOrderNumber={OrderNumber}&KeyName=C_GEN_PULS");
|
var a = LocalWebRequest.GetRequest($"{ServiceUrls.GenesisFinalCheckServiceUrl()}GetSingleVakoKey?ProductionOrderNumber={OrderNumber}&KeyName=C_GEN_PULS");
|
||||||
var myJsonResponse = Newtonsoft.Json.JsonConvert.DeserializeObject<VakoKeyValue>(a);
|
var myJsonResponse = JsonConvert.DeserializeObject<VakoKeyValue>(a);
|
||||||
if (myJsonResponse.Value.ToLower() == "q" || myJsonResponse.Value.ToLower() == "k")
|
if (myJsonResponse.Value.ToLower() == "q" || myJsonResponse.Value.ToLower() == "k")
|
||||||
{
|
{
|
||||||
UserControl.SetDesc("Pulse Module anbauen!");
|
UserControl.SetDesc("Pulse Module anbauen!");
|
||||||
|
|||||||
+4
-4
@@ -1,10 +1,10 @@
|
|||||||
using ProductionUiCordonel.ProductionProcesses.Enum;
|
using System;
|
||||||
using System;
|
|
||||||
using System.Windows.Controls;
|
|
||||||
using ProductionUiCordonel.UserControls.FinalTest;
|
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
|
using System.Windows.Controls;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using ProductionUiCordonel.ProductionProcesses.Enum;
|
||||||
|
using ProductionUiCordonel.UserControls.FinalTest;
|
||||||
using Xylem.Common.CommonCore.Configuration;
|
using Xylem.Common.CommonCore.Configuration;
|
||||||
|
|
||||||
namespace ProductionUiCordonel.ProductionProcesses.Actions
|
namespace ProductionUiCordonel.ProductionProcesses.Actions
|
||||||
|
|||||||
+2
-2
@@ -1,6 +1,6 @@
|
|||||||
using ProductionUiCordonel.ProductionProcesses.Enum;
|
using System;
|
||||||
using System;
|
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
|
using ProductionUiCordonel.ProductionProcesses.Enum;
|
||||||
using ProductionUiCordonel.UserControls.FinalTest;
|
using ProductionUiCordonel.UserControls.FinalTest;
|
||||||
|
|
||||||
namespace ProductionUiCordonel.ProductionProcesses.Actions
|
namespace ProductionUiCordonel.ProductionProcesses.Actions
|
||||||
|
|||||||
+20
-12
@@ -1,9 +1,10 @@
|
|||||||
using ProductionUiCordonel.ProductionProcesses.Enum;
|
using System;
|
||||||
using ProductionUiCordonel.UserControls.FinalTest;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using ProductionUiCordonel.ProductionProcesses.Enum;
|
||||||
|
using ProductionUiCordonel.UserControls.FinalTest;
|
||||||
using Xylem.Common.CommonCore.Configuration;
|
using Xylem.Common.CommonCore.Configuration;
|
||||||
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore;
|
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore;
|
||||||
using Xylem.Common.Logic.ProductionOrderCore;
|
using Xylem.Common.Logic.ProductionOrderCore;
|
||||||
@@ -23,10 +24,17 @@ namespace ProductionUiCordonel.ProductionProcesses.Actions
|
|||||||
}
|
}
|
||||||
public override void InitUserControl()
|
public override void InitUserControl()
|
||||||
{
|
{
|
||||||
UserControl = new UcPlain();
|
UserControl = new UcPlain
|
||||||
UserControl.lblHl.Content = name;
|
{
|
||||||
UserControl.lblText.Content = "";
|
lblHl =
|
||||||
|
{
|
||||||
|
Content = name
|
||||||
|
},
|
||||||
|
lblText =
|
||||||
|
{
|
||||||
|
Content = ""
|
||||||
|
}
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public override UserControl GetControl()
|
public override UserControl GetControl()
|
||||||
@@ -46,21 +54,21 @@ namespace ProductionUiCordonel.ProductionProcesses.Actions
|
|||||||
|
|
||||||
public override void StartProcess()
|
public override void StartProcess()
|
||||||
{
|
{
|
||||||
NewStatus($"Prüfe Verbindung");
|
NewStatus("Prüfe Verbindung");
|
||||||
Progress = 0;
|
Progress = 0;
|
||||||
if (!Meter.IsLoggedOn)
|
if (!Meter.IsLoggedOn)
|
||||||
{
|
{
|
||||||
NewStatus($"Login wird gestartet");
|
NewStatus("Login wird gestartet");
|
||||||
Meter.Login();
|
Meter.Login();
|
||||||
}
|
}
|
||||||
//Check access in
|
//Check access in
|
||||||
Progress = 50;
|
Progress = 50;
|
||||||
NewStatus($"Zugang wird überprüft");
|
NewStatus("Zugang wird überprüft");
|
||||||
//var res = base.Meter.ReadRegister(Register.Genesisflow.LedMode);
|
//var res = base.Meter.ReadRegister(Register.Genesisflow.LedMode);
|
||||||
//if (res != null && res.Length > 0)
|
//if (res != null && res.Length > 0)
|
||||||
//{
|
//{
|
||||||
Progress = 100;
|
Progress = 100;
|
||||||
NewStatus($"Zugang verifiziert");
|
NewStatus("Zugang verifiziert");
|
||||||
currentProcessState = ProductionProcessState.Done;
|
currentProcessState = ProductionProcessState.Done;
|
||||||
|
|
||||||
asyncProgrammingParametersTask = new Task<IList<ProgrammingParameters>>(() =>
|
asyncProgrammingParametersTask = new Task<IList<ProgrammingParameters>>(() =>
|
||||||
@@ -71,7 +79,7 @@ namespace ProductionUiCordonel.ProductionProcesses.Actions
|
|||||||
var url = $"{ServiceUrls.GenesisFinalCheckServiceUrl()}GetProgrammingParameters?PcbID={Meter.PcbId}";
|
var url = $"{ServiceUrls.GenesisFinalCheckServiceUrl()}GetProgrammingParameters?PcbID={Meter.PcbId}";
|
||||||
var csdRet = LocalWebRequest.GetRequest(url, 80000);
|
var csdRet = LocalWebRequest.GetRequest(url, 80000);
|
||||||
|
|
||||||
return Newtonsoft.Json.JsonConvert.DeserializeObject<IList<ProgrammingParameters>>(csdRet);
|
return JsonConvert.DeserializeObject<IList<ProgrammingParameters>>(csdRet);
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (Exception )
|
catch (Exception )
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
using ProductionUiCordonel.ProductionProcesses.Enum;
|
using System;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
|
using ProductionUiCordonel.ProductionProcesses.Enum;
|
||||||
using ProductionUiCordonel.UserControls.FinalTest;
|
using ProductionUiCordonel.UserControls.FinalTest;
|
||||||
|
|
||||||
namespace ProductionUiCordonel.ProductionProcesses.Actions
|
namespace ProductionUiCordonel.ProductionProcesses.Actions
|
||||||
|
|||||||
+13
-13
@@ -1,11 +1,11 @@
|
|||||||
using ProductionUiCordonel.ProductionProcesses.Enum;
|
using System;
|
||||||
using ProductionUiCordonel.UserControls.FinalTest;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
|
using ProductionUiCordonel.ProductionProcesses.Enum;
|
||||||
|
using ProductionUiCordonel.UserControls.FinalTest;
|
||||||
using Xylem.Common.Hardware.WaterMeter.Genesis.Registers;
|
using Xylem.Common.Hardware.WaterMeter.Genesis.Registers;
|
||||||
using Xylem.Common.Logic.ProductionOrderCore;
|
using Xylem.Common.Logic.ProductionOrderCore;
|
||||||
|
|
||||||
@@ -126,7 +126,7 @@ namespace ProductionUiCordonel.ProductionProcesses.Actions
|
|||||||
//SENSUSRADIO_EncryptionKey dont reserve SENSUSRADIO_EncryptionKey!
|
//SENSUSRADIO_EncryptionKey dont reserve SENSUSRADIO_EncryptionKey!
|
||||||
if (item.RegisterName.ToLower().Contains("displaypow".ToLower()) || item.RegisterName.ToLower().Contains("METROLOGYASST_FlowPoint".ToLower()))
|
if (item.RegisterName.ToLower().Contains("displaypow".ToLower()) || item.RegisterName.ToLower().Contains("METROLOGYASST_FlowPoint".ToLower()))
|
||||||
{
|
{
|
||||||
overAllResult.Add(_currentGenesis_WriteRegister(item.RegisterName, new Byte[] { item.RegisterValue.ToArray()[0] }, true, true));
|
overAllResult.Add(_currentGenesis_WriteRegister(item.RegisterName, new[] { item.RegisterValue.ToArray()[0] }, true, true));
|
||||||
}
|
}
|
||||||
else if (item.RegisterName.ToLower().Contains("SENSUSRADIO_EncryptionKey".ToLower()))
|
else if (item.RegisterName.ToLower().Contains("SENSUSRADIO_EncryptionKey".ToLower()))
|
||||||
{
|
{
|
||||||
@@ -146,9 +146,9 @@ namespace ProductionUiCordonel.ProductionProcesses.Actions
|
|||||||
//}
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
overAllResult.Add(_currentGenesis_WriteRegister("CUSTOMER_AlarmEnableMask", new Byte[] { 0x00, 0x00, 0x80, 0x53 }.Reverse().ToArray(), true, false)); ;
|
overAllResult.Add(_currentGenesis_WriteRegister("CUSTOMER_AlarmEnableMask", new Byte[] { 0x00, 0x00, 0x80, 0x53 }.Reverse().ToArray())); ;
|
||||||
overAllResult.Add(_currentGenesis_WriteRegister("CUSTOMER_AlarmBroadcastMask", new Byte[] { 0x00, 0x00, 0x1f, 0xdc }.Reverse().ToArray(), true, false));
|
overAllResult.Add(_currentGenesis_WriteRegister("CUSTOMER_AlarmBroadcastMask", new Byte[] { 0x00, 0x00, 0x1f, 0xdc }.Reverse().ToArray()));
|
||||||
overAllResult.Add(_currentGenesis_WriteRegister("CUSTOMER_AlarmVisualMask", new Byte[] { 0x00, 0x00, 0x1f, 0xdc }.Reverse().ToArray(), true, false));
|
overAllResult.Add(_currentGenesis_WriteRegister("CUSTOMER_AlarmVisualMask", new Byte[] { 0x00, 0x00, 0x1f, 0xdc }.Reverse().ToArray()));
|
||||||
|
|
||||||
|
|
||||||
foreach (var item in myJsonResponse.Where(m => m.Source == ProgrammingSource.Csd))
|
foreach (var item in myJsonResponse.Where(m => m.Source == ProgrammingSource.Csd))
|
||||||
@@ -166,7 +166,7 @@ namespace ProductionUiCordonel.ProductionProcesses.Actions
|
|||||||
}
|
}
|
||||||
|
|
||||||
overAllResult.Add(_currentGenesis_WriteRegister("GENESISFLOW_ResetAccumulators",
|
overAllResult.Add(_currentGenesis_WriteRegister("GENESISFLOW_ResetAccumulators",
|
||||||
(new Byte[] { 0x00, 0x00, 0x00, 0x01 }).Reverse().ToArray(), true, false));
|
(new Byte[] { 0x00, 0x00, 0x00, 0x01 }).Reverse().ToArray()));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -179,15 +179,15 @@ namespace ProductionUiCordonel.ProductionProcesses.Actions
|
|||||||
overAllResult.Add(wirteRegisterInBetweenCheck("IRDA_MfgDate", Convert.ToInt32(ts.TotalSeconds)));
|
overAllResult.Add(wirteRegisterInBetweenCheck("IRDA_MfgDate", Convert.ToInt32(ts.TotalSeconds)));
|
||||||
|
|
||||||
overAllResult.Add(_currentGenesis_WriteRegister("LOGGER_TriggerLogFlush",
|
overAllResult.Add(_currentGenesis_WriteRegister("LOGGER_TriggerLogFlush",
|
||||||
(new Byte[] { 0x00, 0x00, 0x00, 0x01 }).Reverse().ToArray(), true, false));
|
(new Byte[] { 0x00, 0x00, 0x00, 0x01 }).Reverse().ToArray()));
|
||||||
|
|
||||||
overAllResult.Add(_currentGenesis_WriteRegister("NFC_EraseRMA",
|
overAllResult.Add(_currentGenesis_WriteRegister("NFC_EraseRMA",
|
||||||
(new Byte[] { 0x00, 0x00, 0x00, 0x01 }).Reverse().ToArray(), true, false));
|
(new Byte[] { 0x00, 0x00, 0x00, 0x01 }).Reverse().ToArray()));
|
||||||
|
|
||||||
if (hasRadio)
|
if (hasRadio)
|
||||||
{
|
{
|
||||||
overAllResult.Add(_currentGenesis_WriteRegister("PERIODICLOG_ResetCounter",
|
overAllResult.Add(_currentGenesis_WriteRegister("PERIODICLOG_ResetCounter",
|
||||||
(new Byte[] { 0x00, 0x00, 0x00, 0x00 }).Reverse().ToArray(), true, false));
|
(new Byte[] { 0x00, 0x00, 0x00, 0x00 }).Reverse().ToArray()));
|
||||||
|
|
||||||
overAllResult.Add(_currentGenesis_WriteRegister("GENESISFLOW_SealDisplay",
|
overAllResult.Add(_currentGenesis_WriteRegister("GENESISFLOW_SealDisplay",
|
||||||
(new Byte[] { 0x00, 0x00, 0x00, 0x01 }).Reverse().ToArray(), true, true));
|
(new Byte[] { 0x00, 0x00, 0x00, 0x01 }).Reverse().ToArray(), true, true));
|
||||||
@@ -231,7 +231,7 @@ namespace ProductionUiCordonel.ProductionProcesses.Actions
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Progress = 15 + ((Int32)Math.Round(((Double)done / (Double)overAllResult.Count) * 85, 0));
|
Progress = 15 + ((Int32)Math.Round((done / (Double)overAllResult.Count) * 85, 0));
|
||||||
done = done + 1;
|
done = done + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -252,7 +252,7 @@ namespace ProductionUiCordonel.ProductionProcesses.Actions
|
|||||||
{
|
{
|
||||||
currentProcessState = ProductionProcessState.Error;
|
currentProcessState = ProductionProcessState.Error;
|
||||||
reTrysLeft = -1;
|
reTrysLeft = -1;
|
||||||
NewStatus($"Warnung!Fehler beim laden des Parametersatzes");
|
NewStatus("Warnung!Fehler beim laden des Parametersatzes");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+4
-4
@@ -1,13 +1,13 @@
|
|||||||
using Newtonsoft.Json;
|
using System;
|
||||||
using ProductionUiCordonel.ProductionProcesses.Enum;
|
|
||||||
using ProductionUiCordonel.UserControls.FinalTest;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using ProductionUiCordonel.ProductionProcesses.Enum;
|
||||||
|
using ProductionUiCordonel.UserControls.FinalTest;
|
||||||
using Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages;
|
using Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages;
|
||||||
using Xylem.Common.Hardware.WaterMeter.Genesis.Registers;
|
using Xylem.Common.Hardware.WaterMeter.Genesis.Registers;
|
||||||
|
|
||||||
|
|||||||
+3
-3
@@ -1,9 +1,9 @@
|
|||||||
using ProductionUiCordonel.ProductionProcesses.Enum;
|
using System;
|
||||||
using ProductionUiCordonel.UserControls.FinalTest;
|
|
||||||
using System;
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
using System.Windows.Threading;
|
using System.Windows.Threading;
|
||||||
|
using ProductionUiCordonel.ProductionProcesses.Enum;
|
||||||
|
using ProductionUiCordonel.UserControls.FinalTest;
|
||||||
using Xylem.Common.Hardware.WaterMeter.Genesis.Registers;
|
using Xylem.Common.Hardware.WaterMeter.Genesis.Registers;
|
||||||
|
|
||||||
namespace ProductionUiCordonel.ProductionProcesses.Actions
|
namespace ProductionUiCordonel.ProductionProcesses.Actions
|
||||||
|
|||||||
+5
-4
@@ -1,9 +1,10 @@
|
|||||||
using ProductionUiCordonel.ProductionProcesses.Enum;
|
using System;
|
||||||
using ProductionUiCordonel.UserControls.FinalTest;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using ProductionUiCordonel.ProductionProcesses.Enum;
|
||||||
|
using ProductionUiCordonel.UserControls.FinalTest;
|
||||||
using Xylem.Common.CommonCore.Configuration;
|
using Xylem.Common.CommonCore.Configuration;
|
||||||
using Xylem.Common.Logic.ProductionOrderCore;
|
using Xylem.Common.Logic.ProductionOrderCore;
|
||||||
using Xylem.Common.Logic.SoftwareAccessHelper;
|
using Xylem.Common.Logic.SoftwareAccessHelper;
|
||||||
@@ -54,7 +55,7 @@ namespace ProductionUiCordonel.ProductionProcesses.Actions
|
|||||||
var url = $"{ServiceUrls.GenesisFinalCheckServiceUrl()}GetProgrammingParameters?PcbID={Meter.PcbId}";
|
var url = $"{ServiceUrls.GenesisFinalCheckServiceUrl()}GetProgrammingParameters?PcbID={Meter.PcbId}";
|
||||||
var csdRet = LocalWebRequest.GetRequest(url, 60000);
|
var csdRet = LocalWebRequest.GetRequest(url, 60000);
|
||||||
|
|
||||||
Result = Newtonsoft.Json.JsonConvert.DeserializeObject<IList<ProgrammingParameters>>(csdRet);
|
Result = JsonConvert.DeserializeObject<IList<ProgrammingParameters>>(csdRet);
|
||||||
|
|
||||||
Progress = 100;
|
Progress = 100;
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
using Logic.ProductionToProductMapper.Cordonel;
|
using System;
|
||||||
using ProductionUiCordonel.ProductionProcesses.Enum;
|
|
||||||
using ProductionUiCordonel.UserControls.FinalTest;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
|
using Logic.ProductionToProductMapper.Cordonel;
|
||||||
|
using ProductionUiCordonel.ProductionProcesses.Enum;
|
||||||
|
using ProductionUiCordonel.UserControls.FinalTest;
|
||||||
using Xylem.Common.CommonCore.Configuration;
|
using Xylem.Common.CommonCore.Configuration;
|
||||||
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore;
|
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore;
|
||||||
using Xylem.Common.Logic.SoftwareAccessHelper;
|
using Xylem.Common.Logic.SoftwareAccessHelper;
|
||||||
|
|||||||
+7
-7
@@ -1,12 +1,12 @@
|
|||||||
using Newtonsoft.Json;
|
using System;
|
||||||
using ProductionUiCordonel.ProductionProcesses.Enum;
|
|
||||||
using ProductionUiCordonel.UserControls.FinalTest;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using ProductionUiCordonel.ProductionProcesses.Enum;
|
||||||
|
using ProductionUiCordonel.UserControls.FinalTest;
|
||||||
using Xylem.Common.CommonCore.Configuration;
|
using Xylem.Common.CommonCore.Configuration;
|
||||||
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisFile;
|
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisFile;
|
||||||
using Xylem.Common.Logic.SoftwareAccessHelper;
|
using Xylem.Common.Logic.SoftwareAccessHelper;
|
||||||
@@ -80,7 +80,7 @@ namespace ProductionUiCordonel.ProductionProcesses.Actions
|
|||||||
}
|
}
|
||||||
updateImage(UserControl.WriteToMeter, ret);
|
updateImage(UserControl.WriteToMeter, ret);
|
||||||
Progress = Progress + 16;
|
Progress = Progress + 16;
|
||||||
//Check if new password is in the meter ... even the file wirte wasnt succesfull
|
//Check if new password is in the meter ... even the file write wasn't successful
|
||||||
if (!ret)
|
if (!ret)
|
||||||
{
|
{
|
||||||
Meter.Logout();
|
Meter.Logout();
|
||||||
@@ -137,7 +137,7 @@ namespace ProductionUiCordonel.ProductionProcesses.Actions
|
|||||||
private MeterPwdFile meterPwdFile;
|
private MeterPwdFile meterPwdFile;
|
||||||
public Boolean RequestPassword()
|
public Boolean RequestPassword()
|
||||||
{
|
{
|
||||||
NewStatus($"Request Passwords");
|
NewStatus("Request Passwords");
|
||||||
var url = ServiceUrls.GenesisGetPasswordContainerServiceUrl();
|
var url = ServiceUrls.GenesisGetPasswordContainerServiceUrl();
|
||||||
//url = "http://localhost:56011/api/Password/GetPasswordHashFileContent?PcbId=";
|
//url = "http://localhost:56011/api/Password/GetPasswordHashFileContent?PcbId=";
|
||||||
url = ($"{url}{Meter.PcbId}");
|
url = ($"{url}{Meter.PcbId}");
|
||||||
@@ -150,7 +150,7 @@ namespace ProductionUiCordonel.ProductionProcesses.Actions
|
|||||||
if (errorCode == HttpStatusCode.OK.GetHashCode())
|
if (errorCode == HttpStatusCode.OK.GetHashCode())
|
||||||
{
|
{
|
||||||
pwContainer = JsonConvert.DeserializeObject<MeterPasswordContainer>(resp);
|
pwContainer = JsonConvert.DeserializeObject<MeterPasswordContainer>(resp);
|
||||||
NewStatus($"Passwörter verfügbar");
|
NewStatus("Passwörter verfügbar");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
+33
-30
@@ -1,20 +1,23 @@
|
|||||||
using ProductionUiCordonel.ProductionProcesses.Enum;
|
using System;
|
||||||
using System;
|
using System.Configuration;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Net.Http;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System.Windows.Controls;
|
|
||||||
using ProductionUiCordonel.UserControls.FinalTest;
|
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
using System.Windows.Threading;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using Newtonsoft.Json.Linq;
|
||||||
|
using ProductionUiCordonel.ProductionProcesses.Enum;
|
||||||
|
using ProductionUiCordonel.UserControls.FinalTest;
|
||||||
|
using SIRTCOM;
|
||||||
|
using Xylem.Common.CommonCore.Configuration;
|
||||||
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore;
|
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore;
|
||||||
using Xylem.Common.Hardware.WaterMeter.Genesis.Registers;
|
using Xylem.Common.Hardware.WaterMeter.Genesis.Registers;
|
||||||
using Newtonsoft.Json;
|
|
||||||
using Xylem.Common.CommonCore.Configuration;
|
|
||||||
using System.Configuration;
|
|
||||||
using System.Net.Http;
|
|
||||||
using System.Windows.Threading;
|
|
||||||
using Newtonsoft.Json.Linq;
|
|
||||||
using Xylem.Common.Logic.SoftwareAccessHelper;
|
using Xylem.Common.Logic.SoftwareAccessHelper;
|
||||||
|
using Button = System.Windows.Controls.Button;
|
||||||
|
using UserControl = System.Windows.Controls.UserControl;
|
||||||
|
|
||||||
namespace ProductionUiCordonel.ProductionProcesses.Actions
|
namespace ProductionUiCordonel.ProductionProcesses.Actions
|
||||||
{
|
{
|
||||||
@@ -33,12 +36,12 @@ namespace ProductionUiCordonel.ProductionProcesses.Actions
|
|||||||
{
|
{
|
||||||
UserControl = new UcRadioCheck();
|
UserControl = new UcRadioCheck();
|
||||||
|
|
||||||
UserControl.OnRetryRequested += delegate (Object sender, EventArgs args) { GetRssi(); };
|
UserControl.OnRetryRequested += delegate { GetRssi(); };
|
||||||
|
|
||||||
|
|
||||||
UserControl.OnResetRequested += delegate (Object sender, EventArgs args) { Reset(); };
|
UserControl.OnResetRequested += delegate { Reset(); };
|
||||||
UserControl.OnForceAPam += delegate (Object sender, EventArgs args) { forcePush(); };
|
UserControl.OnForceAPam += delegate { forcePush(); };
|
||||||
UserControl.OnDoneRequested += delegate (Object sender, EventArgs args)
|
UserControl.OnDoneRequested += delegate
|
||||||
{
|
{
|
||||||
currentProcessState = ProductionProcessState.Done;
|
currentProcessState = ProductionProcessState.Done;
|
||||||
|
|
||||||
@@ -86,7 +89,7 @@ namespace ProductionUiCordonel.ProductionProcesses.Actions
|
|||||||
EncyptionKey = LocalWebRequest.GetRequest($"{ServiceUrls.GenesisFinalCheckServiceUrl()}GetEncryptionKey?PcbID={Meter.PcbId}", 80000).ToUpper().Trim('\"');
|
EncyptionKey = LocalWebRequest.GetRequest($"{ServiceUrls.GenesisFinalCheckServiceUrl()}GetEncryptionKey?PcbID={Meter.PcbId}", 80000).ToUpper().Trim('\"');
|
||||||
if (!EncyptionKey.Equals(BitConverter.ToString(enc.ToArray()).Replace("-", "")))
|
if (!EncyptionKey.Equals(BitConverter.ToString(enc.ToArray()).Replace("-", "")))
|
||||||
{
|
{
|
||||||
System.Windows.Forms.MessageBox.Show("Funkschlüssel überprüfen!");
|
MessageBox.Show("Funkschlüssel überprüfen!");
|
||||||
}
|
}
|
||||||
|
|
||||||
EncyptionKey = BitConverter.ToString(enc.ToArray()).Replace("-", "");
|
EncyptionKey = BitConverter.ToString(enc.ToArray()).Replace("-", "");
|
||||||
@@ -99,9 +102,9 @@ namespace ProductionUiCordonel.ProductionProcesses.Actions
|
|||||||
//{
|
//{
|
||||||
// Comport = 7;
|
// Comport = 7;
|
||||||
//}
|
//}
|
||||||
BoxNr = Convert.ToByte(ConfigurationManager.AppSettings[$"SirtBoxNr"]);
|
BoxNr = Convert.ToByte(ConfigurationManager.AppSettings["SirtBoxNr"]);
|
||||||
|
|
||||||
DebugMessage($"Start RadioCheck Comport:{Comport} ,BoxNr:{BoxNr}, freq: {freq}, RadioAddress:{RadioAdress}s\r\n", false);
|
DebugMessage($"Start RadioCheck Comport:{Comport} ,BoxNr:{BoxNr}, freq: {freq}, RadioAddress:{RadioAdress}s\r\n");
|
||||||
|
|
||||||
Meter.WriteRegister("SENSUSRADIO_IrDAModulePresent", 1, true, true);
|
Meter.WriteRegister("SENSUSRADIO_IrDAModulePresent", 1, true, true);
|
||||||
|
|
||||||
@@ -116,7 +119,7 @@ namespace ProductionUiCordonel.ProductionProcesses.Actions
|
|||||||
#region FormerForm
|
#region FormerForm
|
||||||
|
|
||||||
private SaveData saveData;
|
private SaveData saveData;
|
||||||
private SIRTCOM.Statemashine stm;
|
private Statemashine stm;
|
||||||
private static HttpClient httpclient;
|
private static HttpClient httpclient;
|
||||||
|
|
||||||
private Byte? RSSI_PAM_Min;
|
private Byte? RSSI_PAM_Min;
|
||||||
@@ -204,7 +207,7 @@ namespace ProductionUiCordonel.ProductionProcesses.Actions
|
|||||||
stm.ClearPam();
|
stm.ClearPam();
|
||||||
stm.Stop();
|
stm.Stop();
|
||||||
}
|
}
|
||||||
DebugMessage("Reset\r\n", false);
|
DebugMessage("Reset\r\n");
|
||||||
clearRssi();
|
clearRssi();
|
||||||
SetUi();
|
SetUi();
|
||||||
StartProcess();
|
StartProcess();
|
||||||
@@ -279,14 +282,14 @@ namespace ProductionUiCordonel.ProductionProcesses.Actions
|
|||||||
RSSI_PAM = null;
|
RSSI_PAM = null;
|
||||||
RSSI_SEMI = null;
|
RSSI_SEMI = null;
|
||||||
|
|
||||||
stm = new SIRTCOM.Statemashine();
|
stm = new Statemashine();
|
||||||
|
|
||||||
Byte P81_1 = 0;
|
Byte P81_1 = 0;
|
||||||
|
|
||||||
saveData.RadioAdress = RadioAdress;
|
saveData.RadioAdress = RadioAdress;
|
||||||
|
|
||||||
stm.initialise((Byte)ByteCOMPort);
|
stm.initialise((Byte)ByteCOMPort);
|
||||||
SIRTCOM.Wrapper wrp = new SIRTCOM.Wrapper();
|
Wrapper wrp = new Wrapper();
|
||||||
stm.StartLoggin("C:\\GenesisLog\\log.txt");
|
stm.StartLoggin("C:\\GenesisLog\\log.txt");
|
||||||
|
|
||||||
// ist wohl nicht nötig da der SIRT richtig konfiguroert ist:
|
// ist wohl nicht nötig da der SIRT richtig konfiguroert ist:
|
||||||
@@ -310,7 +313,7 @@ namespace ProductionUiCordonel.ProductionProcesses.Actions
|
|||||||
stm.OnStateChanged += Stm_OnStateChanged;
|
stm.OnStateChanged += Stm_OnStateChanged;
|
||||||
stm.Start(); // Start polling
|
stm.Start(); // Start polling
|
||||||
|
|
||||||
DebugMessage($" OK\r\n", true);
|
DebugMessage(" OK\r\n", true);
|
||||||
Meter.ResetAlarm(GenesisMeter.Alarm.EMPTY_PIPE);
|
Meter.ResetAlarm(GenesisMeter.Alarm.EMPTY_PIPE);
|
||||||
Thread.Sleep(5000);
|
Thread.Sleep(5000);
|
||||||
//Meter.WriteRegister("SENSUSRADIO_SYSTEMSTATE", 0x01, true, false);
|
//Meter.WriteRegister("SENSUSRADIO_SYSTEMSTATE", 0x01, true, false);
|
||||||
@@ -324,8 +327,8 @@ namespace ProductionUiCordonel.ProductionProcesses.Actions
|
|||||||
|
|
||||||
private void forcePush()
|
private void forcePush()
|
||||||
{
|
{
|
||||||
Meter.WriteRegister("SENSUSRADIO_SYSTEMSTATE", 0x55, true, false);
|
Meter.WriteRegister("SENSUSRADIO_SYSTEMSTATE", 0x55);
|
||||||
Meter.WriteRegister("SENSUSRADIO_SYSTEMSTATE", 0x02, true, false);
|
Meter.WriteRegister("SENSUSRADIO_SYSTEMSTATE", 0x02);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -373,21 +376,21 @@ namespace ProductionUiCordonel.ProductionProcesses.Actions
|
|||||||
SetUi();
|
SetUi();
|
||||||
if (saveData.Result == 1)
|
if (saveData.Result == 1)
|
||||||
{
|
{
|
||||||
UserControl.ViewResult(10);
|
UserControl.ViewResult();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private void Stm_OnStateChanged(Object sender, SIRTCOM.MyEventArgs e)
|
private void Stm_OnStateChanged(Object sender, MyEventArgs e)
|
||||||
{
|
{
|
||||||
// our Pam
|
// our Pam
|
||||||
SIRTCOM.PAM Pam = stm.GetPAM(1);
|
PAM Pam = stm.GetPAM(1);
|
||||||
|
|
||||||
if (Pam.State == SIRTCOM.PAM.PAMStates.Timeout)
|
if (Pam.State == PAM.PAMStates.Timeout)
|
||||||
{
|
{
|
||||||
DebugMessage($"Timeout nach {Pam.GetTime()} s\r\n", false);
|
DebugMessage($"Timeout nach {Pam.GetTime()} s\r\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Pam.CountSemi > 0)
|
if (Pam.CountSemi > 0)
|
||||||
|
|||||||
+3
-3
@@ -1,10 +1,10 @@
|
|||||||
using ProductionUiCordonel.ProductionProcesses.Enum;
|
using System;
|
||||||
using ProductionUiCordonel.UserControls.FinalTest;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
|
using ProductionUiCordonel.ProductionProcesses.Enum;
|
||||||
|
using ProductionUiCordonel.UserControls.FinalTest;
|
||||||
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore;
|
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore;
|
||||||
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisFile;
|
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisFile;
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -1,8 +1,8 @@
|
|||||||
using ProductionUiCordonel.ProductionProcesses.Enum;
|
using System;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
|
using ProductionUiCordonel.ProductionProcesses.Enum;
|
||||||
using ProductionUiCordonel.UserControls.FinalTest;
|
using ProductionUiCordonel.UserControls.FinalTest;
|
||||||
|
|
||||||
namespace ProductionUiCordonel.ProductionProcesses.Actions
|
namespace ProductionUiCordonel.ProductionProcesses.Actions
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
using ProductionUiCordonel.ProductionProcesses.Enum;
|
using System;
|
||||||
using System;
|
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
|
using ProductionUiCordonel.ProductionProcesses.Enum;
|
||||||
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore;
|
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore;
|
||||||
|
|
||||||
namespace ProductionUiCordonel.ProductionProcesses
|
namespace ProductionUiCordonel.ProductionProcesses
|
||||||
@@ -13,7 +13,7 @@ namespace ProductionUiCordonel.ProductionProcesses
|
|||||||
private Int32 _progress;
|
private Int32 _progress;
|
||||||
public Int32 Progress
|
public Int32 Progress
|
||||||
{
|
{
|
||||||
get { return _progress; }
|
get => _progress;
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
_progress = value;
|
_progress = value;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
using ProductionUiCordonel.ProductionProcesses.Enum;
|
using System;
|
||||||
using System;
|
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
|
using ProductionUiCordonel.ProductionProcesses.Enum;
|
||||||
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore;
|
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore;
|
||||||
|
|
||||||
namespace ProductionUiCordonel.ProductionProcesses
|
namespace ProductionUiCordonel.ProductionProcesses
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
using ProductionUiCordonel.ProductionProcesses.Enum;
|
using System;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using ProductionUiCordonel.ProductionProcesses.Enum;
|
||||||
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore;
|
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore;
|
||||||
|
|
||||||
namespace ProductionUiCordonel.ProductionProcesses
|
namespace ProductionUiCordonel.ProductionProcesses
|
||||||
|
|||||||
+35
-29
@@ -8,10 +8,16 @@
|
|||||||
// </auto-generated>
|
// </auto-generated>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
using System.CodeDom.Compiler;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.Diagnostics.CodeAnalysis;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Globalization;
|
||||||
|
using System.Resources;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
|
||||||
namespace ProductionUiCordonel.Properties {
|
namespace ProductionUiCordonel.Properties {
|
||||||
using System;
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -19,27 +25,27 @@ namespace ProductionUiCordonel.Properties {
|
|||||||
// class via a tool like ResGen or Visual Studio.
|
// class via a tool like ResGen or Visual Studio.
|
||||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||||
// with the /str option, or rebuild your VS project.
|
// with the /str option, or rebuild your VS project.
|
||||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
|
[GeneratedCode("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
[DebuggerNonUserCode()]
|
||||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
[CompilerGenerated()]
|
||||||
internal class Resources {
|
internal class Resources {
|
||||||
|
|
||||||
private static global::System.Resources.ResourceManager resourceMan;
|
private static ResourceManager resourceMan;
|
||||||
|
|
||||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
private static CultureInfo resourceCulture;
|
||||||
|
|
||||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
[SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||||
internal Resources() {
|
internal Resources() {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns the cached ResourceManager instance used by this class.
|
/// Returns the cached ResourceManager instance used by this class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
[EditorBrowsable(EditorBrowsableState.Advanced)]
|
||||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
internal static ResourceManager ResourceManager {
|
||||||
get {
|
get {
|
||||||
if (object.ReferenceEquals(resourceMan, null)) {
|
if (ReferenceEquals(resourceMan, null)) {
|
||||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ProductionUiCordonel.Properties.Resources", typeof(Resources).Assembly);
|
ResourceManager temp = new ResourceManager("ProductionUiCordonel.Properties.Resources", typeof(Resources).Assembly);
|
||||||
resourceMan = temp;
|
resourceMan = temp;
|
||||||
}
|
}
|
||||||
return resourceMan;
|
return resourceMan;
|
||||||
@@ -50,8 +56,8 @@ namespace ProductionUiCordonel.Properties {
|
|||||||
/// Overrides the current thread's CurrentUICulture property for all
|
/// Overrides the current thread's CurrentUICulture property for all
|
||||||
/// resource lookups using this strongly typed resource class.
|
/// resource lookups using this strongly typed resource class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
[EditorBrowsable(EditorBrowsableState.Advanced)]
|
||||||
internal static global::System.Globalization.CultureInfo Culture {
|
internal static CultureInfo Culture {
|
||||||
get {
|
get {
|
||||||
return resourceCulture;
|
return resourceCulture;
|
||||||
}
|
}
|
||||||
@@ -63,70 +69,70 @@ namespace ProductionUiCordonel.Properties {
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal static System.Drawing.Bitmap CLEARMAtrix {
|
internal static Bitmap CLEARMAtrix {
|
||||||
get {
|
get {
|
||||||
object obj = ResourceManager.GetObject("CLEARMAtrix", resourceCulture);
|
object obj = ResourceManager.GetObject("CLEARMAtrix", resourceCulture);
|
||||||
return ((System.Drawing.Bitmap)(obj));
|
return ((Bitmap)(obj));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal static System.Drawing.Bitmap Connect_16x {
|
internal static Bitmap Connect_16x {
|
||||||
get {
|
get {
|
||||||
object obj = ResourceManager.GetObject("Connect_16x", resourceCulture);
|
object obj = ResourceManager.GetObject("Connect_16x", resourceCulture);
|
||||||
return ((System.Drawing.Bitmap)(obj));
|
return ((Bitmap)(obj));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal static System.Drawing.Bitmap ConnectPlugged_16x {
|
internal static Bitmap ConnectPlugged_16x {
|
||||||
get {
|
get {
|
||||||
object obj = ResourceManager.GetObject("ConnectPlugged_16x", resourceCulture);
|
object obj = ResourceManager.GetObject("ConnectPlugged_16x", resourceCulture);
|
||||||
return ((System.Drawing.Bitmap)(obj));
|
return ((Bitmap)(obj));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal static System.Drawing.Bitmap iconCheck {
|
internal static Bitmap iconCheck {
|
||||||
get {
|
get {
|
||||||
object obj = ResourceManager.GetObject("iconCheck", resourceCulture);
|
object obj = ResourceManager.GetObject("iconCheck", resourceCulture);
|
||||||
return ((System.Drawing.Bitmap)(obj));
|
return ((Bitmap)(obj));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal static System.Drawing.Bitmap iconWarn {
|
internal static Bitmap iconWarn {
|
||||||
get {
|
get {
|
||||||
object obj = ResourceManager.GetObject("iconWarn", resourceCulture);
|
object obj = ResourceManager.GetObject("iconWarn", resourceCulture);
|
||||||
return ((System.Drawing.Bitmap)(obj));
|
return ((Bitmap)(obj));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal static System.Drawing.Bitmap iconWating {
|
internal static Bitmap iconWating {
|
||||||
get {
|
get {
|
||||||
object obj = ResourceManager.GetObject("iconWating", resourceCulture);
|
object obj = ResourceManager.GetObject("iconWating", resourceCulture);
|
||||||
return ((System.Drawing.Bitmap)(obj));
|
return ((Bitmap)(obj));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal static System.Drawing.Bitmap Refresh_16x {
|
internal static Bitmap Refresh_16x {
|
||||||
get {
|
get {
|
||||||
object obj = ResourceManager.GetObject("Refresh_16x", resourceCulture);
|
object obj = ResourceManager.GetObject("Refresh_16x", resourceCulture);
|
||||||
return ((System.Drawing.Bitmap)(obj));
|
return ((Bitmap)(obj));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+8
-4
@@ -8,16 +8,20 @@
|
|||||||
// </auto-generated>
|
// </auto-generated>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
using System.CodeDom.Compiler;
|
||||||
|
using System.Configuration;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
|
||||||
namespace ProductionUiCordonel.Properties
|
namespace ProductionUiCordonel.Properties
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
[CompilerGenerated()]
|
||||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
|
[GeneratedCode("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
|
||||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
|
internal sealed partial class Settings : ApplicationSettingsBase
|
||||||
{
|
{
|
||||||
|
|
||||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
private static Settings defaultInstance = ((Settings)(Synchronized(new Settings())));
|
||||||
|
|
||||||
public static Settings Default
|
public static Settings Default
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ namespace ProductionUiCordonel.UserControls.FinalTest
|
|||||||
|
|
||||||
internal void SetFocusMe()
|
internal void SetFocusMe()
|
||||||
{
|
{
|
||||||
this.Dispatcher.Invoke(DispatcherPriority.Send,
|
Dispatcher.Invoke(DispatcherPriority.Send,
|
||||||
new Action(() =>
|
new Action(() =>
|
||||||
{
|
{
|
||||||
txtHiddenInput.Focus();
|
txtHiddenInput.Focus();
|
||||||
@@ -76,7 +76,7 @@ namespace ProductionUiCordonel.UserControls.FinalTest
|
|||||||
|
|
||||||
public void inputKey(String input)
|
public void inputKey(String input)
|
||||||
{
|
{
|
||||||
this.Dispatcher.Invoke(DispatcherPriority.Send,
|
Dispatcher.Invoke(DispatcherPriority.Send,
|
||||||
new Action(() =>
|
new Action(() =>
|
||||||
{
|
{
|
||||||
BarcodeInput?.Invoke(this,input);
|
BarcodeInput?.Invoke(this,input);
|
||||||
@@ -101,7 +101,7 @@ namespace ProductionUiCordonel.UserControls.FinalTest
|
|||||||
|
|
||||||
private void UserControl_MouseDown(Object sender, MouseButtonEventArgs e)
|
private void UserControl_MouseDown(Object sender, MouseButtonEventArgs e)
|
||||||
{
|
{
|
||||||
this.Dispatcher.Invoke(DispatcherPriority.Send,
|
Dispatcher.Invoke(DispatcherPriority.Send,
|
||||||
new Action(() =>
|
new Action(() =>
|
||||||
{
|
{
|
||||||
//txtHiddenInput.Focus();
|
//txtHiddenInput.Focus();
|
||||||
@@ -111,7 +111,7 @@ namespace ProductionUiCordonel.UserControls.FinalTest
|
|||||||
|
|
||||||
private void LblInput_MouseDown(Object sender, MouseButtonEventArgs e)
|
private void LblInput_MouseDown(Object sender, MouseButtonEventArgs e)
|
||||||
{
|
{
|
||||||
this.Dispatcher.Invoke(DispatcherPriority.Send,
|
Dispatcher.Invoke(DispatcherPriority.Send,
|
||||||
new Action(() =>
|
new Action(() =>
|
||||||
{
|
{
|
||||||
//txtHiddenInput.Focus();
|
//txtHiddenInput.Focus();
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ namespace ProductionUiCordonel.UserControls.FinalTest
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
this.Dispatcher.Invoke(DispatcherPriority.Send,
|
Dispatcher.Invoke(DispatcherPriority.Send,
|
||||||
new Action(() =>
|
new Action(() =>
|
||||||
{
|
{
|
||||||
var stackPnl = new StackPanel();
|
var stackPnl = new StackPanel();
|
||||||
|
|||||||
@@ -5,29 +5,30 @@ using System.Windows;
|
|||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
using System.Windows.Media;
|
using System.Windows.Media;
|
||||||
using System.Windows.Threading;
|
using System.Windows.Threading;
|
||||||
|
using Color = System.Drawing.Color;
|
||||||
|
|
||||||
namespace ProductionUiCordonel.UserControls.FinalTest
|
namespace ProductionUiCordonel.UserControls.FinalTest
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Interaction logic for UcRadioCheck.xaml
|
/// Interaction logic for UcRadioCheck.xaml
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class UcRadioCheck : UserControl
|
public partial class UcRadioCheck
|
||||||
{
|
{
|
||||||
public class UIContainerElement
|
public class UIContainerElement
|
||||||
{
|
{
|
||||||
public Int32? Value;
|
public Int32? Value;
|
||||||
public System.Drawing.Color Color;
|
public Color Color;
|
||||||
|
|
||||||
public UIContainerElement(Int32? value)
|
public UIContainerElement(Int32? value)
|
||||||
{
|
{
|
||||||
Value = value;
|
Value = value;
|
||||||
if (!value.HasValue)
|
if (!value.HasValue)
|
||||||
{
|
{
|
||||||
Color = System.Drawing.Color.LightYellow;
|
Color = Color.LightYellow;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Color = System.Drawing.Color.Transparent;
|
Color = Color.Transparent;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -65,35 +66,35 @@ namespace ProductionUiCordonel.UserControls.FinalTest
|
|||||||
if (!CordMin.Value.HasValue || CordRssi.Value.Value < CordMin.Value.Value)
|
if (!CordMin.Value.HasValue || CordRssi.Value.Value < CordMin.Value.Value)
|
||||||
{
|
{
|
||||||
success = false;
|
success = false;
|
||||||
CordMin.Color = System.Drawing.Color.Tomato;
|
CordMin.Color = Color.Tomato;
|
||||||
CordRssi.Color = System.Drawing.Color.White;
|
CordRssi.Color = Color.White;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!SirtMin.Value.HasValue || SirtRssi.Value.Value < SirtMin.Value.Value)
|
if (!SirtMin.Value.HasValue || SirtRssi.Value.Value < SirtMin.Value.Value)
|
||||||
{
|
{
|
||||||
success = false;
|
success = false;
|
||||||
SirtMin.Color = System.Drawing.Color.Tomato;
|
SirtMin.Color = Color.Tomato;
|
||||||
SirtRssi.Color = System.Drawing.Color.White;
|
SirtRssi.Color = Color.White;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!CordMax.Value.HasValue || CordRssi.Value.Value > CordMax.Value.Value)
|
if (!CordMax.Value.HasValue || CordRssi.Value.Value > CordMax.Value.Value)
|
||||||
{
|
{
|
||||||
success = false;
|
success = false;
|
||||||
CordMax.Color = System.Drawing.Color.Tomato;
|
CordMax.Color = Color.Tomato;
|
||||||
CordRssi.Color = System.Drawing.Color.White;
|
CordRssi.Color = Color.White;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!SirtMax.Value.HasValue || SirtRssi.Value.Value > SirtMax.Value.Value)
|
if (!SirtMax.Value.HasValue || SirtRssi.Value.Value > SirtMax.Value.Value)
|
||||||
{
|
{
|
||||||
success = false;
|
success = false;
|
||||||
SirtMax.Color = System.Drawing.Color.Tomato;
|
SirtMax.Color = Color.Tomato;
|
||||||
SirtRssi.Color = System.Drawing.Color.White;
|
SirtRssi.Color = Color.White;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (success)
|
if (success)
|
||||||
{
|
{
|
||||||
CordRssi.Color = System.Drawing.Color.LightGreen;
|
CordRssi.Color = Color.LightGreen;
|
||||||
SirtRssi.Color = System.Drawing.Color.LightGreen;
|
SirtRssi.Color = Color.LightGreen;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -105,7 +106,7 @@ namespace ProductionUiCordonel.UserControls.FinalTest
|
|||||||
|
|
||||||
public void SetUi(UIContainer uiContainer)
|
public void SetUi(UIContainer uiContainer)
|
||||||
{
|
{
|
||||||
this.Dispatcher.Invoke(DispatcherPriority.Send,
|
Dispatcher.Invoke(DispatcherPriority.Send,
|
||||||
new Action(() =>
|
new Action(() =>
|
||||||
{
|
{
|
||||||
setLbl(lblCordMin, uiContainer.CordMin);
|
setLbl(lblCordMin, uiContainer.CordMin);
|
||||||
@@ -122,7 +123,7 @@ namespace ProductionUiCordonel.UserControls.FinalTest
|
|||||||
{
|
{
|
||||||
lbl.Content = element.GetText();
|
lbl.Content = element.GetText();
|
||||||
lbl.Background =
|
lbl.Background =
|
||||||
new SolidColorBrush(Color.FromArgb(element.Color.A, element.Color.R, element.Color.G, element.Color.B));
|
new SolidColorBrush(System.Windows.Media.Color.FromArgb(element.Color.A, element.Color.R, element.Color.G, element.Color.B));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -159,8 +160,9 @@ namespace ProductionUiCordonel.UserControls.FinalTest
|
|||||||
var waitMS = WaitSeconds * 1000;
|
var waitMS = WaitSeconds * 1000;
|
||||||
while (waitMS > 0)
|
while (waitMS > 0)
|
||||||
{
|
{
|
||||||
|
var ms = waitMS;
|
||||||
BtnDone.Dispatcher.Invoke(DispatcherPriority.Send,
|
BtnDone.Dispatcher.Invoke(DispatcherPriority.Send,
|
||||||
new Action(() => { BtnDone.Content = $"Done({waitMS / 1000}s)"; }
|
new Action(() => { BtnDone.Content = $"Done({ms / 1000}s)"; }
|
||||||
));
|
));
|
||||||
waitMS = waitMS - 1000;
|
waitMS = waitMS - 1000;
|
||||||
|
|
||||||
@@ -168,7 +170,7 @@ namespace ProductionUiCordonel.UserControls.FinalTest
|
|||||||
}
|
}
|
||||||
|
|
||||||
BtnDone.Dispatcher.Invoke(DispatcherPriority.Send,
|
BtnDone.Dispatcher.Invoke(DispatcherPriority.Send,
|
||||||
new Action(() => { BtnDone.Content = $"Done"; }
|
new Action(() => { BtnDone.Content = "Done"; }
|
||||||
));
|
));
|
||||||
OnDoneRequested?.Invoke(this, EventArgs.Empty);
|
OnDoneRequested?.Invoke(this, EventArgs.Empty);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
using System;
|
using System;
|
||||||
using ProductionUiCordonel.Model;
|
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
|
using ProductionUiCordonel.Model;
|
||||||
|
using MessageBox = System.Windows.Forms.MessageBox;
|
||||||
|
|
||||||
namespace ProductionUiCordonel.ctls
|
namespace ProductionUiCordonel.ctls
|
||||||
{
|
{
|
||||||
@@ -32,11 +33,11 @@ namespace ProductionUiCordonel.ctls
|
|||||||
{
|
{
|
||||||
if (a.Result)
|
if (a.Result)
|
||||||
{
|
{
|
||||||
System.Windows.Forms.MessageBox.Show("Meter has passed");
|
MessageBox.Show("Meter has passed");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
System.Windows.Forms.MessageBox.Show("Meter not has passed");
|
MessageBox.Show("Meter not has passed");
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
using ProductionUiCordonel.Event;
|
using System;
|
||||||
using ProductionUiCordonel.Model;
|
|
||||||
using System;
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
using System.Windows.Threading;
|
using System.Windows.Threading;
|
||||||
|
using ProductionUiCordonel.Event;
|
||||||
|
using ProductionUiCordonel.Model;
|
||||||
using Xylem.Common.Logic.ProductionOrderCore.TestResults;
|
using Xylem.Common.Logic.ProductionOrderCore.TestResults;
|
||||||
|
|
||||||
namespace ProductionUiCordonel.ctls
|
namespace ProductionUiCordonel.ctls
|
||||||
@@ -93,7 +93,7 @@ namespace ProductionUiCordonel.ctls
|
|||||||
{
|
{
|
||||||
BarcodeInput = $"{BarcodeInput}{input}";
|
BarcodeInput = $"{BarcodeInput}{input}";
|
||||||
|
|
||||||
if (input == System.Environment.NewLine)
|
if (input == Environment.NewLine)
|
||||||
{
|
{
|
||||||
var tmpOffset = BarcodeInputActiveOffset.Value;
|
var tmpOffset = BarcodeInputActiveOffset.Value;
|
||||||
BarcodeInputActiveOffset = null;
|
BarcodeInputActiveOffset = null;
|
||||||
|
|||||||
Reference in New Issue
Block a user