官网

http://www.hzhcontrols.com

前提

入行已经7,8年了,一直想做一套漂亮点的自定义控件,于是就有了本系列文章。

GitHub:https://github.com/kwwwvagaa/NetWinformControl

码云:https://gitee.com/kwwwvagaa/net_winform_custom_control.git

如果觉得写的还行,请点个 star 支持一下吧

欢迎前来交流探讨: 企鹅群568015492 

idkey=6e08741ef16fe53bf0314c1c9e336c4f626047943a8b76bac062361bab6b4f8d">

目录

https://www.cnblogs.com/bfyx/p/11364884.html

准备工作

这是一个提示消息的窗体,他继承自基类窗体FrmBase,如果你对FrmBase还不了解,请移步 (十七)c#Winform自定义控件-基类窗体 查看

提示消息窗体支持有确定取消按钮及单取消按钮,更多操作按钮暂没有增加

开始

添加一个Form命名为FrmDialog ,继承FrmBase

私有的构造函数

  private FrmDialog(
string strMessage,
string strTitle,
bool blnShowCancel = false,
bool blnShowClose = false,
bool blnisEnterClose = true)
{
InitializeComponent();
if (!string.IsNullOrWhiteSpace(strTitle))
lblTitle.Text = strTitle;
lblMsg.Text = strMessage;
if (blnShowCancel)
{
this.tableLayoutPanel1.ColumnStyles[].Width = ;
this.tableLayoutPanel1.ColumnStyles[].Width = ;
}
else
{
this.tableLayoutPanel1.ColumnStyles[].Width = ;
this.tableLayoutPanel1.ColumnStyles[].Width = ;
}
btnClose.Visible = blnShowClose;
blnEnterClose = blnisEnterClose;
}

搭配一个静态的公共函数

    #region 显示一个模式信息框
/// <summary>
/// 功能描述:显示一个模式信息框
/// 作  者:HZH
/// 创建日期:2019-03-04 15:49:48
/// 任务编号:POS
/// </summary>
/// <param name="owner">owner</param>
/// <param name="strMessage">strMessage</param>
/// <param name="strTitle">strTitle</param>
/// <param name="blnShowCancel">blnShowCancel</param>
/// <param name="isShowMaskDialog">isShowMaskDialog</param>
/// <param name="blnShowClose">blnShowClose</param>
/// <param name="isEnterClose">isEnterClose</param>
/// <returns>返回值</returns>
public static DialogResult ShowDialog(
IWin32Window owner,
string strMessage,
string strTitle = "提示",
bool blnShowCancel = false,
bool isShowMaskDialog = true,
bool blnShowClose = false,
bool blnIsEnterClose = true)
{
DialogResult result = DialogResult.Cancel;
if (owner == null || (owner is Control && (owner as Control).IsDisposed))
{
result = new FrmDialog(strMessage, strTitle, blnShowCancel, blnShowClose, blnIsEnterClose)
{
StartPosition = FormStartPosition.CenterScreen,
IsShowMaskDialog = isShowMaskDialog,
TopMost = true
}.ShowDialog();
}
else
{
if (owner is Control)
{
owner = (owner as Control).FindForm();
}
result = new FrmDialog(strMessage, strTitle, blnShowCancel, blnShowClose, blnIsEnterClose)
{
StartPosition = (owner != null) ? FormStartPosition.CenterParent : FormStartPosition.CenterScreen,
IsShowMaskDialog = isShowMaskDialog,
TopMost = true
}.ShowDialog(owner);
}
return result;
}
#endregion

一些小事件

 private void btnOK_BtnClick(object sender, EventArgs e)
{
this.DialogResult = System.Windows.Forms.DialogResult.OK;
} private void btnCancel_BtnClick(object sender, EventArgs e)
{
this.DialogResult = System.Windows.Forms.DialogResult.Cancel;
} private void btnClose_MouseDown(object sender, MouseEventArgs e)
{
this.DialogResult = System.Windows.Forms.DialogResult.Cancel;
} protected override void DoEnter()
{
if (blnEnterClose)
this.DialogResult = System.Windows.Forms.DialogResult.OK;
}

