Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WPF Remove duplicate DelegateCommand #331

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CefSharp.Example/CefSharp.Example.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,12 @@
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>true</SignAssembly>
</PropertyGroup>
<PropertyGroup>
<AssemblyOriginatorKeyFile>..\CefSharp.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core">
Expand Down
8 changes: 6 additions & 2 deletions CefSharp.Wpf.Example/CefSharp.Wpf.Example.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,12 @@
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>true</SignAssembly>
</PropertyGroup>
<PropertyGroup>
<AssemblyOriginatorKeyFile>..\CefSharp.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core">
Expand All @@ -96,8 +102,6 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</ApplicationDefinition>
<Compile Include="Mvvm\DelegateCommand.cs" />
<Compile Include="Mvvm\DelegateCommandT.cs" />
<Compile Include="Mvvm\ViewModelBase.cs" />
<Compile Include="Views\Main\MainView.xaml.cs">
<DependentUpon>MainView.xaml</DependentUpon>
Expand Down
31 changes: 0 additions & 31 deletions CefSharp.Wpf.Example/Mvvm/DelegateCommand.cs

This file was deleted.

11 changes: 5 additions & 6 deletions CefSharp.Wpf.Example/Views/Main/MainViewModel.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using CefSharp.Example;
using CefSharp.Wpf.Example.Mvvm;
using System;
using System.ComponentModel;
using System.Windows;
Expand Down Expand Up @@ -59,11 +58,11 @@ public bool ShowSidebar
set { PropertyChanged.ChangeAndNotify(ref showSidebar, value, () => ShowSidebar); }
}

public DelegateCommand GoCommand { get; set; }
public DelegateCommand ViewSourceCommand { get; set; }
public DelegateCommand HomeCommand { get; set; }
public DelegateCommand<string> ExecuteJavaScriptCommand { get; set; }
public DelegateCommand<string> EvaluateJavaScriptCommand { get; set; }
public ICommand GoCommand { get; set; }
public ICommand ViewSourceCommand { get; set; }
public ICommand HomeCommand { get; set; }
public ICommand ExecuteJavaScriptCommand { get; set; }
public ICommand EvaluateJavaScriptCommand { get; set; }

public event PropertyChangedEventHandler PropertyChanged;

Expand Down
1 change: 1 addition & 0 deletions CefSharp.Wpf/CefSharp.Wpf.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@
</ItemGroup>
<ItemGroup>
<Compile Include="DelegateCommand.cs" />
<Compile Include="DelegateCommandT.cs" />
<Compile Include="IWpfWebBrowser.cs" />
<Compile Include="Properties\AssemblyInfo.cs">
<SubType>Code</SubType>
Expand Down
1 change: 0 additions & 1 deletion CefSharp.Wpf/DelegateCommand.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using System;
using System.Windows;
using System.Windows.Input;
using System.Windows.Threading;

namespace CefSharp.Wpf
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using System;
using System.Windows.Input;

namespace CefSharp.Wpf.Example.Mvvm
namespace CefSharp.Wpf
{
public class DelegateCommand<T> : ICommand
internal class DelegateCommand<T> : ICommand
{
private readonly Action<T> commandHandler;
private readonly Func<T, bool> canExecuteHandler;
Expand Down
5 changes: 4 additions & 1 deletion CefSharp.Wpf/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using CefSharp;
using System.Runtime.CompilerServices;
using CefSharp;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Windows;
Expand All @@ -20,3 +21,5 @@
ResourceDictionaryLocation.None,
ResourceDictionaryLocation.SourceAssembly
)]

[assembly: InternalsVisibleTo(AssemblyInfo.CefSharpWpfExampleProject)]
1 change: 1 addition & 0 deletions CefSharp/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ public static class AssemblyInfo
public const string CefSharpCoreProject = "CefSharp.Core, PublicKey=" + PublicKey;
public const string CefSharpBrowserSubprocessProject = "CefSharp.BrowserSubprocess, PublicKey=" + PublicKey;
public const string CefSharpWpfProject = "CefSharp.Wpf, PublicKey=" + PublicKey;
public const string CefSharpWpfExampleProject = "CefSharp.Wpf.Example, PublicKey=" + PublicKey;
public const string CefSharpWinFormsProject = "CefSharp.WinForms, PublicKey=" + PublicKey;
public const string CefSharpTestProject = "CefSharp.Test, PublicKey=" + PublicKey;

Expand Down