資源簡介
MyQQ項目(即時聊天小系統,內包含源代碼)
代碼片段和文件信息
using?System;
using?System.Collections.Generic;
using?System.ComponentModel;
using?System.Data;
using?System.Drawing;
using?System.Text;
using?System.Windows.Forms;
using?System.Data.SqlClient;
using?System.Threading;
using?System.Media;
namespace?MyQQ
{
????///?
????///?聊天窗體
????///?
????public?partial?class?ChatForm?:?Form
????{
????????//引入系統安裝的字體
????????private?System.Drawing.Text.InstalledFontCollection?objFont?=?new?System.Drawing.Text.InstalledFontCollection();
???????
????????//創建一個數據庫連接通道
????????DBHelper?chatFormDBHelper?=?new?DBHelper();
????????public?int?friendId;?????//?好友號碼
????????public?string?nickName;???//?好友昵稱
????????public?int?faceId;????????//?好友頭像Id????????
????????int?length?=?0;???????????//當前RichTextBox長度
????????string?font?=?““;?????????//字體類型
????????int?fontSize?=?0;?????????//字體大小
????????string?fontColor?=?“black“;//字體顏色
????????public?ChatForm()
????????{
????????????InitializeComponent();
????????}
????????///?
????????///?窗體加載時的動作
????????///?
????????///?
????????///?
????????private?void?ChatForm_Load(object?sender?EventArgs?e)
????????{
????????????//加載皮膚
????????????this.skinEngine1.SkinFile?=?“skin\\“?+?MainForm.skin[MainForm.skinIndex]?+?“.ssk“;
????????????//循環顯示字體
????????????foreach?(System.Drawing.FontFamily?i?in?objFont.Families)
????????????{
????????????????cboFont.Items.Add(i.Name.ToString());
????????????}
????????????cboFont.SelectedIndex?=?0;
????????????//循環顯示字體大小
????????????for?(int?i?=?1;?i?<=?72;?i++)
????????????{
????????????????cboFontSize.Items.Add(i.ToString());
????????????}
????????????cboFontSize.SelectedIndex?=?11;
????????????MainForm.chatForm?=?this;
????????????//透明度隨主窗體改變
????????????this.Opacity?=?MainForm.number;
????????????tmrTransparence.Start();
????????????timer.Start();
????????????//得到對應好友的昵稱
????????????DBHelper.connection.Open();
????????????string?sqlString?=?string.Format(“select?nickNamesex?from?users?where?id={0}“?friendId);
????????????SqlCommand?command?=?new?SqlCommand(sqlString?DBHelper.connection);
????????????nickName?=?command.ExecuteScalar().ToString();
????????????SqlDataReader?dataReader?=?command.ExecuteReader();
????????????if?(dataReader.Read())
????????????{
????????????????string?sex?=?dataReader[“sex“].ToString();
????????????????if?(sex?==?“男“)
????????????????{
????????????????????picFriend.ImageLocation?=?“new\\boy_1.bmp“;
????????????????}
????????????????else
????????????????{
????????????????????picFriend.ImageLocation?=?“new\\girl_1.bmp“;
????????????????}
????????????}
????????????dataReader.Close();
????????????this.Text?=?string.Format(“與{0}聊天中“?nickName);
????????????//找出當前用戶的性別
????????????sqlString?=?“select?sex?from?users?where?id=“?+?UserHelper.loginId;
????????????command.CommandText?=?sqlString;
????????????dataReader?=?command.Exec
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件??????99678??2010-10-14?23:08??MyQQ\MyQQ\197.ico
?????文件???????2462??2007-09-27?13:25??MyQQ\MyQQ\bin\Debug\FormDesignImage\add.ico
?????文件???????1212??2007-06-19?11:36??MyQQ\MyQQ\bin\Debug\FormDesignImage\BackgroundColor.bmp
?????文件??????10970??2007-09-25?15:00??MyQQ\MyQQ\bin\Debug\FormDesignImage\ba
?????文件??????11390??2007-09-25?14:58??MyQQ\MyQQ\bin\Debug\FormDesignImage\ba
?????文件???????1406??2007-06-19?11:36??MyQQ\MyQQ\bin\Debug\FormDesignImage\BuddyMenu.ico
?????文件???????2000??2007-06-19?11:00??MyQQ\MyQQ\bin\Debug\FormDesignImage\button.bmp
?????文件??????44629??2007-09-25?15:31??MyQQ\MyQQ\bin\Debug\FormDesignImage\ChatFormBG.jpg
?????文件???????2462??2007-09-27?13:31??MyQQ\MyQQ\bin\Debug\FormDesignImage\edit.ico
?????文件??????17013??2007-09-21?17:18??MyQQ\MyQQ\bin\Debug\FormDesignImage\EditRight.jpg
?????文件??????39261??2007-09-29?16:37??MyQQ\MyQQ\bin\Debug\FormDesignImage\LoginFormBG.jpg
?????文件?????241184??2007-09-11?15:24??MyQQ\MyQQ\bin\Debug\FormDesignImage\MaiFormBG.bmp
?????文件????????284??2007-09-29?11:39??MyQQ\MyQQ\bin\Debug\FormDesignImage\Message.gif
?????文件????????574??2007-06-19?10:55??MyQQ\MyQQ\bin\Debug\FormDesignImage\MessageReading.gif
?????文件???????1150??2007-09-24?09:23??MyQQ\MyQQ\bin\Debug\FormDesignImage\MyQQ.ico
?????文件??????43451??2007-09-25?15:06??MyQQ\MyQQ\bin\Debug\FormDesignImage\PersonalFormBG.jpg
?????文件??????12345??2007-09-21?17:19??MyQQ\MyQQ\bin\Debug\FormDesignImage\PersonalInfohead.jpg
?????文件???????2462??2007-09-27?13:26??MyQQ\MyQQ\bin\Debug\FormDesignImage\refresh.ico
?????文件??????20911??2007-09-21?14:53??MyQQ\MyQQ\bin\Debug\FormDesignImage\RegistForm.jpg
?????文件??????56605??2007-09-25?15:37??MyQQ\MyQQ\bin\Debug\FormDesignImage\RegistFormBG.jpg
?????文件???????1150??2007-09-24?10:21??MyQQ\MyQQ\bin\Debug\FormDesignImage\Search.ico
?????文件??????51317??2007-09-25?15:13??MyQQ\MyQQ\bin\Debug\FormDesignImage\SearchFormBG.JPG
?????文件??????22170??2007-09-21?14:50??MyQQ\MyQQ\bin\Debug\FormDesignImage\SearchFriend.jpg
?????文件??????11091??2007-09-25?15:01??MyQQ\MyQQ\bin\Debug\FormDesignImage\Security.jpg
?????文件??????11394??2007-09-25?14:57??MyQQ\MyQQ\bin\Debug\FormDesignImage\SecurityClick.jpg
?????文件??????14520??2007-06-19?11:37??MyQQ\MyQQ\bin\Debug\FormDesignImage\ToolBarBackground.bmp
?????文件???????1080??2007-06-19?10:58??MyQQ\MyQQ\bin\Debug\HeadImage\1-1.bmp
?????文件???????4856??2007-06-19?11:02??MyQQ\MyQQ\bin\Debug\HeadImage\1.bmp
?????文件???????1080??2007-06-19?10:58??MyQQ\MyQQ\bin\Debug\HeadImage\10-1.bmp
?????文件???????4856??2007-06-19?11:02??MyQQ\MyQQ\bin\Debug\HeadImage\10.bmp
............此處省略517個文件信息
- 上一篇:捷聯式慣性導航原理(袁信、鄭鍔著).pdf
- 下一篇:博士德霸道進銷存
評論
共有 條評論