代码就这么多,看下完整代码

 // 版权所有  黄正辉  交流群:568015492   QQ:623128629
// 文件名称:FrmDialog.cs
// 创建日期:2019-08-15 16:04:36
// 功能描述:FrmDialog
// 项目地址:https://gitee.com/kwwwvagaa/net_winform_custom_control
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms; namespace HZH_Controls.Forms
{
public partial class FrmDialog : FrmBase
{
bool blnEnterClose = true;
private FrmDialog(
string strMessage,
string strTitle,
bool blnShowCancel = false,
bool blnShowClose = false,
bool blnisEnterClose = true)
{
InitializeComponent();
if (!string.IsNullOrWhiteSpace(strTitle))
lblTitle.Text = strTitle;
lblMsg.Text = strMessage;
if (blnShowCancel)
{
this.tableLayoutPanel1.ColumnStyles[].Width = ;
this.tableLayoutPanel1.ColumnStyles[].Width = ;
}
else
{
this.tableLayoutPanel1.ColumnStyles[].Width = ;
this.tableLayoutPanel1.ColumnStyles[].Width = ;
}
//btnCancel.Visible = blnShowCancel;
//ucSplitLine_V1.Visible = blnShowCancel;
btnClose.Visible = blnShowClose;
blnEnterClose = blnisEnterClose;
//if (blnShowCancel)
//{
// btnOK.BtnForeColor = Color.FromArgb(255, 85, 51);
//}
} #region 显示一个模式信息框
/// <summary>
/// 功能描述:显示一个模式信息框
/// 作  者:HZH
/// 创建日期:2019-03-04 15:49:48
/// 任务编号:POS
/// </summary>
/// <param name="owner">owner</param>
/// <param name="strMessage">strMessage</param>
/// <param name="strTitle">strTitle</param>
/// <param name="blnShowCancel">blnShowCancel</param>
/// <param name="isShowMaskDialog">isShowMaskDialog</param>
/// <param name="blnShowClose">blnShowClose</param>
/// <param name="isEnterClose">isEnterClose</param>
/// <returns>返回值</returns>
public static DialogResult ShowDialog(
IWin32Window owner,
string strMessage,
string strTitle = "提示",
bool blnShowCancel = false,
bool isShowMaskDialog = true,
bool blnShowClose = false,
bool blnIsEnterClose = true)
{
DialogResult result = DialogResult.Cancel;
if (owner == null || (owner is Control && (owner as Control).IsDisposed))
{
result = new FrmDialog(strMessage, strTitle, blnShowCancel, blnShowClose, blnIsEnterClose)
{
StartPosition = FormStartPosition.CenterScreen,
IsShowMaskDialog = isShowMaskDialog,
TopMost = true
}.ShowDialog();
}
else
{
if (owner is Control)
{
owner = (owner as Control).FindForm();
}
result = new FrmDialog(strMessage, strTitle, blnShowCancel, blnShowClose, blnIsEnterClose)
{
StartPosition = (owner != null) ? FormStartPosition.CenterParent : FormStartPosition.CenterScreen,
IsShowMaskDialog = isShowMaskDialog,
TopMost = true
}.ShowDialog(owner);
}
return result;
}
#endregion private void btnOK_BtnClick(object sender, EventArgs e)
{
this.DialogResult = System.Windows.Forms.DialogResult.OK;
} private void btnCancel_BtnClick(object sender, EventArgs e)
{
this.DialogResult = System.Windows.Forms.DialogResult.Cancel;
} private void btnClose_MouseDown(object sender, MouseEventArgs e)
{
this.DialogResult = System.Windows.Forms.DialogResult.Cancel;
} protected override void DoEnter()
{
if (blnEnterClose)
this.DialogResult = System.Windows.Forms.DialogResult.OK;
} private void FrmDialog_VisibleChanged(object sender, EventArgs e)
{ }
}
}
 namespace HZH_Controls.Forms
{
partial class FrmDialog
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null; /// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
} #region Windows Form Designer generated code /// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmDialog));
this.btnClose = new System.Windows.Forms.Panel();
this.panel1 = new System.Windows.Forms.Panel();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.btnCancel = new HZH_Controls.Controls.UCBtnExt();
this.ucSplitLine_V1 = new HZH_Controls.Controls.UCSplitLine_V();
this.btnOK = new HZH_Controls.Controls.UCBtnExt();
this.lblMsg = new System.Windows.Forms.Label();
this.lblTitle = new System.Windows.Forms.Label();
this.ucSplitLine_H1 = new HZH_Controls.Controls.UCSplitLine_H();
this.ucSplitLine_H2 = new HZH_Controls.Controls.UCSplitLine_H();
this.panel1.SuspendLayout();
this.tableLayoutPanel1.SuspendLayout();
this.SuspendLayout();
//
// btnClose
//
this.btnClose.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnClose.BackgroundImage = global::HZH_Controls.Properties.Resources.dialog_close;
this.btnClose.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
this.btnClose.Location = new System.Drawing.Point(, );
this.btnClose.Name = "btnClose";
this.btnClose.Size = new System.Drawing.Size(, );
this.btnClose.TabIndex = ;
this.btnClose.MouseDown += new System.Windows.Forms.MouseEventHandler(this.btnClose_MouseDown);
//
// panel1
//
this.panel1.Controls.Add(this.tableLayoutPanel1);
this.panel1.Dock = System.Windows.Forms.DockStyle.Bottom;
this.panel1.Location = new System.Drawing.Point(, );
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(, );
this.panel1.TabIndex = ;
//
// tableLayoutPanel1
//
this.tableLayoutPanel1.ColumnCount = ;
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 1F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel1.Controls.Add(this.btnCancel, , );
this.tableLayoutPanel1.Controls.Add(this.ucSplitLine_V1, , );
this.tableLayoutPanel1.Controls.Add(this.btnOK, , );
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel1.Location = new System.Drawing.Point(, );
this.tableLayoutPanel1.Margin = new System.Windows.Forms.Padding();
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RowCount = ;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(, );
this.tableLayoutPanel1.TabIndex = ;
//
// btnCancel
//
this.btnCancel.BackColor = System.Drawing.Color.Transparent;
this.btnCancel.BtnBackColor = System.Drawing.Color.Transparent;
this.btnCancel.BtnFont = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)()));
this.btnCancel.BtnForeColor = System.Drawing.Color.FromArgb(((int)(((byte)()))), ((int)(((byte)()))), ((int)(((byte)()))));
this.btnCancel.BtnText = "取消";
this.btnCancel.ConerRadius = ;
this.btnCancel.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnCancel.Dock = System.Windows.Forms.DockStyle.Fill;
this.btnCancel.FillColor = System.Drawing.Color.White;
this.btnCancel.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
this.btnCancel.IsRadius = false;
this.btnCancel.IsShowRect = false;
this.btnCancel.IsShowTips = false;
this.btnCancel.Location = new System.Drawing.Point(, );
this.btnCancel.Margin = new System.Windows.Forms.Padding();
this.btnCancel.Name = "btnCancel";
this.btnCancel.RectColor = System.Drawing.Color.FromArgb(((int)(((byte)()))), ((int)(((byte)()))), ((int)(((byte)()))));
this.btnCancel.RectWidth = ;
this.btnCancel.Size = new System.Drawing.Size(, );
this.btnCancel.TabIndex = ;
this.btnCancel.TabStop = false;
this.btnCancel.TipsText = "";
this.btnCancel.BtnClick += new System.EventHandler(this.btnCancel_BtnClick);
//
// ucSplitLine_V1
//
this.ucSplitLine_V1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)()))), ((int)(((byte)()))), ((int)(((byte)()))));
this.ucSplitLine_V1.Dock = System.Windows.Forms.DockStyle.Fill;
this.ucSplitLine_V1.Location = new System.Drawing.Point(, );
this.ucSplitLine_V1.Margin = new System.Windows.Forms.Padding(, , , );
this.ucSplitLine_V1.Name = "ucSplitLine_V1";
this.ucSplitLine_V1.Size = new System.Drawing.Size(, );
this.ucSplitLine_V1.TabIndex = ;
this.ucSplitLine_V1.TabStop = false;
//
// btnOK
//
this.btnOK.BackColor = System.Drawing.Color.Transparent;
this.btnOK.BtnBackColor = System.Drawing.Color.Transparent;
this.btnOK.BtnFont = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)()));
this.btnOK.BtnForeColor = System.Drawing.Color.FromArgb(((int)(((byte)()))), ((int)(((byte)()))), ((int)(((byte)()))));
this.btnOK.BtnText = "确定";
this.btnOK.ConerRadius = ;
this.btnOK.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnOK.Dock = System.Windows.Forms.DockStyle.Fill;
this.btnOK.FillColor = System.Drawing.Color.White;
this.btnOK.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
this.btnOK.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)()))), ((int)(((byte)()))), ((int)(((byte)()))));
this.btnOK.IsRadius = false;
this.btnOK.IsShowRect = false;
this.btnOK.IsShowTips = false;
this.btnOK.Location = new System.Drawing.Point(, );
this.btnOK.Margin = new System.Windows.Forms.Padding();
this.btnOK.Name = "btnOK";
this.btnOK.RectColor = System.Drawing.Color.FromArgb(((int)(((byte)()))), ((int)(((byte)()))), ((int)(((byte)()))));
this.btnOK.RectWidth = ;
this.btnOK.Size = new System.Drawing.Size(, );
this.btnOK.TabIndex = ;
this.btnOK.TabStop = false;
this.btnOK.TipsText = "";
this.btnOK.BtnClick += new System.EventHandler(this.btnOK_BtnClick);
//
// lblMsg
//
this.lblMsg.BackColor = System.Drawing.Color.White;
this.lblMsg.Dock = System.Windows.Forms.DockStyle.Fill;
this.lblMsg.Font = new System.Drawing.Font("微软雅黑", 12F);
this.lblMsg.Location = new System.Drawing.Point(, );
this.lblMsg.Name = "lblMsg";
this.lblMsg.Padding = new System.Windows.Forms.Padding();
this.lblMsg.Size = new System.Drawing.Size(, );
this.lblMsg.TabIndex = ;
this.lblMsg.Text = "这是一个提示信息。";
//
// lblTitle
//
this.lblTitle.BackColor = System.Drawing.Color.Transparent;
this.lblTitle.Dock = System.Windows.Forms.DockStyle.Top;
this.lblTitle.Font = new System.Drawing.Font("微软雅黑", 17F);
this.lblTitle.Location = new System.Drawing.Point(, );
this.lblTitle.Name = "lblTitle";
this.lblTitle.Size = new System.Drawing.Size(, );
this.lblTitle.TabIndex = ;
this.lblTitle.Text = "提示";
this.lblTitle.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// ucSplitLine_H1
//
this.ucSplitLine_H1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)()))), ((int)(((byte)()))), ((int)(((byte)()))));
this.ucSplitLine_H1.Dock = System.Windows.Forms.DockStyle.Top;
this.ucSplitLine_H1.Location = new System.Drawing.Point(, );
this.ucSplitLine_H1.Name = "ucSplitLine_H1";
this.ucSplitLine_H1.Size = new System.Drawing.Size(, );
this.ucSplitLine_H1.TabIndex = ;
this.ucSplitLine_H1.TabStop = false;
//
// ucSplitLine_H2
//
this.ucSplitLine_H2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)()))), ((int)(((byte)()))), ((int)(((byte)()))));
this.ucSplitLine_H2.Dock = System.Windows.Forms.DockStyle.Bottom;
this.ucSplitLine_H2.Location = new System.Drawing.Point(, );
this.ucSplitLine_H2.Name = "ucSplitLine_H2";
this.ucSplitLine_H2.Size = new System.Drawing.Size(, );
this.ucSplitLine_H2.TabIndex = ;
this.ucSplitLine_H2.TabStop = false;
//
// FrmDialog
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.BackColor = System.Drawing.Color.White;
this.ClientSize = new System.Drawing.Size(, );
this.Controls.Add(this.ucSplitLine_H2);
this.Controls.Add(this.ucSplitLine_H1);
this.Controls.Add(this.btnClose);
this.Controls.Add(this.panel1);
this.Controls.Add(this.lblMsg);
this.Controls.Add(this.lblTitle);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.IsFullSize = false;
this.IsShowRegion = true;
this.Name = "FrmDialog";
this.Redraw = true;
this.ShowIcon = false;
this.ShowInTaskbar = false;
this.Text = "FrmDialoag";
this.VisibleChanged += new System.EventHandler(this.FrmDialog_VisibleChanged);
this.panel1.ResumeLayout(false);
this.tableLayoutPanel1.ResumeLayout(false);
this.ResumeLayout(false); } #endregion private System.Windows.Forms.Label lblTitle;
private Controls.UCBtnExt btnOK;
private Controls.UCBtnExt btnCancel;
private System.Windows.Forms.Label lblMsg;
private System.Windows.Forms.Panel panel1;
private Controls.UCSplitLine_V ucSplitLine_V1;
private System.Windows.Forms.Panel btnClose;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private Controls.UCSplitLine_H ucSplitLine_H1;
private Controls.UCSplitLine_H ucSplitLine_H2;
}
}

