Version 3.9.3 Korrekturen

This commit is contained in:
Daniel Schick 2017-12-07 18:29:49 +00:00
parent 695c07a5f7
commit 7f659144b7
13 changed files with 84 additions and 48 deletions

View File

@ -45,7 +45,7 @@
<system.serviceModel> <system.serviceModel>
<bindings> <bindings>
<basicHttpBinding> <basicHttpBinding>
<binding name="BasicHttpBinding_IService" /> <binding name="BasicHttpBinding_IService" maxReceivedMessageSize="2147483647" />
</basicHttpBinding> </basicHttpBinding>
</bindings> </bindings>
<client> <client>

View File

@ -28,7 +28,13 @@ namespace ENI2.Controls
public ServerStatusControl() public ServerStatusControl()
{ {
InitializeComponent(); InitializeComponent();
this.dataGridStatus.ItemsSource = this.entries; this.dataGridStatus.ItemsSource = this.entries;
this.Loaded += ServerStatusControl_Loaded;
}
private void ServerStatusControl_Loaded(object sender, System.Windows.RoutedEventArgs e)
{
this.refreshButton_Click(null, null);
} }
internal void Update(LockingServiceReference.ServerStatus serverStatus) internal void Update(LockingServiceReference.ServerStatus serverStatus)
@ -132,6 +138,22 @@ namespace ENI2.Controls
private void refreshButton_Click(object sender, System.Windows.RoutedEventArgs e) private void refreshButton_Click(object sender, System.Windows.RoutedEventArgs e)
{ {
StatusEntry.ClearIds(); StatusEntry.ClearIds();
if (App.LockingServiceClient != null)
{
try
{
LockingServiceReference.ServerStatus serverStatus = App.LockingServiceClient.GetStatus();
if (serverStatus != null)
{
this.Update(serverStatus);
}
}
catch (Exception ex)
{
_log.DebugFormat("LockingService.GetStatus() threw an exception: {0}", ex.Message);
}
}
} }
} }

View File

@ -36,7 +36,7 @@
<CreateWebPageOnPublish>true</CreateWebPageOnPublish> <CreateWebPageOnPublish>true</CreateWebPageOnPublish>
<WebPage>publish.html</WebPage> <WebPage>publish.html</WebPage>
<ApplicationRevision>1</ApplicationRevision> <ApplicationRevision>1</ApplicationRevision>
<ApplicationVersion>3.9.2.%2a</ApplicationVersion> <ApplicationVersion>3.9.3.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust> <UseApplicationTrust>false</UseApplicationTrust>
<CreateDesktopShortcut>true</CreateDesktopShortcut> <CreateDesktopShortcut>true</CreateDesktopShortcut>
<PublishWizardCompleted>true</PublishWizardCompleted> <PublishWizardCompleted>true</PublishWizardCompleted>

View File

@ -21,8 +21,8 @@
<Label Name="labelServiceName" Grid.Row="0" Grid.Column="0" Content="{x:Static p:Resources.textServiceName}" /> <Label Name="labelServiceName" Grid.Row="0" Grid.Column="0" Content="{x:Static p:Resources.textServiceName}" />
<Label Name="labelServiceBeneficiary" Grid.Row="1" Grid.Column="0" Content="{x:Static p:Resources.textServiceBeneficiary}" /> <Label Name="labelServiceBeneficiary" Grid.Row="1" Grid.Column="0" Content="{x:Static p:Resources.textServiceBeneficiary}" />
<Label Name="labelServiceInvoiceRecipient" Grid.Row="2" Grid.Column="0" Content="{x:Static p:Resources.textServiceInvoiceRecipient}" /> <Label Name="labelServiceInvoiceRecipient" Grid.Row="2" Grid.Column="0" Content="{x:Static p:Resources.textServiceInvoiceRecipient}" />
<TextBox Grid.Row="0" Grid.Column="1" Width="auto" Name="textBoxServiceName" Margin="2" MinLines="2" MaxLength="100" AcceptsReturn="True" TextWrapping="Wrap" /> <TextBox Grid.Row="0" Grid.Column="1" Width="auto" Name="textBoxServiceName" Margin="2" MinLines="2" MaxLength="99" AcceptsReturn="True" TextWrapping="Wrap" />
<TextBox Grid.Row="1" Grid.Column="1" Width="auto" Name="textBoxServiceBeneficiary" Margin="2" MinLines="2" TextWrapping="Wrap" AcceptsReturn="True" MaxLength="100" /> <TextBox Grid.Row="1" Grid.Column="1" Width="auto" Name="textBoxServiceBeneficiary" Margin="2" MinLines="2" TextWrapping="Wrap" AcceptsReturn="True" MaxLength="99" />
<TextBox Grid.Row="2" Grid.Column="1" Width="auto" Name="textBoxServiceInvoiceRecipient" Margin="2" MinLines="2" TextWrapping="Wrap" AcceptsReturn="True" MaxLength="100" /> <TextBox Grid.Row="2" Grid.Column="1" Width="auto" Name="textBoxServiceInvoiceRecipient" Margin="2" MinLines="2" TextWrapping="Wrap" AcceptsReturn="True" MaxLength="99" />
</Grid> </Grid>
</enictrl:EditWindowBase> </enictrl:EditWindowBase>

View File

@ -47,8 +47,7 @@ namespace ENI2
private int failedLogonCount = 0; private int failedLogonCount = 0;
private ReportingParty userEntity = null; private ReportingParty userEntity = null;
private ILog _log = LogManager.GetLogger(typeof(MainWindow)); private ILog _log = LogManager.GetLogger(typeof(MainWindow));
private DatabaseEntityWatchdog _dbWatchDog; private DatabaseEntityWatchdog _dbWatchDog;
private System.Timers.Timer _statusTimer;
#endregion #endregion
@ -69,12 +68,7 @@ namespace ENI2
this._dbWatchDog.VisitTransitIdUpdated += _dbWatchDog_VisitTransitIdUpdated; this._dbWatchDog.VisitTransitIdUpdated += _dbWatchDog_VisitTransitIdUpdated;
App.SplashScreen.ShowMessage("done"); App.SplashScreen.ShowMessage("done");
Thread.Sleep(500); Thread.Sleep(500);
App.SplashScreen.LoadComplete(); App.SplashScreen.LoadComplete();
this._statusTimer = new System.Timers.Timer();
this._statusTimer.AutoReset = true;
this._statusTimer.Elapsed += _statusTimer_Elapsed; // TODO: Timer konfigurierbar
this._statusTimer.Interval = 10000; // alle 10 Sekunden
this._statusTimer.Start();
} }
#endregion #endregion
@ -550,30 +544,7 @@ namespace ENI2
this.Close(); this.Close();
} }
#endregion #endregion
#region Service Status timer handler
private void _statusTimer_Elapsed(object sender, ElapsedEventArgs e)
{
if(App.LockingServiceClient != null)
{
try
{
LockingServiceReference.ServerStatus serverStatus = App.LockingServiceClient.GetStatus();
if ((serverStatus != null) && (this.statusControl != null))
{
this.statusControl.Update(serverStatus);
}
}
catch(Exception ex)
{
_log.DebugFormat("LockingService.GetStatus() threw an exception: {0}", ex.Message);
}
}
}
#endregion
} }
} }

View File

@ -1355,6 +1355,15 @@ namespace ENI2.Properties {
} }
} }
/// <summary>
/// Looks up a localized string similar to Copy Id to clipboard.
/// </summary>
public static string textCopyClip {
get {
return ResourceManager.GetString("textCopyClip", resourceCulture);
}
}
/// <summary> /// <summary>
/// Looks up a localized string similar to Copy data. /// Looks up a localized string similar to Copy data.
/// </summary> /// </summary>

View File

@ -1597,4 +1597,7 @@
<data name="textL10PImported" xml:space="preserve"> <data name="textL10PImported" xml:space="preserve">
<value>{0} ports visited imported</value> <value>{0} ports visited imported</value>
</data> </data>
<data name="textCopyClip" xml:space="preserve">
<value>Copy Id to clipboard</value>
</data>
</root> </root>

View File

@ -12,6 +12,7 @@ using System.Windows.Media;
using bsmd.database; using bsmd.database;
using System.Windows.Data; using System.Windows.Data;
using log4net; using log4net;
using System.Windows.Media.Imaging;
namespace ENI2 namespace ENI2
{ {
@ -29,8 +30,20 @@ namespace ENI2
public SucheControl() public SucheControl()
{ {
InitializeComponent(); InitializeComponent();
Loaded += SucheControl_Loaded;
} }
private void SucheControl_Loaded(object sender, RoutedEventArgs e)
{
this.dataGrid.ContextMenu = new ContextMenu();
this.dataGrid.CanUserAddRows = false;
MenuItem addItem = new MenuItem();
addItem.Header = Properties.Resources.textCopyClip;
addItem.Icon = new Image { Source = new BitmapImage(new Uri("pack://application:,,,/Resources/documents.png")) };
addItem.Click += new RoutedEventHandler(this.copyID);
this.dataGrid.ContextMenu.Items.Add(addItem);
}
#endregion #endregion
public event MessageCore.MessageCoreSelectedHandler MessageCoreSelected; public event MessageCore.MessageCoreSelectedHandler MessageCoreSelected;
@ -208,6 +221,18 @@ namespace ENI2
} }
} }
private void copyID(object sender, RoutedEventArgs e)
{
MessageCore selectedCore = dataGrid.SelectedItem as MessageCore;
if(selectedCore != null)
{
if(selectedCore.DisplayId != null)
{
Clipboard.SetText(selectedCore.DisplayId);
}
}
}
#endregion #endregion
} }

