Skip to content

Commit 10428e5

Browse files
committed
BugFix
1 parent 586dba6 commit 10428e5

File tree

8 files changed

+50
-38
lines changed

8 files changed

+50
-38
lines changed

WarehouseControlSystem/WarehouseControlSystem.UWP/Package.appxmanifest

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest" xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" IgnorableNamespaces="uap mp">
3-
<Identity Name="d6b0a390-f9c0-4482-81e5-ba609063ca62" Publisher="CN=Lobakov Oleg" Version="1.1.17.0" />
3+
<Identity Name="d6b0a390-f9c0-4482-81e5-ba609063ca62" Publisher="CN=Lobakov Oleg" Version="1.1.18.0" />
44
<mp:PhoneIdentity PhoneProductId="d6b0a390-f9c0-4482-81e5-ba609063ca62" PhonePublisherId="00000000-0000-0000-0000-000000000000" />
55
<Properties>
66
<DisplayName>WarehouseControl.UWP</DisplayName>

WarehouseControlSystem/WarehouseControlSystem/Model/SubSchemeElement.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ namespace WarehouseControlSystem.Model
1919
{
2020
public class SubSchemeElement
2121
{
22+
public string Text { get; set; }
2223
public int Left { get; set; }
2324
public int Top { get; set; }
2425
public int Height { get; set; }

WarehouseControlSystem/WarehouseControlSystem/View/Content/InnerSubSchemeView.xaml.cs

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,13 @@ namespace WarehouseControlSystem.View.Content
2727
[XamlCompilation(XamlCompilationOptions.Compile)]
2828
public partial class InnerSubSchemeView : ContentView
2929
{
30+
public static readonly BindableProperty SchemeTypeProperty = BindableProperty.Create(nameof(SchemeType), typeof(int), typeof(InnerSubSchemeView), 0, BindingMode.Default, null, Changed);
31+
public int SchemeType
32+
{
33+
get { return (int)GetValue(SchemeTypeProperty); }
34+
set { SetValue(SchemeTypeProperty, value); }
35+
}
36+
3037
public static readonly BindableProperty PlanHeightProperty = BindableProperty.Create(nameof(PlanHeight), typeof(int), typeof(InnerSubSchemeView), 0, BindingMode.Default, null, Changed);
3138
public int PlanHeight
3239
{
@@ -135,19 +142,36 @@ private void AddToScheme(SubSchemeElement element)
135142
Color color1 = Color.FromHex(element.HexColor);
136143
if (color1 == (Color)Application.Current.Resources["SchemeBlockWhiteColor"])
137144
{
138-
color1 = Color.Black;
145+
color1 = Color.WhiteSmoke;
139146
}
140147

141148
int left = Math.Max(0, Math.Min(PlanWidth, element.Left));
142149
int right = Math.Min(PlanWidth, element.Left + element.Width);
143150
int top = Math.Max(0, Math.Min(PlanHeight, element.Top));
144151
int bottom = Math.Min(PlanHeight, element.Top + element.Height);
145152

146-
maingrid.Children.Add(
147-
new BoxView()
148-
{
149-
BackgroundColor = color1
150-
}, left, right, top, bottom);
153+
if (SchemeType == 0)
154+
{
155+
maingrid.Children.Add(
156+
new BoxView()
157+
{
158+
Opacity = 0.5,
159+
BackgroundColor = color1
160+
}, left, right, top, bottom);
161+
}
162+
else
163+
{
164+
maingrid.Children.Add(
165+
new Label()
166+
{
167+
FontSize = Device.GetNamedSize(NamedSize.Small,typeof(Label)),
168+
Text = element.Text,
169+
Opacity = 0.5,
170+
HorizontalTextAlignment = TextAlignment.Center,
171+
VerticalTextAlignment = TextAlignment.Center,
172+
BackgroundColor = color1
173+
}, left, right, top, bottom);
174+
}
151175
}
152176

153177
private void ShowSelection(SubSchemeElement element)

WarehouseControlSystem/WarehouseControlSystem/View/Pages/Locations/LocationView.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
SubSchemeElements="{Binding SubSchemeElements}"
7979
IsVisible="{Binding ZonesIsLoaded}"
8080
SubSchemeBackgroundColor="{Binding Color}"
81-
UpdateScheme="{Binding ZonesIsLoaded}"/>
81+
UpdateScheme="{Binding ZonesIsLoaded}" SchemeType="1"/>
8282
</StackLayout>
8383

8484

WarehouseControlSystem/WarehouseControlSystem/ViewModel/LocationViewModel.cs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -205,12 +205,9 @@ public bool IsIndicatorsVisible
205205
get { return isindicatorsvisible; }
206206
set
207207
{
208-
if (isindicatorsvisible != value)
209-
{
210-
isindicatorsvisible = value;
211-
IsNotIndicatorsVisible = !value;
212-
OnPropertyChanged(nameof(IsIndicatorsVisible));
213-
}
208+
isindicatorsvisible = value;
209+
IsNotIndicatorsVisible = !value;
210+
OnPropertyChanged(nameof(IsIndicatorsVisible));
214211
}
215212
} bool isindicatorsvisible;
216213
public bool IsNotIndicatorsVisible
@@ -485,6 +482,7 @@ private void AddSubSchemeElements(List<Zone> zones)
485482
{
486483
SubSchemeElement sse = new SubSchemeElement
487484
{
485+
Text = zone.Description,
488486
Left = zone.Left,
489487
Top = zone.Top,
490488
Height = zone.Height,

WarehouseControlSystem/WarehouseControlSystem/ViewModel/LocationsPlanViewModel.cs

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -57,18 +57,14 @@ public bool IsIndicatorsVisible
5757
get { return isindicatorsvisible; }
5858
set
5959
{
60-
if (isindicatorsvisible != value)
60+
isindicatorsvisible = value;
61+
foreach (LocationViewModel lvm in LocationViewModels)
6162
{
62-
isindicatorsvisible = value;
63-
foreach (LocationViewModel lvm in LocationViewModels)
64-
{
65-
lvm.IsIndicatorsVisible = value;
66-
}
67-
OnPropertyChanged(nameof(IsIndicatorsVisible));
63+
lvm.IsIndicatorsVisible = value;
6864
}
65+
OnPropertyChanged(nameof(IsIndicatorsVisible));
6966
}
70-
}
71-
bool isindicatorsvisible;
67+
} bool isindicatorsvisible;
7268

7369
public LocationsPlanViewModel(INavigation navigation) : base(navigation)
7470
{

WarehouseControlSystem/WarehouseControlSystem/ViewModel/ZoneViewModel.cs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -198,12 +198,9 @@ public bool IsIndicatorsVisible
198198
get { return isindicatorsvisible; }
199199
set
200200
{
201-
if (isindicatorsvisible != value)
202-
{
203-
isindicatorsvisible = value;
204-
IsNotIndicatorsVisible = !value;
205-
OnPropertyChanged(nameof(IsIndicatorsVisible));
206-
}
201+
isindicatorsvisible = value;
202+
IsNotIndicatorsVisible = !value;
203+
OnPropertyChanged(nameof(IsIndicatorsVisible));
207204
}
208205
} bool isindicatorsvisible;
209206
public bool IsNotIndicatorsVisible

WarehouseControlSystem/WarehouseControlSystem/ViewModel/ZonesPlanViewModel.cs

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -57,18 +57,14 @@ public bool IsIndicatorsVisible
5757
get { return isindicatorsvisible; }
5858
set
5959
{
60-
if (isindicatorsvisible != value)
60+
isindicatorsvisible = value;
61+
foreach (ZoneViewModel zvm in ZoneViewModels)
6162
{
62-
isindicatorsvisible = value;
63-
foreach (ZoneViewModel zvm in ZoneViewModels)
64-
{
65-
zvm.IsIndicatorsVisible = value;
66-
}
67-
OnPropertyChanged(nameof(IsIndicatorsVisible));
63+
zvm.IsIndicatorsVisible = value;
6864
}
65+
OnPropertyChanged(nameof(IsIndicatorsVisible));
6966
}
70-
}
71-
bool isindicatorsvisible;
67+
} bool isindicatorsvisible;
7268

7369
public ZonesPlanViewModel(INavigation navigation, Location location) : base(navigation)
7470
{

0 commit comments

Comments
 (0)