Merge branch 'master' of https://github.com/stchan/pdfscribe
This commit is contained in:
commit
a1bb7806a6
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -77,7 +77,6 @@ Global
|
|||||||
{8562A5BC-A70E-40DD-A7E7-5611D332A983}.Debug|x86.ActiveCfg = Debug|Any CPU
|
{8562A5BC-A70E-40DD-A7E7-5611D332A983}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||||
{8562A5BC-A70E-40DD-A7E7-5611D332A983}.Debug|x86.Build.0 = Debug|Any CPU
|
{8562A5BC-A70E-40DD-A7E7-5611D332A983}.Debug|x86.Build.0 = Debug|Any CPU
|
||||||
{8562A5BC-A70E-40DD-A7E7-5611D332A983}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{8562A5BC-A70E-40DD-A7E7-5611D332A983}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{8562A5BC-A70E-40DD-A7E7-5611D332A983}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{8562A5BC-A70E-40DD-A7E7-5611D332A983}.Release|x64.ActiveCfg = Release|Any CPU
|
{8562A5BC-A70E-40DD-A7E7-5611D332A983}.Release|x64.ActiveCfg = Release|Any CPU
|
||||||
{8562A5BC-A70E-40DD-A7E7-5611D332A983}.Release|x64.Build.0 = Release|Any CPU
|
{8562A5BC-A70E-40DD-A7E7-5611D332A983}.Release|x64.Build.0 = Release|Any CPU
|
||||||
{8562A5BC-A70E-40DD-A7E7-5611D332A983}.Release|x86.ActiveCfg = Release|Any CPU
|
{8562A5BC-A70E-40DD-A7E7-5611D332A983}.Release|x86.ActiveCfg = Release|Any CPU
|
||||||
|
@ -1,41 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Windows;
|
|
||||||
|
|
||||||
using APICodePack = Microsoft.WindowsAPICodePack.Dialogs;
|
|
||||||
|
|
||||||
namespace PdfScribeCore
|
|
||||||
{
|
|
||||||
public class ErrorDialogPresenter : TaskDialogPresenter
|
|
||||||
{
|
|
||||||
protected override APICodePack.TaskDialogStandardIcon DefaultTaskIcon
|
|
||||||
{
|
|
||||||
get { return APICodePack.TaskDialogStandardIcon.Error; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public ErrorDialogPresenter()
|
|
||||||
: base()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Ctor that shows the
|
|
||||||
/// task dialog immediately
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="captionText">Text that goes in the window caption</param>
|
|
||||||
/// <param name="instructionText">Instructional text (Appears next to the icon)</param>
|
|
||||||
/// <param name="messageText">Smaller message detail text at bottom</param>
|
|
||||||
public ErrorDialogPresenter(String captionText,
|
|
||||||
String instructionText,
|
|
||||||
String messageText) :
|
|
||||||
base(captionText, instructionText, messageText)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,74 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Windows;
|
|
||||||
|
|
||||||
using APICodePack = Microsoft.WindowsAPICodePack.Dialogs;
|
|
||||||
|
|
||||||
namespace PdfScribeCore
|
|
||||||
{
|
|
||||||
public abstract class TaskDialogPresenter
|
|
||||||
{
|
|
||||||
|
|
||||||
protected abstract APICodePack.TaskDialogStandardIcon DefaultTaskIcon { get; } // Override this to set the dialog icon you want
|
|
||||||
|
|
||||||
|
|
||||||
public TaskDialogPresenter()
|
|
||||||
{ }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Ctor that shows the
|
|
||||||
/// task dialog immediately
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="captionText">Text that goes in the window caption</param>
|
|
||||||
/// <param name="instructionText">Instructional text (Appears next to the icon)</param>
|
|
||||||
/// <param name="messageText">Smaller message detail text at bottom</param>
|
|
||||||
public TaskDialogPresenter(String captionText,
|
|
||||||
String instructionText,
|
|
||||||
String messageText)
|
|
||||||
{
|
|
||||||
ShowSimple(captionText, instructionText, messageText);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Pops up a simple TaskDialog box
|
|
||||||
/// with just a Close button and
|
|
||||||
/// the default standard dialog icon
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="captionText">Text that goes in the window's caption</param>
|
|
||||||
/// <param name="instructionText">Instructional text (Appears next to the error icon)</param>
|
|
||||||
/// <param name="messageText">Smaller message detail text at bottom</param>
|
|
||||||
public virtual void ShowSimple(String captionText,
|
|
||||||
String instructionText,
|
|
||||||
String messageText)
|
|
||||||
{
|
|
||||||
using (APICodePack.TaskDialog simpleTaskDialog = new APICodePack.TaskDialog())
|
|
||||||
{
|
|
||||||
simpleTaskDialog.Caption = captionText;
|
|
||||||
simpleTaskDialog.InstructionText = instructionText;
|
|
||||||
simpleTaskDialog.Text = messageText;
|
|
||||||
simpleTaskDialog.Icon = this.DefaultTaskIcon;
|
|
||||||
simpleTaskDialog.StandardButtons = APICodePack.TaskDialogStandardButtons.Close;
|
|
||||||
simpleTaskDialog.Opened += new EventHandler(simpleTaskDialog_Opened);
|
|
||||||
simpleTaskDialog.StartupLocation = APICodePack.TaskDialogStartupLocation.CenterScreen;
|
|
||||||
simpleTaskDialog.Show();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void simpleTaskDialog_Opened(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
// Really fucking annoying -
|
|
||||||
// There's a bug somewhere in the API Code Pack that
|
|
||||||
// causes the icon not to show
|
|
||||||
// unless you set it on the Opened event
|
|
||||||
// See: http://stackoverflow.com/questions/15645592/taskdialogstandardicon-not-working-on-task-dialog
|
|
||||||
// One of these days I'll try to find and fix it (honestly I hope
|
|
||||||
// someone else fixes first - also why isn't the API Code pack on codeplex
|
|
||||||
// or github so people can push patches), but until then...
|
|
||||||
((APICodePack.TaskDialog)sender).Icon = this.DefaultTaskIcon;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,48 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<asmv1:assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
|
||||||
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
|
|
||||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
|
|
||||||
<security>
|
|
||||||
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
|
|
||||||
<!-- UAC Manifest Options
|
|
||||||
If you want to change the Windows User Account Control level replace the
|
|
||||||
requestedExecutionLevel node with one of the following.
|
|
||||||
|
|
||||||
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
|
|
||||||
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
|
|
||||||
<requestedExecutionLevel level="highestAvailable" uiAccess="false" />
|
|
||||||
|
|
||||||
Specifying requestedExecutionLevel node will disable file and registry virtualization.
|
|
||||||
If you want to utilize File and Registry Virtualization for backward
|
|
||||||
compatibility then delete the requestedExecutionLevel node.
|
|
||||||
-->
|
|
||||||
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
|
|
||||||
</requestedPrivileges>
|
|
||||||
</security>
|
|
||||||
</trustInfo>
|
|
||||||
|
|
||||||
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
|
|
||||||
<application>
|
|
||||||
<!-- A list of all Windows versions that this application is designed to work with. Windows will automatically select the most compatible environment.-->
|
|
||||||
|
|
||||||
<!-- If your application is designed to work with Windows 7, uncomment the following supportedOS node-->
|
|
||||||
<!--<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>-->
|
|
||||||
|
|
||||||
</application>
|
|
||||||
</compatibility>
|
|
||||||
|
|
||||||
<!-- Enable themes for Windows common controls and dialogs (Windows XP and later) -->
|
|
||||||
<!-- <dependency>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity
|
|
||||||
type="win32"
|
|
||||||
name="Microsoft.Windows.Common-Controls"
|
|
||||||
version="6.0.0.0"
|
|
||||||
processorArchitecture="*"
|
|
||||||
publicKeyToken="6595b64144ccf1df"
|
|
||||||
language="*"
|
|
||||||
/>
|
|
||||||
</dependentAssembly>
|
|
||||||
</dependency>-->
|
|
||||||
|
|
||||||
</asmv1:assembly>
|
|
Loading…
Reference in New Issue
Block a user