Skip to content

Commit

Permalink
fix encondings
Browse files Browse the repository at this point in the history
  • Loading branch information
mpm-os committed Oct 30, 2023
1 parent 34eadf3 commit 5dc40b8
Show file tree
Hide file tree
Showing 2 changed files with 79 additions and 79 deletions.
82 changes: 41 additions & 41 deletions ReactViewControl/IViewModule.cs
Original file line number Diff line number Diff line change
@@ -1,41 +1,41 @@
using System.Collections.Generic;

namespace ReactViewControl {

public interface IViewModule {

public string MainJsSource { get; }

IModuleDependenciesProvider DependenciesProvider{ get; set; }

string[] DependencyJsSources { get; }

string[] CssSources { get; }

string NativeObjectName { get; }

string Name { get; }

string Source { get; }

object CreateNativeObject();

string[] Events { get; }

KeyValuePair<string, object>[] PropertiesValues { get; }

void Bind(IFrame frame, IChildViewHost host = null);

event CustomResourceRequestedEventHandler CustomResourceRequested;

T WithPlugin<T>();

void Load();

bool AddChildView(IViewModule childView, string frameName);

T GetOrAddChildView<T>(string frameName) where T : IViewModule, new();

ReactView Host { get; }
}
}
using System.Collections.Generic;

namespace ReactViewControl {

public interface IViewModule {

public string MainJsSource { get; }

IModuleDependenciesProvider DependenciesProvider{ get; set; }

string[] DependencyJsSources { get; }

string[] CssSources { get; }

string NativeObjectName { get; }

string Name { get; }

string Source { get; }

object CreateNativeObject();

string[] Events { get; }

KeyValuePair<string, object>[] PropertiesValues { get; }

void Bind(IFrame frame, IChildViewHost host = null);

event CustomResourceRequestedEventHandler CustomResourceRequested;

T WithPlugin<T>();

void Load();

bool AddChildView(IViewModule childView, string frameName);

T GetOrAddChildView<T>(string frameName) where T : IViewModule, new();

ReactView Host { get; }
}
}
76 changes: 38 additions & 38 deletions Sample.Avalonia/ExtendedReactViewFactory.cs
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
using System;
using ReactViewControl;
using WebViewControl;

namespace Sample.Avalonia {

internal class ExtendedReactViewFactory : ReactViewFactory {
private static WebPackDependenciesProvider provider = new WebPackDependenciesProvider(new Uri("http://localhost:8080/Sample.Avalonia/"));

public override ResourceUrl DefaultStyleSheet =>
new ResourceUrl(typeof(ExtendedReactViewFactory).Assembly, "Generated", Settings.IsLightTheme ? "LightTheme.css" : "DarkTheme.css");

public override IViewModule[] InitializePlugins() {
var viewPlugin = new ViewPlugin();
#if DEBUG
if (DevServerURI != null) {
viewPlugin.DependenciesProvider = ModuleDependenciesProvider;
}
#endif
return new[]{
viewPlugin
};
}

public override bool ShowDeveloperTools => false;

public override bool EnableViewPreload => true;

#if DEBUG
public override bool EnableDebugMode => true;

public override Uri DevServerURI => new Uri("http://localhost:8080/Sample.Avalonia/");

public override IModuleDependenciesProvider ModuleDependenciesProvider =>
provider;
#endif
}
}
using System;
using ReactViewControl;
using WebViewControl;

namespace Sample.Avalonia {

internal class ExtendedReactViewFactory : ReactViewFactory {
private static WebPackDependenciesProvider provider = new WebPackDependenciesProvider(new Uri("http://localhost:8080/Sample.Avalonia/"));

public override ResourceUrl DefaultStyleSheet =>
new ResourceUrl(typeof(ExtendedReactViewFactory).Assembly, "Generated", Settings.IsLightTheme ? "LightTheme.css" : "DarkTheme.css");

public override IViewModule[] InitializePlugins() {
var viewPlugin = new ViewPlugin();
#if DEBUG
if (DevServerURI != null) {
viewPlugin.DependenciesProvider = ModuleDependenciesProvider;
}
#endif
return new[]{
viewPlugin
};
}

public override bool ShowDeveloperTools => false;

public override bool EnableViewPreload => true;

#if DEBUG
public override bool EnableDebugMode => true;

public override Uri DevServerURI => new Uri("http://localhost:8080/Sample.Avalonia/");

public override IModuleDependenciesProvider ModuleDependenciesProvider =>
provider;
#endif
}
}

0 comments on commit 5dc40b8

Please sign in to comment.