Skip to content

Commit

Permalink
Upload 20240916
Browse files Browse the repository at this point in the history
  • Loading branch information
cjhdevact committed Sep 16, 2024
1 parent 5b0f281 commit 9154c2a
Show file tree
Hide file tree
Showing 34 changed files with 1,539 additions and 1,058 deletions.
Binary file modified Assets/uimain.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Assets/uisetting.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
41 changes: 22 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,42 +1,45 @@
# UsefulControl - 实用工具集合小工具

### 一款为大屏类电脑(如希沃)编写的实用工具,当然普通电脑也可以使用。
### 转到[发布页](https://github.com/cjhdevact/UsefulControl/releases)下载程序或源代码。 ###
### 早期版本的源代码也在发布页里。 ###
## 关于本项目

------------
这是一个为大屏类电脑(如希沃)编写的实用工具,可以理解为一堆工具的整合包。本软件可以安装在大屏上(例如教学大屏),也可以安装在普通电脑上。

## 程序截图 ##
## 功能

本程序支持的功能有:

### 工具栏界面 ###
- [x] 系统操作(睡眠,休眠,锁定,关闭屏幕,调节音量,强制重启,强制关机)
- [x] 小工具系列(时钟锁屏屏保,公告栏,图片展示)
- [x] 模拟界面系列(模拟希沃联想关机界面,模拟系统关机界面,模拟黑屏)
- [x] 支持通过组策略配置策略
- [x] 支持保存你的设置

## 下载

横向:

