-
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
8d4a9e3
commit 2500806
Showing
16 changed files
with
550 additions
and
42 deletions.
There are no files selected for viewing
56 changes: 56 additions & 0 deletions
56
NumberRecognizer/NumberRecognizer.App/Common/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 |
---|---|---|
@@ -0,0 +1,56 @@ | ||
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.Common | ||
{ | ||
/// <summary> | ||
/// Wertkonverter, der TRUE in <see cref="Visibility.Visible"/> und FALSE in | ||
/// <see cref="Visibility.Collapsed"/> übersetzt. | ||
/// </summary> | ||
public class BooleanToVisibilityConverter : IValueConverter | ||
{ | ||
/// <summary> | ||
/// Ändert die Quelldaten vor der Übergabe an das Ziel zur Anzeige in der Benutzeroberfläche. | ||
/// </summary> | ||
/// <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> | ||
/// Der Wert, der an die Zielabhängigkeitseigenschaft übergeben werden soll. | ||
/// </returns> | ||
public object Convert(object value, Type targetType, object parameter, string language) | ||
{ | ||
if (parameter != null) | ||
{ | ||
return (value is bool && (bool)value) ? Visibility.Collapsed : Visibility.Visible; | ||
} | ||
return (value is bool && (bool)value) ? Visibility.Visible : Visibility.Collapsed; | ||
} | ||
|
||
/// <summary> | ||
/// Ändert die Zieldaten vor der Übergabe an das Quellobjekt. Diese Methode wird nur in TwoWay-Bindungen aufgerufen. | ||
/// </summary> | ||
/// <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> | ||
/// Der Wert, der an das Quellobjekt weitergeleitet wird. | ||
/// </returns> | ||
public object ConvertBack(object value, Type targetType, object parameter, string language) | ||
{ | ||
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
17 changes: 17 additions & 0 deletions
17
NumberRecognizer/NumberRecognizer.App/DataModel/LocalTrainingImage.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,17 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using Windows.Storage; | ||
using NumberRecognizer.Cloud.Contract.Data; | ||
|
||
namespace NumberRecognizer.App.DataModel | ||
{ | ||
public class LocalTrainingImage | ||
{ | ||
public TrainingImage ImageData { get; set; } | ||
|
||
public String LocalImagePath { get; set; } | ||
} | ||
} |
65 changes: 65 additions & 0 deletions
65
NumberRecognizer/NumberRecognizer.App/DataModel/LocalTrainingImageGroup.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,65 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Collections.ObjectModel; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using GalaSoft.MvvmLight; | ||
|
||
namespace NumberRecognizer.App.DataModel | ||
{ | ||
public class LocalTrainingImageGroup : ViewModelBase | ||
{ | ||
/// <summary> | ||
/// The titel | ||
/// </summary> | ||
private string title; | ||
|
||
/// <summary> | ||
/// Initializes a new instance of the <see cref="NetworkDataGroup"/> class. | ||
/// </summary> | ||
/// <param name="uniqueId">The unique identifier.</param> | ||
/// <param name="title">The title.</param> | ||
public LocalTrainingImageGroup(string uniqueId, string title) | ||
{ | ||
this.UniqueId = uniqueId; | ||
this.Title = title; | ||
this.Items = new ObservableCollection<LocalTrainingImage>(); | ||
} | ||
|
||
/// <summary> | ||
/// Gets the unique identifier. | ||
/// </summary> | ||
/// <imgByte> | ||
/// The unique identifier. | ||
/// </imgByte> | ||
public string UniqueId { get; private set; } | ||
|
||
/// <summary> | ||
/// Gets the title. | ||
/// </summary> | ||
/// <imgByte> | ||
/// The title. | ||
/// </imgByte> | ||
public string Title | ||
{ | ||
get | ||
{ | ||
return title; | ||
} | ||
private set | ||
{ | ||
this.title = value; | ||
RaisePropertyChanged(() => Title); | ||
} | ||
} | ||
|
||
/// <summary> | ||
/// Gets the items. | ||
/// </summary> | ||
/// <imgByte> | ||
/// The items. | ||
/// </imgByte> | ||
public ObservableCollection<LocalTrainingImage> Items { get; set; } | ||
} | ||
} |
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
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
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
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.