| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581 |
- using System;
- using System.Xml;
- using System.Data;
- using System.Drawing;
- using System.Collections;
- using System.ComponentModel;
- using System.Windows.Forms;
- using Core.Mes.ClientFrameWork;
- using Core.Mes.IBaseInterface;
- //using Core.Mes.ServerFrameWork;
- using Infragistics.Win.UltraWinGrid;
- using Infragistics.Win.UltraWinTree;
- namespace Core.Mes.ClientPurviewManager
- {
- /// <summary>
- /// FrmFunction 的摘要说明。
- /// </summary>
- public class FrmFunction : Core.Mes.ClientFrameWork.FrmBase
- {
- private System.Windows.Forms.Panel panel1;
- private Infragistics.Win.UltraWinToolbars.UltraToolbarsManager ultraToolbarsManager1;
- private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _panel1_Toolbars_Dock_Area_Left;
- private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _panel1_Toolbars_Dock_Area_Right;
- private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _panel1_Toolbars_Dock_Area_Top;
- private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _panel1_Toolbars_Dock_Area_Bottom;
- private System.Windows.Forms.Panel panel2;
- private Infragistics.Win.Misc.UltraGroupBox ultraGroupBox1;
- private System.Windows.Forms.Panel panel3;
- private Infragistics.Win.UltraWinToolbars.UltraToolbarsManager ultraToolbarsManager2;
- private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _panel2_Toolbars_Dock_Area_Left;
- private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _panel2_Toolbars_Dock_Area_Right;
- private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _panel2_Toolbars_Dock_Area_Top;
- private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _panel2_Toolbars_Dock_Area_Bottom;
- private Infragistics.Win.UltraWinGrid.UltraGrid ultraGrid1;
- private Infragistics.Win.UltraWinTree.UltraTree trDb;
- private Infragistics.Win.UltraWinTree.UltraTree trFile;
- private Infragistics.Win.Misc.UltraButton ultraButton1;
- private Infragistics.Win.Misc.UltraButton ultraButton2;
- private Infragistics.Win.Misc.UltraButton ultraButton3;
- private Infragistics.Win.Misc.UltraButton ultraButton4;
- private Infragistics.Win.Misc.UltraButton ultraButton5;
- private Infragistics.Win.Misc.UltraButton ultraButton6;
- private Infragistics.Win.Misc.UltraButton ultraButton7;
- private Infragistics.Win.Misc.UltraButton ultraButton8;
- private System.ComponentModel.IContainer components;
- private DataSet _functionData;
- private Infragistics.Win.Misc.UltraExpandableGroupBox ultraExpandableGroupBox1;
- private Infragistics.Win.Misc.UltraExpandableGroupBoxPanel ultraExpandableGroupBoxPanel1;
- private Infragistics.Win.Misc.UltraLabel ultraLabel1;
- private Infragistics.Win.Misc.UltraLabel ultraLabel2;
- private Infragistics.Win.Misc.UltraLabel ultraLabel3;
- private Infragistics.Win.Misc.UltraLabel ultraLabel4;
- private Infragistics.Win.Misc.UltraLabel ultraLabel5;
- private Infragistics.Win.UltraWinEditors.UltraTextEditor ultraTextEditor1;
- private Infragistics.Win.UltraWinEditors.UltraComboEditor ultraComboEditor1;
- private Infragistics.Win.UltraWinEditors.UltraTextEditor ultraTextEditor2;
- private Infragistics.Win.UltraWinEditors.UltraTextEditor ultraTextEditor3;
- private Infragistics.Win.UltraWinEditors.UltraTextEditor ultraTextEditor4;
- private string _selectFuncSQL;
- public FrmFunction()
- {
- //
- // Windows 窗体设计器支持所必需的
- //
- InitializeComponent();
- //
- // TODO: 在 InitializeComponent 调用后添加任何构造函数代码
- //
- }
- /// <summary>
- /// 清理所有正在使用的资源。
- /// </summary>
- protected override void Dispose( bool disposing )
- {
- if( disposing )
- {
- if(components != null)
- {
- components.Dispose();
- }
- }
- base.Dispose( disposing );
- }
- #region Windows 窗体设计器生成的代码
- /// <summary>
- /// 设计器支持所需的方法 - 不要使用代码编辑器修改
- /// 此方法的内容。
- /// </summary>
- private void InitializeComponent()
- {
- this.components = new System.ComponentModel.Container();
- Infragistics.Win.UltraWinTree.UltraTreeColumnSet ultraTreeColumnSet1 = new Infragistics.Win.UltraWinTree.UltraTreeColumnSet();
- Infragistics.Win.Appearance appearance1 = new Infragistics.Win.Appearance();
- Infragistics.Win.UltraWinGrid.UltraGridBand ultraGridBand1 = new Infragistics.Win.UltraWinGrid.UltraGridBand("Band 0", -1);
- Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn1 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("Column 0");
- Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn2 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("Column 1");
- Infragistics.Win.Appearance appearance2 = new Infragistics.Win.Appearance();
- Infragistics.Win.Appearance appearance3 = new Infragistics.Win.Appearance();
- Infragistics.Win.Appearance appearance4 = new Infragistics.Win.Appearance();
- Infragistics.Win.Appearance appearance5 = new Infragistics.Win.Appearance();
- Infragistics.Win.Appearance appearance6 = new Infragistics.Win.Appearance();
- Infragistics.Win.Appearance appearance7 = new Infragistics.Win.Appearance();
- Infragistics.Win.Appearance appearance8 = new Infragistics.Win.Appearance();
- Infragistics.Win.Appearance appearance9 = new Infragistics.Win.Appearance();
- Infragistics.Win.Appearance appearance10 = new Infragistics.Win.Appearance();
- Infragistics.Win.Appearance appearance11 = new Infragistics.Win.Appearance();
- Infragistics.Win.Appearance appearance12 = new Infragistics.Win.Appearance();
- Infragistics.Win.Appearance appearance13 = new Infragistics.Win.Appearance();
- Infragistics.Win.Appearance appearance14 = new Infragistics.Win.Appearance();
- Infragistics.Win.Appearance appearance15 = new Infragistics.Win.Appearance();
- Infragistics.Win.Appearance appearance16 = new Infragistics.Win.Appearance();
- Infragistics.Win.Appearance appearance17 = new Infragistics.Win.Appearance();
- Infragistics.Win.Appearance appearance18 = new Infragistics.Win.Appearance();
- Infragistics.Win.UltraWinToolbars.UltraToolbar ultraToolbar1 = new Infragistics.Win.UltraWinToolbars.UltraToolbar("Toolbar1");
- Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool1 = new Infragistics.Win.UltraWinToolbars.ButtonTool("all");
- Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool2 = new Infragistics.Win.UltraWinToolbars.ButtonTool("add");
- Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool3 = new Infragistics.Win.UltraWinToolbars.ButtonTool("del");
- Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool4 = new Infragistics.Win.UltraWinToolbars.ButtonTool("save");
- Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool5 = new Infragistics.Win.UltraWinToolbars.ButtonTool("edit");
- Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool6 = new Infragistics.Win.UltraWinToolbars.ButtonTool("exit");
- Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool7 = new Infragistics.Win.UltraWinToolbars.ButtonTool("all");
- Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool8 = new Infragistics.Win.UltraWinToolbars.ButtonTool("add");
- Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool9 = new Infragistics.Win.UltraWinToolbars.ButtonTool("del");
- Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool10 = new Infragistics.Win.UltraWinToolbars.ButtonTool("save");
- Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool11 = new Infragistics.Win.UltraWinToolbars.ButtonTool("edit");
- Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool12 = new Infragistics.Win.UltraWinToolbars.ButtonTool("exit");
- Infragistics.Win.UltraWinTree.UltraTreeColumnSet ultraTreeColumnSet2 = new Infragistics.Win.UltraWinTree.UltraTreeColumnSet();
- Infragistics.Win.UltraWinToolbars.UltraToolbar ultraToolbar2 = new Infragistics.Win.UltraWinToolbars.UltraToolbar("Toolbar1");
- Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool13 = new Infragistics.Win.UltraWinToolbars.ButtonTool("open");
- Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool14 = new Infragistics.Win.UltraWinToolbars.ButtonTool("save");
- Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool15 = new Infragistics.Win.UltraWinToolbars.ButtonTool("open");
- Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool16 = new Infragistics.Win.UltraWinToolbars.ButtonTool("save");
- this.trDb = new Infragistics.Win.UltraWinTree.UltraTree();
- this.panel1 = new System.Windows.Forms.Panel();
- this.ultraGrid1 = new Infragistics.Win.UltraWinGrid.UltraGrid();
- this.ultraExpandableGroupBox1 = new Infragistics.Win.Misc.UltraExpandableGroupBox();
- this.ultraExpandableGroupBoxPanel1 = new Infragistics.Win.Misc.UltraExpandableGroupBoxPanel();
- this.ultraTextEditor4 = new Infragistics.Win.UltraWinEditors.UltraTextEditor();
- this.ultraTextEditor3 = new Infragistics.Win.UltraWinEditors.UltraTextEditor();
- this.ultraTextEditor2 = new Infragistics.Win.UltraWinEditors.UltraTextEditor();
- this.ultraComboEditor1 = new Infragistics.Win.UltraWinEditors.UltraComboEditor();
- this.ultraTextEditor1 = new Infragistics.Win.UltraWinEditors.UltraTextEditor();
- this.ultraLabel5 = new Infragistics.Win.Misc.UltraLabel();
- this.ultraLabel4 = new Infragistics.Win.Misc.UltraLabel();
- this.ultraLabel3 = new Infragistics.Win.Misc.UltraLabel();
- this.ultraLabel2 = new Infragistics.Win.Misc.UltraLabel();
- this.ultraLabel1 = new Infragistics.Win.Misc.UltraLabel();
- this._panel1_Toolbars_Dock_Area_Left = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea();
- this.ultraToolbarsManager1 = new Infragistics.Win.UltraWinToolbars.UltraToolbarsManager(this.components);
- this._panel1_Toolbars_Dock_Area_Right = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea();
- this._panel1_Toolbars_Dock_Area_Top = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea();
- this._panel1_Toolbars_Dock_Area_Bottom = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea();
- this.panel2 = new System.Windows.Forms.Panel();
- this.trFile = new Infragistics.Win.UltraWinTree.UltraTree();
- this._panel2_Toolbars_Dock_Area_Left = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea();
- this.ultraToolbarsManager2 = new Infragistics.Win.UltraWinToolbars.UltraToolbarsManager(this.components);
- this._panel2_Toolbars_Dock_Area_Right = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea();
- this._panel2_Toolbars_Dock_Area_Top = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea();
- this._panel2_Toolbars_Dock_Area_Bottom = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea();
- this.ultraGroupBox1 = new Infragistics.Win.Misc.UltraGroupBox();
- this.ultraButton8 = new Infragistics.Win.Misc.UltraButton();
- this.ultraButton7 = new Infragistics.Win.Misc.UltraButton();
- this.ultraButton6 = new Infragistics.Win.Misc.UltraButton();
- this.ultraButton5 = new Infragistics.Win.Misc.UltraButton();
- this.ultraButton4 = new Infragistics.Win.Misc.UltraButton();
- this.ultraButton3 = new Infragistics.Win.Misc.UltraButton();
- this.ultraButton2 = new Infragistics.Win.Misc.UltraButton();
- this.ultraButton1 = new Infragistics.Win.Misc.UltraButton();
- this.panel3 = new System.Windows.Forms.Panel();
- ((System.ComponentModel.ISupportInitialize)(this.trDb)).BeginInit();
- this.panel1.SuspendLayout();
- ((System.ComponentModel.ISupportInitialize)(this.ultraGrid1)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.ultraExpandableGroupBox1)).BeginInit();
- this.ultraExpandableGroupBox1.SuspendLayout();
- this.ultraExpandableGroupBoxPanel1.SuspendLayout();
- ((System.ComponentModel.ISupportInitialize)(this.ultraTextEditor4)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.ultraTextEditor3)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.ultraTextEditor2)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.ultraComboEditor1)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.ultraTextEditor1)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.ultraToolbarsManager1)).BeginInit();
- this.panel2.SuspendLayout();
- ((System.ComponentModel.ISupportInitialize)(this.trFile)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.ultraToolbarsManager2)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.ultraGroupBox1)).BeginInit();
- this.ultraGroupBox1.SuspendLayout();
- this.panel3.SuspendLayout();
- this.SuspendLayout();
- //
- // trDb
- //
- this.trDb.ColumnSettings.RootColumnSet = ultraTreeColumnSet1;
- this.trDb.Dock = System.Windows.Forms.DockStyle.Left;
- this.trDb.Location = new System.Drawing.Point(0, 0);
- this.trDb.Name = "trDb";
- this.trDb.Size = new System.Drawing.Size(168, 555);
- this.trDb.TabIndex = 0;
- //
- // panel1
- //
- this.panel1.Controls.Add(this.ultraGrid1);
- this.panel1.Controls.Add(this.ultraExpandableGroupBox1);
- this.panel1.Controls.Add(this._panel1_Toolbars_Dock_Area_Left);
- this.panel1.Controls.Add(this._panel1_Toolbars_Dock_Area_Right);
- this.panel1.Controls.Add(this._panel1_Toolbars_Dock_Area_Top);
- this.panel1.Controls.Add(this._panel1_Toolbars_Dock_Area_Bottom);
- this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
- this.panel1.Location = new System.Drawing.Point(168, 0);
- this.panel1.Name = "panel1";
- this.panel1.Size = new System.Drawing.Size(584, 320);
- this.panel1.TabIndex = 1;
- //
- // ultraGrid1
- //
- appearance1.BackColor = System.Drawing.SystemColors.Window;
- appearance1.BorderColor = System.Drawing.SystemColors.InactiveCaption;
- this.ultraGrid1.DisplayLayout.Appearance = appearance1;
- ultraGridColumn1.Header.VisiblePosition = 0;
- ultraGridColumn2.Header.VisiblePosition = 1;
- ultraGridBand1.Columns.AddRange(new object[] {
- ultraGridColumn1,
- ultraGridColumn2});
- appearance2.BackColor = System.Drawing.Color.LightSteelBlue;
- ultraGridBand1.Override.RowSelectorAppearance = appearance2;
- ultraGridBand1.Override.RowSelectorHeaderStyle = Infragistics.Win.UltraWinGrid.RowSelectorHeaderStyle.SeparateElement;
- ultraGridBand1.Override.RowSelectorNumberStyle = Infragistics.Win.UltraWinGrid.RowSelectorNumberStyle.RowIndex;
- ultraGridBand1.Override.RowSelectors = Infragistics.Win.DefaultableBoolean.True;
- this.ultraGrid1.DisplayLayout.BandsSerializer.Add(ultraGridBand1);
- this.ultraGrid1.DisplayLayout.CaptionVisible = Infragistics.Win.DefaultableBoolean.False;
- appearance3.BackColor = System.Drawing.SystemColors.ActiveBorder;
- appearance3.BackColor2 = System.Drawing.SystemColors.ControlDark;
- appearance3.BackGradientStyle = Infragistics.Win.GradientStyle.Vertical;
- appearance3.BorderColor = System.Drawing.SystemColors.Window;
- this.ultraGrid1.DisplayLayout.GroupByBox.Appearance = appearance3;
- appearance4.ForeColor = System.Drawing.SystemColors.GrayText;
- this.ultraGrid1.DisplayLayout.GroupByBox.BandLabelAppearance = appearance4;
- this.ultraGrid1.DisplayLayout.GroupByBox.BorderStyle = Infragistics.Win.UIElementBorderStyle.Solid;
- this.ultraGrid1.DisplayLayout.GroupByBox.Hidden = true;
- appearance5.BackColor = System.Drawing.SystemColors.ControlLightLight;
- appearance5.BackColor2 = System.Drawing.SystemColors.Control;
- appearance5.BackGradientStyle = Infragistics.Win.GradientStyle.Horizontal;
- appearance5.ForeColor = System.Drawing.SystemColors.GrayText;
- this.ultraGrid1.DisplayLayout.GroupByBox.PromptAppearance = appearance5;
- this.ultraGrid1.DisplayLayout.MaxColScrollRegions = 1;
- this.ultraGrid1.DisplayLayout.MaxRowScrollRegions = 1;
- appearance6.BackColor = System.Drawing.SystemColors.Window;
- appearance6.ForeColor = System.Drawing.SystemColors.ControlText;
- this.ultraGrid1.DisplayLayout.Override.ActiveCellAppearance = appearance6;
- appearance7.BackColor = System.Drawing.SystemColors.Highlight;
- appearance7.ForeColor = System.Drawing.SystemColors.HighlightText;
- this.ultraGrid1.DisplayLayout.Override.ActiveRowAppearance = appearance7;
- this.ultraGrid1.DisplayLayout.Override.BorderStyleCell = Infragistics.Win.UIElementBorderStyle.RaisedSoft;
- this.ultraGrid1.DisplayLayout.Override.BorderStyleRow = Infragistics.Win.UIElementBorderStyle.Dotted;
- appearance8.BackColor = System.Drawing.SystemColors.Window;
- this.ultraGrid1.DisplayLayout.Override.CardAreaAppearance = appearance8;
- appearance9.BorderColor = System.Drawing.Color.Silver;
- appearance9.TextTrimming = Infragistics.Win.TextTrimming.EllipsisCharacter;
- this.ultraGrid1.DisplayLayout.Override.CellAppearance = appearance9;
- this.ultraGrid1.DisplayLayout.Override.CellClickAction = Infragistics.Win.UltraWinGrid.CellClickAction.EditAndSelectText;
- this.ultraGrid1.DisplayLayout.Override.CellPadding = 0;
- appearance10.BackColor = System.Drawing.SystemColors.Control;
- appearance10.BackColor2 = System.Drawing.SystemColors.ControlDark;
- appearance10.BackGradientAlignment = Infragistics.Win.GradientAlignment.Element;
- appearance10.BackGradientStyle = Infragistics.Win.GradientStyle.Horizontal;
- appearance10.BorderColor = System.Drawing.SystemColors.Window;
- this.ultraGrid1.DisplayLayout.Override.GroupByRowAppearance = appearance10;
- appearance11.BackColor = System.Drawing.Color.LightSteelBlue;
- appearance11.TextHAlign = Infragistics.Win.HAlign.Center;
- this.ultraGrid1.DisplayLayout.Override.HeaderAppearance = appearance11;
- this.ultraGrid1.DisplayLayout.Override.HeaderClickAction = Infragistics.Win.UltraWinGrid.HeaderClickAction.SortMulti;
- this.ultraGrid1.DisplayLayout.Override.HeaderStyle = Infragistics.Win.HeaderStyle.Standard;
- this.ultraGrid1.DisplayLayout.Override.MinRowHeight = 21;
- appearance12.BackColor = System.Drawing.SystemColors.Window;
- appearance12.BorderColor = System.Drawing.Color.Silver;
- this.ultraGrid1.DisplayLayout.Override.RowAppearance = appearance12;
- this.ultraGrid1.DisplayLayout.Override.RowSelectors = Infragistics.Win.DefaultableBoolean.False;
- appearance13.BackColor = System.Drawing.SystemColors.ControlLight;
- this.ultraGrid1.DisplayLayout.Override.TemplateAddRowAppearance = appearance13;
- this.ultraGrid1.DisplayLayout.ScrollBounds = Infragistics.Win.UltraWinGrid.ScrollBounds.ScrollToFill;
- this.ultraGrid1.DisplayLayout.ScrollStyle = Infragistics.Win.UltraWinGrid.ScrollStyle.Immediate;
- this.ultraGrid1.DisplayLayout.ViewStyleBand = Infragistics.Win.UltraWinGrid.ViewStyleBand.OutlookGroupBy;
- this.ultraGrid1.Dock = System.Windows.Forms.DockStyle.Fill;
- this.ultraGrid1.Location = new System.Drawing.Point(0, 50);
- this.ultraGrid1.Name = "ultraGrid1";
- this.ultraGrid1.Size = new System.Drawing.Size(584, 182);
- this.ultraGrid1.TabIndex = 4;
- this.ultraGrid1.Text = "ultraGrid1";
- this.ultraGrid1.AfterRowActivate += new System.EventHandler(this.ultraGrid1_AfterRowActivate);
- //
- // ultraExpandableGroupBox1
- //
- this.ultraExpandableGroupBox1.Controls.Add(this.ultraExpandableGroupBoxPanel1);
- this.ultraExpandableGroupBox1.Dock = System.Windows.Forms.DockStyle.Bottom;
- this.ultraExpandableGroupBox1.ExpandedSize = new System.Drawing.Size(584, 88);
- this.ultraExpandableGroupBox1.Location = new System.Drawing.Point(0, 232);
- this.ultraExpandableGroupBox1.Name = "ultraExpandableGroupBox1";
- this.ultraExpandableGroupBox1.Size = new System.Drawing.Size(584, 88);
- this.ultraExpandableGroupBox1.SupportThemes = false;
- this.ultraExpandableGroupBox1.TabIndex = 9;
- this.ultraExpandableGroupBox1.Text = "编辑区域";
- //
- // ultraExpandableGroupBoxPanel1
- //
- this.ultraExpandableGroupBoxPanel1.Controls.Add(this.ultraTextEditor4);
- this.ultraExpandableGroupBoxPanel1.Controls.Add(this.ultraTextEditor3);
- this.ultraExpandableGroupBoxPanel1.Controls.Add(this.ultraTextEditor2);
- this.ultraExpandableGroupBoxPanel1.Controls.Add(this.ultraComboEditor1);
- this.ultraExpandableGroupBoxPanel1.Controls.Add(this.ultraTextEditor1);
- this.ultraExpandableGroupBoxPanel1.Controls.Add(this.ultraLabel5);
- this.ultraExpandableGroupBoxPanel1.Controls.Add(this.ultraLabel4);
- this.ultraExpandableGroupBoxPanel1.Controls.Add(this.ultraLabel3);
- this.ultraExpandableGroupBoxPanel1.Controls.Add(this.ultraLabel2);
- this.ultraExpandableGroupBoxPanel1.Controls.Add(this.ultraLabel1);
- this.ultraExpandableGroupBoxPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
- this.ultraExpandableGroupBoxPanel1.Location = new System.Drawing.Point(3, 19);
- this.ultraExpandableGroupBoxPanel1.Name = "ultraExpandableGroupBoxPanel1";
- this.ultraExpandableGroupBoxPanel1.Size = new System.Drawing.Size(578, 66);
- this.ultraExpandableGroupBoxPanel1.TabIndex = 0;
- //
- // ultraTextEditor4
- //
- appearance14.BackColor = System.Drawing.Color.LightCyan;
- this.ultraTextEditor4.Appearance = appearance14;
- this.ultraTextEditor4.AutoSize = true;
- this.ultraTextEditor4.Location = new System.Drawing.Point(432, 40);
- this.ultraTextEditor4.Name = "ultraTextEditor4";
- this.ultraTextEditor4.Size = new System.Drawing.Size(104, 21);
- this.ultraTextEditor4.TabIndex = 10;
- //
- // ultraTextEditor3
- //
- appearance15.BackColor = System.Drawing.Color.LightCyan;
- this.ultraTextEditor3.Appearance = appearance15;
- this.ultraTextEditor3.AutoSize = true;
- this.ultraTextEditor3.Location = new System.Drawing.Point(256, 40);
- this.ultraTextEditor3.Name = "ultraTextEditor3";
- this.ultraTextEditor3.Size = new System.Drawing.Size(104, 21);
- this.ultraTextEditor3.TabIndex = 9;
- //
- // ultraTextEditor2
- //
- appearance16.BackColor = System.Drawing.Color.LightCyan;
- this.ultraTextEditor2.Appearance = appearance16;
- this.ultraTextEditor2.AutoSize = true;
- this.ultraTextEditor2.Location = new System.Drawing.Point(80, 40);
- this.ultraTextEditor2.Name = "ultraTextEditor2";
- this.ultraTextEditor2.Size = new System.Drawing.Size(96, 21);
- this.ultraTextEditor2.TabIndex = 8;
- //
- // ultraComboEditor1
- //
- appearance17.BackColor = System.Drawing.Color.LightCyan;
- this.ultraComboEditor1.Appearance = appearance17;
- this.ultraComboEditor1.AutoSize = true;
- this.ultraComboEditor1.Location = new System.Drawing.Point(256, 8);
- this.ultraComboEditor1.Name = "ultraComboEditor1";
- this.ultraComboEditor1.Size = new System.Drawing.Size(104, 21);
- this.ultraComboEditor1.TabIndex = 7;
- //
- // ultraTextEditor1
- //
- appearance18.BackColor = System.Drawing.Color.LightCyan;
- this.ultraTextEditor1.Appearance = appearance18;
- this.ultraTextEditor1.AutoSize = true;
- this.ultraTextEditor1.Location = new System.Drawing.Point(80, 6);
- this.ultraTextEditor1.Name = "ultraTextEditor1";
- this.ultraTextEditor1.Size = new System.Drawing.Size(96, 21);
- this.ultraTextEditor1.TabIndex = 6;
- //
- // ultraLabel5
- //
- this.ultraLabel5.Location = new System.Drawing.Point(376, 42);
- this.ultraLabel5.Name = "ultraLabel5";
- this.ultraLabel5.Size = new System.Drawing.Size(56, 16);
- this.ultraLabel5.TabIndex = 4;
- this.ultraLabel5.Text = "图标名称";
- //
- // ultraLabel4
- //
- this.ultraLabel4.Location = new System.Drawing.Point(192, 42);
- this.ultraLabel4.Name = "ultraLabel4";
- this.ultraLabel4.Size = new System.Drawing.Size(56, 16);
- this.ultraLabel4.TabIndex = 3;
- this.ultraLabel4.Text = "程序集名";
- //
- // ultraLabel3
- //
- this.ultraLabel3.Location = new System.Drawing.Point(32, 40);
- this.ultraLabel3.Name = "ultraLabel3";
- this.ultraLabel3.Size = new System.Drawing.Size(32, 16);
- this.ultraLabel3.TabIndex = 2;
- this.ultraLabel3.Text = "类名";
- //
- // ultraLabel2
- //
- this.ultraLabel2.Location = new System.Drawing.Point(192, 16);
- this.ultraLabel2.Name = "ultraLabel2";
- this.ultraLabel2.Size = new System.Drawing.Size(56, 16);
- this.ultraLabel2.TabIndex = 1;
- this.ultraLabel2.Text = "功能名称";
- //
- // ultraLabel1
- //
- this.ultraLabel1.Location = new System.Drawing.Point(16, 16);
- this.ultraLabel1.Name = "ultraLabel1";
- this.ultraLabel1.Size = new System.Drawing.Size(56, 16);
- this.ultraLabel1.TabIndex = 0;
- this.ultraLabel1.Text = "功能编码";
- //
- // _panel1_Toolbars_Dock_Area_Left
- //
- this._panel1_Toolbars_Dock_Area_Left.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping;
- this._panel1_Toolbars_Dock_Area_Left.BackColor = System.Drawing.SystemColors.Control;
- this._panel1_Toolbars_Dock_Area_Left.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Left;
- this._panel1_Toolbars_Dock_Area_Left.ForeColor = System.Drawing.SystemColors.ControlText;
- this._panel1_Toolbars_Dock_Area_Left.Location = new System.Drawing.Point(0, 50);
- this._panel1_Toolbars_Dock_Area_Left.Name = "_panel1_Toolbars_Dock_Area_Left";
- this._panel1_Toolbars_Dock_Area_Left.Size = new System.Drawing.Size(0, 270);
- this._panel1_Toolbars_Dock_Area_Left.ToolbarsManager = this.ultraToolbarsManager1;
- //
- // ultraToolbarsManager1
- //
- this.ultraToolbarsManager1.DesignerFlags = 1;
- this.ultraToolbarsManager1.DockWithinContainer = this.panel1;
- this.ultraToolbarsManager1.ShowQuickCustomizeButton = false;
- this.ultraToolbarsManager1.Style = Infragistics.Win.UltraWinToolbars.ToolbarStyle.VisualStudio2005;
- ultraToolbar1.DockedColumn = 0;
- ultraToolbar1.DockedRow = 0;
- ultraToolbar1.Text = "Toolbar1";
- buttonTool1.InstanceProps.IsFirstInGroup = true;
- buttonTool2.InstanceProps.IsFirstInGroup = true;
- buttonTool3.InstanceProps.IsFirstInGroup = true;
- buttonTool4.InstanceProps.IsFirstInGroup = true;
- buttonTool5.InstanceProps.IsFirstInGroup = true;
- buttonTool6.InstanceProps.IsFirstInGroup = true;
- ultraToolbar1.Tools.AddRange(new Infragistics.Win.UltraWinToolbars.ToolBase[] {
- buttonTool1,
- buttonTool2,
- buttonTool3,
- buttonTool4,
- buttonTool5,
- buttonTool6});
- this.ultraToolbarsManager1.Toolbars.AddRange(new Infragistics.Win.UltraWinToolbars.UltraToolbar[] {
- ultraToolbar1});
- buttonTool7.SharedProps.Caption = "全部(&L)";
- buttonTool7.SharedProps.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageAndText;
- buttonTool7.SharedProps.Shortcut = System.Windows.Forms.Shortcut.CtrlL;
- buttonTool8.SharedProps.Caption = "新增(&A)";
- buttonTool8.SharedProps.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageAndText;
- buttonTool8.SharedProps.Shortcut = System.Windows.Forms.Shortcut.CtrlA;
- buttonTool9.SharedProps.Caption = "删除(&D)";
- buttonTool9.SharedProps.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageAndText;
- buttonTool9.SharedProps.Shortcut = System.Windows.Forms.Shortcut.CtrlD;
- buttonTool10.SharedProps.Caption = "保存(&S)";
- buttonTool10.SharedProps.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageAndText;
- buttonTool10.SharedProps.Shortcut = System.Windows.Forms.Shortcut.CtrlS;
- buttonTool10.SharedProps.Visible = false;
- buttonTool11.SharedProps.Caption = "修改(&U)";
- buttonTool11.SharedProps.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageAndText;
- buttonTool11.SharedProps.Shortcut = System.Windows.Forms.Shortcut.CtrlU;
- buttonTool12.SharedProps.Caption = "关闭(&E)";
- buttonTool12.SharedProps.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageAndText;
- buttonTool12.SharedProps.Shortcut = System.Windows.Forms.Shortcut.CtrlE;
- this.ultraToolbarsManager1.Tools.AddRange(new Infragistics.Win.UltraWinToolbars.ToolBase[] {
- buttonTool7,
- buttonTool8,
- buttonTool9,
- buttonTool10,
- buttonTool11,
- buttonTool12});
- this.ultraToolbarsManager1.ToolClick += new Infragistics.Win.UltraWinToolbars.ToolClickEventHandler(this.ultraToolbarsManager1_ToolClick);
- //
- // _panel1_Toolbars_Dock_Area_Right
- //
- this._panel1_Toolbars_Dock_Area_Right.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping;
- this._panel1_Toolbars_Dock_Area_Right.BackColor = System.Drawing.SystemColors.Control;
- this._panel1_Toolbars_Dock_Area_Right.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Right;
- this._panel1_Toolbars_Dock_Area_Right.ForeColor = System.Drawing.SystemColors.ControlText;
- this._panel1_Toolbars_Dock_Area_Right.Location = new System.Drawing.Point(584, 50);
- this._panel1_Toolbars_Dock_Area_Right.Name = "_panel1_Toolbars_Dock_Area_Right";
- this._panel1_Toolbars_Dock_Area_Right.Size = new System.Drawing.Size(0, 270);
- this._panel1_Toolbars_Dock_Area_Right.ToolbarsManager = this.ultraToolbarsManager1;
- //
- // _panel1_Toolbars_Dock_Area_Top
- //
- this._panel1_Toolbars_Dock_Area_Top.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping;
- this._panel1_Toolbars_Dock_Area_Top.BackColor = System.Drawing.SystemColors.Control;
- this._panel1_Toolbars_Dock_Area_Top.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Top;
- this._panel1_Toolbars_Dock_Area_Top.ForeColor = System.Drawing.SystemColors.ControlText;
- this._panel1_Toolbars_Dock_Area_Top.Location = new System.Drawing.Point(0, 0);
- this._panel1_Toolbars_Dock_Area_Top.Name = "_panel1_Toolbars_Dock_Area_Top";
- this._panel1_Toolbars_Dock_Area_Top.Size = new System.Drawing.Size(584, 50);
- this._panel1_Toolbars_Dock_Area_Top.ToolbarsManager = this.ultraToolbarsManager1;
- //
- // _panel1_Toolbars_Dock_Area_Bottom
- //
- this._panel1_Toolbars_Dock_Area_Bottom.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping;
- this._panel1_Toolbars_Dock_Area_Bottom.BackColor = System.Drawing.SystemColors.Control;
- this._panel1_Toolbars_Dock_Area_Bottom.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Bottom;
- this._panel1_Toolbars_Dock_Area_Bottom.ForeColor = System.Drawing.SystemColors.ControlText;
- this._panel1_Toolbars_Dock_Area_Bottom.Location = new System.Drawing.Point(0, 320);
- this._panel1_Toolbars_Dock_Area_Bottom.Name = "_panel1_Toolbars_Dock_Area_Bottom";
- this._panel1_Toolbars_Dock_Area_Bottom.Size = new System.Drawing.Size(584, 0);
- this._panel1_Toolbars_Dock_Area_Bottom.ToolbarsManager = this.ultraToolbarsManager1;
- //
- // panel2
- //
- this.panel2.Controls.Add(this.trFile);
- this.panel2.Controls.Add(this._panel2_Toolbars_Dock_Area_Left);
- this.panel2.Controls.Add(this._panel2_Toolbars_Dock_Area_Right);
- this.panel2.Controls.Add(this._panel2_Toolbars_Dock_Area_Top);
- this.panel2.Controls.Add(this._panel2_Toolbars_Dock_Area_Bottom);
- this.panel2.Dock = System.Windows.Forms.DockStyle.Fill;
- this.panel2.Location = new System.Drawing.Point(128, 0);
- this.panel2.Name = "panel2";
- this.panel2.Size = new System.Drawing.Size(456, 235);
- this.panel2.TabIndex = 2;
- //
- // trFile
- //
- this.trFile.ColumnSettings.RootColumnSet = ultraTreeColumnSet2;
- this.trFile.Dock = System.Windows.Forms.DockStyle.Fill;
- this.trFile.Location = new System.Drawing.Point(0, 22);
- this.trFile.Name = "trFile";
- this.trFile.Size = new System.Drawing.Size(456, 213);
- this.trFile.TabIndex = 0;
- //
- // _panel2_Toolbars_Dock_Area_Left
- //
- this._panel2_Toolbars_Dock_Area_Left.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping;
- this._panel2_Toolbars_Dock_Area_Left.BackColor = System.Drawing.SystemColors.Control;
- this._panel2_Toolbars_Dock_Area_Left.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Left;
- this._panel2_Toolbars_Dock_Area_Left.ForeColor = System.Drawing.SystemColors.ControlText;
- this._panel2_Toolbars_Dock_Area_Left.Location = new System.Drawing.Point(0, 22);
- this._panel2_Toolbars_Dock_Area_Left.Name = "_panel2_Toolbars_Dock_Area_Left";
- this._panel2_Toolbars_Dock_Area_Left.Size = new System.Drawing.Size(0, 213);
- this._panel2_Toolbars_Dock_Area_Left.ToolbarsManager = this.ultraToolbarsManager2;
- //
- // ultraToolbarsManager2
- //
- this.ultraToolbarsManager2.DesignerFlags = 1;
- this.ultraToolbarsManager2.DockWithinContainer = this.panel2;
- this.ultraToolbarsManager2.ShowQuickCustomizeButton = false;
- ultraToolbar2.DockedColumn = 0;
- ultraToolbar2.DockedRow = 0;
- ultraToolbar2.Text = "Toolbar1";
- buttonTool13.InstanceProps.IsFirstInGroup = true;
- buttonTool14.InstanceProps.IsFirstInGroup = true;
- ultraToolbar2.Tools.AddRange(new Infragistics.Win.UltraWinToolbars.ToolBase[] {
- buttonTool13,
- buttonTool14});
- this.ultraToolbarsManager2.Toolbars.AddRange(new Infragistics.Win.UltraWinToolbars.UltraToolbar[] {
- ultraToolbar2});
- buttonTool15.SharedProps.Caption = "打开(&O)";
- buttonTool15.SharedProps.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageAndText;
- buttonTool15.SharedProps.Shortcut = System.Windows.Forms.Shortcut.CtrlO;
- buttonTool16.SharedProps.Caption = "保存(&S)";
- buttonTool16.SharedProps.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageAndText;
- buttonTool16.SharedProps.Shortcut = System.Windows.Forms.Shortcut.CtrlS;
- this.ultraToolbarsManager2.Tools.AddRange(new Infragistics.Win.UltraWinToolbars.ToolBase[] {
- buttonTool15,
- buttonTool16});
- this.ultraToolbarsManager2.ToolClick += new Infragistics.Win.UltraWinToolbars.ToolClickEventHandler(this.ultraToolbarsManager2_ToolClick);
- //
- // _panel2_Toolbars_Dock_Area_Right
- //
- this._panel2_Toolbars_Dock_Area_Right.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping;
- this._panel2_Toolbars_Dock_Area_Right.BackColor = System.Drawing.SystemColors.Control;
- this._panel2_Toolbars_Dock_Area_Right.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Right;
- this._panel2_Toolbars_Dock_Area_Right.ForeColor = System.Drawing.SystemColors.ControlText;
- this._panel2_Toolbars_Dock_Area_Right.Location = new System.Drawing.Point(456, 22);
- this._panel2_Toolbars_Dock_Area_Right.Name = "_panel2_Toolbars_Dock_Area_Right";
- this._panel2_Toolbars_Dock_Area_Right.Size = new System.Drawing.Size(0, 213);
- this._panel2_Toolbars_Dock_Area_Right.ToolbarsManager = this.ultraToolbarsManager2;
- //
- // _panel2_Toolbars_Dock_Area_Top
- //
- this._panel2_Toolbars_Dock_Area_Top.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping;
- this._panel2_Toolbars_Dock_Area_Top.BackColor = System.Drawing.SystemColors.Control;
- this._panel2_Toolbars_Dock_Area_Top.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Top;
- this._panel2_Toolbars_Dock_Area_Top.ForeColor = System.Drawing.SystemColors.ControlText;
- this._panel2_Toolbars_Dock_Area_Top.Location = new System.Drawing.Point(0, 0);
- this._panel2_Toolbars_Dock_Area_Top.Name = "_panel2_Toolbars_Dock_Area_Top";
- this._panel2_Toolbars_Dock_Area_Top.Size = new System.Drawing.Size(456, 22);
- this._panel2_Toolbars_Dock_Area_Top.ToolbarsManager = this.ultraToolbarsManager2;
- //
- // _panel2_Toolbars_Dock_Area_Bottom
- //
- this._panel2_Toolbars_Dock_Area_Bottom.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping;
- this._panel2_Toolbars_Dock_Area_Bottom.BackColor = System.Drawing.SystemColors.Control;
- this._panel2_Toolbars_Dock_Area_Bottom.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Bottom;
- this._panel2_Toolbars_Dock_Area_Bottom.ForeColor = System.Drawing.SystemColors.ControlText;
- this._panel2_Toolbars_Dock_Area_Bottom.Location = new System.Drawing.Point(0, 235);
- this._panel2_Toolbars_Dock_Area_Bottom.Name = "_panel2_Toolbars_Dock_Area_Bottom";
- this._panel2_Toolbars_Dock_Area_Bottom.Size = new System.Drawing.Size(456, 0);
- this._panel2_Toolbars_Dock_Area_Bottom.ToolbarsManager = this.ultraToolbarsManager2;
- //
- // ultraGroupBox1
- //
- this.ultraGroupBox1.Controls.Add(this.ultraButton8);
- this.ultraGroupBox1.Controls.Add(this.ultraButton7);
- this.ultraGroupBox1.Controls.Add(this.ultraButton6);
- this.ultraGroupBox1.Controls.Add(this.ultraButton5);
- this.ultraGroupBox1.Controls.Add(this.ultraButton4);
- this.ultraGroupBox1.Controls.Add(this.ultraButton3);
- this.ultraGroupBox1.Controls.Add(this.ultraButton2);
- this.ultraGroupBox1.Controls.Add(this.ultraButton1);
- this.ultraGroupBox1.Dock = System.Windows.Forms.DockStyle.Left;
- this.ultraGroupBox1.Location = new System.Drawing.Point(0, 0);
- this.ultraGroupBox1.Name = "ultraGroupBox1";
- this.ultraGroupBox1.Size = new System.Drawing.Size(128, 235);
- this.ultraGroupBox1.SupportThemes = false;
- this.ultraGroupBox1.TabIndex = 3;
- this.ultraGroupBox1.Text = "控制区域";
- this.ultraGroupBox1.Click += new System.EventHandler(this.ultraGroupBox1_Click);
- //
- // ultraButton8
- //
- this.ultraButton8.Location = new System.Drawing.Point(72, 176);
- this.ultraButton8.Name = "ultraButton8";
- this.ultraButton8.Size = new System.Drawing.Size(40, 23);
- this.ultraButton8.TabIndex = 7;
- this.ultraButton8.Text = "右";
- this.ultraButton8.Click += new System.EventHandler(this.ultraButton8_Click);
- //
- // ultraButton7
- //
- this.ultraButton7.Location = new System.Drawing.Point(40, 200);
- this.ultraButton7.Name = "ultraButton7";
- this.ultraButton7.Size = new System.Drawing.Size(40, 23);
- this.ultraButton7.TabIndex = 6;
- this.ultraButton7.Text = "下";
- this.ultraButton7.Click += new System.EventHandler(this.ultraButton7_Click);
- //
- // ultraButton6
- //
- this.ultraButton6.Location = new System.Drawing.Point(40, 152);
- this.ultraButton6.Name = "ultraButton6";
- this.ultraButton6.Size = new System.Drawing.Size(40, 23);
- this.ultraButton6.TabIndex = 5;
- this.ultraButton6.Text = "上";
- this.ultraButton6.Click += new System.EventHandler(this.ultraButton6_Click);
- //
- // ultraButton5
- //
- this.ultraButton5.Location = new System.Drawing.Point(8, 176);
- this.ultraButton5.Name = "ultraButton5";
- this.ultraButton5.Size = new System.Drawing.Size(40, 23);
- this.ultraButton5.TabIndex = 4;
- this.ultraButton5.Text = "左";
- this.ultraButton5.Click += new System.EventHandler(this.ultraButton5_Click);
- //
- // ultraButton4
- //
- this.ultraButton4.Location = new System.Drawing.Point(24, 120);
- this.ultraButton4.Name = "ultraButton4";
- this.ultraButton4.Size = new System.Drawing.Size(75, 23);
- this.ultraButton4.TabIndex = 3;
- this.ultraButton4.Text = "新增子";
- this.ultraButton4.Click += new System.EventHandler(this.ultraButton4_Click);
- //
- // ultraButton3
- //
- this.ultraButton3.Location = new System.Drawing.Point(24, 96);
- this.ultraButton3.Name = "ultraButton3";
- this.ultraButton3.Size = new System.Drawing.Size(75, 23);
- this.ultraButton3.TabIndex = 2;
- this.ultraButton3.Text = "新增同";
- this.ultraButton3.Click += new System.EventHandler(this.ultraButton3_Click);
- //
- // ultraButton2
- //
- this.ultraButton2.Location = new System.Drawing.Point(24, 72);
- this.ultraButton2.Name = "ultraButton2";
- this.ultraButton2.Size = new System.Drawing.Size(75, 23);
- this.ultraButton2.TabIndex = 1;
- this.ultraButton2.Text = "移除";
- this.ultraButton2.Click += new System.EventHandler(this.ultraButton2_Click);
- //
- // ultraButton1
- //
- this.ultraButton1.Location = new System.Drawing.Point(24, 48);
- this.ultraButton1.Name = "ultraButton1";
- this.ultraButton1.Size = new System.Drawing.Size(75, 23);
- this.ultraButton1.TabIndex = 0;
- this.ultraButton1.Text = "选择";
- this.ultraButton1.Click += new System.EventHandler(this.ultraButton1_Click);
- //
- // panel3
- //
- this.panel3.Controls.Add(this.panel2);
- this.panel3.Controls.Add(this.ultraGroupBox1);
- this.panel3.Dock = System.Windows.Forms.DockStyle.Fill;
- this.panel3.Location = new System.Drawing.Point(168, 320);
- this.panel3.Name = "panel3";
- this.panel3.Size = new System.Drawing.Size(584, 235);
- this.panel3.TabIndex = 4;
- //
- // FrmFunction
- //
- this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
- this.ClientSize = new System.Drawing.Size(752, 555);
- this.Controls.Add(this.panel3);
- this.Controls.Add(this.panel1);
- this.Controls.Add(this.trDb);
- this.Name = "FrmFunction";
- this.Text = "权限文件维护";
- this.WindowState = System.Windows.Forms.FormWindowState.Normal;
- this.Load += new System.EventHandler(this.FrmFunction_Load);
- ((System.ComponentModel.ISupportInitialize)(this.trDb)).EndInit();
- this.panel1.ResumeLayout(false);
- ((System.ComponentModel.ISupportInitialize)(this.ultraGrid1)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.ultraExpandableGroupBox1)).EndInit();
- this.ultraExpandableGroupBox1.ResumeLayout(false);
- this.ultraExpandableGroupBoxPanel1.ResumeLayout(false);
- ((System.ComponentModel.ISupportInitialize)(this.ultraTextEditor4)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.ultraTextEditor3)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.ultraTextEditor2)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.ultraComboEditor1)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.ultraTextEditor1)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.ultraToolbarsManager1)).EndInit();
- this.panel2.ResumeLayout(false);
- ((System.ComponentModel.ISupportInitialize)(this.trFile)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.ultraToolbarsManager2)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.ultraGroupBox1)).EndInit();
- this.ultraGroupBox1.ResumeLayout(false);
- this.panel3.ResumeLayout(false);
- this.ResumeLayout(false);
- }
- #endregion
- private void FrmFunction_Load(object sender, System.EventArgs e)
- {
- GetTrDBdata("");
- InCom();
- InitTrDB();
- InitDbGrid();
- this.trDb.AfterSelect += new Infragistics.Win.UltraWinTree.AfterNodeSelectEventHandler(ultraTree1_AfterSelect);
- if (this.trDb.Nodes.Count > 0)
- this.trDb.Nodes[0].Selected = true;
- }
- #region " InitDbTree "
- private void InitTrDB()
- {
- try
- {
- if (_functionData != null)
- {
- if (this.trDb.Nodes.Count > 0)
- {
- try
- {
- RemoveAllTreeNode(this.trDb);
- }
- catch
- {
- RemoveAllTreeNode(this.trDb);
- }
- }
- TreeFillData1( _functionData.Tables[0]);
- this.trDb.ExpandAll();
- }
- }
- catch //(Exception ex)
- {
- // CoreMesLogger.log(this.GetType()).Error(ex.Message);
- }
- }
- private void RemoveAllTreeNode(UltraTree ut)
- {
- int count = ut.Nodes.Count ;
-
- for (int i = count -1; i >= 0 ; i--)
- {
- ut.Nodes[i].Remove();
- }
- }
- //==========================================================
- // 产线类型
- //==========================================================
- private void TreeFillData1(DataTable dt)
- {
- DataRow[] drs = dt.Select("len(FUNCTIONID) = 2");
-
- foreach(DataRow dr in drs)
- {
- UltraTreeNode tn = new UltraTreeNode();
- tn.Text = dr["FUNCTIONNAME"].ToString();
- tn.Key = dr["FUNCTIONID"].ToString();
- tn.Tag = dr["IMAGENAME"].ToString();
- TreeFillData2(dt, dr["FUNCTIONID"].ToString(), tn);
- this.trDb.Nodes.Add(tn);
- }
- }
- //==========================================================
- // 产线编号
- //==========================================================
- private void TreeFillData2(DataTable dt, string str, UltraTreeNode tnd)
- {
- DataRow[] drs = dt.Select("len(FUNCTIONID) = 4 and substring(FUNCTIONID,1,2) = '" + str + "'");
- foreach(DataRow dr in drs)
- {
- UltraTreeNode tn = new UltraTreeNode();
- tn.Text = dr["FUNCTIONNAME"].ToString();
- tn.Key = dr["FUNCTIONID"].ToString();
- tn.Tag = dr["IMAGENAME"].ToString();
- TreeFillData3(dt, dr["FUNCTIONID"].ToString(), tn);
- tnd.Nodes.Add(tn);
- }
- }
- //==========================================================
- // 车间编码
- //==========================================================
- private void TreeFillData3(DataTable dt, string str, UltraTreeNode tnd)
- {
- DataRow[] drs = dt.Select("len(FUNCTIONID) = 6 and substring(FUNCTIONID,1,4) = '" + str + "'");
- foreach(DataRow dr in drs)
- {
- UltraTreeNode tn = new UltraTreeNode();
- tn.Text = dr["FUNCTIONNAME"].ToString();
- tn.Key = dr["FUNCTIONID"].ToString();
- tn.Tag = dr["IMAGENAME"].ToString();
-
- tnd.Nodes.Add(tn);
- }
- }
- private void GetTrDBdata(string str)
- {
- try
- {
- CallingMessage par = new CallingMessage();
- par.ServerName = "PurviewManager";
- //par.AssemblyName = "Core.Mes.PurviewManager";
- par.ClassName = "Core.Mes.PurviewManager.PurviewManager";
- par.MethodName = "SelectUAM_FUNCTION";
- par.args = new object[]{str+" order by FUNCTIONID "};
- par.ServerType = MesServerType.MesSystemBaseServer;
-
- string strOut = "";
- _functionData = Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod(par, out strOut) as DataSet;
- _selectFuncSQL = strOut;
- }
- catch //(Exception ex)
- {
- // CoreMesLogger.log(this.GetType()).Error(ex.Message);
- }
- }
- private void ultraTree1_AfterSelect(object sender, Infragistics.Win.UltraWinTree.SelectEventArgs e)
- {
- string rowFilter;
- if (e.NewSelections == null || e.NewSelections.Count == 0)
- rowFilter = "";
- else
- {
- string id = e.NewSelections[0].Key.ToString();
- int count = id.Length;
- rowFilter = "substring(FUNCTIONID,1," + count.ToString() + ") = '" + id + "' or FUNCTIONID is null or trim(FUNCTIONID) = '' ";
- }
- DataTable dt = this.ultraGrid1.DataSource as DataTable ;
- dt.DefaultView.RowFilter = rowFilter;
- }
- #endregion
- #region " InitDbGrid "
- private void InitDbGrid()
- {
- this.ultraGrid1.DataSource = this._functionData.Tables[0];
- this.ultraGrid1.DisplayLayout.Bands[0].Columns[0].Header.Caption = "功能编码";
- this.ultraGrid1.DisplayLayout.Bands[0].Columns[0].Width = 80;
- this.ultraGrid1.DisplayLayout.Bands[0].Columns[0].CellAppearance.TextHAlign = Infragistics.Win.HAlign.Left;
- this.ultraGrid1.DisplayLayout.Bands[0].Columns[0].CellAppearance.BackColor=Color.LightGoldenrodYellow;
- this.ultraGrid1.DisplayLayout.Bands[0].Columns[1].Header.Caption = "功能名称";
- this.ultraGrid1.DisplayLayout.Bands[0].Columns[1].Width = 100;
- this.ultraGrid1.DisplayLayout.Bands[0].Columns[1].CellAppearance.TextHAlign = Infragistics.Win.HAlign.Left;
- this.ultraGrid1.DisplayLayout.Bands[0].Columns[2].Header.Caption = "类名";
- this.ultraGrid1.DisplayLayout.Bands[0].Columns[2].Width = 200;
- this.ultraGrid1.DisplayLayout.Bands[0].Columns[2].CellAppearance.TextHAlign = Infragistics.Win.HAlign.Left;
- this.ultraGrid1.DisplayLayout.Bands[0].Columns[2].CellAppearance.BackColor=Color.LightGoldenrodYellow;
- this.ultraGrid1.DisplayLayout.Bands[0].Columns[3].Header.Caption = "程序集名";
- this.ultraGrid1.DisplayLayout.Bands[0].Columns[3].Width = 200;
- this.ultraGrid1.DisplayLayout.Bands[0].Columns[3].CellAppearance.TextHAlign = Infragistics.Win.HAlign.Left;
- this.ultraGrid1.DisplayLayout.Bands[0].Columns[4].Header.Caption = "图标名称";
- this.ultraGrid1.DisplayLayout.Bands[0].Columns[4].Width = 100;
- this.ultraGrid1.DisplayLayout.Bands[0].Columns[4].CellAppearance.TextHAlign = Infragistics.Win.HAlign.Left;
- this.ultraGrid1.DisplayLayout.Bands[0].Columns[4].CellAppearance.BackColor=Color.LightGoldenrodYellow;
- this.ultraGrid1.DisplayLayout.Bands[0].Columns[5].Hidden=true;
- // this.ultraGrid1.DisplayLayout.Bands[0].Columns[5].Header.Caption = "备注";
- // this.ultraGrid1.DisplayLayout.Bands[0].Columns[5].Width = 100;
- // this.ultraGrid1.DisplayLayout.Bands[0].Columns[5].CellAppearance.TextHAlign = Infragistics.Win.HAlign.Left;
- }
- private void InCom()
- {
- if (_functionData != null && _functionData.Tables.Count >0)
- {
- foreach(DataRow arow in (_functionData).Tables[0].Rows)
- this.ultraComboEditor1.Items.Add(arow[1]);
- if(!this.ultraComboEditor1.Items.Contains(System.DBNull.Value)) this.ultraComboEditor1.Items.Add(System.DBNull.Value);
- }
- }
- #endregion
- #region "工具栏1"
- private void ultraToolbarsManager1_ToolClick(object sender, Infragistics.Win.UltraWinToolbars.ToolClickEventArgs e)
- {
- switch(e.Tool .Key )
- {
- case "all":
- this.trDb.SelectedNodes.Clear();
- break;
- case "add":
- Add();
- break;
- case "del":
- Delete();
- break;
- case "edit":
- Edit();
- break;
- case "exit":
- this.Close();
- break;
- }
- }
- private void Delete()
- {
-
- int i = 0;
- UltraGridRow ugr = this.ultraGrid1.ActiveRow;
- if (ugr == null)
- {
- MessageBox.Show("请选择要删除的功能名!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information );
- return;
- }
- if (MessageBox.Show("是否确认删除选中的功能?","提示",MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
- {
- return;
- }
- try
- {
- i = ugr.Index;
- string strWhere = " where FUNCTIONID = '" + ugr.Cells[0].Value.ToString() + "'";
-
- CallingMessage par = new CallingMessage();
- par.ServerName = "PurviewManager";
- //par.AssemblyName = "Core.Mes.PurviewManager";
- par.ClassName = "Core.Mes.PurviewManager.PurviewManager";
- par.MethodName = "DeleteUAM_FUNCTION";
- par.args = new object[]{strWhere};
- par.ServerType = MesServerType.MesSystemBaseServer;
-
- string strOut = "";
- object obj = Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod(par, out strOut);
- if (strOut != "")
- {
- MessageBox.Show("删除失败! \n" + strOut);
- return;
- }
- else
- {
- if ((int)obj != 1)
- {
- MessageBox.Show("删除失败!");
- return;
- }
- }
- }
- catch //(Exception ex)
- {
- // CoreMesLogger.log(this.GetType()).Error(ex.Message);
- return;
- }
-
- ultraGrid1.ActiveRow.Delete(false);
- ultraGrid1.UpdateData();
- InCom();
- InitTrDB();
- try
- {
- ultraGrid1.Rows[i].Activate();
- }
- catch
- {
- int count = ultraGrid1.Rows.Count;
- if ( count > 0)
- ultraGrid1.Rows[count -1].Activate();
- }
- }
- private void Add()
- {
- if (this.ultraTextEditor1.Text.Trim() == "")
- {
- MessageBox.Show("请录入功能编码!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
- return;
- }
- if (this.ultraTextEditor2.Text.Trim() == "")
- {
- MessageBox.Show("请录入类名!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
- return;
- }
- if (this.ultraTextEditor3.Text.Trim() == "")
- {
- MessageBox.Show("请录入程序集名!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
- return;
- }
- if (this.ultraComboEditor1.Text.Trim() == null)
- {
- MessageBox.Show("请录入功能名称!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
- return;
- }
- ArrayList al = new ArrayList();
-
- al.Add(this.ultraTextEditor1.Text.Trim());
-
- al.Add(this.ultraComboEditor1.Text.Trim());
- al.Add(this.ultraTextEditor2.Text.Trim());
- al.Add(this.ultraTextEditor3.Text.Trim());
- al.Add(this.ultraTextEditor4.Text.Trim());
- // al.Add(this.ultraTextEditor5.Text.Trim());
-
- try
- {
- CallingMessage par = new CallingMessage();
- par.ServerName = "PurviewManager";
- //par.AssemblyName = "Core.Mes.PurviewManager";
- par.ClassName = "Core.Mes.PurviewManager.PurviewManager";
- par.MethodName = "InsertUAM_FUNCTION";
- par.args = new object[]{al};
- par.ServerType = MesServerType.MesSystemBaseServer;
-
- string strOut = "";
- object obj = Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod(par, out strOut);
- if (strOut != "")
- {
- MessageBox.Show("新增失败! \n" + strOut);
- return;
- }
- else
- {
- if ((int)obj != 1)
- {
- MessageBox.Show("新增失败!");
- return;
- }
- }
- }
- catch //(Exception ex)
- {
- // CoreMesLogger.log(this.GetType()).Error(ex.Message);
- return;
- }
- GetTrDBdata("");
- UltraGridRow ugr = this.ultraGrid1.DisplayLayout.Bands[0].AddNew();
- ugr.Cells[0].Value = al[0];
- ugr.Cells[1].Value = al[1];
- ugr.Cells[2].Value = al[2];
- ugr.Cells[3].Value = al[3];
- ugr.Cells[4].Value = al[4];
- ugr.Cells[5].Value = al[5];
-
- this.ultraGrid1.UpdateData();
- InCom();
- InitTrDB();
- }
- private void Edit()
- {
- UltraGridRow ugr = this.ultraGrid1.ActiveRow;
- if (ugr == null)
- {
- MessageBox.Show("请选择要修改的功能编码!");
- return;
- }
-
- if (this.ultraComboEditor1.Value == null)
- {
- MessageBox.Show("请选择要修改的功能名称!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
- return;
- }
- if (this.ultraTextEditor2.Text.Trim() == "")
- {
- MessageBox.Show("请选择要修改的类名称!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
- return;
- }
- if (this.ultraTextEditor3.Text.Trim() == "")
- {
- MessageBox.Show("请选择要修改的程序集名称!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
- return;
- }
-
- ArrayList al = new ArrayList();
-
- al.Add(this.ultraTextEditor1.Text.Trim());
- al.Add(this.ultraComboEditor1.Text.Trim());
- al.Add(this.ultraTextEditor2.Text.Trim());
-
- al.Add(this.ultraTextEditor3.Text.Trim());
- al.Add(this.ultraTextEditor4.Text.Trim());
- // al.Add(this.ultraTextEditor5.Text.Trim());
- try
- {
- CallingMessage par = new CallingMessage();
- par.ServerName = "PurviewManager";
- //par.AssemblyName = "Core.Mes.PurviewManager";
- par.ClassName = "Core.Mes.PurviewManager.PurviewManager";
- par.MethodName = "UpdateUAM_FUNCTION";
- par.args = new object[]{al};
- par.ServerType = MesServerType.MesSystemBaseServer;
-
- string strOut = "";
- object obj = Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod(par, out strOut);
- if (strOut != "")
- {
- MessageBox.Show("修改失败 \n" + strOut);
- return;
- }
- else
- {
- int i = (int)obj;
- if (i != 1)
- {
- MessageBox.Show("修改失败");
- return;
- }
- }
- }
- catch //(Exception ex)
- {
- // CoreMesLogger.log(this.GetType()).Error(ex.Message);
- return;
- }
- ugr.Cells[0].Value = al[0];
- ugr.Cells[1].Value = al[1];
- ugr.Cells[2].Value = al[2];
- ugr.Cells[3].Value = al[3];
- ugr.Cells[4].Value = al[4];
- ugr.Cells[5].Value = al[5];
-
- ultraGrid1.UpdateData();
- InCom();
- InitTrDB();
- }
- private void ultraGrid1_AfterRowActivate(object sender, System.EventArgs e)
- {
- try
- {
- if (this.ultraGrid1.ActiveRow == null) return;
- UltraGridRow ugr = this.ultraGrid1.ActiveRow;
- this.ultraTextEditor1.Text = ugr.Cells[0].Value.ToString();
- this.ultraComboEditor1.Text= ugr.Cells[1].Value.ToString();
- this.ultraTextEditor2.Text = ugr.Cells[2].Value.ToString();
- this.ultraTextEditor3.Text = ugr.Cells[3].Value.ToString();
- this.ultraTextEditor4.Text = ugr.Cells[4].Value.ToString();
- // this.ultraTextEditor5.Text = ugr.Cells[5].Value.ToString();
- }
- catch (Exception ex)
- {
- Console.WriteLine(ex.Message);
- }
- }
- #endregion
- #region "工具栏2"
- private void ultraToolbarsManager2_ToolClick(object sender, Infragistics.Win.UltraWinToolbars.ToolClickEventArgs e)
- {
- switch (e.Tool.Key)
- {
- case "open" :
- openFile();
- break;
- case "save" :
- saveFile();
- break;
- }
- }
- #region " save "
- private void saveFile()
- {
- DialogResult rs = MessageBox.Show("保存到本地?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Information);
- switch (rs)
- {
-
- case DialogResult.OK :
- saveLocalFile();
- break;
- case DialogResult.Cancel :
- break;
- }
- }
- private void saveLocalFile()
- {
- System.Windows.Forms.SaveFileDialog sfd = new SaveFileDialog();
-
- sfd.FileName = "*.xml";
- sfd.Filter = "xml文件(*.xml)|*.xml|所有文件(*.*)|*.*";
- DialogResult rs = sfd.ShowDialog(this);
- switch (rs)
- {
- case DialogResult.OK :
- try
- {
- string fileName = sfd.FileName;
- //this.trFile.SaveAsXml(fileName);
- SaveAsXml(fileName);
- }
- catch (Exception ex)
- {
- Console.WriteLine(ex.Message);
- MessageBox.Show("文件保存错误!");
- }
- break;
- default :
- break;
- }
- }
- private void SaveAsXml(string fileName)
- {
- XmlTextWriter xtw = new XmlTextWriter(fileName,System.Text.Encoding.UTF8);
- try
- {
- xtw.Formatting = Formatting.Indented ;
- xtw.WriteStartDocument();
- xtw.WriteStartElement("MainMenu");
-
- foreach (UltraTreeNode utn in this.trFile.Nodes)
- {
- xtw.WriteStartElement("Group");
- xtw.WriteAttributeString("GroupName", utn.Key);
-
- if (utn.Nodes.Count > 0 )
- {
- if (utn.GetNodeCount(true) != utn.GetNodeCount(false))
- xtw.WriteAttributeString("flag", "Tree");
- else
- xtw.WriteAttributeString("flag", "Default");
-
- SetChildElement(xtw, utn.Nodes);
- }
-
- xtw.WriteEndElement();
- }
-
- xtw.WriteEndElement();
- xtw.WriteEndDocument();
- XmlDocument doc = new XmlDocument();
-
- xtw.Flush();
- }
- catch(Exception ex)
- {
- MessageBox.Show(ex.Message);
- }
- xtw.Close();
- }
- private void SetChildElement(XmlTextWriter xtw, TreeNodesCollection tnc)
- {
-
- foreach(UltraTreeNode utn in tnc)
- {
- xtw.WriteStartElement("Item");
- xtw.WriteAttributeString("ItemID", utn.Key);
- xtw.WriteAttributeString("Image", utn.Tag.ToString());
- if (utn.Nodes.Count > 0)
- {
- SetChildElement(xtw, utn.Nodes);
- }
- xtw.WriteEndElement();
- }
- }
-
- #endregion
- #region " open "
- private void openFile()
- {
- DialogResult rs = MessageBox.Show("打开本地文件?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Information);
- switch (rs)
- {
-
- case DialogResult.OK :
- openLocalFile();
- break;
- case DialogResult.Cancel :
- break;
- }
- }
- private void openLocalFile()
- {
- System.Windows.Forms.OpenFileDialog ofd = new OpenFileDialog();
-
- ofd.FileName = "*.xml";
- ofd.Filter = "xml文件(*.xml)|*.xml|所有文件(*.*)|*.*";
- DialogResult rs = ofd.ShowDialog(this);
- switch (rs)
- {
- case DialogResult.OK :
- try
- {
- string fileName = ofd.FileName;
- this.RemoveAllTreeNode(this.trFile);
- LoadFromXml(fileName);
- }
- catch (Exception ex)
- {
- MessageBox.Show(ex.Message);
- }
- break;
- default :
- break;
- }
- }
- private void LoadFromXml(string fileName)
- {
- XmlDocument doc = new XmlDocument();
-
- doc.Load(fileName);
- XmlNodeList xnl = doc.ChildNodes[1].ChildNodes;
- foreach (XmlNode xn in xnl)
- {
- UltraTreeNode utn = new UltraTreeNode();
- string strKey = xn.Attributes[0].Value.ToString();
- UltraTreeNode tn = this.trDb.GetNodeByKey(strKey);
-
- if (this.trDb.GetNodeByKey(strKey) != null)
- {
- utn.Key = tn.Key;
- utn.Text = tn.Text;
- utn.Tag = tn.Tag;
- }
- else
- {
- utn.Key = strKey;
- utn.Text = strKey;
- utn.Tag = "";
- }
- if (xn.ChildNodes.Count >0)
- {
- SetChildNode(utn, xn.ChildNodes);
- }
- this.trFile.Nodes.Add(utn);
- }
- }
- private void SetChildNode(UltraTreeNode utn, XmlNodeList xnl)
- {
- foreach (XmlNode xn in xnl)
- {
- UltraTreeNode tn = new UltraTreeNode();
- string strKey = xn.Attributes[0].Value.ToString();
- UltraTreeNode tntmp = this.trDb.GetNodeByKey(strKey);
-
- if (this.trDb.GetNodeByKey(strKey) != null)
- {
- tn.Key = tntmp.Key;
- tn.Text = tntmp.Text;
- tn.Tag = tntmp.Tag;
- }
- else
- {
- tn.Key = strKey;
- tn.Text = strKey;
- tn.Tag = "";
- }
- if (xn.ChildNodes.Count >0)
- {
- SetChildNode(tn, xn.ChildNodes);
- }
- utn.Nodes.Add(tn);
- }
- }
- #endregion
- #endregion
- private void ultraButton1_Click(object sender, System.EventArgs e)
- {
- if (this.trDb.SelectedNodes == null) return;
-
- SelectedNodesCollection utn = this.trDb.SelectedNodes;
-
- foreach(UltraTreeNode tn in utn)
- {
- CopyTreeNode(tn, this.trFile.Nodes);
- }
- }
- private void CopyTreeNode(UltraTreeNode tn, TreeNodesCollection tnc)
- {
- if (this.trFile.GetNodeByKey(tn.Key) == null)
- {
- UltraTreeNode ftn = new UltraTreeNode(tn.Key, tn.Text);
- ftn.Tag = tn.Tag;
- tnc.Add(ftn);
- }
- if (tn.Nodes.Count > 0)
- {
- foreach (UltraTreeNode utn in tn.Nodes)
- {
- CopyTreeNode(utn,this.trFile.GetNodeByKey(tn.Key).Nodes);
- }
- }
- }
- private void ultraButton2_Click(object sender, System.EventArgs e)
- {
- if ( this.trFile.ActiveNode == null) return;
-
- DialogResult rs = MessageBox.Show("是否确认移除?","提示",MessageBoxButtons.YesNo,MessageBoxIcon.Question);
- switch (rs)
- {
- case DialogResult.Yes :
- this.trFile.ActiveNode.Remove();
- break;
- case DialogResult.No :
- break;
- }
- }
- private void ultraButton6_Click(object sender, System.EventArgs e)
- {
- try
- {
- if ( this.trFile.SelectedNodes == null) return;
- UltraTreeNode tn= this.trFile.ActiveNode;
- int i = tn.Index ;
- if (i == 0) return;
- if (tn.Level == 0)
- tn.Reposition(this.trFile.Nodes, i - 1);
- else
- tn.Reposition(tn.Parent.Nodes, i - 1);
- }
- catch
- {}
- }
- private void ultraButton7_Click(object sender, System.EventArgs e)
- {
- try
- {
- if ( this.trFile.SelectedNodes == null) return;
- UltraTreeNode tn= this.trFile.ActiveNode;
- int i = tn.Index ;
-
- if (tn.Level == 0)
- {
- if (i == this.trFile.Nodes.Count-1) return;
- tn.Reposition(this.trFile.Nodes, i + 1);
- }
- else
- {
- if (i == tn.Parent.Nodes.Count-1) return;
- tn.Reposition(tn.Parent.Nodes, i + 1);
- }
- }
- catch {}
- }
- private void ultraButton5_Click(object sender, System.EventArgs e)
- {
- try
- {
- if ( this.trFile.SelectedNodes == null) return;
- UltraTreeNode tn= this.trFile.ActiveNode;
-
- if (tn.Level == 0 )
- return;
- else if (tn.Level == 1 )
- tn.Reposition(this.trFile.Nodes);
- else
- {
- UltraTreeNode utn = tn.Parent.Parent;
- tn.Reposition(utn.Nodes);
- }
- }
- catch {}
- }
- private void ultraButton8_Click(object sender, System.EventArgs e)
- {
- try
- {
- if ( this.trFile.SelectedNodes == null) return;
- UltraTreeNode tn= this.trFile.ActiveNode;
- int i = tn.Index;
-
- if (i == 0) return;
-
- UltraTreeNode utn;
- if (tn.Level == 0)
- utn = this.trFile.Nodes[i -1];
- else
- utn = tn.Parent.Nodes[i -1];
-
- tn.Reposition(utn.Nodes);
- utn.ExpandAll();
- }
- catch {}
- }
- private void ultraButton3_Click(object sender, System.EventArgs e)
- {
- try
- {
- if ( this.trFile.SelectedNodes == null) return;
- UltraTreeNode tn= this.trFile.ActiveNode;
- if (tn.Level == 0)
- {
- UltraTreeNode utn = new UltraTreeNode();
- this.trFile.Nodes.Add(utn);
- utn.BeginEdit();
- }
- else
- {
- UltraTreeNode utn = new UltraTreeNode();
- tn.Parent.Nodes.Add(utn);
- utn.BeginEdit();
- }
- }
- catch {}
- }
- private void ultraButton4_Click(object sender, System.EventArgs e)
- {
-
- }
- private void ultraGroupBox1_Click(object sender, System.EventArgs e)
- {
-
- }
-
-
- }
- }
|