changed arrow colors, enabled controls on edit control if participant is agency or bsmd

This commit is contained in:
Daniel Schick 2023-09-04 13:07:19 +02:00
parent 4abd5025f5
commit 05462e6332
8 changed files with 50 additions and 10 deletions

View File

@ -19,6 +19,8 @@
<None Remove="Resources\arrow_down_green.png" />
<None Remove="Resources\arrow_down_red.png" />
<None Remove="Resources\arrow_right_blue.png" />
<None Remove="Resources\arrow_right_green.png" />
<None Remove="Resources\arrow_up_blue.png" />
<None Remove="Resources\arrow_up_green.png" />
<None Remove="Resources\arrow_up_red.png" />
<None Remove="Resources\clipboard.png" />
@ -65,6 +67,8 @@
<Resource Include="Resources\arrow_down_green.png" />
<Resource Include="Resources\arrow_down_red.png" />
<Resource Include="Resources\arrow_right_blue.png" />
<Resource Include="Resources\arrow_right_green.png" />
<Resource Include="Resources\arrow_up_blue.png" />
<Resource Include="Resources\arrow_up_green.png" />
<Resource Include="Resources\arrow_up_red.png" />
<Resource Include="Resources\clipboard.png" />

View File

@ -71,6 +71,8 @@ namespace BreCalClient
this.comboBoxDepartureBerth.ItemsSource = this.Berths;
this.CopyToControls();
this.EnableControls();
}
private void buttonOK_Click(object sender, RoutedEventArgs e)
@ -266,6 +268,40 @@ namespace BreCalClient
}
}
private void EnableControls()
{
bool isBsmd = App.Participant.IsFlagSet(Extensions.ParticipantType.BSMD);
bool isAgency = App.Participant.IsFlagSet(Extensions.ParticipantType.AGENCY);
this.comboBoxAgency.IsEnabled = isBsmd;
this.comboBoxArrivalBerth.IsEnabled = isBsmd || isAgency;
this.comboBoxCategories.IsEnabled = isBsmd;
this.comboBoxDepartureBerth.IsEnabled = isBsmd || isAgency;
this.checkBoxAnchored.IsEnabled = isAgency;
this.checkBoxBunkering.IsEnabled = isAgency;
this.checkBoxCanceled.IsEnabled = isBsmd || isAgency;
this.checkBoxMooredLock.IsEnabled = isAgency;
this.checkBoxPilotRequired.IsEnabled = isAgency;
this.checkBoxRainsensitiveCargo.IsEnabled = isAgency;
this.checkBoxReplenishingLock.IsEnabled = isAgency;
this.checkBoxReplenishingTerminal.IsEnabled = isAgency;
this.checkBoxTugRequired.IsEnabled = isAgency;
this.comboBoxMooring.IsEnabled = isBsmd;
this.comboBoxPierside.IsEnabled = isAgency;
this.comboBoxPilot.IsEnabled = isAgency;
this.comboBoxShip.IsEnabled = isBsmd;
this.comboBoxMooring.IsEnabled = isAgency;
this.comboBoxTerminal.IsEnabled = isAgency;
this.comboBoxTug.IsEnabled = isAgency;
this.datePickerETA.IsEnabled = isAgency || isBsmd;
this.datePickerETD.IsEnabled = isAgency;
this.textBoxVoyage.IsEnabled = isAgency;
this.datePickerTidalWindowFrom.IsEnabled = isAgency;
this.datePickerTidalWindowTo.IsEnabled = isAgency;
this.integerUpDownRecommendedTugs.IsEnabled = isAgency;
this.doubleUpDownDraft.IsEnabled = isAgency || isBsmd;
}
#endregion

View File

@ -83,9 +83,9 @@ namespace BreCalClient.Resources {
/// <summary>
/// Looks up a localized resource of type System.Byte[].
/// </summary>
public static byte[] arrow_right_blue {
public static byte[] arrow_right_green {
get {
object obj = ResourceManager.GetObject("arrow_right_blue", resourceCulture);
object obj = ResourceManager.GetObject("arrow_right_green", resourceCulture);
return ((byte[])(obj));
}
}
@ -93,9 +93,9 @@ namespace BreCalClient.Resources {
/// <summary>
/// Looks up a localized resource of type System.Byte[].
/// </summary>
public static byte[] arrow_up_green {
public static byte[] arrow_up_blue {
get {
object obj = ResourceManager.GetObject("arrow_up_green", resourceCulture);
object obj = ResourceManager.GetObject("arrow_up_blue", resourceCulture);
return ((byte[])(obj));
}
}

View File

@ -124,11 +124,11 @@
<data name="arrow_down_red" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>arrow_down_red.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="arrow_right_blue" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>arrow_right_blue.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<data name="arrow_right_green" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>arrow_right_green.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="arrow_up_green" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>arrow_up_green.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<data name="arrow_up_blue" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>arrow_up_blue.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="arrow_up_red" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>arrow_up_red.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -119,10 +119,10 @@ namespace BreCalClient
this.imageShipcallType.Source = new BitmapImage(new Uri("pack://application:,,,/BreCalClient;component/Resources/arrow_down_red.png"));
break;
case 2: // outgoing
this.imageShipcallType.Source = new BitmapImage(new Uri("pack://application:,,,/BreCalClient;component/Resources/arrow_up_green.png"));
this.imageShipcallType.Source = new BitmapImage(new Uri("pack://application:,,,/BreCalClient;component/Resources/arrow_up_blue.png"));
break;
case 3: // shifting
this.imageShipcallType.Source = new BitmapImage(new Uri("pack://application:,,,/BreCalClient;component/Resources/arrow_right_blue.png"));
this.imageShipcallType.Source = new BitmapImage(new Uri("pack://application:,,,/BreCalClient;component/Resources/arrow_right_green.png"));
break;
default:
break;