用戶故事排球教練助手

計劃:估計這個任務需要一周時間

需求分析:作為一名排球教練助手,我需要了解每場每位隊員的技術動作,每場比賽每位隊員的得分情況,以便教練更好的了解到每位隊員的發揮情況和特長。

設計文檔:用戶進入此界面可以查看隊伍比賽成績以及比賽結果。

設計復審:與同學一起審核

具體編碼

namespace 排球
{

public partial class ZhouShou : Form
{

public ZhouShou()
{
InitializeComponent();
}

private void btnOK_Click(object sender, EventArgs e)
{
string ZhuGong111 = txtZhuGong1.Text;
string ZhuGong222 = txtZhuGong2.Text;
string FuGong111 = txtFuGong1.Text;
string FuGong222 = txtFuGong2.Text;
string JieYing111 = txtJieYing.Text;
string ErChuan111 = txtErChuan.Text;
string ZiYouRen111 = txtZiYouRen.Text;
if (string.IsNullOrEmpty(ZhuGong111)) { MessageBox.Show("請輸入本場比賽的主攻手一"); }
else if (string.IsNullOrEmpty(FuGong111)) { MessageBox.Show("請輸入本場比賽的副攻手一"); }
else if (string.IsNullOrEmpty(ZhuGong222)) { MessageBox.Show("請輸入本場比賽的主攻手二"); }
else if (string.IsNullOrEmpty(FuGong222)) { MessageBox.Show("請輸入本場比賽的副攻手二"); }
else if (string.IsNullOrEmpty(JieYing111)) { MessageBox.Show("請輸入本場比賽的接應"); }
else if (string.IsNullOrEmpty(ErChuan111)) { MessageBox.Show("請輸入本場比賽的二傳"); }
else if (string.IsNullOrEmpty(ZiYouRen111)) { MessageBox.Show("請輸入本場比賽的自由人"); }
else
{
groupBox1.Visible = false;
groupBox2.Visible = true;
linkZhuGong1.Text = ZhuGong1.Text + txtZhuGong1.Text;
linkFuGong1.Text=FuGong1.Text+txtFuGong1.Text;
linkZhuGong2.Text = ZhuGong2.Text + txtZhuGong2.Text;
linkFuGong2.Text = FuGong2.Text + txtFuGong2.Text;
linkJieYing.Text = JieYing.Text + txtJieYing.Text;
linkErChuan.Text = ErChuan.Text + txtErChuan.Text;
linkZiYouRen.Text = ZiYouRen.Text + txtZiYouRen.Text;
}

}

private void ZhouShou_Load(object sender, EventArgs e)
{
groupBox1.Visible = true;
groupBox2.Visible = false;
}
int i = 0;

private void button1_Click(object sender, EventArgs e)
{
i++;
txtFen.Text = lblName.Text + button1.Text + " " + i;
//txtFirst.Text = label1.Text + ":" + button1.Text + " " + i;

}
int FQ = 0;
private void btnFaQiu_Click(object sender, EventArgs e)
{
FQ++;
txtFen.AppendText(lblName.Text+btnFaQiu.Text+" "+FQ);
//FQ++;
//txtZhuGong11.Text = lblZhuGong1.Text + btnFaQiu.Text + " " + FQ;
//txtZhuGong11.Text.Replace(FQ.ToString(), lblZhuGong1.Text + btnFaQiu.Text + " " + FQ);
//txtZhuGong11.AppendText(lblZhuGong1.Text + btnFaQiu.Text + " " + FQ);
}
int KQ=0;
private void btnKouQiu_Click(object sender, EventArgs e)
{
KQ++;
txtFen.AppendText(lblName.Text + btnKouQiu.Text + " " + KQ);
//txtZhuGong11.AppendText(lblZhuGong1.Text + btnKouQiu.Text + " " + KQ);


}
int CW=0;
private void btnChouWang_Click(object sender, EventArgs e)
{
CW++;
txtFen.AppendText(lblName.Text + btnChouWang.Text + " " + CW);
}
int DQ = 0;
private void btnDiaoQiu_Click(object sender, EventArgs e)
{
DQ++;
txtFen.AppendText(lblName.Text + btnDiaoQiu.Text + " " + DQ);
}
int LWCJ = 0;
private void btnLWChuJie_Click(object sender, EventArgs e)
{
LWCJ++;
txtFen.AppendText(lblName.Text + btnLWChuJie.Text + " " + LWCJ);
}
int FQSW = 0;
private void btnFaQiuShiWu_Click(object sender, EventArgs e)
{
FQSW++;
txtFen.AppendText(lblName.Text + btnFaQiuShiWu.Text + " " + FQSW);
}
int KQCJ = 0;
private void btnKouQiuChuJie_Click(object sender, EventArgs e)
{
KQCJ++;
txtFen.AppendText(lblName.Text + btnKouQiuChuJie.Text + " " + KQCJ);
}
private void lastOK_Click(object sender, EventArgs e)
{
//創建一個文件流,用以寫入或者創建一個StreamWriter
FileStream fs = new FileStream("C:\\file.txt", FileMode.OpenOrCreate, FileAccess.Write);
StreamWriter m_streamWriter = new StreamWriter(fs);
m_streamWriter.Flush(); // 使用StreamWriter來往文件中寫入內容
m_streamWriter.BaseStream.Seek(0, SeekOrigin.Begin);
// 把richTextBox1中的內容寫入文件
m_streamWriter.Write(txtFen.Text);
//關閉此文件 m_streamWriter.Flush ( ) ;
m_streamWriter.Close();
MessageBox.Show("保存成功!");
groupBox2.Visible = false;
groupBox1.Visible = true;
}

測試

總結:程序運行過程中還有部分問題,有待完善,也沒有運用三層架構。還需要再接再厲。

?

轉載于:https://www.cnblogs.com/wangsanhong/p/6256149.html

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/371710.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/371710.shtml
英文地址,請注明出處:http://en.pswp.cn/news/371710.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

TMS320DM642學習----第一篇(硬件連接)

DSP設備型號:SEED-DTK-VPM642(目前實驗室用途:視頻處理,圖像處理方向,預計搭載目標跟蹤以及云臺防抖等算法) 官網鏈接:http://www.seeddsp.com/index.php/Home/Product/detail/name/1/id/174.ht…

字符串內存內部

本文基于我對StackOverflow的回答 。 我正在嘗試解釋String類如何存儲文本,內部存儲和常量池如何工作。 這里要理解的要點是String Java對象與其內容– private value字段下的char[]之間的區別。 String基本上是char[]數組的包裝器,將其封裝并使其無法修…

關于inline-block 元素之間為何會產生間隔

關于inline-block 元素之間為何會產生間隔 現象&#xff1a; <body><input type"text"><input type"text"> </body> 在瀏覽器中的表現&#xff1a; 實時上不僅僅是 inline-block 會導致這種現象。 inline 也會導致。 那問題來了&a…

java 入參 是 枚舉_java 枚舉 參數傳遞

展開全部這樣做是不行的&#xff0c;原因是&#xff1a;Java中的對象實例化都是在堆中&#xff0c;如果是普通的類實例變量&#xff0c;比如在方法636f707962616964757a686964616f313333376166371中定義的普通類實例變量&#xff0c;傳到了方法2中&#xff0c;由于方法1和方法2…

loadView的使用總結

一、loadView 1. loadView什么時候被調用&#xff1f; 每次訪問UIViewController的view&#xff08;如 controller.view、self.view&#xff09;并且view為nil&#xff0c;loadView方法就會被調用 2. 有什么作用 loadView 方法是用來負責創建UIViewController的view 3. 默認實…

數據庫備份 java jar_Java實現數據庫備份并利用ant導入SQL腳本

?數據備份對于經常在運維部署方面的工作者來說&#xff0c;是一件相對簡單的事情&#xff0c;都可以通過某一個SQL工具進行備份&#xff0c;但是如果在項目運行當中&#xff0c;我們需要對數據進行實時&#xff0c;或者是每隔一星期&#xff0c;一個月&#xff0c;等等進行數據…

JSF簡單Ajax示例

今天&#xff0c;我們將看到一些使用JSF的Ajax簡單樣本。 如果要查看有關JSF / Web應用程序的其他文章&#xff0c;請單擊以下鏈接&#xff1a; 重定向后的JSF持久化對象和消息 &#xff0c; 使用JAAS和JSF進行用戶登錄驗證 &#xff0c; JSF&#xff1a;Converter and Bean Au…

常用的好用的window工具

1. FastStone Capture截圖錄屏軟件 百度軟件中心&#xff1a;http://rj.baidu.com/soft/detail/13504.html?ald 注冊企業版&#xff1a; 用戶名&#xff1a;c1ikm 注冊碼&#xff1a;AXMQX-RMMMJ-DBHHF-WIHTV 中文輸入亂碼解決方法&#xff1a; 2. Notepad文本編輯器&#xff…

表分區

http://www.cnblogs.com/leestar54/p/6225821.html轉載于:https://www.cnblogs.com/jouny/p/6262850.html

java飛鴿傳書_feige 飛鴿傳書源代碼java 實現不錯的聯系網絡編程的資料飛鴿傳書的GUI(java實現) - 下載 - 搜珍網...

我的飛鴿傳書/FileFilter.java我的飛鴿傳書/FileNameExtensionFilter.java我的飛鴿傳書/飛鴿傳書/classes/feige/About.class我的飛鴿傳書/飛鴿傳書/classes/feige/ConnectOthers$ReadMessageThread.class我的飛鴿傳書/飛鴿傳書/classes/feige/ConnectOthers.class我的飛鴿傳書…

JAXB和根元素

XmlRootElement是人們習慣于與JAXB&#xff08;JSR-222&#xff09;一起使用的注釋。 目的是將根元素與類唯一關聯。 由于JAXB類映射到復雜類型&#xff0c;因此一個類有可能對應于多個根元素。 在這種情況下&#xff0c;無法使用XmlRootElement &#xff0c;人們開始感到有些困…

python socket模塊實現udp通信_Python基于socket模塊實現UDP通信功能示例

Python基于socket模塊實現UDP通信功能示例本文實例講述了Python基于socket模塊實現UDP通信功能。分享給大家供大家參考&#xff0c;具體如下&#xff1a;一 代碼1、接收端import socket#使用IPV4協議&#xff0c;使用UDP協議傳輸數據ssocket.socket(socket.AF_INET, socket.SOC…

Hibernate緩存基礎知識

最近&#xff0c;我嘗試了休眠緩存。 在這篇文章中&#xff0c;我想分享我的經驗&#xff0c;并指出Hibernate Second Level Cache的一些細節。 在此過程中&#xff0c;我將指導您閱讀一些有助于實現緩存的文章。 讓我們從地面開始。 在休眠狀態下緩存 緩存功能旨在減少必要的…

TP3.2之WHERE組合條件處理

1、條件都是int類型&#xff1a; $User->where(type1 AND status1)->select(); 2、條件包含字符串類型&#xff1a; 使用3.1以上版本的話&#xff0c;使用字符串條件的時候&#xff0c;建議配合預處理機制&#xff0c;確保更加安全&#xff0c; $Model->where("i…

linux-ssh遠程后臺執行腳本-放置后臺執行問題(轉)

寫了一個監控負載的小腳本&#xff08;死循環&#xff0c;測試結束后再kill對應進程&#xff09;&#xff0c;因需要監控多臺服務器&#xff0c;所以在一臺服務器上使用ssh統一執行腳本遇到問題&#xff1a;使用ssh root172.16.146.20 /usr/local/luly/loadavg.sh 2 2 &執行…

python2.7輸入函數_Python2.7的用戶輸入函數有問題,無法讓這些輸入與程序一起工作...

我對python世界還是個新手&#xff0c;雖然我已經用php做了很多工作。。。這是我的案子。。。在我正在用python2.7為我的小程序編寫一些代碼。在在那個程序中&#xff0c;我需要2個用戶輸入&#xff0c;它們都是數字。在第一個數字不得大于11&#xff0c;也不得小于0。在第二個…

創建Java動態代理

Java動態代理機制提供了一種有趣的方式來創建代理實例。 不過&#xff0c;創建動態代理的步驟有些繁瑣&#xff0c;請考慮將代理用于審核服務實例的方法調用所花費的時間– public interface InventoryService {public Inventory create(Inventory inventory);public List<I…

html5有哪些新特性、移除了那些元素?如何處理HTML5新標簽的瀏覽器兼容問題?如何區分 HTML 和 HTML5?...

新特性&#xff1a; 1. 拖拽釋放(Drag and drop) API 2. 語義化更好的內容標簽&#xff08;header,nav,footer,aside,article,section&#xff09; 3. 音頻、視頻API(audio,video) 4. 畫布(Canvas) API 5. 地理(Geolocation) API 6. 本地離線存儲 localStorage 長期存儲數據&am…

Substring with Concatenation of All Words 題解

題意 You are given a string, s, and a list of words, words, that are all of the same length. Find all starting indices of substring(s) in s that is a concatenation of each word in words exactly once and without any intervening characters. For example, give…