mirror of
https://github.com/snltty/linker.git
synced 2025-10-30 20:16:53 +08:00
有一定的更新
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import { sendWebsocketMsg } from './request'
|
||||
|
||||
|
||||
export const notifyUpdate = (speed, msg, star) => {
|
||||
export const notifyUpdate = (speed, msg, star1, star2, star3) => {
|
||||
return sendWebsocketMsg('notify/update', {
|
||||
speed, msg, star
|
||||
speed, msg, star1, star2, star3
|
||||
});
|
||||
}
|
||||
@@ -11,6 +11,9 @@
|
||||
<el-form-item label="截屏缩放" prop="ScreenScale">
|
||||
<el-input-number size="large" v-model="state.form.ScreenScale" :min="0.1" :max="1" :step="0.1" controls-position="right" />
|
||||
</el-form-item>
|
||||
<el-form-item label="保存配置" prop="SaveSetting">
|
||||
<el-checkbox v-model="state.form.SaveSetting">保存限制配置</el-checkbox>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<template #footer>
|
||||
@@ -40,6 +43,7 @@ export default {
|
||||
ReportDelay: 0,
|
||||
ScreenDelay: 0,
|
||||
ScreenScale: 0,
|
||||
SaveSetting: true,
|
||||
}
|
||||
});
|
||||
watch(() => state.show, (val) => {
|
||||
@@ -55,6 +59,7 @@ export default {
|
||||
state.form.ReportDelay = res.ReportDelay;
|
||||
state.form.ScreenDelay = res.ScreenDelay;
|
||||
state.form.ScreenScale = res.ScreenScale;
|
||||
state.form.SaveSetting = res.SaveSetting;
|
||||
}).catch(() => {
|
||||
});
|
||||
}
|
||||
|
||||
@@ -7,9 +7,17 @@
|
||||
<el-checkbox v-model="data.Share.Lock.Value.notify" size="small">广播</el-checkbox>
|
||||
</template>
|
||||
</h5>
|
||||
<div>
|
||||
<div class="stars">
|
||||
<template v-if="data.Share.Lock.Value.type == 'remark-block' || data.Share.Lock.Value.type == 'remark-cpp'">
|
||||
<el-rate @change="handleStarChange" v-model="data.Share.Lock.Value.star" size="large" />
|
||||
<div class="line flex flex-nowrap"><span>读题分析</span>
|
||||
<el-rate @change="handleStarChange" v-model="data.Share.Lock.Value.star1" size="large" />
|
||||
</div>
|
||||
<div class="line flex flex-nowrap"><span>程序设计</span>
|
||||
<el-rate @change="handleStarChange" v-model="data.Share.Lock.Value.star2" size="large" />
|
||||
</div>
|
||||
<div class="line flex flex-nowrap"><span>数据校验</span>
|
||||
<el-rate @change="handleStarChange" v-model="data.Share.Lock.Value.star3" size="large" />
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
<div>
|
||||
@@ -72,7 +80,7 @@ export default {
|
||||
if (res) {
|
||||
ElMessage.success('操作成功!');
|
||||
if (value.notify) {
|
||||
notifyUpdate(2, props.data.Share.UserName.Value, value.star);
|
||||
notifyUpdate(2, props.data.Share.UserName.Value, value.star1, value.star2, value.star3);
|
||||
}
|
||||
} else {
|
||||
ElMessage.error('操作失败!');
|
||||
@@ -116,7 +124,7 @@ export default {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
transform: translateX(-50%) translateY(-70%);
|
||||
transform: translateX(-50%) translateY(-50%);
|
||||
text-align: center;
|
||||
border: 1px solid rgba(255, 255, 255, 0.5);
|
||||
background-color: rgba(0, 0, 0, 0.3);
|
||||
@@ -136,9 +144,22 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
.stars {
|
||||
padding: 0.2rem 0 1rem 0;
|
||||
font-size: 1.2rem;
|
||||
color: #fff;
|
||||
|
||||
.line {
|
||||
padding: 0.6rem 0 0.4rem 0;
|
||||
|
||||
&>span {
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.el-rate.el-rate--large {
|
||||
height: inherit;
|
||||
padding: 0.6rem 0 1.6rem 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ export default {
|
||||
Share: {
|
||||
KeyBoard: { Index: 0, Value: '' },
|
||||
UserName: { Index: 1, Value: '' },
|
||||
Lock: { Index: 2, Value: { type: 'list', val: 'none', star: 0, notify: false }, TypeText: '' },
|
||||
Lock: { Index: 2, Value: { type: 'list', val: 'none', star1: 0, star2: 0, star3: 0, notify: false }, TypeText: '' },
|
||||
|
||||
draw(canvas, ctx) {
|
||||
if (this.KeyBoard.Value) {
|
||||
@@ -33,7 +33,9 @@ export default {
|
||||
ctx.strokeText(str, left, top);
|
||||
|
||||
str = '';
|
||||
str = str.padEnd(this.Lock.Value.star, '☆');
|
||||
const value = this.Lock.Value;
|
||||
const star = parseInt((value.star1 + value.star2 + value.star3) / 3);
|
||||
str = str.padEnd(star, '☆');
|
||||
ctx.lineWidth = 2;
|
||||
ctx.strokeStyle = 'yellow';
|
||||
ctx.strokeText(str, left, top);
|
||||
@@ -59,7 +61,9 @@ export default {
|
||||
const json = JSON.parse(report.Share.Lock.Value);
|
||||
item.Share.Lock.Value.type = json.type;
|
||||
item.Share.Lock.Value.val = json.val;
|
||||
item.Share.Lock.Value.star = json.star || 0;
|
||||
item.Share.Lock.Value.star1 = json.star1 || 0;
|
||||
item.Share.Lock.Value.star2 = json.star2 || 0;
|
||||
item.Share.Lock.Value.star3 = json.star3 || 0;
|
||||
item.Share.Lock.TypeText = this.lockTypes[json.type];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -270,6 +270,8 @@ namespace cmonitor
|
||||
|
||||
public float ScreenScale { get; set; } = 0.2f;
|
||||
public int ScreenDelay { get; set; } = 30;
|
||||
public bool SaveSetting { get; set; } = true;
|
||||
|
||||
|
||||
public string Version { get; set; } = "1.0.0.1";
|
||||
public bool IsCLient { get; set; }
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace cmonitor.server.api.services
|
||||
ReportDelay = config.ReportDelay,
|
||||
ScreenDelay = config.ScreenDelay,
|
||||
ScreenScale = config.ScreenScale,
|
||||
|
||||
SaveSetting = config.SaveSetting
|
||||
};
|
||||
}
|
||||
|
||||
@@ -38,6 +38,7 @@ namespace cmonitor.server.api.services
|
||||
config.ReportDelay = settingInfo.ReportDelay;
|
||||
config.ScreenDelay = settingInfo.ScreenDelay;
|
||||
config.ScreenScale = settingInfo.ScreenScale;
|
||||
config.SaveSetting = settingInfo.SaveSetting;
|
||||
|
||||
byte[] bytes = MemoryPackSerializer.Serialize(settingInfo);
|
||||
foreach (var item in signCaching.Get())
|
||||
|
||||
@@ -10,16 +10,20 @@ namespace cmonitor.server.client
|
||||
public sealed class ClientConfig
|
||||
{
|
||||
private readonly IConfigDataProvider<ClientConfig> configDataProvider;
|
||||
private readonly Config config;
|
||||
|
||||
public ClientConfig() { }
|
||||
public ClientConfig(IConfigDataProvider<ClientConfig> configDataProvider)
|
||||
public ClientConfig(IConfigDataProvider<ClientConfig> configDataProvider, Config config)
|
||||
{
|
||||
this.configDataProvider = configDataProvider;
|
||||
ClientConfig config = configDataProvider.Load().Result ?? new ClientConfig();
|
||||
LLock = config.LLock;
|
||||
Wallpaper = config.Wallpaper;
|
||||
WallpaperUrl = config.WallpaperUrl;
|
||||
HijackConfig = config.HijackConfig;
|
||||
WindowNames = config.WindowNames;
|
||||
this.config = config;
|
||||
|
||||
ClientConfig clientConfig = configDataProvider.Load().Result ?? new ClientConfig();
|
||||
LLock = clientConfig.LLock;
|
||||
Wallpaper = clientConfig.Wallpaper;
|
||||
WallpaperUrl = clientConfig.WallpaperUrl;
|
||||
HijackConfig = clientConfig.HijackConfig;
|
||||
WindowNames = clientConfig.WindowNames;
|
||||
SaveTask();
|
||||
}
|
||||
|
||||
@@ -31,7 +35,7 @@ namespace cmonitor.server.client
|
||||
{
|
||||
try
|
||||
{
|
||||
if (updated)
|
||||
if (updated && config.SaveSetting)
|
||||
{
|
||||
Save();
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace cmonitor.server.client.reports.notify
|
||||
Task.Run(() =>
|
||||
{
|
||||
CommandHelper.Windows(string.Empty, new string[] {
|
||||
$"start notify.win.exe {notify.Speed} \"{notify.Msg}\" {notify.Star}"
|
||||
$"start notify.win.exe {notify.Speed} \"{notify.Msg}\" {notify.Star1} {notify.Star2} {notify.Star3}"
|
||||
});
|
||||
});
|
||||
}
|
||||
@@ -32,7 +32,9 @@ namespace cmonitor.server.client.reports.notify
|
||||
{
|
||||
public byte Speed { get; set; }
|
||||
public string Msg { get; set; }
|
||||
public byte Star { get; set; } = 1;
|
||||
public byte Star1 { get; set; } = 1;
|
||||
public byte Star2 { get; set; } = 1;
|
||||
public byte Star3 { get; set; } = 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ namespace cmonitor.server.service.messengers.setting
|
||||
config.ReportDelay = settingInfo.ReportDelay;
|
||||
config.ScreenDelay = settingInfo.ScreenDelay;
|
||||
config.ScreenScale = settingInfo.ScreenScale;
|
||||
config.SaveSetting = settingInfo.SaveSetting;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -27,5 +28,8 @@ namespace cmonitor.server.service.messengers.setting
|
||||
public int ReportDelay { get; set; } = 30;
|
||||
public float ScreenScale { get; set; } = 0.2f;
|
||||
public int ScreenDelay { get; set; } = 30;
|
||||
public bool SaveSetting { get; set; } = true;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
1
cmonitor/web/css/517.0a042728.css
Normal file
1
cmonitor/web/css/517.0a042728.css
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
<!doctype html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=0"><link rel="icon" href="/favicon.ico"><title>cmonitor.web</title><script defer="defer" src="/js/chunk-vendors.9b0dc62c.js"></script><script defer="defer" src="/js/app.ee33a46f.js"></script><link href="/css/chunk-vendors.faad7142.css" rel="stylesheet"><link href="/css/app.9c6b579f.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but cmonitor.web doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html>
|
||||
<!doctype html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=0"><link rel="icon" href="/favicon.ico"><title>cmonitor.web</title><script defer="defer" src="/js/chunk-vendors.9b0dc62c.js"></script><script defer="defer" src="/js/app.980c979e.js"></script><link href="/css/chunk-vendors.faad7142.css" rel="stylesheet"><link href="/css/app.9c6b579f.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but cmonitor.web doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html>
|
||||
1
cmonitor/web/js/517.96549344.js
Normal file
1
cmonitor/web/js/517.96549344.js
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
332
notify.win/Form1.Designer.cs
generated
332
notify.win/Form1.Designer.cs
generated
@@ -29,85 +29,108 @@
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.username = new System.Windows.Forms.Label();
|
||||
this.star5 = new System.Windows.Forms.PictureBox();
|
||||
this.star4 = new System.Windows.Forms.PictureBox();
|
||||
this.star3 = new System.Windows.Forms.PictureBox();
|
||||
this.star2 = new System.Windows.Forms.PictureBox();
|
||||
this.star1 = new System.Windows.Forms.PictureBox();
|
||||
this.star15 = new System.Windows.Forms.PictureBox();
|
||||
this.star14 = new System.Windows.Forms.PictureBox();
|
||||
this.star13 = new System.Windows.Forms.PictureBox();
|
||||
this.star12 = new System.Windows.Forms.PictureBox();
|
||||
this.star11 = new System.Windows.Forms.PictureBox();
|
||||
this.pictureBox1 = new System.Windows.Forms.PictureBox();
|
||||
((System.ComponentModel.ISupportInitialize)(this.star5)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.star4)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.star3)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.star2)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.star1)).BeginInit();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.star25 = new System.Windows.Forms.PictureBox();
|
||||
this.star24 = new System.Windows.Forms.PictureBox();
|
||||
this.star23 = new System.Windows.Forms.PictureBox();
|
||||
this.star22 = new System.Windows.Forms.PictureBox();
|
||||
this.star21 = new System.Windows.Forms.PictureBox();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.star35 = new System.Windows.Forms.PictureBox();
|
||||
this.star34 = new System.Windows.Forms.PictureBox();
|
||||
this.star33 = new System.Windows.Forms.PictureBox();
|
||||
this.star32 = new System.Windows.Forms.PictureBox();
|
||||
this.star31 = new System.Windows.Forms.PictureBox();
|
||||
((System.ComponentModel.ISupportInitialize)(this.star15)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.star14)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.star13)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.star12)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.star11)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.star25)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.star24)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.star23)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.star22)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.star21)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.star35)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.star34)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.star33)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.star32)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.star31)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// username
|
||||
//
|
||||
this.username.Font = new System.Drawing.Font("宋体", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.username.ForeColor = System.Drawing.Color.Orange;
|
||||
this.username.Location = new System.Drawing.Point(4, 5);
|
||||
this.username.ForeColor = System.Drawing.Color.Red;
|
||||
this.username.Location = new System.Drawing.Point(4, 3);
|
||||
this.username.Name = "username";
|
||||
this.username.Size = new System.Drawing.Size(171, 23);
|
||||
this.username.Size = new System.Drawing.Size(166, 22);
|
||||
this.username.TabIndex = 6;
|
||||
this.username.Text = "label1";
|
||||
this.username.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// star5
|
||||
// star15
|
||||
//
|
||||
this.star5.Image = global::notify.win.Properties.Resources.star1;
|
||||
this.star5.Location = new System.Drawing.Point(145, 31);
|
||||
this.star5.Name = "star5";
|
||||
this.star5.Size = new System.Drawing.Size(30, 30);
|
||||
this.star5.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
|
||||
this.star5.TabIndex = 5;
|
||||
this.star5.TabStop = false;
|
||||
this.star15.Image = global::notify.win.Properties.Resources.star1;
|
||||
this.star15.Location = new System.Drawing.Point(145, 29);
|
||||
this.star15.Name = "star15";
|
||||
this.star15.Size = new System.Drawing.Size(20, 20);
|
||||
this.star15.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
|
||||
this.star15.TabIndex = 5;
|
||||
this.star15.TabStop = false;
|
||||
//
|
||||
// star4
|
||||
// star14
|
||||
//
|
||||
this.star4.Image = global::notify.win.Properties.Resources.star1;
|
||||
this.star4.Location = new System.Drawing.Point(110, 31);
|
||||
this.star4.Name = "star4";
|
||||
this.star4.Size = new System.Drawing.Size(30, 30);
|
||||
this.star4.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
|
||||
this.star4.TabIndex = 4;
|
||||
this.star4.TabStop = false;
|
||||
this.star14.Image = global::notify.win.Properties.Resources.star1;
|
||||
this.star14.Location = new System.Drawing.Point(123, 29);
|
||||
this.star14.Name = "star14";
|
||||
this.star14.Size = new System.Drawing.Size(20, 20);
|
||||
this.star14.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
|
||||
this.star14.TabIndex = 4;
|
||||
this.star14.TabStop = false;
|
||||
//
|
||||
// star3
|
||||
// star13
|
||||
//
|
||||
this.star3.Image = global::notify.win.Properties.Resources.star1;
|
||||
this.star3.Location = new System.Drawing.Point(74, 31);
|
||||
this.star3.Name = "star3";
|
||||
this.star3.Size = new System.Drawing.Size(30, 30);
|
||||
this.star3.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
|
||||
this.star3.TabIndex = 3;
|
||||
this.star3.TabStop = false;
|
||||
this.star13.Image = global::notify.win.Properties.Resources.star1;
|
||||
this.star13.Location = new System.Drawing.Point(102, 29);
|
||||
this.star13.Name = "star13";
|
||||
this.star13.Size = new System.Drawing.Size(20, 20);
|
||||
this.star13.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
|
||||
this.star13.TabIndex = 3;
|
||||
this.star13.TabStop = false;
|
||||
//
|
||||
// star2
|
||||
// star12
|
||||
//
|
||||
this.star2.Image = global::notify.win.Properties.Resources.star1;
|
||||
this.star2.Location = new System.Drawing.Point(38, 31);
|
||||
this.star2.Name = "star2";
|
||||
this.star2.Size = new System.Drawing.Size(30, 30);
|
||||
this.star2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
|
||||
this.star2.TabIndex = 2;
|
||||
this.star2.TabStop = false;
|
||||
this.star12.Image = global::notify.win.Properties.Resources.star1;
|
||||
this.star12.Location = new System.Drawing.Point(81, 29);
|
||||
this.star12.Name = "star12";
|
||||
this.star12.Size = new System.Drawing.Size(20, 20);
|
||||
this.star12.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
|
||||
this.star12.TabIndex = 2;
|
||||
this.star12.TabStop = false;
|
||||
//
|
||||
// star1
|
||||
// star11
|
||||
//
|
||||
this.star1.Image = global::notify.win.Properties.Resources.star1;
|
||||
this.star1.Location = new System.Drawing.Point(3, 31);
|
||||
this.star1.Name = "star1";
|
||||
this.star1.Size = new System.Drawing.Size(30, 30);
|
||||
this.star1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
|
||||
this.star1.TabIndex = 1;
|
||||
this.star1.TabStop = false;
|
||||
this.star11.Image = global::notify.win.Properties.Resources.star1;
|
||||
this.star11.Location = new System.Drawing.Point(60, 29);
|
||||
this.star11.Name = "star11";
|
||||
this.star11.Size = new System.Drawing.Size(20, 20);
|
||||
this.star11.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
|
||||
this.star11.TabIndex = 1;
|
||||
this.star11.TabStop = false;
|
||||
//
|
||||
// pictureBox1
|
||||
//
|
||||
this.pictureBox1.Image = global::notify.win.Properties.Resources._3;
|
||||
this.pictureBox1.Location = new System.Drawing.Point(31, 66);
|
||||
this.pictureBox1.Location = new System.Drawing.Point(26, 95);
|
||||
this.pictureBox1.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.pictureBox1.Name = "pictureBox1";
|
||||
this.pictureBox1.Size = new System.Drawing.Size(118, 113);
|
||||
@@ -115,42 +138,209 @@
|
||||
this.pictureBox1.TabIndex = 0;
|
||||
this.pictureBox1.TabStop = false;
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.ForeColor = System.Drawing.Color.Gold;
|
||||
this.label1.Location = new System.Drawing.Point(3, 33);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(53, 12);
|
||||
this.label1.TabIndex = 7;
|
||||
this.label1.Text = "读题分析";
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.ForeColor = System.Drawing.Color.Gold;
|
||||
this.label2.Location = new System.Drawing.Point(3, 53);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(53, 12);
|
||||
this.label2.TabIndex = 13;
|
||||
this.label2.Text = "程序设计";
|
||||
//
|
||||
// star25
|
||||
//
|
||||
this.star25.Image = global::notify.win.Properties.Resources.star1;
|
||||
this.star25.Location = new System.Drawing.Point(145, 49);
|
||||
this.star25.Name = "star25";
|
||||
this.star25.Size = new System.Drawing.Size(20, 20);
|
||||
this.star25.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
|
||||
this.star25.TabIndex = 12;
|
||||
this.star25.TabStop = false;
|
||||
//
|
||||
// star24
|
||||
//
|
||||
this.star24.Image = global::notify.win.Properties.Resources.star1;
|
||||
this.star24.Location = new System.Drawing.Point(123, 49);
|
||||
this.star24.Name = "star24";
|
||||
this.star24.Size = new System.Drawing.Size(20, 20);
|
||||
this.star24.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
|
||||
this.star24.TabIndex = 11;
|
||||
this.star24.TabStop = false;
|
||||
//
|
||||
// star23
|
||||
//
|
||||
this.star23.Image = global::notify.win.Properties.Resources.star1;
|
||||
this.star23.Location = new System.Drawing.Point(102, 49);
|
||||
this.star23.Name = "star23";
|
||||
this.star23.Size = new System.Drawing.Size(20, 20);
|
||||
this.star23.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
|
||||
this.star23.TabIndex = 10;
|
||||
this.star23.TabStop = false;
|
||||
//
|
||||
// star22
|
||||
//
|
||||
this.star22.Image = global::notify.win.Properties.Resources.star1;
|
||||
this.star22.Location = new System.Drawing.Point(81, 49);
|
||||
this.star22.Name = "star22";
|
||||
this.star22.Size = new System.Drawing.Size(20, 20);
|
||||
this.star22.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
|
||||
this.star22.TabIndex = 9;
|
||||
this.star22.TabStop = false;
|
||||
//
|
||||
// star21
|
||||
//
|
||||
this.star21.Image = global::notify.win.Properties.Resources.star1;
|
||||
this.star21.Location = new System.Drawing.Point(60, 49);
|
||||
this.star21.Name = "star21";
|
||||
this.star21.Size = new System.Drawing.Size(20, 20);
|
||||
this.star21.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
|
||||
this.star21.TabIndex = 8;
|
||||
this.star21.TabStop = false;
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.ForeColor = System.Drawing.Color.Gold;
|
||||
this.label3.Location = new System.Drawing.Point(3, 74);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(53, 12);
|
||||
this.label3.TabIndex = 19;
|
||||
this.label3.Text = "数据校验";
|
||||
//
|
||||
// star35
|
||||
//
|
||||
this.star35.Image = global::notify.win.Properties.Resources.star1;
|
||||
this.star35.Location = new System.Drawing.Point(145, 70);
|
||||
this.star35.Name = "star35";
|
||||
this.star35.Size = new System.Drawing.Size(20, 20);
|
||||
this.star35.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
|
||||
this.star35.TabIndex = 18;
|
||||
this.star35.TabStop = false;
|
||||
//
|
||||
// star34
|
||||
//
|
||||
this.star34.Image = global::notify.win.Properties.Resources.star1;
|
||||
this.star34.Location = new System.Drawing.Point(123, 70);
|
||||
this.star34.Name = "star34";
|
||||
this.star34.Size = new System.Drawing.Size(20, 20);
|
||||
this.star34.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
|
||||
this.star34.TabIndex = 17;
|
||||
this.star34.TabStop = false;
|
||||
//
|
||||
// star33
|
||||
//
|
||||
this.star33.Image = global::notify.win.Properties.Resources.star1;
|
||||
this.star33.Location = new System.Drawing.Point(102, 70);
|
||||
this.star33.Name = "star33";
|
||||
this.star33.Size = new System.Drawing.Size(20, 20);
|
||||
this.star33.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
|
||||
this.star33.TabIndex = 16;
|
||||
this.star33.TabStop = false;
|
||||
//
|
||||
// star32
|
||||
//
|
||||
this.star32.Image = global::notify.win.Properties.Resources.star1;
|
||||
this.star32.Location = new System.Drawing.Point(81, 70);
|
||||
this.star32.Name = "star32";
|
||||
this.star32.Size = new System.Drawing.Size(20, 20);
|
||||
this.star32.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
|
||||
this.star32.TabIndex = 15;
|
||||
this.star32.TabStop = false;
|
||||
//
|
||||
// star31
|
||||
//
|
||||
this.star31.Image = global::notify.win.Properties.Resources.star1;
|
||||
this.star31.Location = new System.Drawing.Point(60, 70);
|
||||
this.star31.Name = "star31";
|
||||
this.star31.Size = new System.Drawing.Size(20, 20);
|
||||
this.star31.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
|
||||
this.star31.TabIndex = 14;
|
||||
this.star31.TabStop = false;
|
||||
//
|
||||
// Form1
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(179, 179);
|
||||
this.ClientSize = new System.Drawing.Size(169, 215);
|
||||
this.Controls.Add(this.label3);
|
||||
this.Controls.Add(this.star35);
|
||||
this.Controls.Add(this.star34);
|
||||
this.Controls.Add(this.star33);
|
||||
this.Controls.Add(this.star32);
|
||||
this.Controls.Add(this.star31);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.star25);
|
||||
this.Controls.Add(this.star24);
|
||||
this.Controls.Add(this.star23);
|
||||
this.Controls.Add(this.star22);
|
||||
this.Controls.Add(this.star21);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.username);
|
||||
this.Controls.Add(this.star5);
|
||||
this.Controls.Add(this.star4);
|
||||
this.Controls.Add(this.star3);
|
||||
this.Controls.Add(this.star2);
|
||||
this.Controls.Add(this.star1);
|
||||
this.Controls.Add(this.star15);
|
||||
this.Controls.Add(this.star14);
|
||||
this.Controls.Add(this.star13);
|
||||
this.Controls.Add(this.star12);
|
||||
this.Controls.Add(this.star11);
|
||||
this.Controls.Add(this.pictureBox1);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
|
||||
this.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||
this.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.Name = "Form1";
|
||||
this.Text = "广播";
|
||||
this.Load += new System.EventHandler(this.OnLoad);
|
||||
((System.ComponentModel.ISupportInitialize)(this.star5)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.star4)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.star3)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.star2)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.star1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.star15)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.star14)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.star13)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.star12)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.star11)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.star25)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.star24)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.star23)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.star22)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.star21)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.star35)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.star34)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.star33)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.star32)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.star31)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.PictureBox pictureBox1;
|
||||
private System.Windows.Forms.PictureBox star1;
|
||||
private System.Windows.Forms.PictureBox star2;
|
||||
private System.Windows.Forms.PictureBox star3;
|
||||
private System.Windows.Forms.PictureBox star4;
|
||||
private System.Windows.Forms.PictureBox star5;
|
||||
private System.Windows.Forms.PictureBox star11;
|
||||
private System.Windows.Forms.PictureBox star12;
|
||||
private System.Windows.Forms.PictureBox star13;
|
||||
private System.Windows.Forms.PictureBox star14;
|
||||
private System.Windows.Forms.PictureBox star15;
|
||||
private System.Windows.Forms.Label username;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.PictureBox star25;
|
||||
private System.Windows.Forms.PictureBox star24;
|
||||
private System.Windows.Forms.PictureBox star23;
|
||||
private System.Windows.Forms.PictureBox star22;
|
||||
private System.Windows.Forms.PictureBox star21;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.PictureBox star35;
|
||||
private System.Windows.Forms.PictureBox star34;
|
||||
private System.Windows.Forms.PictureBox star33;
|
||||
private System.Windows.Forms.PictureBox star32;
|
||||
private System.Windows.Forms.PictureBox star31;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@ using System.Drawing;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using static System.Windows.Forms.VisualStyles.VisualStyleElement.StartPanel;
|
||||
|
||||
namespace notify.win
|
||||
{
|
||||
@@ -26,12 +25,16 @@ namespace notify.win
|
||||
|
||||
private int speed;
|
||||
private string msg;
|
||||
private int star;
|
||||
public Form1(int speed, string msg,int star)
|
||||
private int star1;
|
||||
private int star2;
|
||||
private int star3;
|
||||
public Form1(int speed, string msg, int star1, int star2, int star3)
|
||||
{
|
||||
this.speed = speed;
|
||||
this.msg = msg;
|
||||
this.star = Math.Min(star,5);
|
||||
this.star1 = Math.Min(star1, 5);
|
||||
this.star2 = Math.Min(star2, 5);
|
||||
this.star3 = Math.Min(star3, 5);
|
||||
|
||||
InitializeComponent();
|
||||
this.AllowTransparency = true;
|
||||
@@ -47,15 +50,24 @@ namespace notify.win
|
||||
|
||||
private void OnLoad(object sender, EventArgs e)
|
||||
{
|
||||
PictureBox[] stars = new PictureBox[] { star1, star2, star3, star4, star5 };
|
||||
for (int i = 0; i < 5; i++)
|
||||
PictureBox[][] starPics = new PictureBox[][] {
|
||||
new PictureBox[]{ star11, star12, star13, star14, star15 }
|
||||
, new PictureBox[]{ star21, star22, star23, star24, star25 }
|
||||
, new PictureBox[]{ star31, star32, star33, star34, star35 }
|
||||
};
|
||||
int[] stars = new int[] { star1, star2, star3 };
|
||||
for (int i = 0; i < starPics.Length; i++)
|
||||
{
|
||||
stars[i].Image = global::notify.win.Properties.Resources.star2;
|
||||
}
|
||||
for (int i = 0; i < star; i++)
|
||||
for (int j = 0; j < starPics[i].Length; j++)
|
||||
{
|
||||
stars[i].Image = global::notify.win.Properties.Resources.star1;
|
||||
starPics[i][j].Image = global::notify.win.Properties.Resources.star2;
|
||||
}
|
||||
for (int j = 0; j < stars[i]; j++)
|
||||
{
|
||||
starPics[i][j].Image = global::notify.win.Properties.Resources.star1;
|
||||
}
|
||||
}
|
||||
|
||||
Bitmap[] images = new Bitmap[] { Properties.Resources._0, Properties.Resources._1, Properties.Resources._2, Properties.Resources._3, Properties.Resources._4, Properties.Resources._5 };
|
||||
pictureBox1.Image = images[new Random().Next(0, 6)];
|
||||
|
||||
|
||||
@@ -16,15 +16,19 @@ namespace notify.win
|
||||
|
||||
int speed = 1;
|
||||
string msg = "少年郎秃头呀";
|
||||
int star = 1;
|
||||
int star1 = 1;
|
||||
int star2 = 1;
|
||||
int star3 = 1;
|
||||
if (args.Length > 1)
|
||||
{
|
||||
speed = int.Parse(args[0]);
|
||||
msg = args[1];
|
||||
star = int.Parse(args[2]);
|
||||
star1 = int.Parse(args[2]);
|
||||
star2 = int.Parse(args[3]);
|
||||
star3 = int.Parse(args[4]);
|
||||
}
|
||||
|
||||
Application.Run(new Form1(speed,msg, star));
|
||||
Application.Run(new Form1(speed,msg, star1, star2, star3));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
2
wallpaper.win/Form1.Designer.cs
generated
2
wallpaper.win/Form1.Designer.cs
generated
@@ -48,7 +48,7 @@
|
||||
this.ClientSize = new System.Drawing.Size(800, 450);
|
||||
this.Controls.Add(this.pictureBox1);
|
||||
this.Name = "Form1";
|
||||
this.Text = "Form1";
|
||||
this.Text = "壁纸";
|
||||
this.Load += new System.EventHandler(this.OnLoad);
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
@@ -112,9 +112,9 @@
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
Reference in New Issue
Block a user