periodic checkin
This commit is contained in:
parent
80c6ba8f58
commit
8eb82ba6c3
@ -1,33 +1,41 @@
|
|||||||
|
|
||||||
Microsoft Visual Studio Solution File, Format Version 11.00
|
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||||
# Visual C# Express 2010
|
# Visual C# Express 2010
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PdfScribe", "PdfScribe\PdfScribe.csproj", "{1EAD8E9A-A123-4C37-B31E-AEE1354DF003}"
|
|
||||||
EndProject
|
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PdfScribeUnitTests", "PdfScribeUnitTests\PdfScribeUnitTests.csproj", "{D387573C-D122-461C-B525-1545DBDB4FBA}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PdfScribeUnitTests", "PdfScribeUnitTests\PdfScribeUnitTests.csproj", "{D387573C-D122-461C-B525-1545DBDB4FBA}"
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PdfScribeCore", "PdfScribeCore\PdfScribeCore.csproj", "{1EAD8E9A-A123-4C37-B31E-AEE1354DF003}"
|
||||||
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|Any CPU = Debug|Any CPU
|
||||||
Debug|x64 = Debug|x64
|
Debug|x64 = Debug|x64
|
||||||
Debug|x86 = Debug|x86
|
Debug|x86 = Debug|x86
|
||||||
|
Release|Any CPU = Release|Any CPU
|
||||||
Release|x64 = Release|x64
|
Release|x64 = Release|x64
|
||||||
Release|x86 = Release|x86
|
Release|x86 = Release|x86
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
{1EAD8E9A-A123-4C37-B31E-AEE1354DF003}.Debug|x64.ActiveCfg = Debug|Any CPU
|
{D387573C-D122-461C-B525-1545DBDB4FBA}.Debug|Any CPU.ActiveCfg = Debug|x64
|
||||||
{1EAD8E9A-A123-4C37-B31E-AEE1354DF003}.Debug|x64.Build.0 = Debug|Any CPU
|
|
||||||
{1EAD8E9A-A123-4C37-B31E-AEE1354DF003}.Debug|x86.ActiveCfg = Debug|x86
|
|
||||||
{1EAD8E9A-A123-4C37-B31E-AEE1354DF003}.Debug|x86.Build.0 = Debug|x86
|
|
||||||
{1EAD8E9A-A123-4C37-B31E-AEE1354DF003}.Release|x64.ActiveCfg = Release|x64
|
|
||||||
{1EAD8E9A-A123-4C37-B31E-AEE1354DF003}.Release|x64.Build.0 = Release|x64
|
|
||||||
{1EAD8E9A-A123-4C37-B31E-AEE1354DF003}.Release|x86.ActiveCfg = Release|x86
|
|
||||||
{1EAD8E9A-A123-4C37-B31E-AEE1354DF003}.Release|x86.Build.0 = Release|x86
|
|
||||||
{D387573C-D122-461C-B525-1545DBDB4FBA}.Debug|x64.ActiveCfg = Debug|x86
|
{D387573C-D122-461C-B525-1545DBDB4FBA}.Debug|x64.ActiveCfg = Debug|x86
|
||||||
{D387573C-D122-461C-B525-1545DBDB4FBA}.Debug|x64.Build.0 = Debug|x86
|
{D387573C-D122-461C-B525-1545DBDB4FBA}.Debug|x64.Build.0 = Debug|x86
|
||||||
{D387573C-D122-461C-B525-1545DBDB4FBA}.Debug|x86.ActiveCfg = Debug|x86
|
{D387573C-D122-461C-B525-1545DBDB4FBA}.Debug|x86.ActiveCfg = Debug|x86
|
||||||
{D387573C-D122-461C-B525-1545DBDB4FBA}.Debug|x86.Build.0 = Debug|x86
|
{D387573C-D122-461C-B525-1545DBDB4FBA}.Debug|x86.Build.0 = Debug|x86
|
||||||
|
{D387573C-D122-461C-B525-1545DBDB4FBA}.Release|Any CPU.ActiveCfg = Release|x64
|
||||||
{D387573C-D122-461C-B525-1545DBDB4FBA}.Release|x64.ActiveCfg = Release|x86
|
{D387573C-D122-461C-B525-1545DBDB4FBA}.Release|x64.ActiveCfg = Release|x86
|
||||||
{D387573C-D122-461C-B525-1545DBDB4FBA}.Release|x86.ActiveCfg = Release|x86
|
{D387573C-D122-461C-B525-1545DBDB4FBA}.Release|x86.ActiveCfg = Release|x86
|
||||||
{D387573C-D122-461C-B525-1545DBDB4FBA}.Release|x86.Build.0 = Release|x86
|
{D387573C-D122-461C-B525-1545DBDB4FBA}.Release|x86.Build.0 = Release|x86
|
||||||
|
{1EAD8E9A-A123-4C37-B31E-AEE1354DF003}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{1EAD8E9A-A123-4C37-B31E-AEE1354DF003}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{1EAD8E9A-A123-4C37-B31E-AEE1354DF003}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
|
{1EAD8E9A-A123-4C37-B31E-AEE1354DF003}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{1EAD8E9A-A123-4C37-B31E-AEE1354DF003}.Debug|x86.ActiveCfg = Debug|x86
|
||||||
|
{1EAD8E9A-A123-4C37-B31E-AEE1354DF003}.Debug|x86.Build.0 = Debug|x86
|
||||||
|
{1EAD8E9A-A123-4C37-B31E-AEE1354DF003}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{1EAD8E9A-A123-4C37-B31E-AEE1354DF003}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{1EAD8E9A-A123-4C37-B31E-AEE1354DF003}.Release|x64.ActiveCfg = Release|x64
|
||||||
|
{1EAD8E9A-A123-4C37-B31E-AEE1354DF003}.Release|x64.Build.0 = Release|x64
|
||||||
|
{1EAD8E9A-A123-4C37-B31E-AEE1354DF003}.Release|x86.ActiveCfg = Release|x86
|
||||||
|
{1EAD8E9A-A123-4C37-B31E-AEE1354DF003}.Release|x86.Build.0 = Release|x86
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
|
@ -5,7 +5,7 @@ using System.Linq;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
namespace PdfScribe
|
namespace PdfScribeCore
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
@ -8,8 +8,8 @@
|
|||||||
<ProjectGuid>{1EAD8E9A-A123-4C37-B31E-AEE1354DF003}</ProjectGuid>
|
<ProjectGuid>{1EAD8E9A-A123-4C37-B31E-AEE1354DF003}</ProjectGuid>
|
||||||
<OutputType>Library</OutputType>
|
<OutputType>Library</OutputType>
|
||||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
<RootNamespace>PdfScribe</RootNamespace>
|
<RootNamespace>PdfScribeCore</RootNamespace>
|
||||||
<AssemblyName>PdfScribe</AssemblyName>
|
<AssemblyName>PdfScribeCore</AssemblyName>
|
||||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||||
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
|
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
|
||||||
<FileAlignment>512</FileAlignment>
|
<FileAlignment>512</FileAlignment>
|
@ -5,8 +5,11 @@ using System.IO;
|
|||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using System.Security;
|
||||||
|
|
||||||
namespace PdfScribe
|
using Microsoft.Win32;
|
||||||
|
|
||||||
|
namespace PdfScribeCore
|
||||||
{
|
{
|
||||||
public class PdfScribeInstaller
|
public class PdfScribeInstaller
|
||||||
{
|
{
|
||||||
@ -328,7 +331,8 @@ namespace PdfScribe
|
|||||||
{
|
{
|
||||||
if (InstallPrinterDriver(driverDirectory, dependentFilesToCopy))
|
if (InstallPrinterDriver(driverDirectory, dependentFilesToCopy))
|
||||||
{
|
{
|
||||||
printerInstalled = AddPdfScribePrinter();
|
if (AddPdfScribePrinter())
|
||||||
|
printerInstalled = ConfigurePdfScribePort();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -459,12 +463,12 @@ namespace PdfScribe
|
|||||||
|
|
||||||
public bool RemovePDFScribePrinterDriver()
|
public bool RemovePDFScribePrinterDriver()
|
||||||
{
|
{
|
||||||
bool printerRemoved = NativeMethods.DeletePrinterDriverEx(null, ENVIRONMENT_64, DRIVERNAME, DPD_DELETE_UNUSED_FILES, 3);
|
bool driverRemoved = NativeMethods.DeletePrinterDriverEx(null, ENVIRONMENT_64, DRIVERNAME, DPD_DELETE_UNUSED_FILES, 3);
|
||||||
if (!printerRemoved)
|
if (!driverRemoved)
|
||||||
{
|
{
|
||||||
throw new Win32Exception(Marshal.GetLastWin32Error(), "Could not remove PDF Scribe printer driver");
|
throw new Win32Exception(Marshal.GetLastWin32Error(), "Could not remove PDF Scribe printer driver");
|
||||||
}
|
}
|
||||||
return printerRemoved;
|
return driverRemoved;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -526,5 +530,48 @@ namespace PdfScribe
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
#region Configuration and Registry changes
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
public bool ConfigurePdfScribePort_Test()
|
||||||
|
{
|
||||||
|
return ConfigurePdfScribePort();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
private bool ConfigurePdfScribePort()
|
||||||
|
{
|
||||||
|
bool registryChangesMade = false;
|
||||||
|
// Add all the registry info
|
||||||
|
// for the port and monitor
|
||||||
|
RegistryKey portConfiguration = Registry.LocalMachine.CreateSubKey("SYSTEM\\CurrentControlSet\\Control\\Print\\Monitors\\" +
|
||||||
|
PORTMONITOR +
|
||||||
|
"\\Ports\\" + PORTNAME);
|
||||||
|
try
|
||||||
|
{
|
||||||
|
portConfiguration.SetValue("Description", "PDF Scribe", RegistryValueKind.String);
|
||||||
|
portConfiguration.SetValue("Command", "", RegistryValueKind.String);
|
||||||
|
portConfiguration.SetValue("Arguments", "", RegistryValueKind.String);
|
||||||
|
portConfiguration.SetValue("Printer", "", RegistryValueKind.String);
|
||||||
|
portConfiguration.SetValue("Output", 0, RegistryValueKind.DWord);
|
||||||
|
portConfiguration.SetValue("ShowWindow", 0, RegistryValueKind.DWord);
|
||||||
|
portConfiguration.SetValue("RunUser", 1, RegistryValueKind.DWord);
|
||||||
|
portConfiguration.SetValue("Delay", 300, RegistryValueKind.DWord);
|
||||||
|
portConfiguration.SetValue("LogFileUse", 0, RegistryValueKind.DWord);
|
||||||
|
portConfiguration.SetValue("LogFileName", "", RegistryValueKind.String);
|
||||||
|
portConfiguration.SetValue("LogFileDebug", 0, RegistryValueKind.DWord);
|
||||||
|
portConfiguration.SetValue("PrintError", 0, RegistryValueKind.DWord);
|
||||||
|
registryChangesMade = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
catch (UnauthorizedAccessException)
|
||||||
|
{ }
|
||||||
|
catch (SecurityException)
|
||||||
|
{ }
|
||||||
|
|
||||||
|
return registryChangesMade;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -103,12 +103,6 @@
|
|||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
<Compile Include="UnitTests.cs" />
|
<Compile Include="UnitTests.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
|
||||||
<ProjectReference Include="..\PdfScribe\PdfScribe.csproj">
|
|
||||||
<Project>{1EAD8E9A-A123-4C37-B31E-AEE1354DF003}</Project>
|
|
||||||
<Name>PdfScribe</Name>
|
|
||||||
</ProjectReference>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="App.config" />
|
<None Include="App.config" />
|
||||||
<None Include="app.manifest" />
|
<None Include="app.manifest" />
|
||||||
@ -135,6 +129,12 @@
|
|||||||
<Install>true</Install>
|
<Install>true</Install>
|
||||||
</BootstrapperPackage>
|
</BootstrapperPackage>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\PdfScribeCore\PdfScribeCore.csproj">
|
||||||
|
<Project>{1EAD8E9A-A123-4C37-B31E-AEE1354DF003}</Project>
|
||||||
|
<Name>PdfScribeCore</Name>
|
||||||
|
</ProjectReference>
|
||||||
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||||
Other similar extension points exist, see Microsoft.Common.targets.
|
Other similar extension points exist, see Microsoft.Common.targets.
|
||||||
|
@ -5,7 +5,7 @@ using System.Text;
|
|||||||
|
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
|
|
||||||
using PdfScribe;
|
using PdfScribeCore;
|
||||||
|
|
||||||
namespace PdfScribeUnitTests
|
namespace PdfScribeUnitTests
|
||||||
{
|
{
|
||||||
@ -21,7 +21,7 @@ namespace PdfScribeUnitTests
|
|||||||
public void Test_DeletePdfScribePort()
|
public void Test_DeletePdfScribePort()
|
||||||
{
|
{
|
||||||
var scribeInstaller = new PdfScribeInstaller();
|
var scribeInstaller = new PdfScribeInstaller();
|
||||||
scribeInstaller.DeletePdfScribePort("SSCAN");
|
scribeInstaller.DeletePdfScribePort("PDFSCRIBE:");
|
||||||
}
|
}
|
||||||
|
|
||||||
//[Test]
|
//[Test]
|
||||||
@ -31,18 +31,25 @@ namespace PdfScribeUnitTests
|
|||||||
scribeInstaller.RemovePDFScribePrinterDriver();
|
scribeInstaller.RemovePDFScribePrinterDriver();
|
||||||
}
|
}
|
||||||
|
|
||||||
//[Test]
|
[Test]
|
||||||
public void Test_InstallPdfScribePrinter()
|
public void Test_InstallPdfScribePrinter()
|
||||||
{
|
{
|
||||||
var scribeInstaller = new PdfScribeInstaller();
|
var scribeInstaller = new PdfScribeInstaller();
|
||||||
scribeInstaller.InstallSoftscanPrinter_Test();
|
scribeInstaller.InstallSoftscanPrinter_Test();
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
//[Test]
|
||||||
public void Test_UninstallPdfScribePrinter()
|
public void Test_UninstallPdfScribePrinter()
|
||||||
{
|
{
|
||||||
var scribeInstaller = new PdfScribeInstaller();
|
var scribeInstaller = new PdfScribeInstaller();
|
||||||
scribeInstaller.UninstallPdfScribePrinter();
|
scribeInstaller.UninstallPdfScribePrinter();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//[Test]
|
||||||
|
public void Test_RemovePdfScribePortMonitor()
|
||||||
|
{
|
||||||
|
var scribeInstaller = new PdfScribeInstaller();
|
||||||
|
scribeInstaller.RemovePdfScribePortMonitor();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user