Skip to content

Commit

Permalink
Merge pull request #50 from ironmansoftware/cmdlets
Browse files Browse the repository at this point in the history
Form Designer for Cmdlets.
  • Loading branch information
adamdriscoll authored Jul 3, 2024
2 parents 84b95d7 + e398bd7 commit 0697b2f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 63 deletions.
4 changes: 0 additions & 4 deletions PowerShellToolsPro.Cmdlets/PowerShellToolsPro.Cmdlets.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,7 @@
<None Include="app.config" />
<None Include="CreateHelp.ps1" />
<None Include="Help\about_MergeScriptConfig.md" />
<None Include="Help\ConvertTo-CSharp.md" />
<None Include="Help\ConvertTo-PowerShell.md" />
<None Include="Help\Install-PoshProToolsLicense.md" />
<None Include="Help\Merge-Script.md" />
<None Include="Help\Send-PoshProToolsTrialLicense.md" />
<None Include="packages.config" />
<None Include="Tests\ConvertToCSharp.tests.ps1" />
<None Include="Tests\ConvertToPowerShell.tests.ps1" />
Expand Down
38 changes: 0 additions & 38 deletions PowerShellToolsPro.Cmdlets/ShowPSScriptPadCommand.cs

This file was deleted.

13 changes: 2 additions & 11 deletions PowerShellToolsPro.Cmdlets/ShowWinFormDesignerCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ public class ShowWinFormDesignerCommand : PSCmdlet
[Parameter(Mandatory = true)]
public string CodeFilePath { get; set; }

[Parameter()]
public string Key { get; set; }

protected override void EndProcessing()
{
var windows = SessionState.PSVariable.GetValue("IsWindows");
Expand All @@ -26,18 +23,12 @@ protected override void EndProcessing()
}

var assemblyBasePath = Path.GetDirectoryName(GetType().Assembly.Location);
var designer = Path.Combine(assemblyBasePath, "FormDesigner", "PSScriptPad.exe");

var keyArg = string.Empty;
if (!string.IsNullOrEmpty(Key))
{
keyArg = $"-key=\"{Key}\"";
}
var designer = Path.Combine(assemblyBasePath, "FormDesigner", "WinFormDesigner.exe");

var process = new Process();
process.StartInfo = new ProcessStartInfo();
process.StartInfo.FileName = designer;
process.StartInfo.Arguments = $"-c=\"{CodeFilePath}\" -d=\"{DesignerFilePath}\" {keyArg}";
process.StartInfo.Arguments = $"-c \"{CodeFilePath}\" -d \"{DesignerFilePath}\"";
process.Start();
}
}
Expand Down
12 changes: 2 additions & 10 deletions PowerShellToolsPro.Cmdlets/post-build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
$ManifestPath = Join-Path $OutDir PowerShellProTools.psd1
Remove-Item $ManifestPath -ErrorAction SilentlyContinue

$Version = "2024.3.0"
$Version = "2024.7.0"
#$prerelease = "-beta1"

$powerShellGet = Import-Module PowerShellGet -PassThru -ErrorAction Ignore -RequiredVersion 2.2.5
Expand All @@ -20,15 +20,7 @@ $Arguments = @{
Description = "PowerShell script packaging, profiling, WPF and Windows Forms design, and desktop automation."
ReleaseNotes = "https://docs.poshtools.com/powershell-pro-tools-module"
AliasesToExport = @("pad")
CmdletsToExport = @("Merge-Script",
"Measure-Block",
"Measure-Script",
"Show-WinFormDesigner",
"ConvertTo-WinForm",
"Show-PSScriptPad",
"Set-Hotkey",
"Get-Hotkey",
"Remove-Hotkey")
CmdletsToExport = @("Merge-Script", "Show-WinFormDesigner","ConvertTo-WinForm","Show-PSScriptPad")
ModuleVersion = $Version
}

Expand Down

0 comments on commit 0697b2f

Please sign in to comment.