-
-
Notifications
You must be signed in to change notification settings - Fork 517
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #212 by renaming FluentTest to Fluent.Ribbon.Showcase
- Loading branch information
Showing
89 changed files
with
5,175 additions
and
5,171 deletions.
There are no files selected for viewing
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,14 +1,14 @@ | ||
<Application xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
x:Class="FluentTest.App" | ||
StartupUri="TestWindow.xaml"> | ||
<Application.Resources> | ||
<ResourceDictionary> | ||
<ResourceDictionary.MergedDictionaries> | ||
<!--<ResourceDictionary Source="pack://application:,,,/Fluent;Component/Themes/Generic.xaml" />--> | ||
<!--<ResourceDictionary Source="pack://application:,,,/Fluent;Component/Themes/Office2013/Generic.xaml" />--> | ||
<ResourceDictionary Source="pack://application:,,,/Fluent;Component/Themes/Windows8/Generic.xaml" /> | ||
</ResourceDictionary.MergedDictionaries> | ||
</ResourceDictionary> | ||
</Application.Resources> | ||
<Application xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
x:Class="FluentTest.App" | ||
StartupUri="TestWindow.xaml"> | ||
<Application.Resources> | ||
<ResourceDictionary> | ||
<ResourceDictionary.MergedDictionaries> | ||
<!--<ResourceDictionary Source="pack://application:,,,/Fluent;Component/Themes/Generic.xaml" />--> | ||
<!--<ResourceDictionary Source="pack://application:,,,/Fluent;Component/Themes/Office2013/Generic.xaml" />--> | ||
<ResourceDictionary Source="pack://application:,,,/Fluent;Component/Themes/Windows8/Generic.xaml" /> | ||
</ResourceDictionary.MergedDictionaries> | ||
</ResourceDictionary> | ||
</Application.Resources> | ||
</Application> |
62 changes: 31 additions & 31 deletions
62
FluentTest/App.xaml.cs → Fluent.Ribbon.Showcase/App.xaml.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,32 +1,32 @@ | ||
namespace FluentTest | ||
{ | ||
public partial class App | ||
{ | ||
public App() | ||
{ | ||
//System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("ru-RU"); | ||
|
||
//Thread.CurrentThread.CurrentUICulture = new CultureInfo("fa"); | ||
//Thread.CurrentThread.CurrentUICulture = new CultureInfo("ru"); | ||
//Thread.CurrentThread.CurrentUICulture = new CultureInfo("de"); | ||
//Thread.CurrentThread.CurrentUICulture = new CultureInfo("hu"); | ||
//Thread.CurrentThread.CurrentUICulture = new CultureInfo("cs"); | ||
//Thread.CurrentThread.CurrentUICulture = new CultureInfo("fr"); | ||
//Thread.CurrentThread.CurrentUICulture = new CultureInfo("pl"); | ||
//Thread.CurrentThread.CurrentUICulture = new CultureInfo("ja"); | ||
//Thread.CurrentThread.CurrentUICulture = new CultureInfo("nl"); | ||
//Thread.CurrentThread.CurrentUICulture = new CultureInfo("pt-PT"); | ||
//Thread.CurrentThread.CurrentUICulture = new CultureInfo("pt-br"); | ||
//Thread.CurrentThread.CurrentUICulture = new CultureInfo("es"); | ||
//Thread.CurrentThread.CurrentUICulture = new CultureInfo("zh"); | ||
//Thread.CurrentThread.CurrentUICulture = new CultureInfo("sv"); | ||
//Thread.CurrentThread.CurrentUICulture = new CultureInfo("sk"); | ||
//Thread.CurrentThread.CurrentUICulture = new CultureInfo("uk"); | ||
//Thread.CurrentThread.CurrentUICulture = new CultureInfo("ro"); | ||
//Thread.CurrentThread.CurrentUICulture = new CultureInfo("it"); | ||
//Thread.CurrentThread.CurrentUICulture = new CultureInfo("ar"); | ||
//Thread.CurrentThread.CurrentUICulture = new CultureInfo("da"); | ||
//Thread.CurrentThread.CurrentUICulture = new CultureInfo("az"); | ||
} | ||
} | ||
namespace FluentTest | ||
{ | ||
public partial class App | ||
{ | ||
public App() | ||
{ | ||
//System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("ru-RU"); | ||
|
||
//Thread.CurrentThread.CurrentUICulture = new CultureInfo("fa"); | ||
//Thread.CurrentThread.CurrentUICulture = new CultureInfo("ru"); | ||
//Thread.CurrentThread.CurrentUICulture = new CultureInfo("de"); | ||
//Thread.CurrentThread.CurrentUICulture = new CultureInfo("hu"); | ||
//Thread.CurrentThread.CurrentUICulture = new CultureInfo("cs"); | ||
//Thread.CurrentThread.CurrentUICulture = new CultureInfo("fr"); | ||
//Thread.CurrentThread.CurrentUICulture = new CultureInfo("pl"); | ||
//Thread.CurrentThread.CurrentUICulture = new CultureInfo("ja"); | ||
//Thread.CurrentThread.CurrentUICulture = new CultureInfo("nl"); | ||
//Thread.CurrentThread.CurrentUICulture = new CultureInfo("pt-PT"); | ||
//Thread.CurrentThread.CurrentUICulture = new CultureInfo("pt-br"); | ||
//Thread.CurrentThread.CurrentUICulture = new CultureInfo("es"); | ||
//Thread.CurrentThread.CurrentUICulture = new CultureInfo("zh"); | ||
//Thread.CurrentThread.CurrentUICulture = new CultureInfo("sv"); | ||
//Thread.CurrentThread.CurrentUICulture = new CultureInfo("sk"); | ||
//Thread.CurrentThread.CurrentUICulture = new CultureInfo("uk"); | ||
//Thread.CurrentThread.CurrentUICulture = new CultureInfo("ro"); | ||
//Thread.CurrentThread.CurrentUICulture = new CultureInfo("it"); | ||
//Thread.CurrentThread.CurrentUICulture = new CultureInfo("ar"); | ||
//Thread.CurrentThread.CurrentUICulture = new CultureInfo("da"); | ||
//Thread.CurrentThread.CurrentUICulture = new CultureInfo("az"); | ||
} | ||
} | ||
} |
20 changes: 10 additions & 10 deletions
20
FluentTest/Commanding/IRelayCommand.cs → ...bbon.Showcase/Commanding/IRelayCommand.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,11 +1,11 @@ | ||
namespace FluentTest.Commanding | ||
{ | ||
using System; | ||
using System.Windows.Input; | ||
|
||
public interface IRelayCommand : ICommand | ||
{ | ||
event EventHandler Executed; | ||
event EventHandler Executing; | ||
} | ||
namespace FluentTest.Commanding | ||
{ | ||
using System; | ||
using System.Windows.Input; | ||
|
||
public interface IRelayCommand : ICommand | ||
{ | ||
event EventHandler Executed; | ||
event EventHandler Executing; | ||
} | ||
} |
264 changes: 132 additions & 132 deletions
264
FluentTest/Commanding/RelayCommand.cs → ...ibbon.Showcase/Commanding/RelayCommand.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,133 +1,133 @@ | ||
namespace FluentTest.Commanding | ||
{ | ||
using System; | ||
using System.Diagnostics; | ||
using System.Windows.Input; | ||
|
||
public class RelayCommand : IRelayCommand | ||
{ | ||
private readonly Action action; | ||
private readonly Func<bool> canExecute; | ||
|
||
protected RelayCommand() | ||
{ | ||
} | ||
|
||
public RelayCommand(Action execute) | ||
{ | ||
this.action = execute; | ||
} | ||
|
||
public RelayCommand(Action execute, Func<bool> canExecute) | ||
: this(execute) | ||
{ | ||
this.canExecute = canExecute; | ||
} | ||
|
||
#region IRelayCommand Members | ||
|
||
[DebuggerStepThrough] | ||
public virtual bool CanExecute(object parameter) | ||
{ | ||
return this.canExecute == null | ||
|| this.canExecute(); | ||
} | ||
|
||
public event EventHandler CanExecuteChanged | ||
{ | ||
add { CommandManager.RequerySuggested += value; } | ||
remove { CommandManager.RequerySuggested -= value; } | ||
} | ||
|
||
public event EventHandler Executed; | ||
|
||
public event EventHandler Executing; | ||
|
||
protected void OnExecuted() | ||
{ | ||
if (this.Executed != null) | ||
{ | ||
this.Executed(this, null); | ||
} | ||
} | ||
|
||
protected void OnExecuting() | ||
{ | ||
if (this.Executing != null) | ||
{ | ||
this.Executing(this, null); | ||
} | ||
} | ||
|
||
public void Execute(object parameter) | ||
{ | ||
this.OnExecuting(); | ||
|
||
this.InvokeAction(parameter); | ||
|
||
this.OnExecuted(); | ||
} | ||
|
||
protected virtual void InvokeAction(object parameter) | ||
{ | ||
this.action(); | ||
} | ||
|
||
#endregion // IRelayCommand Members | ||
} | ||
|
||
/// <summary> | ||
/// A command whose sole purpose is to | ||
/// relay its functionality to other | ||
/// objects by invoking delegates. The | ||
/// default return value for the CanExecute | ||
/// method is 'true'. | ||
/// </summary> | ||
public class RelayCommand<T> : RelayCommand | ||
{ | ||
private readonly Action<T> action; | ||
private readonly Func<T, bool> canExecute; | ||
|
||
protected RelayCommand() | ||
{ | ||
} | ||
|
||
/// <summary> | ||
/// Creates a new command that can always execute. | ||
/// </summary> | ||
/// <param name="action">The execution logic.</param> | ||
public RelayCommand(Action<T> action) | ||
: this(action, null) | ||
{ | ||
} | ||
|
||
/// <summary> | ||
/// Creates a new command. | ||
/// </summary> | ||
/// <param name="action">The execution logic.</param> | ||
/// <param name="canExecute">The execution status logic.</param> | ||
public RelayCommand(Action<T> action, Func<T, bool> canExecute) | ||
{ | ||
this.action = action; | ||
this.canExecute = canExecute; | ||
} | ||
|
||
/// <summary> | ||
/// Defines the method that determines whether the command can execute in its current state. | ||
/// </summary> | ||
/// <returns> | ||
/// true if this command can be executed; otherwise, false. | ||
/// </returns> | ||
/// <param name="parameter">Data used by the command. If the command does not require data to be passed, this object can be set to null.</param> | ||
public override bool CanExecute(object parameter) | ||
{ | ||
return this.canExecute == null | ||
|| this.canExecute((T)parameter); | ||
} | ||
|
||
protected override void InvokeAction(object parameter) | ||
{ | ||
this.action((T)parameter); | ||
} | ||
} | ||
namespace FluentTest.Commanding | ||
{ | ||
using System; | ||
using System.Diagnostics; | ||
using System.Windows.Input; | ||
|
||
public class RelayCommand : IRelayCommand | ||
{ | ||
private readonly Action action; | ||
private readonly Func<bool> canExecute; | ||
|
||
protected RelayCommand() | ||
{ | ||
} | ||
|
||
public RelayCommand(Action execute) | ||
{ | ||
this.action = execute; | ||
} | ||
|
||
public RelayCommand(Action execute, Func<bool> canExecute) | ||
: this(execute) | ||
{ | ||
this.canExecute = canExecute; | ||
} | ||
|
||
#region IRelayCommand Members | ||
|
||
[DebuggerStepThrough] | ||
public virtual bool CanExecute(object parameter) | ||
{ | ||
return this.canExecute == null | ||
|| this.canExecute(); | ||
} | ||
|
||
public event EventHandler CanExecuteChanged | ||
{ | ||
add { CommandManager.RequerySuggested += value; } | ||
remove { CommandManager.RequerySuggested -= value; } | ||
} | ||
|
||
public event EventHandler Executed; | ||
|
||
public event EventHandler Executing; | ||
|
||
protected void OnExecuted() | ||
{ | ||
if (this.Executed != null) | ||
{ | ||
this.Executed(this, null); | ||
} | ||
} | ||
|
||
protected void OnExecuting() | ||
{ | ||
if (this.Executing != null) | ||
{ | ||
this.Executing(this, null); | ||
} | ||
} | ||
|
||
public void Execute(object parameter) | ||
{ | ||
this.OnExecuting(); | ||
|
||
this.InvokeAction(parameter); | ||
|
||
this.OnExecuted(); | ||
} | ||
|
||
protected virtual void InvokeAction(object parameter) | ||
{ | ||
this.action(); | ||
} | ||
|
||
#endregion // IRelayCommand Members | ||
} | ||
|
||
/// <summary> | ||
/// A command whose sole purpose is to | ||
/// relay its functionality to other | ||
/// objects by invoking delegates. The | ||
/// default return value for the CanExecute | ||
/// method is 'true'. | ||
/// </summary> | ||
public class RelayCommand<T> : RelayCommand | ||
{ | ||
private readonly Action<T> action; | ||
private readonly Func<T, bool> canExecute; | ||
|
||
protected RelayCommand() | ||
{ | ||
} | ||
|
||
/// <summary> | ||
/// Creates a new command that can always execute. | ||
/// </summary> | ||
/// <param name="action">The execution logic.</param> | ||
public RelayCommand(Action<T> action) | ||
: this(action, null) | ||
{ | ||
} | ||
|
||
/// <summary> | ||
/// Creates a new command. | ||
/// </summary> | ||
/// <param name="action">The execution logic.</param> | ||
/// <param name="canExecute">The execution status logic.</param> | ||
public RelayCommand(Action<T> action, Func<T, bool> canExecute) | ||
{ | ||
this.action = action; | ||
this.canExecute = canExecute; | ||
} | ||
|
||
/// <summary> | ||
/// Defines the method that determines whether the command can execute in its current state. | ||
/// </summary> | ||
/// <returns> | ||
/// true if this command can be executed; otherwise, false. | ||
/// </returns> | ||
/// <param name="parameter">Data used by the command. If the command does not require data to be passed, this object can be set to null.</param> | ||
public override bool CanExecute(object parameter) | ||
{ | ||
return this.canExecute == null | ||
|| this.canExecute((T)parameter); | ||
} | ||
|
||
protected override void InvokeAction(object parameter) | ||
{ | ||
this.action((T)parameter); | ||
} | ||
} | ||
} |
Oops, something went wrong.