用处及效果

用处:一般用在一个需要用户确定的提示上

效果:

调用示例

  if (FrmDialog.ShowDialog(this, "是否再显示一个没有取消按钮的提示框?", "模式窗体测试", true) == System.Windows.Forms.DialogResult.OK)
{
FrmDialog.ShowDialog(this, "这是一个没有取消按钮的提示框", "模式窗体测试");
}

最后的话

如果你喜欢的话,请到 https://gitee.com/kwwwvagaa/net_winform_custom_control 点个星 星吧

(十八)c#Winform自定义控件-提示框的更多相关文章

  1. (三十)c#Winform自定义控件-文本框(三)

    前提 入行已经7,8年了,一直想做一套漂亮点的自定义控件,于是就有了本系列文章. 开源地址:https://gitee.com/kwwwvagaa/net_winform_custom_control ...

  2. (十六)c#Winform自定义控件-文本框哪里去了?-HZHControls

    官网 http://www.hzhcontrols.com 前提 入行已经7,8年了,一直想做一套漂亮点的自定义控件,于是就有了本系列文章. GitHub:https://github.com/kww ...

  3. (八十二)c#Winform自定义控件-穿梭框

    前提 入行已经7,8年了,一直想做一套漂亮点的自定义控件,于是就有了本系列文章. GitHub:https://github.com/kwwwvagaa/NetWinformControl 码云:ht ...

  4. (三十一)c#Winform自定义控件-文本框(四)

    前提 入行已经7,8年了,一直想做一套漂亮点的自定义控件,于是就有了本系列文章. 开源地址:https://gitee.com/kwwwvagaa/net_winform_custom_control ...

  5. (五十)c#Winform自定义控件-滑块

    前提 入行已经7,8年了,一直想做一套漂亮点的自定义控件,于是就有了本系列文章. GitHub:https://github.com/kwwwvagaa/NetWinformControl 码云:ht ...

  6. (二十)c#Winform自定义控件-有后退的窗体

    前提 入行已经7,8年了,一直想做一套漂亮点的自定义控件,于是就有了本系列文章. 开源地址:https://gitee.com/kwwwvagaa/net_winform_custom_control ...

  7. (二十八)c#Winform自定义控件-文本框(一)

    前提 入行已经7,8年了,一直想做一套漂亮点的自定义控件,于是就有了本系列文章. 开源地址:https://gitee.com/kwwwvagaa/net_winform_custom_control ...

  8. .net开发笔记(十八) winform中的等待框

    winform中很多任务是需要在后台线程(或类似)中完成的,也就是说,经常容易涉及到UI界面与后台工作线程之间的交互.比如UI界面控制后台工作的执行(启动.暂停.停止等),后台工作进度在UI界面上的显 ...

  9. (二十九)c#Winform自定义控件-文本框(二)

    前提 入行已经7,8年了,一直想做一套漂亮点的自定义控件,于是就有了本系列文章. 开源地址:https://gitee.com/kwwwvagaa/net_winform_custom_control ...

