Skip to content

Commit

Permalink
Merge branch 'interface'
Browse files Browse the repository at this point in the history
  • Loading branch information
basildane committed Oct 31, 2016
2 parents e2b1c69 + 8161f39 commit 4c3f89c
Show file tree
Hide file tree
Showing 44 changed files with 9,027 additions and 9,136 deletions.
5 changes: 4 additions & 1 deletion ApplicationEvents.vb
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,10 @@ Namespace My
If (Application.Info.Version.Revision > 0) Then
version &= " BETA " & Application.Info.Version.Revision
End If
Splash.ShowSplash(Resources.Splash, Resources.Strings.Title, version, Resources.Strings.Copyright)

If (Settings.ShowSplash) Then
Splash.ShowSplash(Resources.Splash, Resources.Strings.Title, version, Resources.Strings.Copyright)
End If

End Sub

Expand Down
2 changes: 1 addition & 1 deletion AssemblyInfo.vb
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Imports System.Runtime.InteropServices
' You can specify all the values or you can default the Build and Revision Numbers
' by using the '*' as shown below:

<Assembly: AssemblyVersion("2.11.11.0")>
<Assembly: AssemblyVersion("2.11.12.0")>

<Assembly: ComVisibleAttribute(False)>
<Assembly: NeutralResourcesLanguageAttribute("en-US")>
18 changes: 4 additions & 14 deletions Console/WakeOnLanC/Module1.vb
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ Public Module Module1
Dim _mode As ModeTypes = ModeTypes.None
Dim _result As Integer = ErrorCodes.Ok
Dim _path As String = String.Empty
Dim _interface As String = String.Empty

Function Main() As Integer
Console.ForegroundColor = ConsoleColor.Green
Expand Down Expand Up @@ -111,14 +110,6 @@ Public Module Module1
i += 1
_group = My.Application.CommandLineArgs.Item(i)

Case "-if"
If i = My.Application.CommandLineArgs.Count - 1 Then
BadCommand()
Return ErrorCodes.InvalidCommand
End If
i += 1
_interface = My.Application.CommandLineArgs.Item(i)

Case "-all"
_all = True

Expand Down Expand Up @@ -218,7 +209,6 @@ Public Module Module1
Console.WriteLine("-l (listen for WOL packets)")
Console.WriteLine("-e (enumerate machine list)")
Console.WriteLine("-p (path to machines.xml (optional))")
Console.WriteLine("-if (select Interface (example -if 192.168.0.20) (optional))")
Console.WriteLine("-msg (immediate message (example -msg -c ""Shutting down in 10 minutes"")")
Console.WriteLine(" Optional: Use -m to send message to a remote machine.")
Console.WriteLine("-d (debug) requires -m")
Expand Down Expand Up @@ -262,7 +252,7 @@ Public Module Module1
Console.WriteLine("Cannot find MAC address for " & machine.Name)
Else
Console.WriteLine("waking up mac: " & machine.MAC)
WakeUp(machine, _interface)
WakeUp(machine)
End If
Next
Return _result
Expand Down Expand Up @@ -292,12 +282,12 @@ Public Module Module1
Else
Console.WriteLine(machine.Netbios)
End If
WakeUp(machine, _interface)
WakeUp(machine)
Return ErrorCodes.Ok

ElseIf _mac.Length Then
Console.WriteLine("waking up mac: " & _mac)
WakeUp(_mac, _interface)
WakeUp(_mac)
Return ErrorCodes.Ok

ElseIf _group.Length Then
Expand All @@ -313,7 +303,7 @@ Public Module Module1
Console.WriteLine("waking up group: " & _group)
For Each machine In From machine1 As Machine In Machines Where machine1.Group = _group
Console.WriteLine(" > " & machine.Name)
WakeUp(machine, _interface)
WakeUp(machine)
Thread.Sleep(500)
Next
Console.WriteLine("Done.")
Expand Down
4 changes: 2 additions & 2 deletions Console/WakeOnLanC/My Project/AssemblyInfo.vb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Imports System.Runtime.InteropServices
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>

<Assembly: AssemblyVersion("2.11.11.0")>
<Assembly: AssemblyFileVersion("2.11.11.0")>
<Assembly: AssemblyVersion("2.11.12.0")>
<Assembly: AssemblyFileVersion("2.11.12.0")>

<Assembly: NeutralResourcesLanguageAttribute("en-US")>
11 changes: 4 additions & 7 deletions Console/WakeOnLanC/Wake.vb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
Imports Machines

