-
Notifications
You must be signed in to change notification settings - Fork 0
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
3dd29a2
commit 03cb0e1
Showing
51 changed files
with
2,106 additions
and
922 deletions.
There are no files selected for viewing
71 changes: 71 additions & 0 deletions
71
NumberRecognizer/NumberRecognizer.App/Common/ItemClickCommand.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,71 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using System.Windows.Input; | ||
using Windows.UI.Xaml; | ||
using Windows.UI.Xaml.Controls; | ||
|
||
namespace NumberRecognizer.App.Common | ||
{ | ||
/// <summary> | ||
/// | ||
/// </summary> | ||
public static class ItemClickCommand | ||
{ | ||
/// <summary> | ||
/// The command property | ||
/// </summary> | ||
public static readonly DependencyProperty CommandProperty = | ||
DependencyProperty.RegisterAttached("Command", typeof(ICommand), | ||
typeof(ItemClickCommand), new PropertyMetadata(null, OnCommandPropertyChanged)); | ||
|
||
/// <summary> | ||
/// Sets the command. | ||
/// </summary> | ||
/// <param name="d">The d.</param> | ||
/// <param name="value">The value.</param> | ||
public static void SetCommand(DependencyObject d, ICommand value) | ||
{ | ||
d.SetValue(CommandProperty, value); | ||
} | ||
|
||
/// <summary> | ||
/// Gets the command. | ||
/// </summary> | ||
/// <param name="d">The d.</param> | ||
/// <returns></returns> | ||
public static ICommand GetCommand(DependencyObject d) | ||
{ | ||
return (ICommand)d.GetValue(CommandProperty); | ||
} | ||
|
||
/// <summary> | ||
/// Called when [command property changed]. | ||
/// </summary> | ||
/// <param name="d">The d.</param> | ||
/// <param name="e">The <see cref="DependencyPropertyChangedEventArgs"/> instance containing the event data.</param> | ||
private static void OnCommandPropertyChanged(DependencyObject d, | ||
DependencyPropertyChangedEventArgs e) | ||
{ | ||
var control = d as ListViewBase; | ||
if (control != null) | ||
control.ItemClick += OnItemClick; | ||
} | ||
|
||
/// <summary> | ||
/// Called when [item click]. | ||
/// </summary> | ||
/// <param name="sender">The sender.</param> | ||
/// <param name="e">The <see cref="ItemClickEventArgs"/> instance containing the event data.</param> | ||
private static void OnItemClick(object sender, ItemClickEventArgs e) | ||
{ | ||
var control = sender as ListViewBase; | ||
var command = GetCommand(control); | ||
|
||
if (command != null && command.CanExecute(e.ClickedItem)) | ||
command.Execute(e.ClickedItem); | ||
} | ||
} | ||
} |
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
63 changes: 31 additions & 32 deletions
63
NumberRecognizer/NumberRecognizer.App/Converter/BooleanToVisibilityConverter.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 |
---|---|---|
@@ -1,57 +1,56 @@ | ||
//----------------------------------------------------------------------- | ||
// <copyright file="BooleanToVisibilityConverter.cs" company="FH Wr.Neustadt"> | ||
// Copyright Markus Zytek. All rights reserved. | ||
// </copyright> | ||
// <author>Markus Zytek</author> | ||
// <summary>DateTime To String Converterer.</summary> | ||
//----------------------------------------------------------------------- | ||
using System; | ||
using System.Collections.Generic; | ||
using System.ComponentModel; | ||
using System.Linq; | ||
using System.Runtime.CompilerServices; | ||
using Windows.Foundation; | ||
using Windows.Foundation.Collections; | ||
using Windows.Graphics.Display; | ||
using Windows.UI.ViewManagement; | ||
using Windows.UI.Xaml; | ||
using Windows.UI.Xaml.Controls; | ||
using Windows.UI.Xaml.Data; | ||
|
||
namespace NumberRecognizer.App.Converter | ||
{ | ||
using System; | ||
using Windows.UI.Xaml; | ||
using Windows.UI.Xaml.Data; | ||
|
||
/// <summary> | ||
/// Boolean To Visibility Converter. | ||
/// Wertkonverter, der TRUE in <see cref="Visibility.Visible"/> und FALSE in | ||
/// <see cref="Visibility.Collapsed"/> übersetzt. | ||
/// </summary> | ||
public class BooleanToVisibilityConverter : IValueConverter | ||
{ | ||
/// <summary> | ||
/// Modifies the source data before passing it to the target for display in the UI. | ||
/// Ändert die Quelldaten vor der Übergabe an das Ziel zur Anzeige in der Benutzeroberfläche. | ||
/// </summary> | ||
/// <param name="value">The source data being passed to the target.</param> | ||
/// <param name="targetType">The type of the target property. This uses a different type depending on whether you're programming with Microsoft .NET or Visual C++ component extensions (C++/CX). See Remarks.</param> | ||
/// <param name="parameter">An optional parameter to be used in the converter logic.</param> | ||
/// <param name="language">The language of the conversion.</param> | ||
/// <param name="value">Die Quelldaten, die ans Ziel übergeben werden.</param> | ||
/// <param name="targetType">Der Typ der Zieleigenschaft. Dadurch wird ein anderer Typ verwendet, abhängig davon, ob Sie mit Microsoft .NET oder Visual&nbsp;C++-Komponentenerweiterungen (C++/CX) programmieren. Siehe Hinweise.</param> | ||
/// <param name="parameter">Ein optionaler Parameter, der in der Konverterlogik verwendet wird.</param> | ||
/// <param name="language">Die Sprache der Konvertierung.</param> | ||
/// <returns> | ||
/// The value to be passed to the target dependency property. | ||
/// Der Wert, der an die Zielabhängigkeitseigenschaft übergeben werden soll. | ||
/// </returns> | ||
public object Convert(object value, Type targetType, object parameter, string language) | ||
{ | ||
bool isVisible = (bool)value; | ||
if (isVisible) | ||
if (parameter != null) | ||
{ | ||
return Visibility.Visible; | ||
return (value is bool && (bool)value) ? Visibility.Collapsed : Visibility.Visible; | ||
} | ||
else | ||
{ | ||
return Visibility.Collapsed; | ||
} | ||
return (value is bool && (bool)value) ? Visibility.Visible : Visibility.Collapsed; | ||
} | ||
|
||
/// <summary> | ||
/// Modifies the target data before passing it to the source object. This method is called only in TwoWay bindings. | ||
/// Ändert die Zieldaten vor der Übergabe an das Quellobjekt. Diese Methode wird nur in TwoWay-Bindungen aufgerufen. | ||
/// </summary> | ||
/// <param name="value">The target data being passed to the source.</param> | ||
/// <param name="targetType">The type of the target property, specified by a helper structure that wraps the type name.</param> | ||
/// <param name="parameter">An optional parameter to be used in the converter logic.</param> | ||
/// <param name="language">The language of the conversion.</param> | ||
/// <param name="value">Die Zieldaten, die an die Quelle übergeben werden.</param> | ||
/// <param name="targetType">Der Typ der Zieleigenschaft, angegeben durch eine Hilfestruktur, die den Typnamen umschließt.</param> | ||
/// <param name="parameter">Ein optionaler Parameter, der in der Konverterlogik verwendet wird.</param> | ||
/// <param name="language">Die Sprache der Konvertierung.</param> | ||
/// <returns> | ||
/// The value to be passed to the source object. | ||
/// Der Wert, der an das Quellobjekt weitergeleitet wird. | ||
/// </returns> | ||
public object ConvertBack(object value, Type targetType, object parameter, string language) | ||
{ | ||
throw new NotImplementedException(); | ||
return value is Visibility && (Visibility)value == Visibility.Visible; | ||
} | ||
} | ||
} |
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
64 changes: 0 additions & 64 deletions
64
NumberRecognizer/NumberRecognizer.App/DataModel/NetworkInfoRT.cs
This file was deleted.
Oops, something went wrong.
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
Binary file removed
BIN
-153 KB
NumberRecognizer/NumberRecognizer.App/Lib/De.TorstenMandelkow.MetroChart.dll
Binary file not shown.
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
Oops, something went wrong.