Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
StudiApp
Manage
Activity
Members
Labels
Plan
Issues
5
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OST
SEProj
StudiApp
Commits
f0f01823
Commit
f0f01823
authored
1 year ago
by
FabriceRonny.Bosshard
Browse files
Options
Downloads
Patches
Plain Diff
fixed test & refactored semester list item to be same as everywhere
parent
ad2b2a4d
Loading
Loading
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
StudiApp/StudiApp.Test.Unit/ViewModelsTests/DashboardModule/DashboardViewModelTest.cs
+1
-1
1 addition, 1 deletion
...ViewModelsTests/DashboardModule/DashboardViewModelTest.cs
StudiApp/StudiApp/Views/SettingsView.xaml
+19
-25
19 additions, 25 deletions
StudiApp/StudiApp/Views/SettingsView.xaml
with
20 additions
and
26 deletions
StudiApp/StudiApp.Test.Unit/ViewModelsTests/DashboardModule/DashboardViewModelTest.cs
+
1
−
1
View file @
f0f01823
...
...
@@ -62,7 +62,7 @@ public class DashboardViewModelTest
Assert
.
That
(
_vm
.
ToDos
,
Has
.
Count
.
EqualTo
(
1
));
Assert
.
That
(
_vm
.
ToDos
.
First
().
Name
,
Is
.
EqualTo
(
"TodoInNextUp"
));
Assert
.
That
(
_vm
.
Courses
,
Is
.
Null
);
Assert
.
That
(
_vm
.
DoubleCourseItems
,
Is
.
Null
);
Assert
.
That
(
_vm
.
DoubleCourseItems
,
Is
.
Empty
);
Assert
.
That
(
_vm
.
Lectures
,
Has
.
Count
.
EqualTo
(
0
));
Assert
.
That
(
_vm
.
NextUpItems
,
Has
.
Count
.
EqualTo
(
1
));
});
...
...
This diff is collapsed.
Click to expand it.
StudiApp/StudiApp/Views/SettingsView.xaml
+
19
−
25
View file @
f0f01823
...
...
@@ -39,44 +39,38 @@
<CollectionView
ItemsSource=
"{Binding Semesters}"
SelectionMode=
"None"
IsVisible=
"{Binding Semesters, Converter={StaticResource IsNotEmptyConverter}}"
>
<CollectionView.ItemsLayout>
<LinearItemsLayout
Orientation=
"Vertical"
ItemSpacing=
"0"
/>
</CollectionView.ItemsLayout>
<CollectionView.ItemTemplate>
<DataTemplate
x:DataType=
"{x:Type model:Semester}"
>
<SwipeView>
<SwipeView.RightItems>
<SwipeItems>
<SwipeItem
Text=
"Delete"
BackgroundColor=
"Red"
Command=
"{Binding Source={RelativeSource AncestorType={x:Type viewmodel:SettingsViewModel}}, Path=DeleteSemesterCommand}"
CommandParameter=
"{Binding}"
/>
BackgroundColor=
"Red"
Command=
"{Binding Source={RelativeSource AncestorType={x:Type viewmodel:SettingsViewModel}}, Path=DeleteSemesterCommand}"
CommandParameter=
"{Binding}"
/>
</SwipeItems>
</SwipeView.RightItems>
<VerticalStackLayout
Padding=
"10,0"
BackgroundColor=
"White"
>
<VerticalStackLayout.GestureRecognizers>
<Frame
Padding=
"10,0"
Margin=
"5,2"
>
<Frame.GestureRecognizers>
<TapGestureRecognizer
Command=
"{Binding Source={RelativeSource AncestorType={x:Type viewmodel:SettingsViewModel}}, Path=EditSemesterCommand}"
CommandParameter=
"{Binding}"
/>
</VerticalStackLayout.GestureRecognizers>
<BoxView
HeightRequest=
"0.5"
BackgroundColor=
"Gray"
Margin=
"-10,0"
/>
<Label
Text=
"{ Binding Name }"
MaxLines=
"1"
FontAttributes=
"Bold"
Padding=
"0,10,0,0"
></Label>
<Label
Padding=
"0,0,0,10"
>
<Label.Text>
<MultiBinding
StringFormat=
"{}{0} - {1}"
>
<Binding
Path=
"DateRange.StartString"
/>
<Binding
Path=
"DateRange.EndString"
/>
</MultiBinding>
</Label.Text>
</Label>
</VerticalStackLayout>
CommandParameter=
"{Binding}"
/>
</Frame.GestureRecognizers>
<Grid
RowDefinitions=
"*,*"
>
<Label
Text=
"{ Binding Name }"
Grid.Row=
"0"
MaxLines=
"1"
FontAttributes=
"Bold"
Padding=
"0,10,0,0"
></Label>
<Label
Padding=
"0,0,0,10"
Grid.Row=
"1"
TextColor=
"DimGray"
>
<Label.Text>
<MultiBinding
StringFormat=
"{}{0} - {1}"
>
<Binding
Path=
"DateRange.StartString"
/>
<Binding
Path=
"DateRange.EndString"
/>
</MultiBinding>
</Label.Text>
</Label>
</Grid>
</Frame>
</SwipeView>
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>
<BoxView
HeightRequest=
"0.5"
BackgroundColor=
"Gray"
IsVisible=
"{Binding Semesters, Converter={StaticResource IsNotEmptyConverter}}"
/>
</VerticalStackLayout>
</ContentPage.Content>
</ContentPage>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment