資源簡介
C#實現特殊主框架界面效果,包括側欄、系統界面不同風格。
代碼片段和文件信息
using?System;
using?System.Collections.Generic;
using?System.Text;
using?System.IO;
using?System.Windows.Forms;
using?System.xml;
namespace?TestDespk
{
???public?class?AppSettings
????{
???????private?static?string?AppConfig()?
???????{
???????????return?Path.Combine(Application.StartupPath?“TestDespk.exe.config“);
???????}
???????public?static?string?GetAppSettingValue(string?appKey)?
???????{
???????????xmlDocument?document?=?new?xmlDocument();
???????????try
???????????{
???????????????document.Load(AppConfig());
???????????????xmlElement?element?=?(xmlElement)document.SelectSingleNode(“//appSettings“).SelectSingleNode(“//add[@key=‘“?+?appKey?+?“‘]“);
???????????????if?(element?!=?null)
???????????????{
???????????????????return?element.GetAttribute(“value“);
???????????????}
???????????????return?““;
???????????}
???????????catch(Exception?ex)
???????????{
???????????????return?““;
???????????}
???????}
???????public?static?void?SetAppSettingValue(string?AppKey?string?AppValue)
???????{
???????????xmlDocument?document?=?new?xmlDocument();
???????????document.Load(AppConfig());
???????????xmlNode?node?=?document.SelectSingleNode(“//appSettings“);
???????????xmlElement?element?=?(xmlElement)node.SelectSingleNode(“//add[@key=‘“?+?AppKey?+?“‘]“);
???????????if?(element?!=?null)
???????????{
???????????????element.SetAttribute(“value“?AppValue);
???????????}
???????????else
???????????{
???????????????xmlElement?newChild?=?document.CreateElement(“add“);
???????????????newChild.SetAttribute(“key“?AppKey);
???????????????newChild.SetAttribute(“value“?AppValue);
???????????????node.AppendChild(newChild);
???????????}
???????????document.Save(AppConfig());
???????}
???????public?static?string?GetConnectionStringsValue(string?appKey)
???????{
???????????xmlDocument?document?=?new?xmlDocument();
???????????try
???????????{
???????????????document.Load(AppConfig());
???????????????xmlElement?element?=?(xmlElement)document.SelectSingleNode(“//connectionStrings“).SelectSingleNode(“//add[@name=‘“?+?appKey?+?“‘]“);
???????????????if?(element?!=?null)
???????????????{
???????????????????return?element.GetAttribute(“connectionString“);
???????????????}
???????????????return?““;
???????????}
???????????catch
???????????{
???????????????return?““;
???????????}
???????}
???????public?static?void?SetConnectionStringsValue(string?AppKey?string?AppValue)
???????{
???????????xmlDocument?document?=?new?xmlDocument();
???????????document.Load(AppConfig());
???????????xmlNode?node?=?document.SelectSingleNode(“//connectionStrings“);
???????????xmlElement?element?=?(xmlElement)node.SelectSingleNode(“//add[@name=‘“?+?AppKey?+?“‘]“);
???????????if?(element?!=?null)
???????????{
???????????????element.SetAttribute(“connectionString“?AppValue);
???????????}
???????????else
???????????{
???????????????xmlElement?newChild?=?document.CreateElement(“add“);
???????????????newChild.SetAtt
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????395??2010-12-23?14:37??C#實現特殊界面效果\TestDespk\App.config
?????文件???????3219??2010-12-23?14:41??C#實現特殊界面效果\TestDespk\AppSettings.cs
?????文件??????97189??2010-10-13?13:09??C#實現特殊界面效果\TestDespk\bin\Debug\deepin-01.jpg
?????文件???????3774??1997-06-23?07:08??C#實現特殊界面效果\TestDespk\bin\Debug\image\button.ico
?????文件???????1078??2004-11-14?22:07??C#實現特殊界面效果\TestDespk\bin\Debug\image\button1.ico
?????文件???????3262??2007-09-03?17:41??C#實現特殊界面效果\TestDespk\bin\Debug\image\button2.ico
?????文件?????323590??2006-05-07?03:59??C#實現特殊界面效果\TestDespk\bin\Debug\image\button4.ico
?????文件???????4485??2009-05-22?08:02??C#實現特殊界面效果\TestDespk\bin\Debug\image\from.gif
????..A.SH.?????11776??2009-06-11?11:36??C#實現特殊界面效果\TestDespk\bin\Debug\image\Thumbs.db
?????文件?????516096??2006-08-18?11:50??C#實現特殊界面效果\TestDespk\bin\Debug\IrisSkin2.dll
?????文件??????15156??2007-11-07?09:30??C#實現特殊界面效果\TestDespk\bin\Debug\MacOS.ssk
?????文件??????12542??2007-11-07?09:30??C#實現特殊界面效果\TestDespk\bin\Debug\MidsummerColor1.ssk
?????文件??????16292??2007-11-07?09:30??C#實現特殊界面效果\TestDespk\bin\Debug\MSN.ssk
?????文件???????3148??2007-12-20?11:32??C#實現特殊界面效果\TestDespk\bin\Debug\MTMenu.xm
?????文件????4767744??2007-12-24?15:33??C#實現特殊界面效果\TestDespk\bin\Debug\OutLookBar.dll
?????文件??????11351??2007-11-07?09:30??C#實現特殊界面效果\TestDespk\bin\Debug\SportsBlack.ssk
?????文件????2035712??2020-09-15?21:26??C#實現特殊界面效果\TestDespk\bin\Debug\TestDespk.exe
?????文件????????395??2010-12-23?14:37??C#實現特殊界面效果\TestDespk\bin\Debug\TestDespk.exe.config
?????文件??????40448??2020-09-15?21:26??C#實現特殊界面效果\TestDespk\bin\Debug\TestDespk.pdb
?????文件??????22704??2020-09-15?21:27??C#實現特殊界面效果\TestDespk\bin\Debug\TestDespk.vshost.exe
?????文件????????395??2010-12-23?14:37??C#實現特殊界面效果\TestDespk\bin\Debug\TestDespk.vshost.exe.config
?????文件????????490??2019-03-19?12:46??C#實現特殊界面效果\TestDespk\bin\Debug\TestDespk.vshost.exe.manifest
?????文件??????69075??2009-09-01?09:33??C#實現特殊界面效果\TestDespk\bin\Debug\ti
?????文件??????16013??2007-11-07?09:30??C#實現特殊界面效果\TestDespk\bin\Debug\Vista.ssk
?????文件??????49152??2007-09-04?16:02??C#實現特殊界面效果\TestDespk\bin\Debug\VivantList.dll
?????文件??????47607??2007-11-07?09:30??C#實現特殊界面效果\TestDespk\bin\Debug\Wave.ssk
?????文件??????13189??2007-11-07?09:30??C#實現特殊界面效果\TestDespk\bin\Debug\XPBlue.ssk
?????文件????????351??2010-12-23?16:44??C#實現特殊界面效果\TestDespk\EmployeeForm.cs
?????文件???????8364??2010-12-23?16:44??C#實現特殊界面效果\TestDespk\EmployeeForm.Designer.cs
?????文件???????5814??2010-12-23?16:44??C#實現特殊界面效果\TestDespk\EmployeeForm.resx
............此處省略46個文件信息
- 上一篇:基于easy-mvc的后臺管理系統源碼 v1.1
- 下一篇:C# 遠程開機和關機
評論
共有 條評論