随机推荐

  1. FTP工具便携版 FileZilla 3.38.0

    FileZilla 客户端是一个快速可靠的.跨平台的FTP,FTPS和SFTP客户端.具有图形用户界面(GUI)和很多有用的特性.由NoCmd提供的 FileZilla Client 中文便携版,具有 ...

  2. Java学习笔记之---面向对象

    Java学习笔记之---面向对象 (一)封装 (1)封装的优点 良好的封装能够减少耦合. 类内部的结构可以自由修改. 可以对成员变量进行更精确的控制. 隐藏信息,实现细节. (2)实现封装的步骤 1. ...

  3. Noip 2016 天天爱跑步 题解

    [NOIP2016]天天爱跑步 时间限制:2 s   内存限制:512 MB [题目描述] 小C同学认为跑步非常有趣,于是决定制作一款叫做<天天爱跑步>的游戏.<天天爱跑步>是 ...

  4. Java编程思想:序列化深层部分

    import java.io.*; import java.util.ArrayList; import java.util.List; public class Test { public stat ...

  5. 内核下载、nfs挂载:个性问题及解决方法~~共勉

    开发板下载内核遇到starting waiting问题时: 首先想到是下载地址的问题! 将原本下载地址减去0X40,例如:smart210下载地址0X20008000,修改为0X20007FC0,即可 ...

  6. USACO-集合

    #include<cstdio> #include<iostream> using namespace std; long long f[400]; int main() { ...

  7. Excel催化剂开源第15波-VSTO开发之DataTable数据导出至单元格区域

    上篇提到如何从Excel界面上拿到用户的数据,另外反方向的怎样输出给用户数据,也是关键之处. VSTO最大的优势是,这双向的过程中,全程有用户的交互操作. 而一般IT型的程序,都是脱离用户的操作,只能 ...

  8. MySql的数据库优化到底优啥了都??(2)

    嘟嘟在写此篇文章之前心里先默念(简单,通俗,工整)*10 吟唱完了,进入正题 3.Memory存储引擎 除了存放一个表结构相关信息的.frm文件在磁盘上,其他数据都存储在内存中.说白点哪天你数据库死机 ...

  9. [小米OJ] 9. 移除 K 位得到最小值

    思路: 重复k次: 1.找到并且删除第一个 num[i] > num[i+1] 的第i位数字. 2.若删除过程中,序列变成递增序列,则直接删除最后一位. 注意除去字符串头的0 def solut ...

  10. RabbitMQ 实践之在处理异步任务中的流程

    一.背景: 我司的系统,用户可以创建任务,启动任务,但任务的运行需要很长的时间,所以采用消息队列的方式,后台异步处理. 这里所用到的是 RabbitMQ . 二.MQ 处理任务的流程 ① ② ③ ④ ...