Skip to content

Commit 4cf80b9

Browse files
committed
Example project
1 parent 7ec304f commit 4cf80b9

14 files changed

Lines changed: 474 additions & 1 deletion

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,6 @@
55
/TaskbarHook/bin/Debug
66
/TaskbarHook/obj
77
/.vs/TaskbarHook/v15/Server/sqlite3
8-
/.vs/TaskbarHook/v15
8+
/.vs/TaskbarHook/v15
9+
/Example/bin/Debug
10+
/Example/obj/Debug

.vs/TaskbarHook/v15/.suo

52 KB
Binary file not shown.

Example/App.config

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<configuration>
3+
<startup>
4+
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
5+
</startup>
6+
</configuration>

Example/App.xaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<Application x:Class="Example.App"
2+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4+
xmlns:local="clr-namespace:Example"
5+
StartupUri="MainWindow.xaml">
6+
<Application.Resources>
7+
8+
</Application.Resources>
9+
</Application>

Example/App.xaml.cs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Configuration;
4+
using System.Data;
5+
using System.Linq;
6+
using System.Threading.Tasks;
7+
using System.Windows;
8+
9+
namespace Example
10+
{
11+
/// <summary>
12+
/// Interaktionslogik für "App.xaml"
13+
/// </summary>
14+
public partial class App : Application
15+
{
16+
}
17+
}

Example/Example.csproj

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4+
<PropertyGroup>
5+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7+
<ProjectGuid>{B79D301E-C17D-4A5F-9A50-0FB609A21C88}</ProjectGuid>
8+
<OutputType>WinExe</OutputType>
9+
<RootNamespace>Example</RootNamespace>
10+
<AssemblyName>Example</AssemblyName>
11+
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
12+
<FileAlignment>512</FileAlignment>
13+
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
14+
<WarningLevel>4</WarningLevel>
15+
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
16+
<Deterministic>true</Deterministic>
17+
</PropertyGroup>
18+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
19+
<PlatformTarget>AnyCPU</PlatformTarget>
20+
<DebugSymbols>true</DebugSymbols>
21+
<DebugType>full</DebugType>
22+
<Optimize>false</Optimize>
23+
<OutputPath>bin\Debug\</OutputPath>
24+
<DefineConstants>DEBUG;TRACE</DefineConstants>
25+
<ErrorReport>prompt</ErrorReport>
26+
<WarningLevel>4</WarningLevel>
27+
</PropertyGroup>
28+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
29+
<PlatformTarget>AnyCPU</PlatformTarget>
30+
<DebugType>pdbonly</DebugType>
31+
<Optimize>true</Optimize>
32+
<OutputPath>bin\Release\</OutputPath>
33+
<DefineConstants>TRACE</DefineConstants>
34+
<ErrorReport>prompt</ErrorReport>
35+
<WarningLevel>4</WarningLevel>
36+
</PropertyGroup>
37+
<ItemGroup>
38+
<Reference Include="System" />
39+
<Reference Include="System.Data" />
40+
<Reference Include="System.Xml" />
41+
<Reference Include="Microsoft.CSharp" />
42+
<Reference Include="System.Core" />
43+
<Reference Include="System.Xml.Linq" />
44+
<Reference Include="System.Data.DataSetExtensions" />
45+
<Reference Include="System.Net.Http" />
46+
<Reference Include="System.Xaml">
47+
<RequiredTargetFramework>4.0</RequiredTargetFramework>
48+
</Reference>
49+
<Reference Include="WindowsBase" />
50+
<Reference Include="PresentationCore" />
51+
<Reference Include="PresentationFramework" />
52+
</ItemGroup>
53+
<ItemGroup>
54+
<ApplicationDefinition Include="App.xaml">
55+
<Generator>MSBuild:Compile</Generator>
56+
<SubType>Designer</SubType>
57+
</ApplicationDefinition>
58+
<Page Include="MainWindow.xaml">
59+
<Generator>MSBuild:Compile</Generator>
60+
<SubType>Designer</SubType>
61+
</Page>
62+
<Compile Include="App.xaml.cs">
63+
<DependentUpon>App.xaml</DependentUpon>
64+
<SubType>Code</SubType>
65+
</Compile>
66+
<Compile Include="MainWindow.xaml.cs">
67+
<DependentUpon>MainWindow.xaml</DependentUpon>
68+
<SubType>Code</SubType>
69+
</Compile>
70+
</ItemGroup>
71+
<ItemGroup>
72+
<Compile Include="Properties\AssemblyInfo.cs">
73+
<SubType>Code</SubType>
74+
</Compile>
75+
<Compile Include="Properties\Resources.Designer.cs">
76+
<AutoGen>True</AutoGen>
77+
<DesignTime>True</DesignTime>
78+
<DependentUpon>Resources.resx</DependentUpon>
79+
</Compile>
80+
<Compile Include="Properties\Settings.Designer.cs">
81+
<AutoGen>True</AutoGen>
82+
<DependentUpon>Settings.settings</DependentUpon>
83+
<DesignTimeSharedInput>True</DesignTimeSharedInput>
84+
</Compile>
85+
<EmbeddedResource Include="Properties\Resources.resx">
86+
<Generator>ResXFileCodeGenerator</Generator>
87+
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
88+
</EmbeddedResource>
89+
<None Include="Properties\Settings.settings">
90+
<Generator>SettingsSingleFileGenerator</Generator>
91+
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
92+
</None>
93+
</ItemGroup>
94+
<ItemGroup>
95+
<None Include="App.config" />
96+
</ItemGroup>
97+
<ItemGroup>
98+
<ProjectReference Include="..\TaskbarHook\TaskbarHook.csproj">
99+
<Project>{854641a8-d4f1-4230-9c1a-03f881dd3ff7}</Project>
100+
<Name>TaskbarHook</Name>
101+
</ProjectReference>
102+
</ItemGroup>
103+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
104+
</Project>

