代码拉取完成,页面将自动刷新
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Threading;
using System.Windows.Forms;
using Entites;
using Sunny.UI;
using vivo_tools_Libraries;
namespace vivo_tools_3
{
partial class AboutForm : UIForm
{
public AboutForm(v_Users users)
{
InitializeComponent();
this.Text = String.Format("关于 {0}", AssemblyTitle);
this.labelProductName.Text =string.Format("名称: {0}", AssemblyProduct);
this.labelVersion.Text = String.Format("版本: {0}", Application.ProductVersion);
if (File.Exists(@"path\_beta"))
{
this.labelProductName.Text += "[Beta";
string beta_text = File.ReadAllText(@"path\_beta");
if (beta_text != null && beta_text != "")
{
this.labelProductName.Text += beta_text + "]";
}
}
this.labelCopyright.Text = String.Format("版权: {0}", AssemblyCopyright);
this.labelCompanyName.Text = String.Format("作者: {0}", AssemblyCompany);
this.labelComputerName.Text = string.Format("Windows信息: {0}({1})",osv, Environment.MachineName);
this.labelSunnyUIVersion.Text = string.Format("SunnyUI版本: {0}", this.Version);
if (users != null && users.Uname != null && users.Uname != "")
{
this.labelUserName.Text = string.Format("当前登录用户: {0}", users.Uname);
if (users.IsAdmin == 1)
{
this.labelUserName.Text += "[管理员]";
}
if (users.Uimage.Length < 3)
{
this.pictureBox1.BackgroundImage = (Image)Properties.UsersImage.ResourceManager.GetObject(users.Uimage);
this.lb_uiamge.Visible = true;
}
else
{
byte[] imagebytes = users.Uimage.ToBase64Bytes();
MemoryStream ms = new MemoryStream(imagebytes, 0, imagebytes.Length);
ms.Write(imagebytes, 0, imagebytes.Length);
Image img = Image.FromStream(ms);
pictureBox1.BackgroundImage = img;
}
}
else
{
this.labelUserName.Text = "用户未登录";
this.lb_uiamge.Visible = false;
}
this.uiLinkLabel1.Text = "访问官网";
this.uiLinkLabel2.Text = "访问论坛";
this.uiLinkLabel3.Text = "反馈问题";
this.uiLinkLabel4.Text = "打赏作者";
this.uiLinkLabel2.Left = this.uiLinkLabel1.Left + this.uiLinkLabel1.Width;
this.uiLinkLabel3.Left = this.uiLinkLabel2.Left + this.uiLinkLabel2.Width;
this.uiLinkLabel4.Left = this.uiLinkLabel3.Left + this.uiLinkLabel3.Width;
}
#region 程序集特性访问器
/// <summary>
/// 获取到的Windows信息
/// </summary>
public string osv = Computer.GetOS_Version();
public string AssemblyTitle
{
get
{
object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyTitleAttribute), false);
if (attributes.Length > 0)
{
AssemblyTitleAttribute titleAttribute = (AssemblyTitleAttribute)attributes[0];
if (titleAttribute.Title != "")
{
return titleAttribute.Title;
}
}
return System.IO.Path.GetFileNameWithoutExtension(Assembly.GetExecutingAssembly().CodeBase);
}
}
public string AssemblyDescription
{
get
{
object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyDescriptionAttribute), false);
if (attributes.Length == 0)
{
return "";
}
return ((AssemblyDescriptionAttribute)attributes[0]).Description;
}
}
public string AssemblyProduct
{
get
{
object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyProductAttribute), false);
if (attributes.Length == 0)
{
return "";
}
return ((AssemblyProductAttribute)attributes[0]).Product;
}
}
public string AssemblyCopyright
{
get
{
object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCopyrightAttribute), false);
if (attributes.Length == 0)
{
return "";
}
return ((AssemblyCopyrightAttribute)attributes[0]).Copyright;
}
}
public string AssemblyCompany
{
get
{
object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCompanyAttribute), false);
if (attributes.Length == 0)
{
return "";
}
return ((AssemblyCompanyAttribute)attributes[0]).Company;
}
}
#endregion
private void uiLinkLabel1_Click(object sender, EventArgs e)
{
//官网
Process.Start("https://vivo.adndczs.ml/");
}
private void uiLinkLabel2_Click(object sender, EventArgs e)
{
//论坛
Process.Start("https://adndczs.ml");
}
private void uiLinkLabel3_Click(object sender, EventArgs e)
{
//点击链接加入群聊【VIVO - Y51 - ROM / vivo Y51搞机工】:https://jq.qq.com/?_wv=1027&k=A4EepFpX
//点击链接加入群聊【VIVO - Y51 - ROM / vivo Y51搞机工】:https://jq.qq.com/?_wv=1027&k=6MFz9F7z
//Process.Start("https://jq.qq.com/?_wv=1027&k=6MFz9F7z");
MyBrowser_Form mf = new MyBrowser_Form("https://jq.qq.com/?_wv=1027&k=6MFz9F7z");
mf.Render();
mf.Style = Style;
mf.ShowDialog();
}
private void uiLinkLabel4_Click(object sender, EventArgs e)
{
RewardForm rf = new RewardForm();
rf.Render();
rf.Style = this.Style;
rf.ShowDialog();
}
private void pictureBox1_Paint(object sender, PaintEventArgs e)
{
ControlPaint.DrawBorder(e.Graphics,
this.pictureBox1.ClientRectangle,
Color.FromArgb(200, 200, 200, 200), //左
1,
ButtonBorderStyle.Solid,
Color.FromArgb(200, 200, 200, 200),//上
1,
ButtonBorderStyle.Solid,
Color.FromArgb(200, 200, 200, 200),//右
1,
ButtonBorderStyle.Solid,
Color.FromArgb(200, 200, 200, 200),//下
1,
ButtonBorderStyle.Solid);
}
private void AboutForm_UIStyleChanged(object sender, EventArgs e)
{
if (TitleColor.R * 0.299 + TitleColor.G * 0.578 + TitleColor.B * 0.114 >= 192)
{
this.TitleForeColor = Color.FromArgb(96, 98, 102);
this.ControlBoxForeColor = Color.FromArgb(96, 98, 102);
}
else
{
this.TitleForeColor = Color.White;
this.ControlBoxForeColor = Color.White;
}
this.rectColor = this.TitleColor;
}
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。