ADD Git attributes.

CHG   End of line conversion.
This commit is contained in:
Philipp Sumi
2013-11-25 17:33:40 +01:00
parent 6b07fab725
commit eac1c5d885
103 changed files with 10426 additions and 10207 deletions

View File

@@ -1,64 +1,64 @@
<Window
x:Class="Samples.Tutorials.Commands.CommandWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:tb="http://www.hardcodet.net/taskbar"
xmlns:local="clr-namespace:Samples.Tutorials.Commands"
Height="300"
Width="300"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<Grid>
<!-- declare the command as a local resource -->
<Grid.Resources>
<local:ShowMessageCommand
x:Key="MessageCommand" />
</Grid.Resources>
<!-- declare the NotifyIcon and configure commands with parameters -->
<tb:TaskbarIcon
x:Name="CustomCommandNotifyIcon"
IconSource="/Icons/Error.ico"
LeftClickCommand="{StaticResource MessageCommand}"
LeftClickCommandParameter="Left mouse button was clicked"
DoubleClickCommand="{StaticResource MessageCommand}"
DoubleClickCommandParameter="Double click on NotifyIcon" />
<!-- declare the NotifyIcon and configure commands with targets -->
<tb:TaskbarIcon
x:Name="RoutedCommandNotifyIcon"
IconSource="/Icons/Inactive.ico"
LeftClickCommand="ApplicationCommands.Cut"
LeftClickCommandTarget="{Binding ElementName=txtInput}"
DoubleClickCommand="ApplicationCommands.Paste"
DoubleClickCommandTarget="{Binding ElementName=txtInput}" />
<TextBlock
Margin="26,26,24,0"
VerticalAlignment="Top"
FontWeight="Bold"
TextWrapping="Wrap">
<Run
Language="de-ch"
Text="Left / Double clicks on red NotifyIcon executes simple custom commands." />
</TextBlock>
<TextBlock
Margin="26,112,24,80"
FontWeight="Bold"
TextWrapping="Wrap">
<Run Language="de-ch" Text="Left / Double clicks on grey NotifyIcon executes routed commands." />
<LineBreak /><Run Language="de-ch" Text="Single click: Cuts selected text" /><LineBreak />
<Run Language="de-ch" Text="Double click: Paste text from clipboard" />
</TextBlock>
<TextBox
Margin="26,0,24,48"
VerticalAlignment="Bottom"
Height="22"
Text="hello world"
TextWrapping="Wrap"
x:Name="txtInput" />
</Grid>
<Window
x:Class="Samples.Tutorials.Commands.CommandWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:tb="http://www.hardcodet.net/taskbar"
xmlns:local="clr-namespace:Samples.Tutorials.Commands"
Height="300"
Width="300"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<Grid>
<!-- declare the command as a local resource -->
<Grid.Resources>
<local:ShowMessageCommand
x:Key="MessageCommand" />
</Grid.Resources>
<!-- declare the NotifyIcon and configure commands with parameters -->
<tb:TaskbarIcon
x:Name="CustomCommandNotifyIcon"
IconSource="/Icons/Error.ico"
LeftClickCommand="{StaticResource MessageCommand}"
LeftClickCommandParameter="Left mouse button was clicked"
DoubleClickCommand="{StaticResource MessageCommand}"
DoubleClickCommandParameter="Double click on NotifyIcon" />
<!-- declare the NotifyIcon and configure commands with targets -->
<tb:TaskbarIcon
x:Name="RoutedCommandNotifyIcon"
IconSource="/Icons/Inactive.ico"
LeftClickCommand="ApplicationCommands.Cut"
LeftClickCommandTarget="{Binding ElementName=txtInput}"
DoubleClickCommand="ApplicationCommands.Paste"
DoubleClickCommandTarget="{Binding ElementName=txtInput}" />
<TextBlock
Margin="26,26,24,0"
VerticalAlignment="Top"
FontWeight="Bold"
TextWrapping="Wrap">
<Run
Language="de-ch"
Text="Left / Double clicks on red NotifyIcon executes simple custom commands." />
</TextBlock>
<TextBlock
Margin="26,112,24,80"
FontWeight="Bold"
TextWrapping="Wrap">
<Run Language="de-ch" Text="Left / Double clicks on grey NotifyIcon executes routed commands." />
<LineBreak /><Run Language="de-ch" Text="Single click: Cuts selected text" /><LineBreak />
<Run Language="de-ch" Text="Double click: Paste text from clipboard" />
</TextBlock>
<TextBox
Margin="26,0,24,48"
VerticalAlignment="Bottom"
Height="22"
Text="hello world"
TextWrapping="Wrap"
x:Name="txtInput" />
</Grid>
</Window>

View File

@@ -1,36 +1,36 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
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.Shapes;
namespace Samples.Tutorials.Commands
{
/// <summary>
/// Interaction logic for CommandWindow.xaml
/// </summary>
public partial class CommandWindow : Window
{
public CommandWindow()
{
InitializeComponent();
}
protected override void OnClosing(System.ComponentModel.CancelEventArgs e)
{
//clean up notifyicon (would otherwise stay open until application finishes)
CustomCommandNotifyIcon.Dispose();
RoutedCommandNotifyIcon.Dispose();
base.OnClosing(e);
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
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.Shapes;
namespace Samples.Tutorials.Commands
{
/// <summary>
/// Interaction logic for CommandWindow.xaml
/// </summary>
public partial class CommandWindow : Window
{
public CommandWindow()
{
InitializeComponent();
}
protected override void OnClosing(System.ComponentModel.CancelEventArgs e)
{
//clean up notifyicon (would otherwise stay open until application finishes)
CustomCommandNotifyIcon.Dispose();
RoutedCommandNotifyIcon.Dispose();
base.OnClosing(e);
}
}
}

View File

@@ -1,25 +1,25 @@
using System;
using System.Windows;
using System.Windows.Input;
namespace Samples.Tutorials.Commands
{
/// <summary>
/// A simple command that displays the command parameter as
/// a dialog message.
/// </summary>
public class ShowMessageCommand : ICommand
{
public void Execute(object parameter)
{
MessageBox.Show(parameter.ToString());
}
public bool CanExecute(object parameter)
{
return true;
}
public event EventHandler CanExecuteChanged;
}
using System;
using System.Windows;
using System.Windows.Input;
namespace Samples.Tutorials.Commands
{
/// <summary>
/// A simple command that displays the command parameter as
/// a dialog message.
/// </summary>
public class ShowMessageCommand : ICommand
{
public void Execute(object parameter)
{
MessageBox.Show(parameter.ToString());
}
public bool CanExecute(object parameter)
{
return true;
}
public event EventHandler CanExecuteChanged;
}
}