Example/MainWindow.xaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<Window x:Class="Example.MainWindow"
2+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4+
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
5+
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
6+
xmlns:local="clr-namespace:Example"
7+
mc:Ignorable="d"
8+
Title="MainWindow" Height="450" Width="800">
9+
<Grid>
10+
11+
</Grid>
12+
</Window>

Example/MainWindow.xaml.cs

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
using System.Threading.Tasks;
6+
using System.Windows;
7+
using System.Windows.Controls;
8+
using System.Windows.Data;
9+
using System.Windows.Documents;
10+
using System.Windows.Input;
11+
using System.Windows.Media;
12+
using System.Windows.Media.Imaging;
13+
using System.Windows.Navigation;
14+
using System.Windows.Shapes;
15+
using TaskbarHook;
16+
17+
namespace Example
18+
{
19+
/// <summary>
20+
/// Interaktionslogik für MainWindow.xaml
21+
/// </summary>
22+
public partial class MainWindow : Window
23+
{
24+
public MainWindow()
25+
{
26+
InitializeComponent();
27+
LaunchInTaskBar();
28+
}
29+
30+
private async void LaunchInTaskBar()
31+
{
32+
var taskbar = TaskBarFactory.GetTaskbar();
33+
var process = await taskbar.AddToTaskbar();
34+
process.SetPosition(0, 0);
35+
}
36+
}
37+
}

Example/Properties/AssemblyInfo.cs

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
using System.Reflection;
2+
using System.Resources;
3+
using System.Runtime.CompilerServices;
4+
using System.Runtime.InteropServices;
5+
using System.Windows;
6+
7+
// Allgemeine Informationen über eine Assembly werden über die folgenden
8+
// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
9+
// die einer Assembly zugeordnet sind.
10+
[assembly: AssemblyTitle("Example")]
11+
[assembly: AssemblyDescription("")]
12+
[assembly: AssemblyConfiguration("")]
13+
[assembly: AssemblyCompany("")]
14+
[assembly: AssemblyProduct("Example")]
15+
[assembly: AssemblyCopyright("Copyright © 2018")]
16+
[assembly: AssemblyTrademark("")]
17+
[assembly: AssemblyCulture("")]
18+
19+
// Durch Festlegen von ComVisible auf FALSE werden die Typen in dieser Assembly
20+
// für COM-Komponenten unsichtbar. Wenn Sie auf einen Typ in dieser Assembly von
21+
// COM aus zugreifen müssen, sollten Sie das ComVisible-Attribut für diesen Typ auf "True" festlegen.
22+
[assembly: ComVisible(false)]
23+
24+
//Um mit dem Erstellen lokalisierbarer Anwendungen zu beginnen, legen Sie
25+
//<UICulture>ImCodeVerwendeteKultur</UICulture> in der .csproj-Datei
26+
//in einer <PropertyGroup> fest. Wenn Sie in den Quelldateien beispielsweise Deutsch
27+
//(Deutschland) verwenden, legen Sie <UICulture> auf \"de-DE\" fest. Heben Sie dann die Auskommentierung
28+
//des nachstehenden NeutralResourceLanguage-Attributs auf. Aktualisieren Sie "en-US" in der nachstehenden Zeile,
29+
//sodass es mit der UICulture-Einstellung in der Projektdatei übereinstimmt.
30+
31+
//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
32+
33+
34+
[assembly: ThemeInfo(
35+
ResourceDictionaryLocation.None, //Speicherort der designspezifischen Ressourcenwörterbücher
36+
//(wird verwendet, wenn eine Ressource auf der Seite nicht gefunden wird,
37+
// oder in den Anwendungsressourcen-Wörterbüchern nicht gefunden werden kann.)
38+
ResourceDictionaryLocation.SourceAssembly //Speicherort des generischen Ressourcenwörterbuchs
39+
//(wird verwendet, wenn eine Ressource auf der Seite nicht gefunden wird,
40+
// designspezifischen Ressourcenwörterbuch nicht gefunden werden kann.)
41+
)]
42+
43+
44+
// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
45+
//
46+
// Hauptversion
47+
// Nebenversion
48+
// Buildnummer
49+
// Revision
50+
//
51+
// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
52+
// übernehmen, indem Sie "*" eingeben:
53+
// [assembly: AssemblyVersion("1.0.*")]
54+
[assembly: AssemblyVersion("1.0.0.0")]
55+
[assembly: AssemblyFileVersion("1.0.0.0")]

Example/Properties/Resources.Designer.cs

Lines changed: 71 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)