資源簡介
單例模式--只能彈出一個窗體 只能彈出一個窗體

代碼片段和文件信息
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?no2th
{
????public?partial?class?Form1?:?Form
????{
????????public?Form1()
????????{
????????????InitializeComponent();
????????}
????????public?static?Frm_show?fs;?//這里static
????????private?void?button1_Click(object?sender?EventArgs?e)
????????{
????????????if?(fs?==?null)?//判斷是否已經(jīng)打開
????????????{
????????????????fs?=?new?Frm_show();
????????????????fs.Show();
????????????}
????????????else?{?fs.Activate();?}?//已經(jīng)打開則激活
????????}
????????private?void?button2_Click(object?sender?EventArgs?e)
????????{
????????????MessageBox.Show(“1“);
????????}
????}
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????9216??2010-06-24?13:13??winform防止同一窗口多次打開\no2th\no2th\bin\Debug\no2th.exe
?????文件??????28160??2010-06-24?13:13??winform防止同一窗口多次打開\no2th\no2th\bin\Debug\no2th.pdb
?????文件??????14328??2010-06-24?13:12??winform防止同一窗口多次打開\no2th\no2th\bin\Debug\no2th.vshost.exe
?????文件????????490??2007-07-21?01:33??winform防止同一窗口多次打開\no2th\no2th\bin\Debug\no2th.vshost.exe.manifest
?????文件????????834??2010-06-24?13:13??winform防止同一窗口多次打開\no2th\no2th\Form1.cs
?????文件???????2665??2010-06-24?13:11??winform防止同一窗口多次打開\no2th\no2th\Form1.Designer.cs
?????文件???????5814??2010-06-24?13:11??winform防止同一窗口多次打開\no2th\no2th\Form1.resx
?????文件????????361??2010-06-24?13:11??winform防止同一窗口多次打開\no2th\no2th\Frm_show.cs
?????文件???????2056??2010-06-24?13:11??winform防止同一窗口多次打開\no2th\no2th\Frm_show.Designer.cs
?????文件???????5814??2010-06-24?13:11??winform防止同一窗口多次打開\no2th\no2th\Frm_show.resx
?????文件???????4040??2010-06-24?13:07??winform防止同一窗口多次打開\no2th\no2th\no2th.csproj
?????文件????????767??2010-06-24?13:12??winform防止同一窗口多次打開\no2th\no2th\obj\Debug\no2th.csproj.FileListAbsolute.txt
?????文件????????908??2010-06-24?13:11??winform防止同一窗口多次打開\no2th\no2th\obj\Debug\no2th.csproj.GenerateResource.Cache
?????文件???????9216??2010-06-24?13:13??winform防止同一窗口多次打開\no2th\no2th\obj\Debug\no2th.exe
?????文件????????180??2010-06-24?13:11??winform防止同一窗口多次打開\no2th\no2th\obj\Debug\no2th.Form1.resources
?????文件????????180??2010-06-24?13:11??winform防止同一窗口多次打開\no2th\no2th\obj\Debug\no2th.Frm_show.resources
?????文件??????28160??2010-06-24?13:13??winform防止同一窗口多次打開\no2th\no2th\obj\Debug\no2th.pdb
?????文件????????180??2010-06-24?13:08??winform防止同一窗口多次打開\no2th\no2th\obj\Debug\no2th.Properties.Resources.resources
?????文件????????497??2010-06-24?13:07??winform防止同一窗口多次打開\no2th\no2th\Program.cs
?????文件???????1422??2010-06-24?13:07??winform防止同一窗口多次打開\no2th\no2th\Properties\AssemblyInfo.cs
?????文件???????2839??2010-06-24?13:07??winform防止同一窗口多次打開\no2th\no2th\Properties\Resources.Designer.cs
?????文件???????5612??2010-06-24?13:07??winform防止同一窗口多次打開\no2th\no2th\Properties\Resources.resx
?????文件???????1090??2010-06-24?13:07??winform防止同一窗口多次打開\no2th\no2th\Properties\Settings.Designer.cs
?????文件????????249??2010-06-24?13:07??winform防止同一窗口多次打開\no2th\no2th\Properties\Settings.settings
?????文件????????905??2010-06-24?13:07??winform防止同一窗口多次打開\no2th\no2th.sln
????..A..H.?????14336??2010-06-24?13:13??winform防止同一窗口多次打開\no2th\no2th.suo
?????目錄??????????0??2010-06-24?13:07??winform防止同一窗口多次打開\no2th\no2th\obj\Debug\TempPE
?????目錄??????????0??2010-06-24?13:08??winform防止同一窗口多次打開\no2th\no2th\bin\Debug
?????目錄??????????0??2010-06-24?13:13??winform防止同一窗口多次打開\no2th\no2th\obj\Debug
?????目錄??????????0??2010-06-24?13:07??winform防止同一窗口多次打開\no2th\no2th\bin
............此處省略8個文件信息
- 上一篇:點擊文本框彈出日歷控件可以選擇日期
- 下一篇:ls信道估計算法
評論
共有 條評論