C#實(shí)現(xiàn)餐飲管理系統(tǒng)完整版
完整版的C#餐飲管理系統(tǒng),供大家一起共同分享學(xué)習(xí)。
部分代碼:
Dataoperator.cs
using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Data.SqlClient;
/// <summary>
///Dataoperator 的摘要說(shuō)明
/// </summary>
public class Dataoperator
{
public Dataoperator()
{
//
//TODO: 在此處添加構(gòu)造函數(shù)邏輯
//
}
public static SqlConnection creatcon()
{
string strcon = ConfigurationManager.ConnectionStrings["ConnStr"].ConnectionString;
SqlConnection con = new SqlConnection(strcon);
return con;
}
/// 查詢的數(shù)據(jù)是否已經(jīng)存在
/// </summary>
/// <param name="sql">需要執(zhí)行的SQL語(yǔ)句</param>
/// <returns>返回布爾值,true表示已經(jīng)存在,false表示不存在</returns>
public static bool isData(string sql)
{
//創(chuàng)建數(shù)據(jù)庫(kù)連接
SqlConnection con = creatcon();
//打開(kāi)數(shù)據(jù)庫(kù)連接
con.Open();
//創(chuàng)建Command對(duì)象
SqlCommand com = new SqlCommand(sql, con);
//獲取ExecuteScalar方法所返回的值
int ex = Convert.ToInt32(com.ExecuteScalar());
//關(guān)閉數(shù)據(jù)庫(kù)連接
con.Close();
//判斷整型變量并返回相應(yīng)的布爾值
if (ex > 0)
{
return true;
}
else
{
return false;
}
}
/// 執(zhí)行數(shù)據(jù)庫(kù)中的更新、插入、刪除操作
/// </summary>
/// <param name="sql">需要執(zhí)行的SQL語(yǔ)句</param>
/// <returns>返回布爾值,true表示已存在,false表示不存在</returns>
public static bool exSql(string sql)
{
SqlConnection con = creatcon();
con.Open();
SqlCommand com = new SqlCommand(sql, con);
int rows = Convert.ToInt32(com.ExecuteNonQuery());
if (rows > 0)
return true;
else
return false;
}
public static string getTier(string sql) //返回指定列的值
{
//SqlConnection con = creatcon()
//con.Open();
//SqlCommand cmd = new SqlCommand(sql, con);
////獲得記錄行
//SqlDataReader sdr = cmd.ExecuteReader();
//sdr.Read();
//string str = sdr[0].ToString();
//con.Close();
//return str;
SqlConnection con = creatcon();
SqlDataAdapter sda = new SqlDataAdapter(sql, con);
DataSet ds = new DataSet();
sda.Fill(ds);
string str = ds.Tables[0].Rows[0][0].ToString();
return str;
}
public static DataSet getRows(string sql) //返回所查詢表中所有數(shù)據(jù)
{
//創(chuàng)建數(shù)據(jù)庫(kù)連接
SqlConnection con = creatcon();
//打開(kāi)數(shù)據(jù)連接
//創(chuàng)建DataAdapter對(duì)象
SqlDataAdapter sda = new SqlDataAdapter(sql, con);
//創(chuàng)建DataSet對(duì)象
DataSet ds = new DataSet();
//通過(guò)Fill方法
sda.Fill(ds);
//關(guān)閉數(shù)據(jù)庫(kù)連接
//返回DataSet對(duì)象
return ds;
}
}
MessageBox.cs
using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
/// <summary>
///MessageBox 的摘要說(shuō)明
/// </summary>
public class MessageBox
{
public MessageBox()
{
//
//TODO: 在此處添加構(gòu)造函數(shù)邏輯
//
}
public static void Show(string messageInfo)
{
HttpContext.Current.Response.Write("<script>alert('"+messageInfo+"')</script>");
}
public static void Show(string messageInfo, string pagePath)
{
HttpContext.Current.Response.Write("<script>alert('"+messageInfo+"');location='"+pagePath+"'</script>");
}
public static void ShowPath(string pagePath)
{
HttpContext.Current.Response.Write("<script>location='" + pagePath + "'</script>");
}
}
UserInformation.designer.cs
#pragma warning disable 1591
//------------------------------------------------------------------------------
// <auto-generated>
// 此代碼由工具生成。
// 運(yùn)行庫(kù)版本:2.0.50727.1891
//
// 對(duì)此文件的更改可能會(huì)導(dǎo)致不正確的行為,并且如果
// 重新生成代碼,這些更改將會(huì)丟失。
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.Linq;
using System.Data.Linq.Mapping;
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;
[System.Data.Linq.Mapping.DatabaseAttribute(Name="MenuLinq")]
public partial class UserInformationDataContext : System.Data.Linq.DataContext
{
private static System.Data.Linq.Mapping.MappingSource mappingSource = new AttributeMappingSource();
#region Extensibility Method Definitions
partial void OnCreated();
partial void Insert用戶信息(用戶信息 instance);
partial void Update用戶信息(用戶信息 instance);
partial void Delete用戶信息(用戶信息 instance);
partial void Insert訂餐信息(訂餐信息 instance);
partial void Update訂餐信息(訂餐信息 instance);
partial void Delete訂餐信息(訂餐信息 instance);
partial void Insert菜樣信息(菜樣信息 instance);
partial void Update菜樣信息(菜樣信息 instance);
partial void Delete菜樣信息(菜樣信息 instance);
#endregion
public UserInformationDataContext() :
base(global::System.Configuration.ConfigurationManager.ConnectionStrings["ConnStr"].ConnectionString, mappingSource)
{
OnCreated();
}
public UserInformationDataContext(string connection) :
base(connection, mappingSource)
{
OnCreated();
}
public UserInformationDataContext(System.Data.IDbConnection connection) :
base(connection, mappingSource)
{
OnCreated();
}
public UserInformationDataContext(string connection, System.Data.Linq.Mapping.MappingSource mappingSource) :
base(connection, mappingSource)
{
OnCreated();
}
public UserInformationDataContext(System.Data.IDbConnection connection, System.Data.Linq.Mapping.MappingSource mappingSource) :
base(connection, mappingSource)
{
OnCreated();
}
public System.Data.Linq.Table<用戶信息> 用戶信息
{
get
{
return this.GetTable<用戶信息>();
}
}
public System.Data.Linq.Table<訂餐信息> 訂餐信息
{
get
{
return this.GetTable<訂餐信息>();
}
}
public System.Data.Linq.Table<菜樣信息> 菜樣信息
{
get
{
return this.GetTable<菜樣信息>();
}
}
}
[Table(Name="dbo.用戶信息")]
public partial class 用戶信息 : INotifyPropertyChanging, INotifyPropertyChanged
{
private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
private int _序號(hào);
private string _用戶名;
private string _用戶密碼;
private string _郵箱;
private string _住址;
private string _手機(jī)號(hào);
#region Extensibility Method Definitions
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
partial void OnCreated();
partial void On序號(hào)Changing(int value);
partial void On序號(hào)Changed();
partial void On用戶名Changing(string value);
partial void On用戶名Changed();
partial void On用戶密碼Changing(string value);
partial void On用戶密碼Changed();
partial void On郵箱Changing(string value);
partial void On郵箱Changed();
partial void On住址Changing(string value);
partial void On住址Changed();
partial void On手機(jī)號(hào)Changing(string value);
partial void On手機(jī)號(hào)Changed();
#endregion
public 用戶信息()
{
OnCreated();
}
[Column(Storage="_序號(hào)", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
public int 序號(hào)
{
get
{
return this._序號(hào);
}
set
{
if ((this._序號(hào) != value))
{
this.On序號(hào)Changing(value);
this.SendPropertyChanging();
this._序號(hào) = value;
this.SendPropertyChanged("序號(hào)");
this.On序號(hào)Changed();
}
}
}
[Column(Storage="_用戶名", DbType="NChar(10)")]
public string 用戶名
{
get
{
return this._用戶名;
}
set
{
if ((this._用戶名 != value))
{
this.On用戶名Changing(value);
this.SendPropertyChanging();
this._用戶名 = value;
this.SendPropertyChanged("用戶名");
this.On用戶名Changed();
}
}
}
[Column(Storage="_用戶密碼", DbType="VarChar(50)")]
public string 用戶密碼
{
get
{
return this._用戶密碼;
}
set
{
if ((this._用戶密碼 != value))
{
this.On用戶密碼Changing(value);
this.SendPropertyChanging();
this._用戶密碼 = value;
this.SendPropertyChanged("用戶密碼");
this.On用戶密碼Changed();
}
}
}
[Column(Storage="_郵箱", DbType="VarChar(50)")]
public string 郵箱
{
get
{
return this._郵箱;
}
set
{
if ((this._郵箱 != value))
{
this.On郵箱Changing(value);
this.SendPropertyChanging();
this._郵箱 = value;
this.SendPropertyChanged("郵箱");
this.On郵箱Changed();
}
}
}
[Column(Storage="_住址", DbType="VarChar(50)")]
public string 住址
{
get
{
return this._住址;
}
set
{
if ((this._住址 != value))
{
this.On住址Changing(value);
this.SendPropertyChanging();
this._住址 = value;
this.SendPropertyChanged("住址");
this.On住址Changed();
}
}
}
[Column(Storage="_手機(jī)號(hào)", DbType="VarChar(50)")]
public string 手機(jī)號(hào)
{
get
{
return this._手機(jī)號(hào);
}
set
{
if ((this._手機(jī)號(hào) != value))
{
this.On手機(jī)號(hào)Changing(value);
this.SendPropertyChanging();
this._手機(jī)號(hào) = value;
this.SendPropertyChanged("手機(jī)號(hào)");
this.On手機(jī)號(hào)Changed();
}
}
}
public event PropertyChangingEventHandler PropertyChanging;
public event PropertyChangedEventHandler PropertyChanged;
protected virtual void SendPropertyChanging()
{
if ((this.PropertyChanging != null))
{
this.PropertyChanging(this, emptyChangingEventArgs);
}
}
protected virtual void SendPropertyChanged(String propertyName)
{
if ((this.PropertyChanged != null))
{
this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
}
[Table(Name="dbo.訂餐信息")]
public partial class 訂餐信息 : INotifyPropertyChanging, INotifyPropertyChanged
{
private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
private int _序號(hào);
private System.Nullable<int> _菜樣編號(hào);
private string _菜名;
private string _菜樣圖片;
private System.Nullable<int> _份數(shù);
private System.Nullable<int> _菜價(jià);
private System.Nullable<int> _應(yīng)付金額;
private string _訂餐日期;
private string _用戶名;
#region Extensibility Method Definitions
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
partial void OnCreated();
partial void On序號(hào)Changing(int value);
partial void On序號(hào)Changed();
partial void On菜樣編號(hào)Changing(System.Nullable<int> value);
partial void On菜樣編號(hào)Changed();
partial void On菜名Changing(string value);
partial void On菜名Changed();
partial void On菜樣圖片Changing(string value);
partial void On菜樣圖片Changed();
partial void On份數(shù)Changing(System.Nullable<int> value);
partial void On份數(shù)Changed();
partial void On菜價(jià)Changing(System.Nullable<int> value);
partial void On菜價(jià)Changed();
partial void On應(yīng)付金額Changing(System.Nullable<int> value);
partial void On應(yīng)付金額Changed();
partial void On訂餐日期Changing(string value);
partial void On訂餐日期Changed();
partial void On用戶名Changing(string value);
partial void On用戶名Changed();
#endregion
public 訂餐信息()
{
OnCreated();
}
[Column(Storage="_序號(hào)", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
public int 序號(hào)
{
get
{
return this._序號(hào);
}
set
{
if ((this._序號(hào) != value))
{
this.On序號(hào)Changing(value);
this.SendPropertyChanging();
this._序號(hào) = value;
this.SendPropertyChanged("序號(hào)");
this.On序號(hào)Changed();
}
}
}
[Column(Storage="_菜樣編號(hào)", DbType="Int")]
public System.Nullable<int> 菜樣編號(hào)
{
get
{
return this._菜樣編號(hào);
}
set
{
if ((this._菜樣編號(hào) != value))
{
this.On菜樣編號(hào)Changing(value);
this.SendPropertyChanging();
this._菜樣編號(hào) = value;
this.SendPropertyChanged("菜樣編號(hào)");
this.On菜樣編號(hào)Changed();
}
}
}
[Column(Storage="_菜名", DbType="NChar(10)")]
public string 菜名
{
get
{
return this._菜名;
}
set
{
if ((this._菜名 != value))
{
this.On菜名Changing(value);
this.SendPropertyChanging();
this._菜名 = value;
this.SendPropertyChanged("菜名");
this.On菜名Changed();
}
}
}
[Column(Storage="_菜樣圖片", DbType="NChar(30)")]
public string 菜樣圖片
{
get
{
return this._菜樣圖片;
}
set
{
if ((this._菜樣圖片 != value))
{
this.On菜樣圖片Changing(value);
this.SendPropertyChanging();
this._菜樣圖片 = value;
this.SendPropertyChanged("菜樣圖片");
this.On菜樣圖片Changed();
}
}
}
[Column(Storage="_份數(shù)", DbType="Int")]
public System.Nullable<int> 份數(shù)
{
get
{
return this._份數(shù);
}
set
{
if ((this._份數(shù) != value))
{
this.On份數(shù)Changing(value);
this.SendPropertyChanging();
this._份數(shù) = value;
this.SendPropertyChanged("份數(shù)");
this.On份數(shù)Changed();
}
}
}
[Column(Storage="_菜價(jià)", DbType="Int")]
public System.Nullable<int> 菜價(jià)
{
get
{
return this._菜價(jià);
}
set
{
if ((this._菜價(jià) != value))
{
this.On菜價(jià)Changing(value);
this.SendPropertyChanging();
this._菜價(jià) = value;
this.SendPropertyChanged("菜價(jià)");
this.On菜價(jià)Changed();
}
}
}
[Column(Storage="_應(yīng)付金額", DbType="Int")]
public System.Nullable<int> 應(yīng)付金額
{
get
{
return this._應(yīng)付金額;
}
set
{
if ((this._應(yīng)付金額 != value))
{
this.On應(yīng)付金額Changing(value);
this.SendPropertyChanging();
this._應(yīng)付金額 = value;
this.SendPropertyChanged("應(yīng)付金額");
this.On應(yīng)付金額Changed();
}
}
}
[Column(Storage="_訂餐日期", DbType="NVarChar(50)")]
public string 訂餐日期
{
get
{
return this._訂餐日期;
}
set
{
if ((this._訂餐日期 != value))
{
this.On訂餐日期Changing(value);
this.SendPropertyChanging();
this._訂餐日期 = value;
this.SendPropertyChanged("訂餐日期");
this.On訂餐日期Changed();
}
}
}
[Column(Storage="_用戶名", DbType="NChar(15)")]
public string 用戶名
{
get
{
return this._用戶名;
}
set
{
if ((this._用戶名 != value))
{
this.On用戶名Changing(value);
this.SendPropertyChanging();
this._用戶名 = value;
this.SendPropertyChanged("用戶名");
this.On用戶名Changed();
}
}
}
public event PropertyChangingEventHandler PropertyChanging;
public event PropertyChangedEventHandler PropertyChanged;
protected virtual void SendPropertyChanging()
{
if ((this.PropertyChanging != null))
{
this.PropertyChanging(this, emptyChangingEventArgs);
}
}
protected virtual void SendPropertyChanged(String propertyName)
{
if ((this.PropertyChanged != null))
{
this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
}
[Table(Name="dbo.菜樣信息")]
public partial class 菜樣信息 : INotifyPropertyChanging, INotifyPropertyChanged
{
private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
private int _序號(hào);
private int _菜樣編號(hào);
private string _菜名;
private string _菜樣類型;
private string _菜樣圖片;
private string _廚師;
private System.Nullable<int> _現(xiàn)在價(jià)格;
private System.Nullable<int> _優(yōu)惠價(jià)格;
private string _創(chuàng)菜時(shí)間;
#region Extensibility Method Definitions
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
partial void OnCreated();
partial void On序號(hào)Changing(int value);
partial void On序號(hào)Changed();
partial void On菜樣編號(hào)Changing(int value);
partial void On菜樣編號(hào)Changed();
partial void On菜名Changing(string value);
partial void On菜名Changed();
partial void On菜樣類型Changing(string value);
partial void On菜樣類型Changed();
partial void On菜樣圖片Changing(string value);
partial void On菜樣圖片Changed();
partial void On廚師Changing(string value);
partial void On廚師Changed();
partial void On現(xiàn)在價(jià)格Changing(System.Nullable<int> value);
partial void On現(xiàn)在價(jià)格Changed();
partial void On優(yōu)惠價(jià)格Changing(System.Nullable<int> value);
partial void On優(yōu)惠價(jià)格Changed();
partial void On創(chuàng)菜時(shí)間Changing(string value);
partial void On創(chuàng)菜時(shí)間Changed();
#endregion
public 菜樣信息()
{
OnCreated();
}
[Column(Storage="_序號(hào)", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
public int 序號(hào)
{
get
{
return this._序號(hào);
}
set
{
if ((this._序號(hào) != value))
{
this.On序號(hào)Changing(value);
this.SendPropertyChanging();
this._序號(hào) = value;
this.SendPropertyChanged("序號(hào)");
this.On序號(hào)Changed();
}
}
}
[Column(Storage="_菜樣編號(hào)", DbType="Int NOT NULL")]
public int 菜樣編號(hào)
{
get
{
return this._菜樣編號(hào);
}
set
{
if ((this._菜樣編號(hào) != value))
{
this.On菜樣編號(hào)Changing(value);
this.SendPropertyChanging();
this._菜樣編號(hào) = value;
this.SendPropertyChanged("菜樣編號(hào)");
this.On菜樣編號(hào)Changed();
}
}
}
[Column(Storage="_菜名", DbType="NChar(10)")]
public string 菜名
{
get
{
return this._菜名;
}
set
{
if ((this._菜名 != value))
{
this.On菜名Changing(value);
this.SendPropertyChanging();
this._菜名 = value;
this.SendPropertyChanged("菜名");
this.On菜名Changed();
}
}
}
[Column(Storage="_菜樣類型", DbType="NChar(10)")]
public string 菜樣類型
{
get
{
return this._菜樣類型;
}
set
{
if ((this._菜樣類型 != value))
{
this.On菜樣類型Changing(value);
this.SendPropertyChanging();
this._菜樣類型 = value;
this.SendPropertyChanged("菜樣類型");
this.On菜樣類型Changed();
}
}
}
[Column(Storage="_菜樣圖片", DbType="NVarChar(50)")]
public string 菜樣圖片
{
get
{
return this._菜樣圖片;
}
set
{
if ((this._菜樣圖片 != value))
{
this.On菜樣圖片Changing(value);
this.SendPropertyChanging();
this._菜樣圖片 = value;
this.SendPropertyChanged("菜樣圖片");
this.On菜樣圖片Changed();
}
}
}
[Column(Storage="_廚師", DbType="NChar(15)")]
public string 廚師
{
get
{
return this._廚師;
}
set
{
if ((this._廚師 != value))
{
this.On廚師Changing(value);
this.SendPropertyChanging();
this._廚師 = value;
this.SendPropertyChanged("廚師");
this.On廚師Changed();
}
}
}
[Column(Storage="_現(xiàn)在價(jià)格", DbType="Int")]
public System.Nullable<int> 現(xiàn)在價(jià)格
{
get
{
return this._現(xiàn)在價(jià)格;
}
set
{
if ((this._現(xiàn)在價(jià)格 != value))
{
this.On現(xiàn)在價(jià)格Changing(value);
this.SendPropertyChanging();
this._現(xiàn)在價(jià)格 = value;
this.SendPropertyChanged("現(xiàn)在價(jià)格");
this.On現(xiàn)在價(jià)格Changed();
}
}
}
[Column(Storage="_優(yōu)惠價(jià)格", DbType="Int")]
public System.Nullable<int> 優(yōu)惠價(jià)格
{
get
{
return this._優(yōu)惠價(jià)格;
}
set
{
if ((this._優(yōu)惠價(jià)格 != value))
{
this.On優(yōu)惠價(jià)格Changing(value);
this.SendPropertyChanging();
this._優(yōu)惠價(jià)格 = value;
this.SendPropertyChanged("優(yōu)惠價(jià)格");
this.On優(yōu)惠價(jià)格Changed();
}
}
}
[Column(Storage="_創(chuàng)菜時(shí)間", DbType="NChar(20)")]
public string 創(chuàng)菜時(shí)間
{
get
{
return this._創(chuàng)菜時(shí)間;
}
set
{
if ((this._創(chuàng)菜時(shí)間 != value))
{
this.On創(chuàng)菜時(shí)間Changing(value);
this.SendPropertyChanging();
this._創(chuàng)菜時(shí)間 = value;
this.SendPropertyChanged("創(chuàng)菜時(shí)間");
this.On創(chuàng)菜時(shí)間Changed();
}
}
}
public event PropertyChangingEventHandler PropertyChanging;
public event PropertyChangedEventHandler PropertyChanged;
protected virtual void SendPropertyChanging()
{
if ((this.PropertyChanging != null))
{
this.PropertyChanging(this, emptyChangingEventArgs);
}
}
protected virtual void SendPropertyChanged(String propertyName)
{
if ((this.PropertyChanged != null))
{
this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
}
#pragma warning restore 1591
源碼下載:C#實(shí)現(xiàn)餐飲管理系統(tǒng)
以上就是本文的全部?jī)?nèi)容,希望對(duì)大家的學(xué)習(xí)有所幫助,也希望大家多多支持腳本之家。
相關(guān)文章
C#引用類型轉(zhuǎn)換的常見(jiàn)方式總結(jié)
這篇文章主要介紹了C#引用類型轉(zhuǎn)換的常見(jiàn)方式,包括子類轉(zhuǎn)換成父類,父類轉(zhuǎn)換成子類,以及不是子父級(jí)關(guān)系類之間的轉(zhuǎn)換,需要的朋友可以參考下2014-09-09
C#部署數(shù)據(jù)庫(kù)及IIS站點(diǎn)
這篇文章主要為大家詳細(xì)介紹了C#部署數(shù)據(jù)庫(kù)及IIS站點(diǎn)的相關(guān)資料,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2018-03-03
c#封裝百度web服務(wù)geocoding api 、百度坐標(biāo)轉(zhuǎn)換示例
這篇文章主要介紹了c#封裝百度Web服務(wù)geocoding api 、百度坐標(biāo)轉(zhuǎn)換,需要的朋友可以參考下2014-04-04
深入解析C#中的交錯(cuò)數(shù)組與隱式類型的數(shù)組
這篇文章主要介紹了深入解析C#中的交錯(cuò)數(shù)組與隱式類型的數(shù)組,隱式類型的數(shù)組通常與匿名類型以及對(duì)象初始值設(shè)定項(xiàng)和集合初始值設(shè)定項(xiàng)一起使用,需要的朋友可以參考下2016-01-01
使用Unity3D實(shí)現(xiàn)選中物體消融特效的方法詳解
消融特效中基Shader?Graph實(shí)現(xiàn)了消融特效,本文將基于?Shader?實(shí)現(xiàn)消融特效,當(dāng)前實(shí)現(xiàn)消融特效的方法主要有?Alpha?測(cè)試消融、clip(或?discard)消融,它們的本質(zhì)都是隨機(jī)丟棄一些片元,以實(shí)現(xiàn)消融效果,文中有詳細(xì)代碼示例,需要的朋友可以參考下2023-10-10
C#中倒計(jì)時(shí)功能的優(yōu)化方法小結(jié)
這篇文章主要為大家詳細(xì)介紹了當(dāng)C#重復(fù)使用一段代碼倒計(jì)時(shí)時(shí),如何使用普通類和靜態(tài)方法,實(shí)現(xiàn)簡(jiǎn)單的代碼封裝性、可擴(kuò)展性、可維護(hù)性,感興趣的可以了解下2024-01-01
C#客戶端程序調(diào)用外部程序的3種實(shí)現(xiàn)方法
這篇文章主要給大家介紹了關(guān)于C#客戶端程序調(diào)用外部程序的3種實(shí)現(xiàn)方法,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)學(xué)習(xí)吧。2018-04-04
Visual C#中如何使用IComparable和IComparer接口
這篇文章主要介紹了C#中使用IComparable和IComparer接口,在本例中,該對(duì)象被用作第二個(gè)參數(shù)被傳遞給Array.Sort的接受IComparer實(shí)例的重載方法,需要的朋友可以參考下2023-04-04

