Skip to content

Commit

Permalink
change location path
Browse files Browse the repository at this point in the history
  • Loading branch information
looksharp committed Aug 9, 2018
1 parent de337c6 commit 701b647
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 45 deletions.
2 changes: 2 additions & 0 deletions src/ScanX.Protocol/Protocol/ClientMethod.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,7 @@ public class ClientMethod
public const string ON_ERROR = "OnError";

public const string ON_SCAN_FINISHED = "OnFinish";

public const string ON_LOG = "OnLog";
}
}
8 changes: 7 additions & 1 deletion src/ScanX.Protocol/Protocol/ScanXProtocol.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,13 @@ public override Task OnDisconnectedAsync(Exception exception)

public async Task ScanTest()
{
var imagesPath = Path.Combine(Directory.GetCurrentDirectory(), "wwwroot", "images");
var processFileName = Process.GetCurrentProcess().MainModule.FileName;
var file = new FileInfo(processFileName);
var dir = file.DirectoryName;

var imagesPath = Path.Combine(dir, "wwwroot", "images");

await Clients.Caller.SendAsync(ClientMethod.ON_LOG, imagesPath);

var img1 = File.ReadAllBytes($"{imagesPath}\\1.png");
var img2 = File.ReadAllBytes($"{imagesPath}\\2.png");
Expand Down
6 changes: 6 additions & 0 deletions src/ScanX.Protocol/Views/Home/ScannerSample.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,12 @@
});
scan.connection.on("OnLog", (data) => {
alert(data);
});
scan.connection.on("OnImageScanned", (data) => {
var img = '<li><img class="img-fluid" src="data: image/jpeg;base64,' + data.imageBytes + '" onclick="setImageToViewer(this)"></img><p class="text-center">' + data.page + ' <br/>' + data.size + ' </p></li>';
Expand Down
52 changes: 26 additions & 26 deletions src/SetupProject/SetupProject.vdproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,19 @@
}
"Entry"
{
"MsmKey" = "8:_85209EC1AB1ACB5E69790C2CB4B20342"
"OwnerKey" = "8:_8A568DA3CBCE4E728A74EF9184838D9A"
"MsmKey" = "8:_2967E8570BCB4FAEAD955FCCA242F103"
"OwnerKey" = "8:_UNDEFINED"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_8A568DA3CBCE4E728A74EF9184838D9A"
"OwnerKey" = "8:_UNDEFINED"
"MsmKey" = "8:_85209EC1AB1ACB5E69790C2CB4B20342"
"OwnerKey" = "8:_8A568DA3CBCE4E728A74EF9184838D9A"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_CFF1EB3ACC874AB89CCB1A20C1988F25"
"MsmKey" = "8:_8A568DA3CBCE4E728A74EF9184838D9A"
"OwnerKey" = "8:_UNDEFINED"
"MsmSig" = "8:_UNDEFINED"
}
Expand Down Expand Up @@ -221,6 +221,26 @@
"IsDependency" = "11:TRUE"
"IsolateTo" = "8:"
}
"{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_2967E8570BCB4FAEAD955FCCA242F103"
{
"SourcePath" = "8:C:\\Users\\balba\\Desktop\\ScanX Protocol Published\\Protocol.zip"
"TargetName" = "8:Protocol.zip"
"Tag" = "8:"
"Folder" = "8:_08E16D1E73EB4C11882B3A6DC60B7813"
"Condition" = "8:"
"Transitive" = "11:FALSE"
"Vital" = "11:TRUE"
"ReadOnly" = "11:FALSE"
"Hidden" = "11:FALSE"
"System" = "11:FALSE"
"Permanent" = "11:FALSE"
"SharedLegacy" = "11:FALSE"
"PackageAs" = "3:1"
"Register" = "3:1"
"Exclude" = "11:FALSE"
"IsDependency" = "11:FALSE"
"IsolateTo" = "8:"
}
"{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_85209EC1AB1ACB5E69790C2CB4B20342"
{
"AssemblyRegister" = "3:1"
Expand Down Expand Up @@ -252,26 +272,6 @@
"IsDependency" = "11:TRUE"
"IsolateTo" = "8:"
}
"{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_CFF1EB3ACC874AB89CCB1A20C1988F25"
{
"SourcePath" = "8:C:\\Users\\balba\\Desktop\\ScanX Protocol Published\\Protocol.zip"
"TargetName" = "8:Protocol.zip"
"Tag" = "8:"
"Folder" = "8:_08E16D1E73EB4C11882B3A6DC60B7813"
"Condition" = "8:"
"Transitive" = "11:FALSE"
"Vital" = "11:TRUE"
"ReadOnly" = "11:FALSE"
"Hidden" = "11:FALSE"
"System" = "11:FALSE"
"Permanent" = "11:FALSE"
"SharedLegacy" = "11:FALSE"
"PackageAs" = "3:1"
"Register" = "3:1"
"Exclude" = "11:FALSE"
"IsDependency" = "11:FALSE"
"IsolateTo" = "8:"
}
"{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_D60D8B2E28C0248BD71080A1575D96DC"
{
"AssemblyRegister" = "3:1"
Expand Down Expand Up @@ -393,7 +393,7 @@
"Name" = "8:Microsoft Visual Studio"
"ProductName" = "8:ScanX"
"ProductCode" = "8:{3BDF528E-C6A9-4528-8384-5854BC644F1F}"
"PackageCode" = "8:{75C97A91-A23C-44FD-A505-969C19F34652}"
"PackageCode" = "8:{9B1E64C7-9078-4B49-8250-FB64CEF2990C}"
"UpgradeCode" = "8:{17A25918-F87A-43AB-814F-5508AF7DB5B6}"
"AspNetVersion" = "8:4.0.30319.0"
"RestartWWWService" = "11:FALSE"
Expand Down
18 changes: 0 additions & 18 deletions src/package-lock.json

This file was deleted.

0 comments on commit 701b647

Please sign in to comment.