Skip to content

Commit f69c0de

Browse files
committed
Update
1 parent 99f0ca3 commit f69c0de

File tree

11 files changed

+370
-279
lines changed

11 files changed

+370
-279
lines changed

WarehouseControlSystem/WarehouseControlSystem.Android/Resources/Resource.Designer.cs

Lines changed: 241 additions & 238 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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.20.0" />
3+
<Identity Name="d6b0a390-f9c0-4482-81e5-ba609063ca62" Publisher="CN=Lobakov Oleg" Version="1.1.21.0" />
44
<mp:PhoneIdentity PhoneProductId="d6b0a390-f9c0-4482-81e5-ba609063ca62" PhonePublisherId="00000000-0000-0000-0000-000000000000" />
55
<Properties>
66
<DisplayName>WarehouseControl.UWP</DisplayName>
Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,26 @@
1-
<?xml version="1.0" encoding="UTF-8"?>
1+
<?xml version="1.0" encoding="UTF-8"?>
22
<ContentView xmlns="http://xamarin.com/schemas/2014/forms"
33
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
44
x:Class="WarehouseControlSystem.View.Content.EmptySpaceViewInRack">
5-
<ContentView.Content>
6-
<StackLayout HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand" BackgroundColor="DarkGray" SizeChanged="StackLayout_SizeChanged">
7-
<StackLayout.GestureRecognizers>
8-
<TapGestureRecognizer Command="{Binding TapCommand}"/>
9-
</StackLayout.GestureRecognizers>
10-
<Image Grid.Row="0" HorizontalOptions="CenterAndExpand" VerticalOptions="CenterAndExpand" Aspect="AspectFit" Margin="5">
11-
<Image.Source>
12-
<OnPlatform x:TypeArguments="FileImageSource">
13-
<On Platform="UWP">
14-
<FileImageSource File="Assets/Images/ic_action_add_circle.png"/>
15-
</On>
16-
<On Platform="iOS,Android">
17-
<FileImageSource File="ic_action_add_circle.png"/>
18-
</On>
19-
</OnPlatform>
20-
</Image.Source>
21-
</Image>
5+
<ContentView.Content>
6+
<StackLayout Padding="1" BackgroundColor="LightGray">
7+
<StackLayout HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand" BackgroundColor="DarkGray" SizeChanged="StackLayout_SizeChanged">
8+
<StackLayout.GestureRecognizers>
9+
<TapGestureRecognizer Command="{Binding TapCommand}"/>
10+
</StackLayout.GestureRecognizers>
11+
<Image Grid.Row="0" HorizontalOptions="CenterAndExpand" VerticalOptions="CenterAndExpand" Aspect="AspectFit" Margin="5">
12+
<Image.Source>
13+
<OnPlatform x:TypeArguments="FileImageSource">
14+
<On Platform="UWP">
15+
<FileImageSource File="Assets/Images/ic_action_add_circle.png"/>
16+
</On>
17+
<On Platform="iOS,Android">
18+
<FileImageSource File="ic_action_add_circle.png"/>
19+
</On>
20+
</OnPlatform>
21+
</Image.Source>
22+
</Image>
23+
</StackLayout>
2224
</StackLayout>
23-
</ContentView.Content>
25+
</ContentView.Content>
2426
</ContentView>

WarehouseControlSystem/WarehouseControlSystem/View/Pages/Racks/Card/BinInfoPanelRackCard.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@
191191
HorizontalOptions="End" />
192192
</Grid>
193193
<Image Grid.Row="3" IsVisible="{Binding ImageIsVisible}"
194-
Aspect="AspectFill" Source="{Binding ImageSource}" HeightRequest="200"/>
194+
Aspect="AspectFit" Source="{Binding ImageSource}" HeightRequest="200"/>
195195
</Grid>
196196
</StackLayout>
197197
</ViewCell>

WarehouseControlSystem/WarehouseControlSystem/View/Pages/Racks/New/BinInNewRackView.xaml

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,30 +8,41 @@
88
<TapGestureRecognizer Command="{Binding TapCommand}"/>
99
</StackLayout.GestureRecognizers>
1010

11-
<StackLayout.Triggers>
11+
<!--<StackLayout.Triggers>
1212
<DataTrigger Binding="{Binding IsSelected}" TargetType="StackLayout" Value="true">
1313
<Setter Property="Padding" Value="3" />
1414
<Setter Property="BackgroundColor" Value="Red" />
1515
</DataTrigger>
16-
</StackLayout.Triggers>
16+
</StackLayout.Triggers>-->
1717

