当前位置:文档之家› C课程设计报告要求

C课程设计报告要求

报告内容应包括以下内容(单面打印不少于10页,统一封面见下页):1.程序系统设计思路2.程序系统结构的框架图3.功能模块和类的设计以及数据库设计(模块功能说明(如函数功能、入口及出口参数说明,函数调用关系描述等),类的属性与方法说明与类间关系)4.主要算法流程图5.关键源代码编程步骤6.采用的测试过程与测试(数据调试方法,测试结果的分析与讨论,测试过程中遇到的主要问题及采取的解决措施)7.运行结果分析和总结8.参考资料课程设计评分由以下几部分组成:平时考勤;培训老师对提交的项目评分;实验报告分东华理工大学长江学院C#课程设计报告题目:万能播放器学号:2班级:姓名:方新盛摘要本文主要是开发了一款简单的万能播放器。

可以播放三种格式的jpg图片、wmv视频文件、htm网址。

包括该播放器实现了的基本功能包括:1.音频视频文件的打开、添加到菜单、媒体的播放、音量大小的调节、播放时间的拖动、暂停播放、停止。

2图片的播放速度、透明度、手动或者自动的调节3htm网址的播放,使之成为一款简易的媒体播放设备,能够完美的播放市面上大多数的音频、视频文件。

在程序设计中,系统开发平台为Windows 7操作系统,程序设计环境采用visual stdio。

在程序设计中,程序通过调试运行,初步实现了设计目标,本程序是基于C#集成开发环境以及access数据库、利用各种控件实现媒体播放的功能的,除了基本的播放控制外,还具有多文件自动顺序循环播放、全屏播放、静音等实用功能。

关键字:播放器登入界面数据库目录1.程序系统设计思路2.程序系统结构的框架图3.功能模块和类的设计以及数据库设计(模块功能说明(如函数功能、入口及出4.口参数说明,函数调用关系描述等),类的属性与方法说明与类间关系)--5.主要算法流程图6. 采用的测试过程与测试(数据调试方法,测试结果的分析与讨论,测试过程中遇到的主要问题及采取的解决措施)7. 运行结果分析和总结8.参考资料1.程序系统设计思路参照Visual C#.NET所学知识以及老师所做的示范,首先做出万能播放器播放图片视频网址的界面,实现音频视频文件的打开、添加到菜单、媒体的播放、音量大小的调节、播放时间的拖动、暂停播放、停止的控件,再做出登入界面,建立数据库,利用数据库access设置出登入名字密码,最终实现代码的调试运行。

