91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 182KB
    文件類型: .rar
    金幣: 2
    下載: 1 次
    發布日期: 2021-06-11
  • 語言: C#
  • 標簽: C#??Winform??

資源簡介

注釋很詳細 在網上看了看,對于新手來說很困難 所以我這個新手就寫了寫 測試通過 原創!

資源截圖

代碼片段和文件信息

using?System;
using?System.Collections.Generic;
using?System.ComponentModel;
using?System.Data;
using?System.Drawing;
using?System.Text;
using?System.Windows.Forms;
using?System.Drawing.Drawing2D;
using?System.xml;

namespace?xmlOperation
{
????public?partial?class?Form1?:?Form
????{
????????public?Form1()
????????{
????????????InitializeComponent();
????????}
????????///?
????????///?點擊選擇按鈕
????????///?

????????///?
????????///?
????????private?void?btnSelect_Click(object?sender?EventArgs?e)
????????{
????????????//拋異常
????????????try
????????????{
????????????????//初始化OpenFileDialog類
????????????????OpenFileDialog?openxml?=?new?OpenFileDialog();
????????????????//默認選擇文件格式
????????????????openxml.Filter?=?“xml文件(*.xml)|*.xml“;
????????????????//打開窗口標題欄
????????????????openxml.title?=?“選擇xml文件“;
????????????????//禁止多選
????????????????openxml.Multiselect?=?false;
????????????????//第一次默認打開文件路徑
????????????????openxml.FilterIndex?=?1;
????????????????//打開的默認路徑
????????????????openxml.InitialDirectory?=?System.AppDomain.CurrentDomain.baseDirectory;
????????????????//是否選擇
????????????????if?(openxml.ShowDialog()?==?DialogResult.OK)
????????????????{
????????????????????//清楚txtxmlStr文本框上的路徑
????????????????????this.txtxmlStr.Clear();
????????????????????//賦值
????????????????????this.txtxmlStr.Text?=?openxml.FileName;
????????????????}
????????????}
????????????catch?(Exception?Ex)
????????????{
????????????????MessageBox.Show(Ex.Message?“系統提示“?MessageBoxButtons.OK?MessageBoxIcon.Error);
????????????}
????????}
????????///?
????????///?加載xml文件
????????///?

????????///?
????????///?
????????private?void?btnLoading_Click(object?sender?EventArgs?e)
????????{
????????????//獲取文件路徑
????????????string?FileName?=?this.txtxmlStr.Text.Trim();
????????????//判斷是否選擇了xml文件
????????????if?(““.Equals(FileName))
????????????{
????????????????MessageBox.Show(“請選擇你要操作的文件“?“系統提示“?MessageBoxButtons.OK?MessageBoxIcon.Error);
????????????????return;
????????????}
????????????treeView1.Nodes.Clear();//清空treeview
????????????xmlDocument?xdoc?=?new?xmlDocument();
????????????//加載xml文件
????????????xdoc.Load(FileName);
????????????//調用讀取xml文件轉換到treeview中
????????????BuildTree(xdoc.ChildNodes?treeView1.Nodes);
????????????lblShow.Text?=?“當前狀態:您正在操作“?+?System.IO.Path.GetFileNameWithoutExtension(FileName).ToString()?+?“文件“;
????????????lblShow.ForeColor?=?System.Drawing.Color.Red;
????????}
????????///?
????????///?lNodes“>xml節點
????????///樹的當前節點
????????///?

????????///?
????????///?
????????private?void?BuildTree(xmlNodeList?xmlNodes?TreeNodeCollection?treeNodes)
????????{
????????????string?sValue;
????????????for?(int?i

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件?????131072??2011-05-06?16:26??xmlOperation\xmlOperation\bin\Debug\xmlOperation.exe

?????文件??????34304??2011-05-06?16:26??xmlOperation\xmlOperation\bin\Debug\xmlOperation.pdb

?????文件???????5632??2005-11-11?22:25??xmlOperation\xmlOperation\bin\Debug\xmlOperation.vshost.exe

?????文件??????14211??2011-05-06?16:22??xmlOperation\xmlOperation\Form1.cs

?????文件??????15589??2011-05-06?15:26??xmlOperation\xmlOperation\Form1.Designer.cs

?????文件?????155634??2011-05-06?15:26??xmlOperation\xmlOperation\Form1.resx

?????文件????????900??2011-05-06?15:26??xmlOperation\xmlOperation\obj\Debug\xmlOperation.csproj.GenerateResource.Cache

?????文件?????131072??2011-05-06?16:26??xmlOperation\xmlOperation\obj\Debug\xmlOperation.exe

?????文件?????100244??2011-05-06?15:26??xmlOperation\xmlOperation\obj\Debug\xmlOperation.Form1.resources

?????文件??????34304??2011-05-06?16:26??xmlOperation\xmlOperation\obj\Debug\xmlOperation.pdb

?????文件????????180??2011-05-06?09:10??xmlOperation\xmlOperation\obj\Debug\xmlOperation.Properties.Resources.resources

?????文件???????1159??2011-05-06?16:27??xmlOperation\xmlOperation\obj\xmlOperation.csproj.FileListAbsolute.txt

?????文件????????471??2011-05-06?09:09??xmlOperation\xmlOperation\Program.cs

?????文件???????1196??2011-05-06?09:09??xmlOperation\xmlOperation\Properties\AssemblyInfo.cs

?????文件???????2880??2011-05-06?09:09??xmlOperation\xmlOperation\Properties\Resources.Designer.cs

?????文件???????5612??2011-05-06?09:09??xmlOperation\xmlOperation\Properties\Resources.resx

?????文件???????1097??2011-05-06?09:09??xmlOperation\xmlOperation\Properties\Settings.Designer.cs

?????文件????????249??2011-05-06?09:09??xmlOperation\xmlOperation\Properties\Settings.settings

?????文件???????3231??2011-05-06?12:32??xmlOperation\xmlOperation\xmlOperation.csproj

?????文件????????925??2011-05-06?09:10??xmlOperation\xmlOperation.sln

????..A..H.??????9216??2011-05-06?15:15??xmlOperation\xmlOperation.suo

?????目錄??????????0??2011-05-06?09:16??xmlOperation\xmlOperation\obj\Debug\Refactor

?????目錄??????????0??2011-05-06?09:10??xmlOperation\xmlOperation\obj\Debug\TempPE

?????目錄??????????0??2011-05-06?09:10??xmlOperation\xmlOperation\bin\Debug

?????目錄??????????0??2011-05-06?16:20??xmlOperation\xmlOperation\obj\Debug

?????目錄??????????0??2011-05-06?12:26??xmlOperation\xmlOperation\bin

?????目錄??????????0??2011-05-06?09:09??xmlOperation\xmlOperation\obj

?????目錄??????????0??2011-05-06?09:09??xmlOperation\xmlOperation\Properties

?????目錄??????????0??2011-05-06?16:22??xmlOperation\xmlOperation

?????目錄??????????0??2011-05-06?09:10??xmlOperation

............此處省略3個文件信息

評論

共有 條評論