1818
<Grid x:Name="grid" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand" BackgroundColor="#fcf3e7">
1919
<Grid.Triggers>
2020
<DataTrigger Binding="{Binding Blocked}" TargetType="Grid" Value="true">
2121
<Setter Property="BackgroundColor" Value="#ff9a99" />
2222
</DataTrigger>
23+
<DataTrigger Binding="{Binding IsSelected}" TargetType="Grid" Value="true">
24+
<Setter Property="BackgroundColor" Value="Red"/>
25+
</DataTrigger>
2326
</Grid.Triggers>
2427
<Grid.RowDefinitions>
28+
<RowDefinition Height="Auto"/>
2529
<RowDefinition Height="Auto"/>
2630
<RowDefinition Height="Auto"/>
2731
<RowDefinition Height="*"/>
2832
</Grid.RowDefinitions>
2933
<Label Grid.Row="0" x:Name="codelabel" Text="{Binding Code}"
30-
FontSize="Medium"
31-
HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand"
32-
HorizontalTextAlignment="Start" VerticalTextAlignment="Center" Margin="7,2,0,0"/>
33-
34-
<Image Grid.Row="2" x:Name="iconelement" HorizontalOptions="CenterAndExpand"
34+
FontSize="Large"
35+
HorizontalTextAlignment="Start" Margin="7,2,0,0"/>
36+
37+
<Label Grid.Row="1" Text="{Binding BinType}"
38+
FontSize="Small"
39+
HorizontalTextAlignment="Start" Margin="7,0,0,0"/>
40+
41+
<Label Grid.Row="2" Text="{Binding BinRanking}"
42+
FontSize="Micro"
43+
HorizontalTextAlignment="Start" Margin="7,0,7,0"/>
44+
45+
<Image Grid.Row="3" x:Name="iconelement" HorizontalOptions="CenterAndExpand"
3546
VerticalOptions="CenterAndExpand" Aspect="AspectFit"
3647
IsVisible="{Binding IsExist}">
3748
<Image.Source>

WarehouseControlSystem/WarehouseControlSystem/View/Pages/Racks/New/BinInfoPanel.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<RowDefinition Height="*"/>
1212
<RowDefinition Height="Auto"/>
1313
</Grid.RowDefinitions>
14-
<StackLayout Grid.Row="0" Orientation="Horizontal">
14+
<StackLayout Grid.Row="0" Orientation="Horizontal" IsVisible="{Binding EditedBinCodeIsEnabled}">
1515
<Label Text="Код ячейки" Margin="10" VerticalOptions="Center"/>
1616
<Entry Text="{Binding TemplateCode, Mode=TwoWay}" Keyboard="Text"
1717
HorizontalOptions="FillAndExpand" VerticalOptions="Center" x:Name="singlebinentry" Margin="10"

WarehouseControlSystem/WarehouseControlSystem/View/Pages/Racks/New/MasterNewRackPage.xaml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,20 @@
1010
<convertors:RackOrientationConverter x:Key="orientationConverter" />
1111
</ResourceDictionary>
1212
</ContentPage.Resources>
13+
<ContentPage.ToolbarItems>
14+
<ToolbarItem Order="Primary" Priority="700" Text="{i18n:Translate RackCardPage_Toolbar_UnSelect}" Clicked="ToolbarItem_UnSelect">
15+
<ToolbarItem.Icon>
16+
<OnPlatform x:TypeArguments="FileImageSource">
17+
<On Platform="UWP,WinPhone">
18+
<FileImageSource File="Assets/Images/ic_action_image_aspect_ratio.png"/>
19+
</On>
20+
<On Platform="iOS,Android">
21+
<FileImageSource File="ic_action_image_aspect_ratio.png"/>
22+
</On>
23+
</OnPlatform>
24+
</ToolbarItem.Icon>
25+
</ToolbarItem>
26+
</ContentPage.ToolbarItems>
1327
<ContentPage.Content>
1428
<StackLayout x:Name="mainsl">
1529
<Grid IsVisible="{Binding IsLoadingState}" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand">
@@ -162,7 +176,7 @@
162176
<ScrollView Grid.Row="1" Padding="5" BackgroundColor="White"
163177
HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand"
164178
Orientation="Horizontal" x:Name="rackviewpanel">
165-
<rv:RackSimpleView x:Name="rackview"></rv:RackSimpleView>
179+
<rv:RackSimpleView x:Name="rackview" LevelSelected="rackview_LevelSelected" SectionSelected="rackview_SectionSelected"></rv:RackSimpleView>
166180
</ScrollView>
167181
<Grid Grid.Row="2" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand">
168182
<Grid.ColumnDefinitions>

WarehouseControlSystem/WarehouseControlSystem/View/Pages/Racks/New/MasterNewRackPage.xaml.cs

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,28 @@ private async void CodeEntryChanged(object sender, TextChangedEventArgs e)
102102
await model.CheckNo();
103103
}
104104

