91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 228KB
    文件類型: .zip
    金幣: 2
    下載: 0 次
    發布日期: 2021-06-12
  • 語言: 其他
  • 標簽: ATM??

資源簡介

銀行系統: 1)程序中使用事件及委托。參照視頻中提到的“六步法”,在ATM類中實現一個事件BigMoneyFetched (一大筆錢被取走了),即ATM機在操作時如果用戶取款數大于10000,則可以激活這個事件。事件參數也是一個對象(可以定義類BigMoneyArgs),含有賬號及當時取款數。在程序中(如Main中)注冊這個事件,使之能在界面中顯示出告警信息(相當于銀行的監控功能)。 2)程序中使用自定義異常。比如,定義一個異常類BadCashException,表示有壞的鈔票。在程序中適當的地方(如取款函數)中,拋出(throw)(自定義的異常類(如random的Next(3)小于1,表示有三個之一的概率時就拋出),在ATM調用這個函數時進行捕獲(catch)。

資源截圖

代碼片段和文件信息

using?System;
using?System.Collections.Generic;
using?System.ComponentModel;
using?System.Data;
using?System.Drawing;
using?System.Linq;
using?System;
using?System.Windows.Forms;

namespace?ATM
{
????public?partial?class?Form1?:?Form
????{
????????public?static?Account?a?=?new?Account();
????????public?static?CreditAccount?ca?=?new?CreditAccount();
????????public?Form1()
????????{
????????????InitializeComponent();
????????}
????????public?static?string?name?pass;
????????private?string?login_input_ID?login_input_pass;
????????private?void?Form1_Load(object?sender?EventArgs?e)
????????{

????????}


????????private?void?button3_Click(object?sender?EventArgs?e)
????????{
????????????if?(!String.IsNullOrEmpty(login_input_ID)?&&?!String.IsNullOrEmpty(login_input_pass))
????????????{
????????????????Form3?f3?=?new?Form3();
???????????????
????????????????if?(login_input_ID?==?a[0]?&&?login_input_pass?==?a.password)
????????????????????f3.Show();
????????????????else
????????????????????MessageBox.Show(“wrong?ID?or?password.“);
????????????}
????????????else
????????????{???????????????????????????????????????????????????????????????????????????//use?custom?Exception?Error?number?0
????????????????try
????????????????{
????????????????????Account.emptyInput(login_input_ID);
????????????????????Account.emptyInput(login_input_pass);
????????????????}
????????????????catch?(EmptyException?ex)
????????????????{
????????????????????MessageBox.Show(ex.Message?+?ex.getId());
????????????????}
????????????}
????????}

????????private?void?button1_Click(object?sender?EventArgs?e)
????????{
????????????Form2?f2?=?new?Form2();
????????????name?=?pass?=?null;
????????????f2.Show();
????????}



????????private?void?textBox1_TextChanged(object?sender?EventArgs?e)
????????{
????????????this.textBox1.TextChanged?+=?new?System.EventHandler(this.textBox1_TextChanged);
????????????login_input_ID?=?this.textBox1.Text;
????????}

????????private?void?textBox2_TextChanged(object?sender?EventArgs?e)
????????{
????????????this.textBox2.TextChanged?+=?new?System.EventHandler(this.textBox2_TextChanged);
????????????login_input_pass?=?this.textBox2.Text;
????????}
????}

????public?class?BigMoneyArgs?:?EventArgs
????{
????????public?int?ID;
????????public?int?amount_fetch;
????}
????public?delegate?void?BigMoneyHandler(object?sender?BigMoneyArgs?e);

????//defining?Exception?classes
????class?SurpassException?:?ApplicationException
????{
????????private?int?idnumber;
????????public?SurpassException(String?message?int?id)?:?base(message)
????????{
????????????this.idnumber?=?id;
????????}
????????public?int?getId()
????????{
????????????return?idnumber;
????????}
????}
????class?EmptyException?:?ApplicationException
????{
????????private?int?idnumber;
????????public?EmptyException(String?message?int?id)?:?base(message)
????????{
????????????this.idnumber?=?id;
????????

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2020-04-22?15:50??ATM\
?????目錄???????????0??2020-04-22?15:50??ATM\.vs\
?????目錄???????????0??2020-04-22?15:50??ATM\.vs\ATM\
?????目錄???????????0??2020-04-22?15:50??ATM\.vs\ATM\v16\
?????文件???????53248??2020-03-28?12:53??ATM\.vs\ATM\v16\.suo
?????目錄???????????0??2020-04-22?15:50??ATM\.vs\ATM\v16\Server\
?????目錄???????????0??2020-04-22?15:50??ATM\.vs\ATM\v16\Server\sqlite3\
?????文件???????????0??2020-03-21?14:07??ATM\.vs\ATM\v16\Server\sqlite3\db.lock
?????文件??????614400??2020-03-28?12:53??ATM\.vs\ATM\v16\Server\sqlite3\storage.ide
?????目錄???????????0??2020-04-22?15:50??ATM\ATM\
?????文件????????4202??2020-03-28?12:44??ATM\ATM\ATM.csproj
?????文件?????????189??2020-03-21?14:07??ATM\ATM\App.config
?????文件????????4827??2020-03-28?12:30??ATM\ATM\Form1.Designer.cs
?????文件???????12809??2020-03-28?12:47??ATM\ATM\Form1.cs
?????文件????????5817??2020-03-28?12:30??ATM\ATM\Form1.resx
?????文件????????4205??2020-03-28?12:45??ATM\ATM\Form2.Designer.cs
?????文件????????1443??2020-03-28?12:45??ATM\ATM\Form2.cs
?????文件????????5817??2020-03-28?12:45??ATM\ATM\Form2.resx
?????文件???????10582??2020-03-28?12:53??ATM\ATM\Form3.Designer.cs
?????文件????????2320??2020-03-28?12:53??ATM\ATM\Form3.cs
?????文件????????5817??2020-03-28?12:53??ATM\ATM\Form3.resx
?????文件?????????515??2020-03-21?14:07??ATM\ATM\Program.cs
?????目錄???????????0??2020-04-22?15:50??ATM\ATM\Properties\
?????文件????????1298??2020-03-21?14:07??ATM\ATM\Properties\AssemblyInfo.cs
?????文件????????2819??2020-03-21?14:07??ATM\ATM\Properties\Resources.Designer.cs
?????文件????????5612??2020-03-21?14:07??ATM\ATM\Properties\Resources.resx
?????文件????????1090??2020-03-21?14:07??ATM\ATM\Properties\Settings.Designer.cs
?????文件?????????249??2020-03-21?14:07??ATM\ATM\Properties\Settings.settings
?????目錄???????????0??2020-04-22?15:50??ATM\ATM\bin\
?????目錄???????????0??2020-04-22?15:50??ATM\ATM\bin\Debug\
?????文件???????21504??2020-03-28?12:49??ATM\ATM\bin\Debug\ATM.exe
............此處省略18個文件信息

評論

共有 條評論