Commit 9390d713 authored by Manu's avatar Manu
Browse files

Initial commit

parents
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Resources;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("VocLearner.BusinessLogic.Windows")]
[assembly: AssemblyDescription("Vocable Learner Class Library")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("VocLearner.BusinessLogic.Windows")]
[assembly: AssemblyCopyright("Copyright © Gamer-Beast 2015")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("8a387df9-01f7-40ac-970c-f90f8c9c3fe4")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: NeutralResourcesLanguageAttribute("en")]
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{2A9F701C-7058-4FD1-9E42-D71EE118D0B2}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>VocLearner.BusinessLogic.Windows</RootNamespace>
<AssemblyName>VocLearner.BusinessLogic.Windows</AssemblyName>
<TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SccProjectName>SAK</SccProjectName>
<SccLocalPath>SAK</SccLocalPath>
<SccAuxPath>SAK</SccAuxPath>
<SccProvider>SAK</SccProvider>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Vocable.cs" />
<Compile Include="VocableCart.cs" />
<Compile Include="Vocabulary.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
\ No newline at end of file
""
{
"FILE_VERSION" = "9237"
"ENLISTMENT_CHOICE" = "NEVER"
"PROJECT_FILE_RELATIVE_PATH" = ""
"NUMBER_OF_EXCLUDED_FILES" = "0"
"ORIGINAL_PROJECT_FILE_PATH" = ""
"NUMBER_OF_NESTED_PROJECTS" = "0"
"SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROVIDER"
}
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace VocLearner.BusinessLogic
{
public class Vocable : INotifyPropertyChanged
{
private string text;
/// <summary>
/// Gibt den Text zurück oder legt diesen fest.
/// </summary>
public string Text
{
get
{
return text;
}
set
{
text = value;
RaisePropertyChanged("Text");
}
}
private string translation;
/// <summary>
/// Gibt die Translation zurück oder legt diese fest.
/// </summary>
public string Translation
{
get
{
return translation;
}
set
{
translation = value;
RaisePropertyChanged("Translation");
}
}
private string comment;
/// <summary>
/// Gibt den Comment zurück oder legt diesen fest.
/// </summary>
public string Comment
{
get
{
return comment;
}
set
{
comment = value;
RaisePropertyChanged("Comment");
}
}
/// <summary>
/// Führt eine UI Aktualisierung durch
/// </summary>
private void RaisePropertyChanged(string propertyName)
{
if (PropertyChanged != null)
{
PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
public event PropertyChangedEventHandler PropertyChanged;
}
}
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace VocLearner.BusinessLogic.Windows
{
public class VocableCart : INotifyPropertyChanged
{
private string text;
public string Text
{
get
{
return text;
}
set
{
text = value;
RaisePropertyChanged("Text");
}
}
private string translation;
public string Translation
{
get
{
return translation;
}
set
{
translation = value;
RaisePropertyChanged("Translation");
}
}
private string answer;
public string Answer
{
get
{
return answer;
}
set
{
answer = value;
RaisePropertyChanged("Answer");
}
}
private string comment;
public string Comment
{
get
{
return comment;
}
set
{
comment = value;
RaisePropertyChanged("Comment");
}
}
private string answer2;
public string Answer2
{
get
{
return answer2;
}
set
{
answer2 = value;
RaisePropertyChanged("Answer2");
}
}
private string color;
public string Color
{
get
{
return color;
}
set
{
color = value;
RaisePropertyChanged("Color");
}
}
private string color2;
public string Color2
{
get
{
return color2;
}
set
{
color2 = value;
RaisePropertyChanged("Color2");
}
}
/// <summary>
/// Führt eine UI Aktualisierung durch
/// </summary>
private void RaisePropertyChanged(string propertyName)
{
if (PropertyChanged != null)
{
PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
public event PropertyChangedEventHandler PropertyChanged;
}
}
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using VocLearner.BusinessLogic.Windows;
namespace VocLearner.BusinessLogic
{
public class Vocabulary : INotifyPropertyChanged
{
private ObservableCollection<Vocable> vocables;
public ObservableCollection<Vocable> Vocables
{
get
{
return vocables;
}
set
{
vocables = value;
RaisePropertyChanged("Vocables");
}
}
private ObservableCollection<VocableCart> vocableCarts;
public ObservableCollection<VocableCart> VocableCarts
{
get
{
return vocableCarts;
}
set
{
vocableCarts = value;
RaisePropertyChanged("VocableCarts");
}
}
public void Load()
{
string appDataDirectory = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
string filePath = Path.Combine(appDataDirectory, @"VocLearner\Vocabulary.txt");
string directoryPath = Path.Combine(appDataDirectory, @"VocLearner");
if (!Directory.Exists(directoryPath))
{
Directory.CreateDirectory(directoryPath);
}
using (StreamReader fileReader = new StreamReader(filePath))
{
while (!fileReader.EndOfStream)
{
string[] zeile;
zeile = fileReader.ReadLine().Split('¶');
Vocable newVocable = new Vocable();
newVocable.Text = zeile[0];
newVocable.Translation = zeile[1];
newVocable.Comment = zeile[2];
Vocables.Add(newVocable);
}
}
}
public void Save()
{
string appDataDirectory = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
string filePath = Path.Combine(appDataDirectory, @"VocLearner\Vocabulary.txt");
string directoryPath = Path.Combine(appDataDirectory, @"VocLearner");
if (!Directory.Exists(directoryPath))
{
Directory.CreateDirectory(directoryPath);
}
using (StreamWriter fileWriter = new StreamWriter(filePath, false))
{
foreach (Vocable vocable in Vocables)
{
fileWriter.WriteLine(string.Format("{0}¶{1}¶{2}", vocable.Text, vocable.Translation, vocable.Comment));
}
}
}
private string page1Width;
public string Page1Width
{
get
{
return page1Width;
}
set
{
page1Width = value;
RaisePropertyChanged("Page1Width");
}
}
private string page2Width;
public string Page2Width
{
get
{
return page2Width;
}
set
{
page2Width = value;
RaisePropertyChanged("Page2Width");
}
}
private string menuColor;
public string MenuColor
{
get
{
return menuColor;
}
set
{
menuColor = value;
RaisePropertyChanged("MenuColor");
}
}
private string backgroundColor;
public string BackgroundColor
{
get
{
return backgroundColor;
}
set
{
backgroundColor = value;
RaisePropertyChanged("BackgroundColor");
}
}
private string uselessButtonVisibility;
public string UselessButtonVisibility
{
get
{
return uselessButtonVisibility;
}
set
{
uselessButtonVisibility = value;
RaisePropertyChanged("UselessButtonVisibility");
}
}
/// <summary>
/// Führt eine UI Aktualisierung durch
/// </summary>
private void RaisePropertyChanged(string propertyName)
{
if (PropertyChanged != null)
{
PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
public event PropertyChangedEventHandler PropertyChanged;
}
}
<?xml version="1.0" encoding="utf-8"?>
<modelStoreModel xmlns:dm0="http://schemas.microsoft.com/VisualStudio/2008/DslTools/Core" xmlns:dm1="http://schemas.microsoft.com/dsltools/Kernel" xmlns:dm2="http://schemas.microsoft.com/dsltools/Component" xmlns:dm3="http://schemas.microsoft.com/dsltools/UseCase" xmlns:dm4="http://schemas.microsoft.com/dsltools/Activity" xmlns:dm5="http://schemas.microsoft.com/dsltools/Interaction" xmlns:dm6="http://schemas.microsoft.com/dsltools/UmlModelLibrary" xmlns:dm7="http://schemas.microsoft.com/dsltools/UmlDiagrams" xmlns:dm8="http://schemas.microsoft.com/dsltools/LogicalClassDesigner"
dslVersion="1.0.0.0"
Id="0dcdd379-905c-4666-9f5b-536d3f272cee"
name="VocLearner.Modeling" xmlns="http://schemas.microsoft.com/dsltools/ModelStore">
<profileInstances>
<packageHasProfileInstances
Id="0caec977-1f8c-4ba3-a7db-8cc9ad9cc73b">
<profileInstance
Id="e34d544e-0fea-4ed6-ac5e-1b74119ac791"
name="StandardProfileL2" />
</packageHasProfileInstances>
<packageHasProfileInstances
Id="29349502-908c-4fda-9054-c48619c59ed0">
<profileInstance
Id="532ea607-fb19-44b8-8502-3351b05452be"
name="StandardProfileL3" />
</packageHasProfileInstances>
</profileInstances>
<packagedElements>
<packageHasNamedElement>
<class
Id="0874952b-fe84-4db3-b7bc-09ffc179ec51"
name="Vocable"
isAbstract="false"
isLeaf="false"
isActiveClass="false">
<ownedAttributesInternal>
<property
Id="68557ed4-8c55-4d20-b951-36b4fc0521d8"
name="Translation"
isLeaf="false"
isStatic="false"
isReadOnly="false"
isUnique="false"
isDerived="false"
isDerivedUnion="false"
aggregation="None"
isComposite="false">
<type_NamedElement>
<undefinedTypeMoniker
Id="c2921656-ec88-4147-8f14-d072eedc839d"
LastKnownName="string"
LastKnownLocation="VocLearner.Modeling.uml" />
</type_NamedElement>
</property>
<property
Id="ca8210f8-c484-4925-8f8a-67e362d6f53b"
name="Text"
isLeaf="false"
isStatic="false"
isReadOnly="false"
isUnique="false"
isDerived="false"
isDerivedUnion="false"
aggregation="None"
isComposite="false">
<type_NamedElement>
<undefinedTypeMoniker
Id="c2921656-ec88-4147-8f14-d072eedc839d"
LastKnownName="string"
LastKnownLocation="VocLearner.Modeling.uml" />
</type_NamedElement>
</property>
<property
Id="823b35bc-42f0-47d8-9ca4-2142a2a3b630"
name="Comment"
isLeaf="false"
isStatic="false"
isReadOnly="false"
isUnique="false"
isDerived="false"
isDerivedUnion="false"
aggregation="None"
isComposite="false">
<type_NamedElement>
<undefinedTypeMoniker
Id="c2921656-ec88-4147-8f14-d072eedc839d"
LastKnownName="string"
LastKnownLocation="VocLearner.Modeling.uml" />
</type_NamedElement>
</property>
</ownedAttributesInternal>
</class>
</packageHasNamedElement>
<packageHasNamedElement>
<class
Id="3d61055f-ea7b-413a-b75f-a17a331f8829"
name="Class1"
isAbstract="false"
isLeaf="false"
isActiveClass="false" />
</packageHasNamedElement>
<packageHasNamedElement>
<undefinedType
Id="c2921656-ec88-4147-8f14-d072eedc839d"
name="string" />