-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
586fac7
commit 0707089
Showing
28 changed files
with
1,275 additions
and
193 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<!-- | ||
MIT License | ||
Copyright (c) 2018 Grega Mohorko | ||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. | ||
Project: GM.WPF.Test | ||
Created: 2018-12-26 | ||
Author: GregaMohorko | ||
--> | ||
<controls:BaseControl x:Class="GM.WPF.Test.Controls.ControlsTest" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:local="clr-namespace:GM.WPF.Test.Controls" | ||
xmlns:controls="clr-namespace:GM.WPF.Controls;assembly=GM.WPF" | ||
mc:Ignorable="d" | ||
d:DesignHeight="450" | ||
d:DesignWidth="800" | ||
> | ||
<TabControl> | ||
<TabItem Header="ProgressOverlay"> | ||
<local:ProgressOverlayTest /> | ||
</TabItem> | ||
<TabItem Header="TimeControl"> | ||
<local:TimeControlTest /> | ||
</TabItem> | ||
<TabItem Header="TimePicker" IsSelected="True"> | ||
<local:TimePickerTest /> | ||
</TabItem> | ||
</TabControl> | ||
</controls:BaseControl> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
/* | ||
MIT License | ||
Copyright (c) 2018 Grega Mohorko | ||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. | ||
Project: GM.WPF.Test | ||
Created: 2018-12-26 | ||
Author: GregaMohorko | ||
*/ | ||
|
||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using System.Windows; | ||
using System.Windows.Controls; | ||
using System.Windows.Data; | ||
using System.Windows.Documents; | ||
using System.Windows.Input; | ||
using System.Windows.Media; | ||
using System.Windows.Media.Imaging; | ||
using System.Windows.Navigation; | ||
using System.Windows.Shapes; | ||
using GM.WPF.Controls; | ||
|
||
namespace GM.WPF.Test.Controls | ||
{ | ||
public partial class ControlsTest : BaseControl | ||
{ | ||
public ControlsTest() | ||
{ | ||
InitializeComponent(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
<!-- | ||
MIT License | ||
Copyright (c) 2018 Grega Mohorko | ||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. | ||
Project: GM.WPF.Test | ||
Created: 2018-12-26 | ||
Author: GregaMohorko | ||
--> | ||
<controls:BaseControl x:Class="GM.WPF.Test.Controls.ProgressOverlayTest" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:local="clr-namespace:GM.WPF.Test.Controls" | ||
xmlns:controls="clr-namespace:GM.WPF.Controls;assembly=GM.WPF" | ||
mc:Ignorable="d" | ||
d:DesignHeight="450" | ||
d:DesignWidth="800" | ||
d:DataContext="{d:DesignInstance Type=local:ProgressOverlayTestViewModel,IsDesignTimeCreatable=True}" | ||
> | ||
<Grid> | ||
<Grid.ColumnDefinitions> | ||
<ColumnDefinition Width="Auto" MinWidth="150" /> | ||
<ColumnDefinition /> | ||
</Grid.ColumnDefinitions> | ||
<StackPanel Background="LightGray"> | ||
<Label FontWeight="Bold">Message:</Label> | ||
<TextBox Text="{Binding Message,UpdateSourceTrigger=PropertyChanged,Mode=OneWayToSource}" Margin="5 0" /> | ||
<StackPanel Orientation="Horizontal"> | ||
<Label FontWeight="Bold">Progress value:</Label> | ||
<Label Content="{Binding Value,Mode=OneWay}" /> | ||
</StackPanel> | ||
<Slider Value="{Binding Value,Mode=TwoWay}" Maximum="100" Margin="10 0" TickFrequency="1" IsSnapToTickEnabled="True" /> | ||
<CheckBox IsChecked="{Binding IsIndeterminate,Mode=TwoWay}" Content="Is indeterminate" Margin="10 10" /> | ||
</StackPanel> | ||
<Grid Grid.Column="1"> | ||
<StackPanel> | ||
<TextBlock>Some random content ...</TextBlock> | ||
<TextBlock>Some random content ...</TextBlock> | ||
<TextBlock>Some random content ...</TextBlock> | ||
<TextBlock>Some random content ...</TextBlock> | ||
<TextBlock>Some random content ...</TextBlock> | ||
<TextBlock>Some random content ...</TextBlock> | ||
</StackPanel> | ||
<controls:ProgressOverlay Message="{Binding Message,Mode=OneWay}" ProgressValue="{Binding Value,Mode=OneWay}" /> | ||
</Grid> | ||
</Grid> | ||
</controls:BaseControl> |
57 changes: 57 additions & 0 deletions
57
src/GM.WPF/GM.WPF.Test/Controls/ProgressOverlayTest.xaml.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
/* | ||
MIT License | ||
Copyright (c) 2018 Grega Mohorko | ||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. | ||
Project: GM.WPF.Test | ||
Created: 2018-12-26 | ||
Author: GregaMohorko | ||
*/ | ||
|
||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using System.Windows; | ||
using System.Windows.Controls; | ||
using System.Windows.Data; | ||
using System.Windows.Documents; | ||
using System.Windows.Input; | ||
using System.Windows.Media; | ||
using System.Windows.Media.Imaging; | ||
using System.Windows.Navigation; | ||
using System.Windows.Shapes; | ||
using GM.WPF.Controls; | ||
|
||
namespace GM.WPF.Test.Controls | ||
{ | ||
public partial class ProgressOverlayTest : BaseControl | ||
{ | ||
public ProgressOverlayTest() | ||
{ | ||
InitializeComponent(); | ||
|
||
var vm = new ProgressOverlayTestViewModel(); | ||
ViewModel = vm; | ||
} | ||
} | ||
} |
78 changes: 78 additions & 0 deletions
78
src/GM.WPF/GM.WPF.Test/Controls/ProgressOverlayTestViewModel.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
/* | ||
MIT License | ||
Copyright (c) 2018 Grega Mohorko | ||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. | ||
Project: GM.WPF.Test | ||
Created: 2018-12-26 | ||
Author: GregaMohorko | ||
*/ | ||
|
||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using GM.WPF.MVVM; | ||
|
||
namespace GM.WPF.Test.Controls | ||
{ | ||
class ProgressOverlayTestViewModel:ViewModel | ||
{ | ||
public string Message { get; set; } | ||
|
||
private double? _value; | ||
public double? Value | ||
{ | ||
get => _value; | ||
set | ||
{ | ||
_value = value; | ||
if(value != null) { | ||
IsIndeterminate = false; | ||
} | ||
} | ||
} | ||
|
||
private bool _isIndeterminate; | ||
public bool IsIndeterminate | ||
{ | ||
get => _isIndeterminate; | ||
set | ||
{ | ||
_isIndeterminate = value; | ||
if(value) { | ||
Value = null; | ||
} else if(Value == null) { | ||
Value = 0; | ||
} | ||
} | ||
} | ||
|
||
public ProgressOverlayTestViewModel() | ||
{ | ||
if(IsInDesignMode) { | ||
Message = "Loading ..."; | ||
return; | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<!-- | ||
MIT License | ||
Copyright (c) 2018 Grega Mohorko | ||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. | ||
Project: GM.WPF.Test | ||
Created: 2018-12-26 | ||
Author: GregaMohorko | ||
--> | ||
<controls:BaseControl x:Class="GM.WPF.Test.Controls.TimeControlTest" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:local="clr-namespace:GM.WPF.Test.Controls" | ||
xmlns:controls="clr-namespace:GM.WPF.Controls;assembly=GM.WPF" | ||
mc:Ignorable="d" | ||
d:DesignHeight="450" | ||
d:DesignWidth="800" | ||
> | ||
<Grid> | ||
<Grid.ColumnDefinitions> | ||
<ColumnDefinition /> | ||
<ColumnDefinition Width="Auto" /> | ||
<ColumnDefinition /> | ||
</Grid.ColumnDefinitions> | ||
<Grid.RowDefinitions> | ||
<RowDefinition /> | ||
<RowDefinition Height="Auto" /> | ||
<RowDefinition /> | ||
</Grid.RowDefinitions> | ||
<controls:TimeControl Name="_TimeControl_Top" TimeChanged="Top_TimeChanged" /> | ||
<controls:TimeControl Name="_TimeControl_Bottom" Time="{Binding ElementName=_TimeControl_Top,Path=Time,Mode=TwoWay}" TimeChanged="Bottom_TimeChanged" Grid.Row="2" Grid.Column="2" /> | ||
<TextBox Name="_TextBox_Event_Top" Grid.Column="2" IsReadOnly="True" ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Auto" /> | ||
<TextBox Name="_TextBox_Event_Bottom" Grid.Row="2" IsReadOnly="True" HorizontalContentAlignment="Right" ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Auto" /> | ||
<GridSplitter Grid.Column="1" Grid.RowSpan="3" Width="5" VerticalAlignment="Stretch" ResizeBehavior="PreviousAndNext" /> | ||
<GridSplitter Grid.Row="1" Grid.ColumnSpan="3" Height="5" HorizontalAlignment="Stretch" ResizeBehavior="PreviousAndNext" /> | ||
</Grid> | ||
</controls:BaseControl> |
Oops, something went wrong.