View File

@ -2,6 +2,6 @@
[assembly: AssemblyCompany("schick Informatik")] [assembly: AssemblyCompany("schick Informatik")]
[assembly: AssemblyProduct("BSMD NSW interface")] [assembly: AssemblyProduct("BSMD NSW interface")]
[assembly: AssemblyInformationalVersion("3.9.2")] [assembly: AssemblyInformationalVersion("3.9.3")]
[assembly: AssemblyCopyright("Copyright © 2014-2017 schick Informatik")] [assembly: AssemblyCopyright("Copyright © 2014-2017 schick Informatik")]
[assembly: AssemblyTrademark("")] [assembly: AssemblyTrademark("")]

View File

@ -1,4 +1,4 @@
using System.Reflection; using System.Reflection;
[assembly: AssemblyVersion("3.9.2.*")] [assembly: AssemblyVersion("3.9.3.*")]

View File

@ -322,6 +322,10 @@ namespace bsmd.database
} }
break; break;
} }
case ValidationCode.NOT_NULL_MAX_LEN:
if ((value.Length > maxlen) || (value.Length == 0))
errors.Add(RuleEngine.CreateError(validationCode, property.Name, value, entity.Title, identifier, entity.Tablename));
break;
default: default:
break; break;
} }

View File

@ -25,21 +25,22 @@ namespace bsmd.database
#region Properties #region Properties
[ShowReport] [ShowReport]
[MaxLength(100)] [MaxLength(99)]
[ENI2Validation] [ENI2Validation]
[Validation(ValidationCode.STRING_MAXLEN, 99)]
public string ServiceName { get; set; } public string ServiceName { get; set; }
[ShowReport] [ShowReport]
[Validation1(ValidationCode.NOT_NULL)] [Validation(ValidationCode.NOT_NULL_MAX_LEN, 99)]
[LookupName("SERV.ServiceBeneficiary")] [LookupName("SERV.ServiceBeneficiary")]
[MaxLength(100)] [MaxLength(99)]
[ENI2Validation] [ENI2Validation]
public string ServiceBeneficiary { get; set; } public string ServiceBeneficiary { get; set; }
[ShowReport] [ShowReport]
[Validation1(ValidationCode.NOT_NULL)] [Validation(ValidationCode.NOT_NULL_MAX_LEN, 99)]
[LookupName("SERV.ServiceInvoiceRecipient")] [LookupName("SERV.ServiceInvoiceRecipient")]
[MaxLength(100)] [MaxLength(99)]
[ENI2Validation] [ENI2Validation]
public string ServiceInvoiceRecipient { get; set; } public string ServiceInvoiceRecipient { get; set; }

View File

@ -23,19 +23,20 @@ namespace bsmd.database
LOCODE, LOCODE,
LOCODE_GER, LOCODE_GER,
GISIS, GISIS,
INT_GT_ZERO, INT_GT_ZERO, // 5
DOUBLE_GT_ZERO, DOUBLE_GT_ZERO,
FLAG_CODE, FLAG_CODE,
TWO_DIGIT, TWO_DIGIT,
STRING_MAXLEN, STRING_MAXLEN,
STRING_EXACT_LEN, STRING_EXACT_LEN, // 10
LIST_EMPTY, LIST_EMPTY,
IMPLAUSIBLE, IMPLAUSIBLE,
IMPLAUSIBLE_ZZUKN, IMPLAUSIBLE_ZZUKN,
LOCODE_NOPORT, LOCODE_NOPORT,
LOCODE_SSN, LOCODE_SSN, // 15
DOT_NO_COMMA, DOT_NO_COMMA,
VESSEL_TYPE, VESSEL_TYPE,
NOT_NULL_MAX_LEN,
POSITION_COUNT = 22, POSITION_COUNT = 22,
STRING_UNNUMBER = 23, STRING_UNNUMBER = 23,
STRING_IMOCLASS = 24, STRING_IMOCLASS = 24,