转到[发布页](https://github.com/cjhdevact/UsefulControl/releases)下载程序或源代码。

![工具栏界面(横向深色)](Assets/ui1.png) ![工具栏界面(横向浅色)](Assets/ui1light.png)
早期版本的源代码也在发布页里。

## 程序截图

纵向:
### 工具栏界面

横向:

![工具栏界面(纵向深色](Assets/ui2.png) ![工具栏界面(纵向浅色](Assets/ui2light.png)
![工具栏界面(横向深色](Assets/ui1.png) ![工具栏界面(横向浅色](Assets/ui1light.png)

纵向:

### 主程序界面 ###
![工具栏界面(纵向深色)](Assets/ui2.png) ![工具栏界面(纵向浅色)](Assets/ui2light.png)

### 主程序界面

![主程序界面(浅色)](Assets/uimain.png)


### 设置界面 ###

### 设置界面

![设置界面](Assets/uisetting.png)

## License

------------


#### 本程序基于 `GPL-3.0` 授权。 ####
本程序基于`GPL-3.0`协议授权。
Binary file modified Src/UsefulControl.suo
Binary file not shown.
3 changes: 3 additions & 0 deletions Src/UsefulControl/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,7 @@
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0,Profile=Client" />
</startup>
<appSettings>
<add key="EnableWindowsFormsHighDpiAutoResizing" value="true" />
</appSettings>
</configuration>
48 changes: 47 additions & 1 deletion Src/UsefulControl/BootForm.vb
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,50 @@ Public Class BootForm

FakeShutdownForm.Timer1.Enabled = True
Uif = 1
FakeShutdownForm.FakeMode = 0
FakeShutdownForm.ShowDialog()
End
'ElseIf Command().ToLower = "/fakeshutdownui" Then
' FakeShutdownForm.PictureBox1.Visible = True
' FakeShutdownForm.Label1.Visible = True
' Me.WindowState = FormWindowState.Minimized
' FakeShutdownForm.Timer1.Enabled = False
' FakeShutdownForm.ShowDialog()
' End
ElseIf Command().ToLower = "/fakeshutdownlenovo" Then
Me.WindowState = FormWindowState.Minimized
Me.Hide()
Me.Visible = False

Try
For Each TargetNamea As String In NavTargetNames
Shell("taskkill.exe /f /im " & TargetNamea & ".exe", AppWinStyle.Hide)
Shell("taskkill.exe /f /im " & TargetNamea & "*", AppWinStyle.Hide)
Next

For Each TargetName As String In NavTargetNames
'Dim TargetName As String = "fmp" '存储进程名为文本型,注:进程名不加扩展名
Dim TargetKill() As Process = Process.GetProcessesByName(TargetName) '从进程名获取进程
Dim TargetPath As String '存储进程路径为文本型
If TargetKill.Length > 1 Then '判断进程名的数量,如果同名进程数量在2个以上,用For循环关闭进程。
For i = 0 To TargetKill.Length - 1
TargetPath = TargetKill(i).MainModule.FileName
TargetKill(i).Kill()
Next
'ElseIf TargetKill.Length = 0 Then '判断进程名的数量,没有发现进程直接弹窗。不需要的,可直接删掉该If子句
' Exit Sub
ElseIf TargetKill.Length = 1 Then '判断进程名的数量,如果只有一个,就不用For循环
TargetKill(0).Kill()
End If
'Me.Dispose(1) '关闭自身进程
Next
Catch ex As Exception
End Try


FakeShutdownForm.Timer1.Enabled = True
Uif = 1
FakeShutdownForm.FakeMode = 1
FakeShutdownForm.ShowDialog()
End
'ElseIf Command().ToLower = "/fakeshutdownui" Then
Expand Down Expand Up @@ -700,7 +744,9 @@ Public Class BootForm
If Not (Command().ToLower = "/topbar" Or Command().ToLower = "/bottombar" Or Command().ToLower = "/lefttopbar" Or Command().ToLower = "/righttopbar" Or Command().ToLower = "/leftbottombar" Or Command().ToLower = "/rightbottombar" Or Command().ToLower = "/leftbar" Or Command().ToLower = "/rightbar") Then
'Me.Hide()
'Me.WindowState = FormWindowState.Minimized
Me.Location = New Point(-50, -50)
Dim SysDpiX As Single = Me.CreateGraphics().DpiX / 96
Dim SysDpiY As Single = Me.CreateGraphics().DpiY / 96
Me.Location = New Point(-(Me.Width + 5 * SysDpiX), -(Me.Height + 5 * SysDpiY))
Form1.Show()
End If
End Sub
Expand Down
1 change: 1 addition & 0 deletions Src/UsefulControl/FakeShutdownForm.Designer.vb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion Src/UsefulControl/FakeShutdownForm.vb
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ Public Class FakeShutdownForm
End Function

Public a As Integer
Public FakeMode As Integer
Private Sub FakeShutdownForm_MouseDoubleClick(sender As System.Object, e As System.EventArgs) Handles MyBase.MouseDoubleClick
If a = 5 Then
Me.Close()
Expand All @@ -55,6 +56,7 @@ Public Class FakeShutdownForm
For i As Integer = 1 To 50
SendMessageW(Me.Handle, &H319, Me.Handle, New IntPtr(down))
Next
Me.TableLayoutPanel1.BackgroundImage = Nothing
End Sub
Private Sub TableLayoutPanel1_MouseDoubleClick(sender As System.Object, e As System.EventArgs) Handles TableLayoutPanel1.MouseDoubleClick
If a = 5 Then
Expand All @@ -67,8 +69,12 @@ Public Class FakeShutdownForm
Private Sub Timer1_Tick(sender As System.Object, e As System.EventArgs) Handles Timer1.Tick
Me.PictureBox1.Visible = False
Me.Label1.Visible = False
If FakeMode = 1 Then
Me.TableLayoutPanel1.BackgroundImage = My.Resources.lenovoshut
Else
SeewoFakeShut.Show()
End If
'Form1.ChangeMonitorState(Form1.MonitorMode.MonitorOff)
SeewoFakeShut.Show()
Timer1.Enabled = False
End Sub
End Class
Loading

0 comments on commit 9154c2a

Please sign in to comment.