Module Wake
Public Sub WakeUp(ByVal machine As Machine, ByVal adapter As String)
Public Sub WakeUp(ByVal machine As Machine)
Dim host As String

Try
Expand All @@ -27,11 +27,8 @@ Module Wake
Else
host = machine.Netbios
End If
If String.IsNullOrEmpty(Adapter) Then
Adapter = machine.Adapter
End If

WOL.AquilaWolLibrary.WakeUp(machine.MAC, host, machine.UDPPort, machine.TTL, adapter)
WOL.AquilaWolLibrary.WakeUp(machine.MAC, host, machine.UDPPort, machine.TTL)
WOL.AquilaWolLibrary.WriteLog(String.Format("WakeUp sent to ""{0}""", machine.Name), EventLogEntryType.Information, WOL.AquilaWolLibrary.EventId.WakeUp)

Catch ex As Exception
Expand All @@ -42,8 +39,8 @@ Module Wake

End Sub

Public Sub WakeUp(ByVal mac As String, ByVal adapter As String)
WOL.AquilaWolLibrary.WakeUp(MAC, adapter:=adapter)
Public Sub WakeUp(ByVal mac As String)
WOL.AquilaWolLibrary.WakeUp(mac)
End Sub

End Module
3 changes: 2 additions & 1 deletion Console/WakeOnLanC/WakeOnLanC.vbproj
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<None Include="build.ps1" />
<None Include="My Project\app.manifest" />
<None Include="My Project\Application.myapp">
<Generator>MyApplicationCodeGenerator</Generator>
Expand Down Expand Up @@ -312,7 +313,7 @@
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.VisualBasic.targets" />
<PropertyGroup>
<PostBuildEvent>"C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6 Tools\x64\sgen.exe" "$(TargetDir)$(TargetFileName)" /force</PostBuildEvent>
<PostBuildEvent>Powershell -File "$(ProjectDir)build.ps1" -config $(ConfigurationName) -source $(SolutionDir) -project $(ProjectName) -target $(TargetPath)</PostBuildEvent>
</PropertyGroup>
<!-- 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.
Expand Down
46 changes: 46 additions & 0 deletions Console/WakeOnLanC/build.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# WakeOnLAN - Wake On LAN
# Copyright (C) 2004-2016 Aquila Technology, LLC. <[email protected]>
#
# This file is part of WakeOnLAN.
#
# WakeOnLAN is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# WakeOnLAN is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with WakeOnLAN. If not, see <http://www.gnu.org/licenses/>.

Param([string]$config, [string]$source, [string]$project, [string]$target)

if($config -ne 'Release')
{
exit 0
}

$sgen = "${Env:ProgramFiles(x86)}\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6 Tools\x64\sgen.exe"
$signtool = "${Env:ProgramFiles(x86)}\Windows Kits\10\bin\x64\signtool.exe"
$subject = "Open Source Developer, Phillip Tull"

Try
{
# generate XML serializer
& $sgen "$target" /force

# sign the DLL
& $signtool sign /a /n "$subject" /fd sha1 /t http://timestamp.comodoca.com/authenticode /d "$project" "$target"
& $signtool sign /a /n "$subject" /as /fd sha256 /td sha256 /tr http://timestamp.comodoca.com/rfc3161 /d "$project" "$target"
}
Catch [system.exception]
{
"Error"
exit 1
}

echo "Build.ps1 $config completed"
exit 0
18 changes: 8 additions & 10 deletions Crash.de.resx
Original file line number Diff line number Diff line change
Expand Up @@ -117,22 +117,20 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="$this.Text" xml:space="preserve">
<value>Absturz</value>
</data>
<data name="Cancel_Button.Text" xml:space="preserve">
<value>Abbrechen</value>
</data>
<data name="GroupBox1.Text" xml:space="preserve">
<value>Fehlermeldung</value>
</data>
<data name="GroupBox2.Text" xml:space="preserve">
<value>Stack Trace</value>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="lTitle.Size" type="System.Drawing.Size, System.Drawing">
<value>326, 20</value>
</data>
<data name="lTitle.Text" xml:space="preserve">
<value>Ein unerwarteter Fehler ist aufgetreten.</value>
</data>
<data name="OK_Button.Text" xml:space="preserve">
<value>OK</value>
<data name="GroupBox1.Text" xml:space="preserve">
<value>Fehlermeldung</value>
</data>
<data name="$this.Text" xml:space="preserve">
<value>Absturz</value>
</data>
</root>
Loading

0 comments on commit 4c3f89c

Please sign in to comment.