Skip to content
Merged
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
4 changes: 2 additions & 2 deletions AdamController/AdamController.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<WebView2LoaderPreference>Dynamic</WebView2LoaderPreference>
<WebView2UseWinRT>False</WebView2UseWinRT>
<PackageLicenseExpression>MIT-Modern-Variant</PackageLicenseExpression>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<FileVersion>2.0.0.0</FileVersion>
<AssemblyVersion>2.0.0.3</AssemblyVersion>
<FileVersion>2.0.0.3</FileVersion>
</PropertyGroup>
<PropertyGroup>
<TargetFramework>net7.0-windows</TargetFramework>
Expand Down
6 changes: 3 additions & 3 deletions AdamSetup.devel.iss
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define MyAppName "AdamStudio"
#define MyAppPublisher "AdamStudioProduction"
#define MyAppPublisher "AdamSoftware"
#define MyAppURL "https://robotco.ru/"
#define MySupportURL = "https://github.com/vertigra/Adam-IDE"
#define MySupportURL = "https://github.com/Adam-Software/Adam-IDE"
#define MyAppExeName "AdamController.exe"
#define InstallerIconPath "AdamController\Images\Icons\AdamIconAndRGBPageIcon.ico"
#define InstallerIconPath "AdamController.Core\Properties\Icons\main_app_icon.ico"
#define AppReleaseFolderPath "AdamController\bin\Debug\net7.0-windows\"
#define MyAppVersion GetVersionNumbersString(AppReleaseFolderPath + MyAppExeName)

Expand Down
6 changes: 3 additions & 3 deletions AdamSetup.release.iss
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define MyAppName "AdamStudio"
#define MyAppPublisher "AdamStudioProduction"
#define MyAppPublisher "AdamSoftware"
#define MyAppURL "https://robotco.ru/"
#define MySupportURL = "https://github.com/vertigra/Adam-IDE"
#define MySupportURL = "https://github.com/Adam-Software/Adam-IDE"
#define MyAppExeName "AdamController.exe"
#define InstallerIconPath "AdamController\Images\Icons\AdamIconAndRGBPageIcon.ico"
#define InstallerIconPath "AdamController.Core\Properties\Icons\main_app_icon.ico"
#define AppReleaseFolderPath "AdamController\bin\Release\net7.0-windows\"
#define MyAppVersion GetVersionNumbersString(AppReleaseFolderPath + MyAppExeName)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using AdamBlocklyLibrary.Toolbox;
using AdamBlocklyLibrary.ToolboxSets;
using AdamController.Controls.CustomControls.Services;
using AdamController.Controls.Enums;
using AdamController.Core;
using AdamController.Core.Extensions;
using AdamController.Core.Mvvm;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ public partial class ScratchControlView : UserControl
#region Var

private readonly string mPathToSource;
private readonly string mPath;

#endregion

Expand All @@ -41,7 +40,6 @@ public ScratchControlView(IWebViewProvider webViewProvider, IStatusBarNotificati
mControlHelper = controlHelper;

mPathToSource = Path.Combine(folderManagment.CommonDirAppData, "BlocklySource");
mPath = Path.Combine(Path.GetTempPath(), "AdamBrowser");

WebView.CoreWebView2InitializationCompleted += WebViewCoreWebView2InitializationCompleted;
WebView.NavigationCompleted += WebViewNavigationCompleted;
Expand Down Expand Up @@ -106,15 +104,16 @@ private void TextResulEditorTextChanged(object sender, EventArgs e)

private async void InitializeWebViewCore()
{
CoreWebView2Environment env = await CoreWebView2Environment.CreateAsync(userDataFolder: mPath);
await WebView.EnsureCoreWebView2Async(env);
var tempPath = Path.Combine(Path.GetTempPath(), "AdamBrowser");
CoreWebView2Environment env = await CoreWebView2Environment.CreateAsync(userDataFolder: tempPath);
await WebView?.EnsureCoreWebView2Async(env);
}

private void WebViewCoreWebView2InitializationCompleted(object sender, CoreWebView2InitializationCompletedEventArgs e)
{
WebView.CoreWebView2.Settings.AreDefaultContextMenusEnabled = !Settings.Default.DontShowBrowserMenuInBlockly;
WebView.CoreWebView2.SetVirtualHostNameToFolderMapping("localhost", mPathToSource, CoreWebView2HostResourceAccessKind.Allow);
WebView.CoreWebView2.Navigate("https://localhost/index.html");
WebView?.CoreWebView2?.SetVirtualHostNameToFolderMapping("localhost", mPathToSource, CoreWebView2HostResourceAccessKind.Allow);
WebView?.CoreWebView2?.Navigate("https://localhost/index.html");
}

private void WebViewWebMessageReceived(object sender, CoreWebView2WebMessageReceivedEventArgs e)
Expand Down