2.程序系统结构的框架图3.功能模块和类的设计以及数据库设计(模块功能说明(如函数功能、入口及出口参数说明,函数调用关系描述等),类的属性与方法说明与类间关系)功能界面:类的属性说明:4.主要算法流程图5.关键源代码编程步骤namespace WPlay_1班16_方新盛{partial class FormLogin{///<summary>/// Required designer variable.///</summary>private ponentModel.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(){ponents = new ponentModel.Container();bel1 = new bel();bel2 = new bel();bel3 = new bel();this.textBoxuname = new System.Windows.Forms.TextBox();this.textBoxpwd = new System.Windows.Forms.TextBox();this.buttonLogin = new System.Windows.Forms.Button();this.buttonReset = new System.Windows.Forms.Button();this.buttonExit = new System.Windows.Forms.Button();boBoxrole = new boBox();this.timer1 = new System.Windows.Forms.Timer(ponents);this.timer2 = new System.Windows.Forms.Timer(ponents);this.SuspendLayout();//// label1//bel1.AutoSize = true;bel1.Location = new System.Drawing.Point(63, 43); = "label1";bel1.Size = new System.Drawing.Size(89, 20);bel1.TabIndex = 0;bel1.Text = "用户名:";//// label2//bel2.AutoSize = true;bel2.Location = new System.Drawing.Point(63, 86); = "label2";bel2.Size = new System.Drawing.Size(89, 20);bel2.TabIndex = 1;bel2.Text = "密码:";//// label3//bel3.AutoSize = true;bel3.Location = new System.Drawing.Point(63, 133); = "label3";bel3.Size = new System.Drawing.Size(89, 20);bel3.TabIndex = 2;bel3.Text = "角色:";//// textBoxuname//this.textBoxuname.Location = new System.Drawing.Point(138, 40); = "textBoxuname";this.textBoxuname.Size = new System.Drawing.Size(221, 30);this.textBoxuname.TabIndex = 3;//// textBoxpwd//this.textBoxpwd.Location = new System.Drawing.Point(138, 83); = "textBoxpwd";this.textBoxpwd.Size = new System.Drawing.Size(221, 30);this.textBoxpwd.TabIndex = 4;//// buttonLogin//this.buttonLogin.BackColor = System.Drawing.Color.White;this.buttonLogin.FlatAppearance.BorderColor = System.Drawing.Color.Red;this.buttonLogin.ForeColor =System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));this.buttonLogin.Location = new System.Drawing.Point(34, 238); = "buttonLogin";this.buttonLogin.Size = new System.Drawing.Size(88, 38);this.buttonLogin.TabIndex = 6;this.buttonLogin.Text = "登陆";eVisualStyleBackColor = false;this.buttonLogin.Click += new System.EventHandler(this.buttonLogin_Click);//// buttonReset//this.buttonReset.BackColor = System.Drawing.Color.White;this.buttonReset.FlatAppearance.BorderColor =System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))),((int)(((byte)(192)))));this.buttonReset.FlatAppearance.MouseDownBackColor =System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(255)))),((int)(((byte)(255)))));this.buttonReset.FlatAppearance.MouseOverBackColor =System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(255)))),((int)(((byte)(255)))));this.buttonReset.Font = new System.Drawing.Font("微软雅黑", 15F,System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));this.buttonReset.ForeColor =System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(255)))),((int)(((byte)(255)))));this.buttonReset.Location = new System.Drawing.Point(194, 238); = "buttonReset";this.buttonReset.Size = new System.Drawing.Size(96, 38);this.buttonReset.TabIndex = 7;this.buttonReset.Text = "重置";eVisualStyleBackColor = false;this.buttonReset.Click += new System.EventHandler(this.buttonReset_Click);//// buttonExit//this.buttonExit.BackColor = System.Drawing.Color.White;this.buttonExit.ForeColor =System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(255)))),((int)(((byte)(255)))));this.buttonExit.Location = new System.Drawing.Point(368, 238); = "buttonExit";this.buttonExit.Size = new System.Drawing.Size(91, 38);this.buttonExit.TabIndex = 8;this.buttonExit.Text = "退出";eVisualStyleBackColor = false;this.buttonExit.Click += new System.EventHandler(this.buttonExit_Click);//// comboBoxrole//boBoxrole.AutoCompleteCustomSource.AddRange(new string[] {"普通用户","管理员","超级管理员"});boBoxrole.FormattingEnabled = true;boBoxrole.Location = new System.Drawing.Point(138, 130); = "comboBoxrole";boBoxrole.Size = new System.Drawing.Size(221, 28);boBoxrole.TabIndex = 9;boBoxrole.Text = "普通用户";//// timer1//this.timer1.Enabled = true;this.timer1.Interval = 1000;this.timer1.Tick += new System.EventHandler(this.timer1_Tick);//// timer2//this.timer2.Enabled = true;this.timer2.Tick += new System.EventHandler(this.timer2_Tick);//// FormLogin//this.AutoScaleDimensions = new System.Drawing.SizeF(10F, 20F);this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;this.BackColor = System.Drawing.Color.LightGray;this.ClientSize = new System.Drawing.Size(491, 453);this.Controls.Add(boBoxrole);this.Controls.Add(this.buttonExit);this.Controls.Add(this.buttonReset);this.Controls.Add(this.buttonLogin);this.Controls.Add(this.textBoxpwd);this.Controls.Add(this.textBoxuname);this.Controls.Add(bel3);this.Controls.Add(bel2);this.Controls.Add(bel1);this.Font = new System.Drawing.Font("宋体", 15F,System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));this.ForeColor = System.Drawing.Color.Black;this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;this.Margin = new System.Windows.Forms.Padding(5); = "FormLogin";this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;this.Text = "登陆";this.Load += new System.EventHandler(this.FormLogin_Load);this.ResumeLayout(false);this.PerformLayout();}#endregionprivate bel label1;private bel label2;private bel label3;private System.Windows.Forms.TextBox textBoxuname;private System.Windows.Forms.TextBox textBoxpwd;private System.Windows.Forms.Button buttonLogin;private System.Windows.Forms.Button buttonReset;private System.Windows.Forms.Button buttonExit;private boBox comboBoxrole;private System.Windows.Forms.Timer timer1;private System.Windows.Forms.Timer timer2;}}using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;//引入数据库命名空间using System.Data.OleDb;namespace WPlay_1班16_方新盛{class DbopAccess{static public bool Login(string name,string pwd){//步骤//1.创建连接,连接数据库OleDbConnection con = new OleDbConnection();con.ConnectionString = @"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=F:\达内C#\课程设计C#\WPlay_1班16_方新盛\WPlay_1班16_方新盛\bin\Debug\userdb.accdb;Persist Security Info=True";//创建命令,执行语句OleDbCommand cmd = new OleDbCommand();cmd.Connection = con;mandText = "select * from tusers where uname='"+name +"' andpwd='"+pwd+"'";con.Open();//出错!object getResult = cmd.ExecuteScalar();//3.返回结果if (getResult!=null){return true;}else{return false;}}}}7.运行结果分析和总结登入界面运行界面总结:经过的4天的课程设计,让我受益匪浅,给我收获最大的是我觉得很多工作需要我去摸索和探讨,要不怕吃苦,勇于激流勇进,有的工作虽然单挑又重复,但这是磨练意志最有效的方法,我告诫自己要认真完成,对每项实训任务都要他看成是对自己的一次考核,做到每一件事的过程中遇到困难,一定要争取不抛弃,不放弃,坚持“战斗”,只要希望还在,胜利一定属于我们。

相关主题