diff --git a/src/GM.WPF/GM.WPF.Test/App.xaml.cs b/src/GM.WPF/GM.WPF.Test/App.xaml.cs index 9a2c0d0..6e3581c 100644 --- a/src/GM.WPF/GM.WPF.Test/App.xaml.cs +++ b/src/GM.WPF/GM.WPF.Test/App.xaml.cs @@ -37,9 +37,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE namespace GM.WPF.Test { - /// - /// Interaction logic for App.xaml - /// public partial class App : Application { private MainWindow mainWindow; diff --git a/src/GM.WPF/GM.WPF.Test/Controls/ControlsTest.xaml b/src/GM.WPF/GM.WPF.Test/Controls/ControlsTest.xaml new file mode 100644 index 0000000..c385c71 --- /dev/null +++ b/src/GM.WPF/GM.WPF.Test/Controls/ControlsTest.xaml @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + diff --git a/src/GM.WPF/GM.WPF.Test/Controls/ControlsTest.xaml.cs b/src/GM.WPF/GM.WPF.Test/Controls/ControlsTest.xaml.cs new file mode 100644 index 0000000..aa9155c --- /dev/null +++ b/src/GM.WPF/GM.WPF.Test/Controls/ControlsTest.xaml.cs @@ -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(); + } + } +} diff --git a/src/GM.WPF/GM.WPF.Test/Controls/ProgressOverlayTest.xaml b/src/GM.WPF/GM.WPF.Test/Controls/ProgressOverlayTest.xaml new file mode 100644 index 0000000..a943fb1 --- /dev/null +++ b/src/GM.WPF/GM.WPF.Test/Controls/ProgressOverlayTest.xaml @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + Some random content ... + Some random content ... + Some random content ... + Some random content ... + Some random content ... + Some random content ... + + + + + diff --git a/src/GM.WPF/GM.WPF.Test/Controls/ProgressOverlayTest.xaml.cs b/src/GM.WPF/GM.WPF.Test/Controls/ProgressOverlayTest.xaml.cs new file mode 100644 index 0000000..bc3ce43 --- /dev/null +++ b/src/GM.WPF/GM.WPF.Test/Controls/ProgressOverlayTest.xaml.cs @@ -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; + } + } +} diff --git a/src/GM.WPF/GM.WPF.Test/Controls/ProgressOverlayTestViewModel.cs b/src/GM.WPF/GM.WPF.Test/Controls/ProgressOverlayTestViewModel.cs new file mode 100644 index 0000000..2937ca1 --- /dev/null +++ b/src/GM.WPF/GM.WPF.Test/Controls/ProgressOverlayTestViewModel.cs @@ -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; + } + } + } +} diff --git a/src/GM.WPF/GM.WPF.Test/Controls/TimeControlTest.xaml b/src/GM.WPF/GM.WPF.Test/Controls/TimeControlTest.xaml new file mode 100644 index 0000000..ecdf2dc --- /dev/null +++ b/src/GM.WPF/GM.WPF.Test/Controls/TimeControlTest.xaml @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/src/GM.WPF/GM.WPF.Test/Controls/TimeControlTest.xaml.cs b/src/GM.WPF/GM.WPF.Test/Controls/TimeControlTest.xaml.cs new file mode 100644 index 0000000..b9a3fe4 --- /dev/null +++ b/src/GM.WPF/GM.WPF.Test/Controls/TimeControlTest.xaml.cs @@ -0,0 +1,75 @@ +/* +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 TimeControlTest : BaseControl + { + public TimeControlTest() + { + InitializeComponent(); + } + + private void Top_TimeChanged(object sender, TimeSpan e) + { + TimeChanged(e, _TextBox_Event_Top); + } + + private void Bottom_TimeChanged(object sender, TimeSpan e) + { + TimeChanged(e, _TextBox_Event_Bottom); + } + + private void TimeChanged(TimeSpan newValue, TextBox associatedTextBox) + { + string text = $"TimeChanged event fired. Current time value: {newValue}"; + if(!string.IsNullOrEmpty(associatedTextBox.Text)) { + text = Environment.NewLine + text; + } + + associatedTextBox.AppendText(text); + associatedTextBox.ScrollToEnd(); + } + } +} diff --git a/src/GM.WPF/GM.WPF.Test/Controls/TimePickerTest.xaml b/src/GM.WPF/GM.WPF.Test/Controls/TimePickerTest.xaml new file mode 100644 index 0000000..8d070ef --- /dev/null +++ b/src/GM.WPF/GM.WPF.Test/Controls/TimePickerTest.xaml @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + diff --git a/src/GM.WPF/GM.WPF.Test/Controls/TimePickerTest.xaml.cs b/src/GM.WPF/GM.WPF.Test/Controls/TimePickerTest.xaml.cs new file mode 100644 index 0000000..8611711 --- /dev/null +++ b/src/GM.WPF/GM.WPF.Test/Controls/TimePickerTest.xaml.cs @@ -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 TimePickerTest : BaseControl + { + public TimePickerTest() + { + InitializeComponent(); + } + } +} diff --git a/src/GM.WPF/GM.WPF.Test/Controls/TimePickerTests/TimePickerBindingTest.xaml b/src/GM.WPF/GM.WPF.Test/Controls/TimePickerTests/TimePickerBindingTest.xaml new file mode 100644 index 0000000..d9c8aa0 --- /dev/null +++ b/src/GM.WPF/GM.WPF.Test/Controls/TimePickerTests/TimePickerBindingTest.xaml @@ -0,0 +1,53 @@ + + + + + + + + + +