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>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_IService" />
<binding name="BasicHttpBinding_IService" maxReceivedMessageSize="2147483647" />
</basicHttpBinding>
</bindings>
<client>

View File

@ -28,7 +28,13 @@ namespace ENI2.Controls
public ServerStatusControl()
{
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)
@ -132,6 +138,22 @@ namespace ENI2.Controls
private void refreshButton_Click(object sender, System.Windows.RoutedEventArgs e)
{
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>
<WebPage>publish.html</WebPage>
<ApplicationRevision>1</ApplicationRevision>
<ApplicationVersion>3.9.2.%2a</ApplicationVersion>
<ApplicationVersion>3.9.3.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<CreateDesktopShortcut>true</CreateDesktopShortcut>
<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="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}" />
<TextBox Grid.Row="0" Grid.Column="1" Width="auto" Name="textBoxServiceName" Margin="2" MinLines="2" MaxLength="100" 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="2" Grid.Column="1" Width="auto" Name="textBoxServiceInvoiceRecipient" Margin="2" MinLines="2" TextWrapping="Wrap" AcceptsReturn="True" MaxLength="100" />
<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="99" />
<TextBox Grid.Row="2" Grid.Column="1" Width="auto" Name="textBoxServiceInvoiceRecipient" Margin="2" MinLines="2" TextWrapping="Wrap" AcceptsReturn="True" MaxLength="99" />
</Grid>
</enictrl:EditWindowBase>

View File

@ -47,8 +47,7 @@ namespace ENI2
private int failedLogonCount = 0;
private ReportingParty userEntity = null;
private ILog _log = LogManager.GetLogger(typeof(MainWindow));
private DatabaseEntityWatchdog _dbWatchDog;
private System.Timers.Timer _statusTimer;
private DatabaseEntityWatchdog _dbWatchDog;
#endregion
@ -69,12 +68,7 @@ namespace ENI2
this._dbWatchDog.VisitTransitIdUpdated += _dbWatchDog_VisitTransitIdUpdated;
App.SplashScreen.ShowMessage("done");
Thread.Sleep(500);
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();
App.SplashScreen.LoadComplete();
}
#endregion
@ -550,30 +544,7 @@ namespace ENI2
this.Close();
}
#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
#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>
/// Looks up a localized string similar to Copy data.
/// </summary>

View File

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

View File

@ -12,6 +12,7 @@ using System.Windows.Media;
using bsmd.database;
using System.Windows.Data;
using log4net;
using System.Windows.Media.Imaging;
namespace ENI2
{
@ -29,8 +30,20 @@ namespace ENI2
public SucheControl()
{
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
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
}

View File

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

View File

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

View File

@ -322,6 +322,10 @@ namespace bsmd.database
}
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:
break;
}

View File

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

View File

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