105+
private void ToolbarItem_UnSelect(object sender, EventArgs e)
106+
{
107+
model.NewModel.BinsViewModel.UnSelect();
108+
}
109+
110+
/// <summary>
111+
/// Selec all bins in level
112+
/// </summary>
113+
/// <param name="levelcoord"></param>
114+
private void rackview_LevelSelected(int levelcoord)
115+
{
116+
model.NewModel.SelectLevelBins(levelcoord);
117+
}
118+
119+
/// <summary>
120+
/// Select all bins in 1 section
121+
/// </summary>
122+
/// <param name="sectioncoord"></param>
123+
private void rackview_SectionSelected(int sectioncoord)
124+
{
125+
model.NewModel.SelectSectionBins(sectioncoord);
126+
}
105127

106128
}
107129
}

WarehouseControlSystem/WarehouseControlSystem/View/Pages/Racks/New/RackSimpleView.xaml.cs

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ namespace WarehouseControlSystem.View.Pages.Racks.New
2222
[XamlCompilation(XamlCompilationOptions.Compile)]
2323
public partial class RackSimpleView : ContentView
2424
{
25+
public event Action<int> LevelSelected;
26+
public event Action<int> SectionSelected;
27+
2528
Label HeaderLabel;
2629
private RackViewModel model;
2730

@@ -32,9 +35,39 @@ public int BinWidth
3235
set { SetValue(BinWidthProperty, value); }
3336
}
3437

38+
TapGestureRecognizer LevelTap;
39+
TapGestureRecognizer SectionTap;
40+
3541
public RackSimpleView()
3642
{
3743
InitializeComponent();
44+
45+
LevelTap = new TapGestureRecognizer();
46+
LevelTap.Tapped += (s, e) => {
47+
if (LevelSelected is Action<int>)
48+
{
49+
if (s is Label)
50+
{
51+
Label label1 = (Label)s;
52+
int t = int.Parse(label1.Text);
53+
int i = model.Levels - t + 1;
54+
LevelSelected(i);
55+
}
56+
}
57+
};
58+
59+
SectionTap = new TapGestureRecognizer();
60+
SectionTap.Tapped += (s, e) => {
61+
if (SectionSelected is Action<int>)
62+
{
63+
if (s is Label)
64+
{
65+
Label label1 = (Label)s;
66+
int t = int.Parse(label1.Text);
67+
SectionSelected(t);
68+
}
69+
}
70+
};
3871
}
3972

4073
public void Update(RackViewModel rvm)
@@ -112,6 +145,7 @@ private void CreateLevelsLabels()
112145
TextColor = Color.White,
113146
FontAttributes = FontAttributes.Bold
114147
};
148+
lb.GestureRecognizers.Add(LevelTap);
115149
grid.Children.Add(lb, 0, i);
116150
}
117151
}
@@ -130,6 +164,7 @@ private void CreateSectionLabels()
130164
TextColor = Color.White,
131165
FontAttributes = FontAttributes.Bold
132166
};
167+
lb.GestureRecognizers.Add(SectionTap);
133168
lb.Text = j.ToString();
134169
grid.Children.Add(lb, j, 0);
135170
}

WarehouseControlSystem/WarehouseControlSystem/ViewModel/BinViewModel.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -218,8 +218,7 @@ public int SearchQuantity
218218
OnPropertyChanged("SearchQuantity");
219219
}
220220
}
221-
}
222-
int searchquantity;
221+
} int searchquantity;
223222

224223
public bool IsSearchQuantityVisible
225224
{
@@ -232,9 +231,7 @@ public bool IsSearchQuantityVisible
232231
OnPropertyChanged("IsSearchQuantityVisible");
233232
}
234233
}
235-
}
236-
bool issearchquantityvisible;
237-
234+
} bool issearchquantityvisible;
238235

239236
public int BlockMovement
240237
{

WarehouseControlSystem/WarehouseControlSystem/ViewModel/BinsViewModel.cs

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -699,12 +699,19 @@ public void DeleteBins()
699699
foreach (BinViewModel bvm in selectedlist)
700700
{
701701
DeleteBin(bvm);
702-
EmptySpaceViewModel esvm = new EmptySpaceViewModel(Navigation);
703-
esvm.Section = bvm.Section;
704-
esvm.Level = bvm.Level;
705-
esvm.Depth = bvm.Depth;
706-
esvm.OnTap += Esvm_OnTap;
707-
EmptySpacesViewModels.Add(esvm);
702+
703+
for(int i=1;i<=bvm.SectionSpan;i++)
704+
{
705+
for (int j = 1; j <= bvm.LevelSpan; j++)
706+
{
707+
EmptySpaceViewModel esvm = new EmptySpaceViewModel(Navigation);
708+
esvm.Section = bvm.Section + i - 1;
709+
esvm.Level = bvm.Level + j - 1;
710+
esvm.Depth = bvm.Depth;
711+
esvm.OnTap += Esvm_OnTap;
712+
EmptySpacesViewModels.Add(esvm);
713+
}
714+
}
708715
}
709716
MessagingCenter.Send(this, "Update");
710717
}

0 commit comments

Comments
 (0)