1246bd157caacbec170e1da330584182083c9300.svn-base 67 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581
  1. using System;
  2. using System.Xml;
  3. using System.Data;
  4. using System.Drawing;
  5. using System.Collections;
  6. using System.ComponentModel;
  7. using System.Windows.Forms;
  8. using Core.Mes.ClientFrameWork;
  9. using Core.Mes.IBaseInterface;
  10. //using Core.Mes.ServerFrameWork;
  11. using Infragistics.Win.UltraWinGrid;
  12. using Infragistics.Win.UltraWinTree;
  13. namespace Core.Mes.ClientPurviewManager
  14. {
  15. /// <summary>
  16. /// FrmFunction 的摘要说明。
  17. /// </summary>
  18. public class FrmFunction : Core.Mes.ClientFrameWork.FrmBase
  19. {
  20. private System.Windows.Forms.Panel panel1;
  21. private Infragistics.Win.UltraWinToolbars.UltraToolbarsManager ultraToolbarsManager1;
  22. private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _panel1_Toolbars_Dock_Area_Left;
  23. private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _panel1_Toolbars_Dock_Area_Right;
  24. private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _panel1_Toolbars_Dock_Area_Top;
  25. private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _panel1_Toolbars_Dock_Area_Bottom;
  26. private System.Windows.Forms.Panel panel2;
  27. private Infragistics.Win.Misc.UltraGroupBox ultraGroupBox1;
  28. private System.Windows.Forms.Panel panel3;
  29. private Infragistics.Win.UltraWinToolbars.UltraToolbarsManager ultraToolbarsManager2;
  30. private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _panel2_Toolbars_Dock_Area_Left;
  31. private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _panel2_Toolbars_Dock_Area_Right;
  32. private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _panel2_Toolbars_Dock_Area_Top;
  33. private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _panel2_Toolbars_Dock_Area_Bottom;
  34. private Infragistics.Win.UltraWinGrid.UltraGrid ultraGrid1;
  35. private Infragistics.Win.UltraWinTree.UltraTree trDb;
  36. private Infragistics.Win.UltraWinTree.UltraTree trFile;
  37. private Infragistics.Win.Misc.UltraButton ultraButton1;
  38. private Infragistics.Win.Misc.UltraButton ultraButton2;
  39. private Infragistics.Win.Misc.UltraButton ultraButton3;
  40. private Infragistics.Win.Misc.UltraButton ultraButton4;
  41. private Infragistics.Win.Misc.UltraButton ultraButton5;
  42. private Infragistics.Win.Misc.UltraButton ultraButton6;
  43. private Infragistics.Win.Misc.UltraButton ultraButton7;
  44. private Infragistics.Win.Misc.UltraButton ultraButton8;
  45. private System.ComponentModel.IContainer components;
  46. private DataSet _functionData;
  47. private Infragistics.Win.Misc.UltraExpandableGroupBox ultraExpandableGroupBox1;
  48. private Infragistics.Win.Misc.UltraExpandableGroupBoxPanel ultraExpandableGroupBoxPanel1;
  49. private Infragistics.Win.Misc.UltraLabel ultraLabel1;
  50. private Infragistics.Win.Misc.UltraLabel ultraLabel2;
  51. private Infragistics.Win.Misc.UltraLabel ultraLabel3;
  52. private Infragistics.Win.Misc.UltraLabel ultraLabel4;
  53. private Infragistics.Win.Misc.UltraLabel ultraLabel5;
  54. private Infragistics.Win.UltraWinEditors.UltraTextEditor ultraTextEditor1;
  55. private Infragistics.Win.UltraWinEditors.UltraComboEditor ultraComboEditor1;
  56. private Infragistics.Win.UltraWinEditors.UltraTextEditor ultraTextEditor2;
  57. private Infragistics.Win.UltraWinEditors.UltraTextEditor ultraTextEditor3;
  58. private Infragistics.Win.UltraWinEditors.UltraTextEditor ultraTextEditor4;
  59. private string _selectFuncSQL;
  60. public FrmFunction()
  61. {
  62. //
  63. // Windows 窗体设计器支持所必需的
  64. //
  65. InitializeComponent();
  66. //
  67. // TODO: 在 InitializeComponent 调用后添加任何构造函数代码
  68. //
  69. }
  70. /// <summary>
  71. /// 清理所有正在使用的资源。
  72. /// </summary>
  73. protected override void Dispose( bool disposing )
  74. {
  75. if( disposing )
  76. {
  77. if(components != null)
  78. {
  79. components.Dispose();
  80. }
  81. }
  82. base.Dispose( disposing );
  83. }
  84. #region Windows 窗体设计器生成的代码
  85. /// <summary>
  86. /// 设计器支持所需的方法 - 不要使用代码编辑器修改
  87. /// 此方法的内容。
  88. /// </summary>
  89. private void InitializeComponent()
  90. {
  91. this.components = new System.ComponentModel.Container();
  92. Infragistics.Win.UltraWinTree.UltraTreeColumnSet ultraTreeColumnSet1 = new Infragistics.Win.UltraWinTree.UltraTreeColumnSet();
  93. Infragistics.Win.Appearance appearance1 = new Infragistics.Win.Appearance();
  94. Infragistics.Win.UltraWinGrid.UltraGridBand ultraGridBand1 = new Infragistics.Win.UltraWinGrid.UltraGridBand("Band 0", -1);
  95. Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn1 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("Column 0");
  96. Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn2 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("Column 1");
  97. Infragistics.Win.Appearance appearance2 = new Infragistics.Win.Appearance();
  98. Infragistics.Win.Appearance appearance3 = new Infragistics.Win.Appearance();
  99. Infragistics.Win.Appearance appearance4 = new Infragistics.Win.Appearance();
  100. Infragistics.Win.Appearance appearance5 = new Infragistics.Win.Appearance();
  101. Infragistics.Win.Appearance appearance6 = new Infragistics.Win.Appearance();
  102. Infragistics.Win.Appearance appearance7 = new Infragistics.Win.Appearance();
  103. Infragistics.Win.Appearance appearance8 = new Infragistics.Win.Appearance();
  104. Infragistics.Win.Appearance appearance9 = new Infragistics.Win.Appearance();
  105. Infragistics.Win.Appearance appearance10 = new Infragistics.Win.Appearance();
  106. Infragistics.Win.Appearance appearance11 = new Infragistics.Win.Appearance();
  107. Infragistics.Win.Appearance appearance12 = new Infragistics.Win.Appearance();
  108. Infragistics.Win.Appearance appearance13 = new Infragistics.Win.Appearance();
  109. Infragistics.Win.Appearance appearance14 = new Infragistics.Win.Appearance();
  110. Infragistics.Win.Appearance appearance15 = new Infragistics.Win.Appearance();
  111. Infragistics.Win.Appearance appearance16 = new Infragistics.Win.Appearance();
  112. Infragistics.Win.Appearance appearance17 = new Infragistics.Win.Appearance();
  113. Infragistics.Win.Appearance appearance18 = new Infragistics.Win.Appearance();
  114. Infragistics.Win.UltraWinToolbars.UltraToolbar ultraToolbar1 = new Infragistics.Win.UltraWinToolbars.UltraToolbar("Toolbar1");
  115. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool1 = new Infragistics.Win.UltraWinToolbars.ButtonTool("all");
  116. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool2 = new Infragistics.Win.UltraWinToolbars.ButtonTool("add");
  117. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool3 = new Infragistics.Win.UltraWinToolbars.ButtonTool("del");
  118. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool4 = new Infragistics.Win.UltraWinToolbars.ButtonTool("save");
  119. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool5 = new Infragistics.Win.UltraWinToolbars.ButtonTool("edit");
  120. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool6 = new Infragistics.Win.UltraWinToolbars.ButtonTool("exit");
  121. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool7 = new Infragistics.Win.UltraWinToolbars.ButtonTool("all");
  122. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool8 = new Infragistics.Win.UltraWinToolbars.ButtonTool("add");
  123. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool9 = new Infragistics.Win.UltraWinToolbars.ButtonTool("del");
  124. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool10 = new Infragistics.Win.UltraWinToolbars.ButtonTool("save");
  125. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool11 = new Infragistics.Win.UltraWinToolbars.ButtonTool("edit");
  126. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool12 = new Infragistics.Win.UltraWinToolbars.ButtonTool("exit");
  127. Infragistics.Win.UltraWinTree.UltraTreeColumnSet ultraTreeColumnSet2 = new Infragistics.Win.UltraWinTree.UltraTreeColumnSet();
  128. Infragistics.Win.UltraWinToolbars.UltraToolbar ultraToolbar2 = new Infragistics.Win.UltraWinToolbars.UltraToolbar("Toolbar1");
  129. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool13 = new Infragistics.Win.UltraWinToolbars.ButtonTool("open");
  130. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool14 = new Infragistics.Win.UltraWinToolbars.ButtonTool("save");
  131. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool15 = new Infragistics.Win.UltraWinToolbars.ButtonTool("open");
  132. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool16 = new Infragistics.Win.UltraWinToolbars.ButtonTool("save");
  133. this.trDb = new Infragistics.Win.UltraWinTree.UltraTree();
  134. this.panel1 = new System.Windows.Forms.Panel();
  135. this.ultraGrid1 = new Infragistics.Win.UltraWinGrid.UltraGrid();
  136. this.ultraExpandableGroupBox1 = new Infragistics.Win.Misc.UltraExpandableGroupBox();
  137. this.ultraExpandableGroupBoxPanel1 = new Infragistics.Win.Misc.UltraExpandableGroupBoxPanel();
  138. this.ultraTextEditor4 = new Infragistics.Win.UltraWinEditors.UltraTextEditor();
  139. this.ultraTextEditor3 = new Infragistics.Win.UltraWinEditors.UltraTextEditor();
  140. this.ultraTextEditor2 = new Infragistics.Win.UltraWinEditors.UltraTextEditor();
  141. this.ultraComboEditor1 = new Infragistics.Win.UltraWinEditors.UltraComboEditor();
  142. this.ultraTextEditor1 = new Infragistics.Win.UltraWinEditors.UltraTextEditor();
  143. this.ultraLabel5 = new Infragistics.Win.Misc.UltraLabel();
  144. this.ultraLabel4 = new Infragistics.Win.Misc.UltraLabel();
  145. this.ultraLabel3 = new Infragistics.Win.Misc.UltraLabel();
  146. this.ultraLabel2 = new Infragistics.Win.Misc.UltraLabel();
  147. this.ultraLabel1 = new Infragistics.Win.Misc.UltraLabel();
  148. this._panel1_Toolbars_Dock_Area_Left = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea();
  149. this.ultraToolbarsManager1 = new Infragistics.Win.UltraWinToolbars.UltraToolbarsManager(this.components);
  150. this._panel1_Toolbars_Dock_Area_Right = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea();
  151. this._panel1_Toolbars_Dock_Area_Top = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea();
  152. this._panel1_Toolbars_Dock_Area_Bottom = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea();
  153. this.panel2 = new System.Windows.Forms.Panel();
  154. this.trFile = new Infragistics.Win.UltraWinTree.UltraTree();
  155. this._panel2_Toolbars_Dock_Area_Left = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea();
  156. this.ultraToolbarsManager2 = new Infragistics.Win.UltraWinToolbars.UltraToolbarsManager(this.components);
  157. this._panel2_Toolbars_Dock_Area_Right = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea();
  158. this._panel2_Toolbars_Dock_Area_Top = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea();
  159. this._panel2_Toolbars_Dock_Area_Bottom = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea();
  160. this.ultraGroupBox1 = new Infragistics.Win.Misc.UltraGroupBox();
  161. this.ultraButton8 = new Infragistics.Win.Misc.UltraButton();
  162. this.ultraButton7 = new Infragistics.Win.Misc.UltraButton();
  163. this.ultraButton6 = new Infragistics.Win.Misc.UltraButton();
  164. this.ultraButton5 = new Infragistics.Win.Misc.UltraButton();
  165. this.ultraButton4 = new Infragistics.Win.Misc.UltraButton();
  166. this.ultraButton3 = new Infragistics.Win.Misc.UltraButton();
  167. this.ultraButton2 = new Infragistics.Win.Misc.UltraButton();
  168. this.ultraButton1 = new Infragistics.Win.Misc.UltraButton();
  169. this.panel3 = new System.Windows.Forms.Panel();
  170. ((System.ComponentModel.ISupportInitialize)(this.trDb)).BeginInit();
  171. this.panel1.SuspendLayout();
  172. ((System.ComponentModel.ISupportInitialize)(this.ultraGrid1)).BeginInit();
  173. ((System.ComponentModel.ISupportInitialize)(this.ultraExpandableGroupBox1)).BeginInit();
  174. this.ultraExpandableGroupBox1.SuspendLayout();
  175. this.ultraExpandableGroupBoxPanel1.SuspendLayout();
  176. ((System.ComponentModel.ISupportInitialize)(this.ultraTextEditor4)).BeginInit();
  177. ((System.ComponentModel.ISupportInitialize)(this.ultraTextEditor3)).BeginInit();
  178. ((System.ComponentModel.ISupportInitialize)(this.ultraTextEditor2)).BeginInit();
  179. ((System.ComponentModel.ISupportInitialize)(this.ultraComboEditor1)).BeginInit();
  180. ((System.ComponentModel.ISupportInitialize)(this.ultraTextEditor1)).BeginInit();
  181. ((System.ComponentModel.ISupportInitialize)(this.ultraToolbarsManager1)).BeginInit();
  182. this.panel2.SuspendLayout();
  183. ((System.ComponentModel.ISupportInitialize)(this.trFile)).BeginInit();
  184. ((System.ComponentModel.ISupportInitialize)(this.ultraToolbarsManager2)).BeginInit();
  185. ((System.ComponentModel.ISupportInitialize)(this.ultraGroupBox1)).BeginInit();
  186. this.ultraGroupBox1.SuspendLayout();
  187. this.panel3.SuspendLayout();
  188. this.SuspendLayout();
  189. //
  190. // trDb
  191. //
  192. this.trDb.ColumnSettings.RootColumnSet = ultraTreeColumnSet1;
  193. this.trDb.Dock = System.Windows.Forms.DockStyle.Left;
  194. this.trDb.Location = new System.Drawing.Point(0, 0);
  195. this.trDb.Name = "trDb";
  196. this.trDb.Size = new System.Drawing.Size(168, 555);
  197. this.trDb.TabIndex = 0;
  198. //
  199. // panel1
  200. //
  201. this.panel1.Controls.Add(this.ultraGrid1);
  202. this.panel1.Controls.Add(this.ultraExpandableGroupBox1);
  203. this.panel1.Controls.Add(this._panel1_Toolbars_Dock_Area_Left);
  204. this.panel1.Controls.Add(this._panel1_Toolbars_Dock_Area_Right);
  205. this.panel1.Controls.Add(this._panel1_Toolbars_Dock_Area_Top);
  206. this.panel1.Controls.Add(this._panel1_Toolbars_Dock_Area_Bottom);
  207. this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
  208. this.panel1.Location = new System.Drawing.Point(168, 0);
  209. this.panel1.Name = "panel1";
  210. this.panel1.Size = new System.Drawing.Size(584, 320);
  211. this.panel1.TabIndex = 1;
  212. //
  213. // ultraGrid1
  214. //
  215. appearance1.BackColor = System.Drawing.SystemColors.Window;
  216. appearance1.BorderColor = System.Drawing.SystemColors.InactiveCaption;
  217. this.ultraGrid1.DisplayLayout.Appearance = appearance1;
  218. ultraGridColumn1.Header.VisiblePosition = 0;
  219. ultraGridColumn2.Header.VisiblePosition = 1;
  220. ultraGridBand1.Columns.AddRange(new object[] {
  221. ultraGridColumn1,
  222. ultraGridColumn2});
  223. appearance2.BackColor = System.Drawing.Color.LightSteelBlue;
  224. ultraGridBand1.Override.RowSelectorAppearance = appearance2;
  225. ultraGridBand1.Override.RowSelectorHeaderStyle = Infragistics.Win.UltraWinGrid.RowSelectorHeaderStyle.SeparateElement;
  226. ultraGridBand1.Override.RowSelectorNumberStyle = Infragistics.Win.UltraWinGrid.RowSelectorNumberStyle.RowIndex;
  227. ultraGridBand1.Override.RowSelectors = Infragistics.Win.DefaultableBoolean.True;
  228. this.ultraGrid1.DisplayLayout.BandsSerializer.Add(ultraGridBand1);
  229. this.ultraGrid1.DisplayLayout.CaptionVisible = Infragistics.Win.DefaultableBoolean.False;
  230. appearance3.BackColor = System.Drawing.SystemColors.ActiveBorder;
  231. appearance3.BackColor2 = System.Drawing.SystemColors.ControlDark;
  232. appearance3.BackGradientStyle = Infragistics.Win.GradientStyle.Vertical;
  233. appearance3.BorderColor = System.Drawing.SystemColors.Window;
  234. this.ultraGrid1.DisplayLayout.GroupByBox.Appearance = appearance3;
  235. appearance4.ForeColor = System.Drawing.SystemColors.GrayText;
  236. this.ultraGrid1.DisplayLayout.GroupByBox.BandLabelAppearance = appearance4;
  237. this.ultraGrid1.DisplayLayout.GroupByBox.BorderStyle = Infragistics.Win.UIElementBorderStyle.Solid;
  238. this.ultraGrid1.DisplayLayout.GroupByBox.Hidden = true;
  239. appearance5.BackColor = System.Drawing.SystemColors.ControlLightLight;
  240. appearance5.BackColor2 = System.Drawing.SystemColors.Control;
  241. appearance5.BackGradientStyle = Infragistics.Win.GradientStyle.Horizontal;
  242. appearance5.ForeColor = System.Drawing.SystemColors.GrayText;
  243. this.ultraGrid1.DisplayLayout.GroupByBox.PromptAppearance = appearance5;
  244. this.ultraGrid1.DisplayLayout.MaxColScrollRegions = 1;
  245. this.ultraGrid1.DisplayLayout.MaxRowScrollRegions = 1;
  246. appearance6.BackColor = System.Drawing.SystemColors.Window;
  247. appearance6.ForeColor = System.Drawing.SystemColors.ControlText;
  248. this.ultraGrid1.DisplayLayout.Override.ActiveCellAppearance = appearance6;
  249. appearance7.BackColor = System.Drawing.SystemColors.Highlight;
  250. appearance7.ForeColor = System.Drawing.SystemColors.HighlightText;
  251. this.ultraGrid1.DisplayLayout.Override.ActiveRowAppearance = appearance7;
  252. this.ultraGrid1.DisplayLayout.Override.BorderStyleCell = Infragistics.Win.UIElementBorderStyle.RaisedSoft;
  253. this.ultraGrid1.DisplayLayout.Override.BorderStyleRow = Infragistics.Win.UIElementBorderStyle.Dotted;
  254. appearance8.BackColor = System.Drawing.SystemColors.Window;
  255. this.ultraGrid1.DisplayLayout.Override.CardAreaAppearance = appearance8;
  256. appearance9.BorderColor = System.Drawing.Color.Silver;
  257. appearance9.TextTrimming = Infragistics.Win.TextTrimming.EllipsisCharacter;
  258. this.ultraGrid1.DisplayLayout.Override.CellAppearance = appearance9;
  259. this.ultraGrid1.DisplayLayout.Override.CellClickAction = Infragistics.Win.UltraWinGrid.CellClickAction.EditAndSelectText;
  260. this.ultraGrid1.DisplayLayout.Override.CellPadding = 0;
  261. appearance10.BackColor = System.Drawing.SystemColors.Control;
  262. appearance10.BackColor2 = System.Drawing.SystemColors.ControlDark;
  263. appearance10.BackGradientAlignment = Infragistics.Win.GradientAlignment.Element;
  264. appearance10.BackGradientStyle = Infragistics.Win.GradientStyle.Horizontal;
  265. appearance10.BorderColor = System.Drawing.SystemColors.Window;
  266. this.ultraGrid1.DisplayLayout.Override.GroupByRowAppearance = appearance10;
  267. appearance11.BackColor = System.Drawing.Color.LightSteelBlue;
  268. appearance11.TextHAlign = Infragistics.Win.HAlign.Center;
  269. this.ultraGrid1.DisplayLayout.Override.HeaderAppearance = appearance11;
  270. this.ultraGrid1.DisplayLayout.Override.HeaderClickAction = Infragistics.Win.UltraWinGrid.HeaderClickAction.SortMulti;
  271. this.ultraGrid1.DisplayLayout.Override.HeaderStyle = Infragistics.Win.HeaderStyle.Standard;
  272. this.ultraGrid1.DisplayLayout.Override.MinRowHeight = 21;
  273. appearance12.BackColor = System.Drawing.SystemColors.Window;
  274. appearance12.BorderColor = System.Drawing.Color.Silver;
  275. this.ultraGrid1.DisplayLayout.Override.RowAppearance = appearance12;
  276. this.ultraGrid1.DisplayLayout.Override.RowSelectors = Infragistics.Win.DefaultableBoolean.False;
  277. appearance13.BackColor = System.Drawing.SystemColors.ControlLight;
  278. this.ultraGrid1.DisplayLayout.Override.TemplateAddRowAppearance = appearance13;
  279. this.ultraGrid1.DisplayLayout.ScrollBounds = Infragistics.Win.UltraWinGrid.ScrollBounds.ScrollToFill;
  280. this.ultraGrid1.DisplayLayout.ScrollStyle = Infragistics.Win.UltraWinGrid.ScrollStyle.Immediate;
  281. this.ultraGrid1.DisplayLayout.ViewStyleBand = Infragistics.Win.UltraWinGrid.ViewStyleBand.OutlookGroupBy;
  282. this.ultraGrid1.Dock = System.Windows.Forms.DockStyle.Fill;
  283. this.ultraGrid1.Location = new System.Drawing.Point(0, 50);
  284. this.ultraGrid1.Name = "ultraGrid1";
  285. this.ultraGrid1.Size = new System.Drawing.Size(584, 182);
  286. this.ultraGrid1.TabIndex = 4;
  287. this.ultraGrid1.Text = "ultraGrid1";
  288. this.ultraGrid1.AfterRowActivate += new System.EventHandler(this.ultraGrid1_AfterRowActivate);
  289. //
  290. // ultraExpandableGroupBox1
  291. //
  292. this.ultraExpandableGroupBox1.Controls.Add(this.ultraExpandableGroupBoxPanel1);
  293. this.ultraExpandableGroupBox1.Dock = System.Windows.Forms.DockStyle.Bottom;
  294. this.ultraExpandableGroupBox1.ExpandedSize = new System.Drawing.Size(584, 88);
  295. this.ultraExpandableGroupBox1.Location = new System.Drawing.Point(0, 232);
  296. this.ultraExpandableGroupBox1.Name = "ultraExpandableGroupBox1";
  297. this.ultraExpandableGroupBox1.Size = new System.Drawing.Size(584, 88);
  298. this.ultraExpandableGroupBox1.SupportThemes = false;
  299. this.ultraExpandableGroupBox1.TabIndex = 9;
  300. this.ultraExpandableGroupBox1.Text = "编辑区域";
  301. //
  302. // ultraExpandableGroupBoxPanel1
  303. //
  304. this.ultraExpandableGroupBoxPanel1.Controls.Add(this.ultraTextEditor4);
  305. this.ultraExpandableGroupBoxPanel1.Controls.Add(this.ultraTextEditor3);
  306. this.ultraExpandableGroupBoxPanel1.Controls.Add(this.ultraTextEditor2);
  307. this.ultraExpandableGroupBoxPanel1.Controls.Add(this.ultraComboEditor1);
  308. this.ultraExpandableGroupBoxPanel1.Controls.Add(this.ultraTextEditor1);
  309. this.ultraExpandableGroupBoxPanel1.Controls.Add(this.ultraLabel5);
  310. this.ultraExpandableGroupBoxPanel1.Controls.Add(this.ultraLabel4);
  311. this.ultraExpandableGroupBoxPanel1.Controls.Add(this.ultraLabel3);
  312. this.ultraExpandableGroupBoxPanel1.Controls.Add(this.ultraLabel2);
  313. this.ultraExpandableGroupBoxPanel1.Controls.Add(this.ultraLabel1);
  314. this.ultraExpandableGroupBoxPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
  315. this.ultraExpandableGroupBoxPanel1.Location = new System.Drawing.Point(3, 19);
  316. this.ultraExpandableGroupBoxPanel1.Name = "ultraExpandableGroupBoxPanel1";
  317. this.ultraExpandableGroupBoxPanel1.Size = new System.Drawing.Size(578, 66);
  318. this.ultraExpandableGroupBoxPanel1.TabIndex = 0;
  319. //
  320. // ultraTextEditor4
  321. //
  322. appearance14.BackColor = System.Drawing.Color.LightCyan;
  323. this.ultraTextEditor4.Appearance = appearance14;
  324. this.ultraTextEditor4.AutoSize = true;
  325. this.ultraTextEditor4.Location = new System.Drawing.Point(432, 40);
  326. this.ultraTextEditor4.Name = "ultraTextEditor4";
  327. this.ultraTextEditor4.Size = new System.Drawing.Size(104, 21);
  328. this.ultraTextEditor4.TabIndex = 10;
  329. //
  330. // ultraTextEditor3
  331. //
  332. appearance15.BackColor = System.Drawing.Color.LightCyan;
  333. this.ultraTextEditor3.Appearance = appearance15;
  334. this.ultraTextEditor3.AutoSize = true;
  335. this.ultraTextEditor3.Location = new System.Drawing.Point(256, 40);
  336. this.ultraTextEditor3.Name = "ultraTextEditor3";
  337. this.ultraTextEditor3.Size = new System.Drawing.Size(104, 21);
  338. this.ultraTextEditor3.TabIndex = 9;
  339. //
  340. // ultraTextEditor2
  341. //
  342. appearance16.BackColor = System.Drawing.Color.LightCyan;
  343. this.ultraTextEditor2.Appearance = appearance16;
  344. this.ultraTextEditor2.AutoSize = true;
  345. this.ultraTextEditor2.Location = new System.Drawing.Point(80, 40);
  346. this.ultraTextEditor2.Name = "ultraTextEditor2";
  347. this.ultraTextEditor2.Size = new System.Drawing.Size(96, 21);
  348. this.ultraTextEditor2.TabIndex = 8;
  349. //
  350. // ultraComboEditor1
  351. //
  352. appearance17.BackColor = System.Drawing.Color.LightCyan;
  353. this.ultraComboEditor1.Appearance = appearance17;
  354. this.ultraComboEditor1.AutoSize = true;
  355. this.ultraComboEditor1.Location = new System.Drawing.Point(256, 8);
  356. this.ultraComboEditor1.Name = "ultraComboEditor1";
  357. this.ultraComboEditor1.Size = new System.Drawing.Size(104, 21);
  358. this.ultraComboEditor1.TabIndex = 7;
  359. //
  360. // ultraTextEditor1
  361. //
  362. appearance18.BackColor = System.Drawing.Color.LightCyan;
  363. this.ultraTextEditor1.Appearance = appearance18;
  364. this.ultraTextEditor1.AutoSize = true;
  365. this.ultraTextEditor1.Location = new System.Drawing.Point(80, 6);
  366. this.ultraTextEditor1.Name = "ultraTextEditor1";
  367. this.ultraTextEditor1.Size = new System.Drawing.Size(96, 21);
  368. this.ultraTextEditor1.TabIndex = 6;
  369. //
  370. // ultraLabel5
  371. //
  372. this.ultraLabel5.Location = new System.Drawing.Point(376, 42);
  373. this.ultraLabel5.Name = "ultraLabel5";
  374. this.ultraLabel5.Size = new System.Drawing.Size(56, 16);
  375. this.ultraLabel5.TabIndex = 4;
  376. this.ultraLabel5.Text = "图标名称";
  377. //
  378. // ultraLabel4
  379. //
  380. this.ultraLabel4.Location = new System.Drawing.Point(192, 42);
  381. this.ultraLabel4.Name = "ultraLabel4";
  382. this.ultraLabel4.Size = new System.Drawing.Size(56, 16);
  383. this.ultraLabel4.TabIndex = 3;
  384. this.ultraLabel4.Text = "程序集名";
  385. //
  386. // ultraLabel3
  387. //
  388. this.ultraLabel3.Location = new System.Drawing.Point(32, 40);
  389. this.ultraLabel3.Name = "ultraLabel3";
  390. this.ultraLabel3.Size = new System.Drawing.Size(32, 16);
  391. this.ultraLabel3.TabIndex = 2;
  392. this.ultraLabel3.Text = "类名";
  393. //
  394. // ultraLabel2
  395. //
  396. this.ultraLabel2.Location = new System.Drawing.Point(192, 16);
  397. this.ultraLabel2.Name = "ultraLabel2";
  398. this.ultraLabel2.Size = new System.Drawing.Size(56, 16);
  399. this.ultraLabel2.TabIndex = 1;
  400. this.ultraLabel2.Text = "功能名称";
  401. //
  402. // ultraLabel1
  403. //
  404. this.ultraLabel1.Location = new System.Drawing.Point(16, 16);
  405. this.ultraLabel1.Name = "ultraLabel1";
  406. this.ultraLabel1.Size = new System.Drawing.Size(56, 16);
  407. this.ultraLabel1.TabIndex = 0;
  408. this.ultraLabel1.Text = "功能编码";
  409. //
  410. // _panel1_Toolbars_Dock_Area_Left
  411. //
  412. this._panel1_Toolbars_Dock_Area_Left.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping;
  413. this._panel1_Toolbars_Dock_Area_Left.BackColor = System.Drawing.SystemColors.Control;
  414. this._panel1_Toolbars_Dock_Area_Left.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Left;
  415. this._panel1_Toolbars_Dock_Area_Left.ForeColor = System.Drawing.SystemColors.ControlText;
  416. this._panel1_Toolbars_Dock_Area_Left.Location = new System.Drawing.Point(0, 50);
  417. this._panel1_Toolbars_Dock_Area_Left.Name = "_panel1_Toolbars_Dock_Area_Left";
  418. this._panel1_Toolbars_Dock_Area_Left.Size = new System.Drawing.Size(0, 270);
  419. this._panel1_Toolbars_Dock_Area_Left.ToolbarsManager = this.ultraToolbarsManager1;
  420. //
  421. // ultraToolbarsManager1
  422. //
  423. this.ultraToolbarsManager1.DesignerFlags = 1;
  424. this.ultraToolbarsManager1.DockWithinContainer = this.panel1;
  425. this.ultraToolbarsManager1.ShowQuickCustomizeButton = false;
  426. this.ultraToolbarsManager1.Style = Infragistics.Win.UltraWinToolbars.ToolbarStyle.VisualStudio2005;
  427. ultraToolbar1.DockedColumn = 0;
  428. ultraToolbar1.DockedRow = 0;
  429. ultraToolbar1.Text = "Toolbar1";
  430. buttonTool1.InstanceProps.IsFirstInGroup = true;
  431. buttonTool2.InstanceProps.IsFirstInGroup = true;
  432. buttonTool3.InstanceProps.IsFirstInGroup = true;
  433. buttonTool4.InstanceProps.IsFirstInGroup = true;
  434. buttonTool5.InstanceProps.IsFirstInGroup = true;
  435. buttonTool6.InstanceProps.IsFirstInGroup = true;
  436. ultraToolbar1.Tools.AddRange(new Infragistics.Win.UltraWinToolbars.ToolBase[] {
  437. buttonTool1,
  438. buttonTool2,
  439. buttonTool3,
  440. buttonTool4,
  441. buttonTool5,
  442. buttonTool6});
  443. this.ultraToolbarsManager1.Toolbars.AddRange(new Infragistics.Win.UltraWinToolbars.UltraToolbar[] {
  444. ultraToolbar1});
  445. buttonTool7.SharedProps.Caption = "全部(&L)";
  446. buttonTool7.SharedProps.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageAndText;
  447. buttonTool7.SharedProps.Shortcut = System.Windows.Forms.Shortcut.CtrlL;
  448. buttonTool8.SharedProps.Caption = "新增(&A)";
  449. buttonTool8.SharedProps.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageAndText;
  450. buttonTool8.SharedProps.Shortcut = System.Windows.Forms.Shortcut.CtrlA;
  451. buttonTool9.SharedProps.Caption = "删除(&D)";
  452. buttonTool9.SharedProps.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageAndText;
  453. buttonTool9.SharedProps.Shortcut = System.Windows.Forms.Shortcut.CtrlD;
  454. buttonTool10.SharedProps.Caption = "保存(&S)";
  455. buttonTool10.SharedProps.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageAndText;
  456. buttonTool10.SharedProps.Shortcut = System.Windows.Forms.Shortcut.CtrlS;
  457. buttonTool10.SharedProps.Visible = false;
  458. buttonTool11.SharedProps.Caption = "修改(&U)";
  459. buttonTool11.SharedProps.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageAndText;
  460. buttonTool11.SharedProps.Shortcut = System.Windows.Forms.Shortcut.CtrlU;
  461. buttonTool12.SharedProps.Caption = "关闭(&E)";
  462. buttonTool12.SharedProps.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageAndText;
  463. buttonTool12.SharedProps.Shortcut = System.Windows.Forms.Shortcut.CtrlE;
  464. this.ultraToolbarsManager1.Tools.AddRange(new Infragistics.Win.UltraWinToolbars.ToolBase[] {
  465. buttonTool7,
  466. buttonTool8,
  467. buttonTool9,
  468. buttonTool10,
  469. buttonTool11,
  470. buttonTool12});
  471. this.ultraToolbarsManager1.ToolClick += new Infragistics.Win.UltraWinToolbars.ToolClickEventHandler(this.ultraToolbarsManager1_ToolClick);
  472. //
  473. // _panel1_Toolbars_Dock_Area_Right
  474. //
  475. this._panel1_Toolbars_Dock_Area_Right.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping;
  476. this._panel1_Toolbars_Dock_Area_Right.BackColor = System.Drawing.SystemColors.Control;
  477. this._panel1_Toolbars_Dock_Area_Right.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Right;
  478. this._panel1_Toolbars_Dock_Area_Right.ForeColor = System.Drawing.SystemColors.ControlText;
  479. this._panel1_Toolbars_Dock_Area_Right.Location = new System.Drawing.Point(584, 50);
  480. this._panel1_Toolbars_Dock_Area_Right.Name = "_panel1_Toolbars_Dock_Area_Right";
  481. this._panel1_Toolbars_Dock_Area_Right.Size = new System.Drawing.Size(0, 270);
  482. this._panel1_Toolbars_Dock_Area_Right.ToolbarsManager = this.ultraToolbarsManager1;
  483. //
  484. // _panel1_Toolbars_Dock_Area_Top
  485. //
  486. this._panel1_Toolbars_Dock_Area_Top.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping;
  487. this._panel1_Toolbars_Dock_Area_Top.BackColor = System.Drawing.SystemColors.Control;
  488. this._panel1_Toolbars_Dock_Area_Top.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Top;
  489. this._panel1_Toolbars_Dock_Area_Top.ForeColor = System.Drawing.SystemColors.ControlText;
  490. this._panel1_Toolbars_Dock_Area_Top.Location = new System.Drawing.Point(0, 0);
  491. this._panel1_Toolbars_Dock_Area_Top.Name = "_panel1_Toolbars_Dock_Area_Top";
  492. this._panel1_Toolbars_Dock_Area_Top.Size = new System.Drawing.Size(584, 50);
  493. this._panel1_Toolbars_Dock_Area_Top.ToolbarsManager = this.ultraToolbarsManager1;
  494. //
  495. // _panel1_Toolbars_Dock_Area_Bottom
  496. //
  497. this._panel1_Toolbars_Dock_Area_Bottom.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping;
  498. this._panel1_Toolbars_Dock_Area_Bottom.BackColor = System.Drawing.SystemColors.Control;
  499. this._panel1_Toolbars_Dock_Area_Bottom.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Bottom;
  500. this._panel1_Toolbars_Dock_Area_Bottom.ForeColor = System.Drawing.SystemColors.ControlText;
  501. this._panel1_Toolbars_Dock_Area_Bottom.Location = new System.Drawing.Point(0, 320);
  502. this._panel1_Toolbars_Dock_Area_Bottom.Name = "_panel1_Toolbars_Dock_Area_Bottom";
  503. this._panel1_Toolbars_Dock_Area_Bottom.Size = new System.Drawing.Size(584, 0);
  504. this._panel1_Toolbars_Dock_Area_Bottom.ToolbarsManager = this.ultraToolbarsManager1;
  505. //
  506. // panel2
  507. //
  508. this.panel2.Controls.Add(this.trFile);
  509. this.panel2.Controls.Add(this._panel2_Toolbars_Dock_Area_Left);
  510. this.panel2.Controls.Add(this._panel2_Toolbars_Dock_Area_Right);
  511. this.panel2.Controls.Add(this._panel2_Toolbars_Dock_Area_Top);
  512. this.panel2.Controls.Add(this._panel2_Toolbars_Dock_Area_Bottom);
  513. this.panel2.Dock = System.Windows.Forms.DockStyle.Fill;
  514. this.panel2.Location = new System.Drawing.Point(128, 0);
  515. this.panel2.Name = "panel2";
  516. this.panel2.Size = new System.Drawing.Size(456, 235);
  517. this.panel2.TabIndex = 2;
  518. //
  519. // trFile
  520. //
  521. this.trFile.ColumnSettings.RootColumnSet = ultraTreeColumnSet2;
  522. this.trFile.Dock = System.Windows.Forms.DockStyle.Fill;
  523. this.trFile.Location = new System.Drawing.Point(0, 22);
  524. this.trFile.Name = "trFile";
  525. this.trFile.Size = new System.Drawing.Size(456, 213);
  526. this.trFile.TabIndex = 0;
  527. //
  528. // _panel2_Toolbars_Dock_Area_Left
  529. //
  530. this._panel2_Toolbars_Dock_Area_Left.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping;
  531. this._panel2_Toolbars_Dock_Area_Left.BackColor = System.Drawing.SystemColors.Control;
  532. this._panel2_Toolbars_Dock_Area_Left.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Left;
  533. this._panel2_Toolbars_Dock_Area_Left.ForeColor = System.Drawing.SystemColors.ControlText;
  534. this._panel2_Toolbars_Dock_Area_Left.Location = new System.Drawing.Point(0, 22);
  535. this._panel2_Toolbars_Dock_Area_Left.Name = "_panel2_Toolbars_Dock_Area_Left";
  536. this._panel2_Toolbars_Dock_Area_Left.Size = new System.Drawing.Size(0, 213);
  537. this._panel2_Toolbars_Dock_Area_Left.ToolbarsManager = this.ultraToolbarsManager2;
  538. //
  539. // ultraToolbarsManager2
  540. //
  541. this.ultraToolbarsManager2.DesignerFlags = 1;
  542. this.ultraToolbarsManager2.DockWithinContainer = this.panel2;
  543. this.ultraToolbarsManager2.ShowQuickCustomizeButton = false;
  544. ultraToolbar2.DockedColumn = 0;
  545. ultraToolbar2.DockedRow = 0;
  546. ultraToolbar2.Text = "Toolbar1";
  547. buttonTool13.InstanceProps.IsFirstInGroup = true;
  548. buttonTool14.InstanceProps.IsFirstInGroup = true;
  549. ultraToolbar2.Tools.AddRange(new Infragistics.Win.UltraWinToolbars.ToolBase[] {
  550. buttonTool13,
  551. buttonTool14});
  552. this.ultraToolbarsManager2.Toolbars.AddRange(new Infragistics.Win.UltraWinToolbars.UltraToolbar[] {
  553. ultraToolbar2});
  554. buttonTool15.SharedProps.Caption = "打开(&O)";
  555. buttonTool15.SharedProps.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageAndText;
  556. buttonTool15.SharedProps.Shortcut = System.Windows.Forms.Shortcut.CtrlO;
  557. buttonTool16.SharedProps.Caption = "保存(&S)";
  558. buttonTool16.SharedProps.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageAndText;
  559. buttonTool16.SharedProps.Shortcut = System.Windows.Forms.Shortcut.CtrlS;
  560. this.ultraToolbarsManager2.Tools.AddRange(new Infragistics.Win.UltraWinToolbars.ToolBase[] {
  561. buttonTool15,
  562. buttonTool16});
  563. this.ultraToolbarsManager2.ToolClick += new Infragistics.Win.UltraWinToolbars.ToolClickEventHandler(this.ultraToolbarsManager2_ToolClick);
  564. //
  565. // _panel2_Toolbars_Dock_Area_Right
  566. //
  567. this._panel2_Toolbars_Dock_Area_Right.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping;
  568. this._panel2_Toolbars_Dock_Area_Right.BackColor = System.Drawing.SystemColors.Control;
  569. this._panel2_Toolbars_Dock_Area_Right.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Right;
  570. this._panel2_Toolbars_Dock_Area_Right.ForeColor = System.Drawing.SystemColors.ControlText;
  571. this._panel2_Toolbars_Dock_Area_Right.Location = new System.Drawing.Point(456, 22);
  572. this._panel2_Toolbars_Dock_Area_Right.Name = "_panel2_Toolbars_Dock_Area_Right";
  573. this._panel2_Toolbars_Dock_Area_Right.Size = new System.Drawing.Size(0, 213);
  574. this._panel2_Toolbars_Dock_Area_Right.ToolbarsManager = this.ultraToolbarsManager2;
  575. //
  576. // _panel2_Toolbars_Dock_Area_Top
  577. //
  578. this._panel2_Toolbars_Dock_Area_Top.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping;
  579. this._panel2_Toolbars_Dock_Area_Top.BackColor = System.Drawing.SystemColors.Control;
  580. this._panel2_Toolbars_Dock_Area_Top.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Top;
  581. this._panel2_Toolbars_Dock_Area_Top.ForeColor = System.Drawing.SystemColors.ControlText;
  582. this._panel2_Toolbars_Dock_Area_Top.Location = new System.Drawing.Point(0, 0);
  583. this._panel2_Toolbars_Dock_Area_Top.Name = "_panel2_Toolbars_Dock_Area_Top";
  584. this._panel2_Toolbars_Dock_Area_Top.Size = new System.Drawing.Size(456, 22);
  585. this._panel2_Toolbars_Dock_Area_Top.ToolbarsManager = this.ultraToolbarsManager2;
  586. //
  587. // _panel2_Toolbars_Dock_Area_Bottom
  588. //
  589. this._panel2_Toolbars_Dock_Area_Bottom.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping;
  590. this._panel2_Toolbars_Dock_Area_Bottom.BackColor = System.Drawing.SystemColors.Control;
  591. this._panel2_Toolbars_Dock_Area_Bottom.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Bottom;
  592. this._panel2_Toolbars_Dock_Area_Bottom.ForeColor = System.Drawing.SystemColors.ControlText;
  593. this._panel2_Toolbars_Dock_Area_Bottom.Location = new System.Drawing.Point(0, 235);
  594. this._panel2_Toolbars_Dock_Area_Bottom.Name = "_panel2_Toolbars_Dock_Area_Bottom";
  595. this._panel2_Toolbars_Dock_Area_Bottom.Size = new System.Drawing.Size(456, 0);
  596. this._panel2_Toolbars_Dock_Area_Bottom.ToolbarsManager = this.ultraToolbarsManager2;
  597. //
  598. // ultraGroupBox1
  599. //
  600. this.ultraGroupBox1.Controls.Add(this.ultraButton8);
  601. this.ultraGroupBox1.Controls.Add(this.ultraButton7);
  602. this.ultraGroupBox1.Controls.Add(this.ultraButton6);
  603. this.ultraGroupBox1.Controls.Add(this.ultraButton5);
  604. this.ultraGroupBox1.Controls.Add(this.ultraButton4);
  605. this.ultraGroupBox1.Controls.Add(this.ultraButton3);
  606. this.ultraGroupBox1.Controls.Add(this.ultraButton2);
  607. this.ultraGroupBox1.Controls.Add(this.ultraButton1);
  608. this.ultraGroupBox1.Dock = System.Windows.Forms.DockStyle.Left;
  609. this.ultraGroupBox1.Location = new System.Drawing.Point(0, 0);
  610. this.ultraGroupBox1.Name = "ultraGroupBox1";
  611. this.ultraGroupBox1.Size = new System.Drawing.Size(128, 235);
  612. this.ultraGroupBox1.SupportThemes = false;
  613. this.ultraGroupBox1.TabIndex = 3;
  614. this.ultraGroupBox1.Text = "控制区域";
  615. this.ultraGroupBox1.Click += new System.EventHandler(this.ultraGroupBox1_Click);
  616. //
  617. // ultraButton8
  618. //
  619. this.ultraButton8.Location = new System.Drawing.Point(72, 176);
  620. this.ultraButton8.Name = "ultraButton8";
  621. this.ultraButton8.Size = new System.Drawing.Size(40, 23);
  622. this.ultraButton8.TabIndex = 7;
  623. this.ultraButton8.Text = "右";
  624. this.ultraButton8.Click += new System.EventHandler(this.ultraButton8_Click);
  625. //
  626. // ultraButton7
  627. //
  628. this.ultraButton7.Location = new System.Drawing.Point(40, 200);
  629. this.ultraButton7.Name = "ultraButton7";
  630. this.ultraButton7.Size = new System.Drawing.Size(40, 23);
  631. this.ultraButton7.TabIndex = 6;
  632. this.ultraButton7.Text = "下";
  633. this.ultraButton7.Click += new System.EventHandler(this.ultraButton7_Click);
  634. //
  635. // ultraButton6
  636. //
  637. this.ultraButton6.Location = new System.Drawing.Point(40, 152);
  638. this.ultraButton6.Name = "ultraButton6";
  639. this.ultraButton6.Size = new System.Drawing.Size(40, 23);
  640. this.ultraButton6.TabIndex = 5;
  641. this.ultraButton6.Text = "上";
  642. this.ultraButton6.Click += new System.EventHandler(this.ultraButton6_Click);
  643. //
  644. // ultraButton5
  645. //
  646. this.ultraButton5.Location = new System.Drawing.Point(8, 176);
  647. this.ultraButton5.Name = "ultraButton5";
  648. this.ultraButton5.Size = new System.Drawing.Size(40, 23);
  649. this.ultraButton5.TabIndex = 4;
  650. this.ultraButton5.Text = "左";
  651. this.ultraButton5.Click += new System.EventHandler(this.ultraButton5_Click);
  652. //
  653. // ultraButton4
  654. //
  655. this.ultraButton4.Location = new System.Drawing.Point(24, 120);
  656. this.ultraButton4.Name = "ultraButton4";
  657. this.ultraButton4.Size = new System.Drawing.Size(75, 23);
  658. this.ultraButton4.TabIndex = 3;
  659. this.ultraButton4.Text = "新增子";
  660. this.ultraButton4.Click += new System.EventHandler(this.ultraButton4_Click);
  661. //
  662. // ultraButton3
  663. //
  664. this.ultraButton3.Location = new System.Drawing.Point(24, 96);
  665. this.ultraButton3.Name = "ultraButton3";
  666. this.ultraButton3.Size = new System.Drawing.Size(75, 23);
  667. this.ultraButton3.TabIndex = 2;
  668. this.ultraButton3.Text = "新增同";
  669. this.ultraButton3.Click += new System.EventHandler(this.ultraButton3_Click);
  670. //
  671. // ultraButton2
  672. //
  673. this.ultraButton2.Location = new System.Drawing.Point(24, 72);
  674. this.ultraButton2.Name = "ultraButton2";
  675. this.ultraButton2.Size = new System.Drawing.Size(75, 23);
  676. this.ultraButton2.TabIndex = 1;
  677. this.ultraButton2.Text = "移除";
  678. this.ultraButton2.Click += new System.EventHandler(this.ultraButton2_Click);
  679. //
  680. // ultraButton1
  681. //
  682. this.ultraButton1.Location = new System.Drawing.Point(24, 48);
  683. this.ultraButton1.Name = "ultraButton1";
  684. this.ultraButton1.Size = new System.Drawing.Size(75, 23);
  685. this.ultraButton1.TabIndex = 0;
  686. this.ultraButton1.Text = "选择";
  687. this.ultraButton1.Click += new System.EventHandler(this.ultraButton1_Click);
  688. //
  689. // panel3
  690. //
  691. this.panel3.Controls.Add(this.panel2);
  692. this.panel3.Controls.Add(this.ultraGroupBox1);
  693. this.panel3.Dock = System.Windows.Forms.DockStyle.Fill;
  694. this.panel3.Location = new System.Drawing.Point(168, 320);
  695. this.panel3.Name = "panel3";
  696. this.panel3.Size = new System.Drawing.Size(584, 235);
  697. this.panel3.TabIndex = 4;
  698. //
  699. // FrmFunction
  700. //
  701. this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
  702. this.ClientSize = new System.Drawing.Size(752, 555);
  703. this.Controls.Add(this.panel3);
  704. this.Controls.Add(this.panel1);
  705. this.Controls.Add(this.trDb);
  706. this.Name = "FrmFunction";
  707. this.Text = "权限文件维护";
  708. this.WindowState = System.Windows.Forms.FormWindowState.Normal;
  709. this.Load += new System.EventHandler(this.FrmFunction_Load);
  710. ((System.ComponentModel.ISupportInitialize)(this.trDb)).EndInit();
  711. this.panel1.ResumeLayout(false);
  712. ((System.ComponentModel.ISupportInitialize)(this.ultraGrid1)).EndInit();
  713. ((System.ComponentModel.ISupportInitialize)(this.ultraExpandableGroupBox1)).EndInit();
  714. this.ultraExpandableGroupBox1.ResumeLayout(false);
  715. this.ultraExpandableGroupBoxPanel1.ResumeLayout(false);
  716. ((System.ComponentModel.ISupportInitialize)(this.ultraTextEditor4)).EndInit();
  717. ((System.ComponentModel.ISupportInitialize)(this.ultraTextEditor3)).EndInit();
  718. ((System.ComponentModel.ISupportInitialize)(this.ultraTextEditor2)).EndInit();
  719. ((System.ComponentModel.ISupportInitialize)(this.ultraComboEditor1)).EndInit();
  720. ((System.ComponentModel.ISupportInitialize)(this.ultraTextEditor1)).EndInit();
  721. ((System.ComponentModel.ISupportInitialize)(this.ultraToolbarsManager1)).EndInit();
  722. this.panel2.ResumeLayout(false);
  723. ((System.ComponentModel.ISupportInitialize)(this.trFile)).EndInit();
  724. ((System.ComponentModel.ISupportInitialize)(this.ultraToolbarsManager2)).EndInit();
  725. ((System.ComponentModel.ISupportInitialize)(this.ultraGroupBox1)).EndInit();
  726. this.ultraGroupBox1.ResumeLayout(false);
  727. this.panel3.ResumeLayout(false);
  728. this.ResumeLayout(false);
  729. }
  730. #endregion
  731. private void FrmFunction_Load(object sender, System.EventArgs e)
  732. {
  733. GetTrDBdata("");
  734. InCom();
  735. InitTrDB();
  736. InitDbGrid();
  737. this.trDb.AfterSelect += new Infragistics.Win.UltraWinTree.AfterNodeSelectEventHandler(ultraTree1_AfterSelect);
  738. if (this.trDb.Nodes.Count > 0)
  739. this.trDb.Nodes[0].Selected = true;
  740. }
  741. #region " InitDbTree "
  742. private void InitTrDB()
  743. {
  744. try
  745. {
  746. if (_functionData != null)
  747. {
  748. if (this.trDb.Nodes.Count > 0)
  749. {
  750. try
  751. {
  752. RemoveAllTreeNode(this.trDb);
  753. }
  754. catch
  755. {
  756. RemoveAllTreeNode(this.trDb);
  757. }
  758. }
  759. TreeFillData1( _functionData.Tables[0]);
  760. this.trDb.ExpandAll();
  761. }
  762. }
  763. catch //(Exception ex)
  764. {
  765. // CoreMesLogger.log(this.GetType()).Error(ex.Message);
  766. }
  767. }
  768. private void RemoveAllTreeNode(UltraTree ut)
  769. {
  770. int count = ut.Nodes.Count ;
  771. for (int i = count -1; i >= 0 ; i--)
  772. {
  773. ut.Nodes[i].Remove();
  774. }
  775. }
  776. //==========================================================
  777. // 产线类型
  778. //==========================================================
  779. private void TreeFillData1(DataTable dt)
  780. {
  781. DataRow[] drs = dt.Select("len(FUNCTIONID) = 2");
  782. foreach(DataRow dr in drs)
  783. {
  784. UltraTreeNode tn = new UltraTreeNode();
  785. tn.Text = dr["FUNCTIONNAME"].ToString();
  786. tn.Key = dr["FUNCTIONID"].ToString();
  787. tn.Tag = dr["IMAGENAME"].ToString();
  788. TreeFillData2(dt, dr["FUNCTIONID"].ToString(), tn);
  789. this.trDb.Nodes.Add(tn);
  790. }
  791. }
  792. //==========================================================
  793. // 产线编号
  794. //==========================================================
  795. private void TreeFillData2(DataTable dt, string str, UltraTreeNode tnd)
  796. {
  797. DataRow[] drs = dt.Select("len(FUNCTIONID) = 4 and substring(FUNCTIONID,1,2) = '" + str + "'");
  798. foreach(DataRow dr in drs)
  799. {
  800. UltraTreeNode tn = new UltraTreeNode();
  801. tn.Text = dr["FUNCTIONNAME"].ToString();
  802. tn.Key = dr["FUNCTIONID"].ToString();
  803. tn.Tag = dr["IMAGENAME"].ToString();
  804. TreeFillData3(dt, dr["FUNCTIONID"].ToString(), tn);
  805. tnd.Nodes.Add(tn);
  806. }
  807. }
  808. //==========================================================
  809. // 车间编码
  810. //==========================================================
  811. private void TreeFillData3(DataTable dt, string str, UltraTreeNode tnd)
  812. {
  813. DataRow[] drs = dt.Select("len(FUNCTIONID) = 6 and substring(FUNCTIONID,1,4) = '" + str + "'");
  814. foreach(DataRow dr in drs)
  815. {
  816. UltraTreeNode tn = new UltraTreeNode();
  817. tn.Text = dr["FUNCTIONNAME"].ToString();
  818. tn.Key = dr["FUNCTIONID"].ToString();
  819. tn.Tag = dr["IMAGENAME"].ToString();
  820. tnd.Nodes.Add(tn);
  821. }
  822. }
  823. private void GetTrDBdata(string str)
  824. {
  825. try
  826. {
  827. CallingMessage par = new CallingMessage();
  828. par.ServerName = "PurviewManager";
  829. //par.AssemblyName = "Core.Mes.PurviewManager";
  830. par.ClassName = "Core.Mes.PurviewManager.PurviewManager";
  831. par.MethodName = "SelectUAM_FUNCTION";
  832. par.args = new object[]{str+" order by FUNCTIONID "};
  833. par.ServerType = MesServerType.MesSystemBaseServer;
  834. string strOut = "";
  835. _functionData = Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod(par, out strOut) as DataSet;
  836. _selectFuncSQL = strOut;
  837. }
  838. catch //(Exception ex)
  839. {
  840. // CoreMesLogger.log(this.GetType()).Error(ex.Message);
  841. }
  842. }
  843. private void ultraTree1_AfterSelect(object sender, Infragistics.Win.UltraWinTree.SelectEventArgs e)
  844. {
  845. string rowFilter;
  846. if (e.NewSelections == null || e.NewSelections.Count == 0)
  847. rowFilter = "";
  848. else
  849. {
  850. string id = e.NewSelections[0].Key.ToString();
  851. int count = id.Length;
  852. rowFilter = "substring(FUNCTIONID,1," + count.ToString() + ") = '" + id + "' or FUNCTIONID is null or trim(FUNCTIONID) = '' ";
  853. }
  854. DataTable dt = this.ultraGrid1.DataSource as DataTable ;
  855. dt.DefaultView.RowFilter = rowFilter;
  856. }
  857. #endregion
  858. #region " InitDbGrid "
  859. private void InitDbGrid()
  860. {
  861. this.ultraGrid1.DataSource = this._functionData.Tables[0];
  862. this.ultraGrid1.DisplayLayout.Bands[0].Columns[0].Header.Caption = "功能编码";
  863. this.ultraGrid1.DisplayLayout.Bands[0].Columns[0].Width = 80;
  864. this.ultraGrid1.DisplayLayout.Bands[0].Columns[0].CellAppearance.TextHAlign = Infragistics.Win.HAlign.Left;
  865. this.ultraGrid1.DisplayLayout.Bands[0].Columns[0].CellAppearance.BackColor=Color.LightGoldenrodYellow;
  866. this.ultraGrid1.DisplayLayout.Bands[0].Columns[1].Header.Caption = "功能名称";
  867. this.ultraGrid1.DisplayLayout.Bands[0].Columns[1].Width = 100;
  868. this.ultraGrid1.DisplayLayout.Bands[0].Columns[1].CellAppearance.TextHAlign = Infragistics.Win.HAlign.Left;
  869. this.ultraGrid1.DisplayLayout.Bands[0].Columns[2].Header.Caption = "类名";
  870. this.ultraGrid1.DisplayLayout.Bands[0].Columns[2].Width = 200;
  871. this.ultraGrid1.DisplayLayout.Bands[0].Columns[2].CellAppearance.TextHAlign = Infragistics.Win.HAlign.Left;
  872. this.ultraGrid1.DisplayLayout.Bands[0].Columns[2].CellAppearance.BackColor=Color.LightGoldenrodYellow;
  873. this.ultraGrid1.DisplayLayout.Bands[0].Columns[3].Header.Caption = "程序集名";
  874. this.ultraGrid1.DisplayLayout.Bands[0].Columns[3].Width = 200;
  875. this.ultraGrid1.DisplayLayout.Bands[0].Columns[3].CellAppearance.TextHAlign = Infragistics.Win.HAlign.Left;
  876. this.ultraGrid1.DisplayLayout.Bands[0].Columns[4].Header.Caption = "图标名称";
  877. this.ultraGrid1.DisplayLayout.Bands[0].Columns[4].Width = 100;
  878. this.ultraGrid1.DisplayLayout.Bands[0].Columns[4].CellAppearance.TextHAlign = Infragistics.Win.HAlign.Left;
  879. this.ultraGrid1.DisplayLayout.Bands[0].Columns[4].CellAppearance.BackColor=Color.LightGoldenrodYellow;
  880. this.ultraGrid1.DisplayLayout.Bands[0].Columns[5].Hidden=true;
  881. // this.ultraGrid1.DisplayLayout.Bands[0].Columns[5].Header.Caption = "备注";
  882. // this.ultraGrid1.DisplayLayout.Bands[0].Columns[5].Width = 100;
  883. // this.ultraGrid1.DisplayLayout.Bands[0].Columns[5].CellAppearance.TextHAlign = Infragistics.Win.HAlign.Left;
  884. }
  885. private void InCom()
  886. {
  887. if (_functionData != null && _functionData.Tables.Count >0)
  888. {
  889. foreach(DataRow arow in (_functionData).Tables[0].Rows)
  890. this.ultraComboEditor1.Items.Add(arow[1]);
  891. if(!this.ultraComboEditor1.Items.Contains(System.DBNull.Value)) this.ultraComboEditor1.Items.Add(System.DBNull.Value);
  892. }
  893. }
  894. #endregion
  895. #region "工具栏1"
  896. private void ultraToolbarsManager1_ToolClick(object sender, Infragistics.Win.UltraWinToolbars.ToolClickEventArgs e)
  897. {
  898. switch(e.Tool .Key )
  899. {
  900. case "all":
  901. this.trDb.SelectedNodes.Clear();
  902. break;
  903. case "add":
  904. Add();
  905. break;
  906. case "del":
  907. Delete();
  908. break;
  909. case "edit":
  910. Edit();
  911. break;
  912. case "exit":
  913. this.Close();
  914. break;
  915. }
  916. }
  917. private void Delete()
  918. {
  919. int i = 0;
  920. UltraGridRow ugr = this.ultraGrid1.ActiveRow;
  921. if (ugr == null)
  922. {
  923. MessageBox.Show("请选择要删除的功能名!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information );
  924. return;
  925. }
  926. if (MessageBox.Show("是否确认删除选中的功能?","提示",MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
  927. {
  928. return;
  929. }
  930. try
  931. {
  932. i = ugr.Index;
  933. string strWhere = " where FUNCTIONID = '" + ugr.Cells[0].Value.ToString() + "'";
  934. CallingMessage par = new CallingMessage();
  935. par.ServerName = "PurviewManager";
  936. //par.AssemblyName = "Core.Mes.PurviewManager";
  937. par.ClassName = "Core.Mes.PurviewManager.PurviewManager";
  938. par.MethodName = "DeleteUAM_FUNCTION";
  939. par.args = new object[]{strWhere};
  940. par.ServerType = MesServerType.MesSystemBaseServer;
  941. string strOut = "";
  942. object obj = Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod(par, out strOut);
  943. if (strOut != "")
  944. {
  945. MessageBox.Show("删除失败! \n" + strOut);
  946. return;
  947. }
  948. else
  949. {
  950. if ((int)obj != 1)
  951. {
  952. MessageBox.Show("删除失败!");
  953. return;
  954. }
  955. }
  956. }
  957. catch //(Exception ex)
  958. {
  959. // CoreMesLogger.log(this.GetType()).Error(ex.Message);
  960. return;
  961. }
  962. ultraGrid1.ActiveRow.Delete(false);
  963. ultraGrid1.UpdateData();
  964. InCom();
  965. InitTrDB();
  966. try
  967. {
  968. ultraGrid1.Rows[i].Activate();
  969. }
  970. catch
  971. {
  972. int count = ultraGrid1.Rows.Count;
  973. if ( count > 0)
  974. ultraGrid1.Rows[count -1].Activate();
  975. }
  976. }
  977. private void Add()
  978. {
  979. if (this.ultraTextEditor1.Text.Trim() == "")
  980. {
  981. MessageBox.Show("请录入功能编码!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
  982. return;
  983. }
  984. if (this.ultraTextEditor2.Text.Trim() == "")
  985. {
  986. MessageBox.Show("请录入类名!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
  987. return;
  988. }
  989. if (this.ultraTextEditor3.Text.Trim() == "")
  990. {
  991. MessageBox.Show("请录入程序集名!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
  992. return;
  993. }
  994. if (this.ultraComboEditor1.Text.Trim() == null)
  995. {
  996. MessageBox.Show("请录入功能名称!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
  997. return;
  998. }
  999. ArrayList al = new ArrayList();
  1000. al.Add(this.ultraTextEditor1.Text.Trim());
  1001. al.Add(this.ultraComboEditor1.Text.Trim());
  1002. al.Add(this.ultraTextEditor2.Text.Trim());
  1003. al.Add(this.ultraTextEditor3.Text.Trim());
  1004. al.Add(this.ultraTextEditor4.Text.Trim());
  1005. // al.Add(this.ultraTextEditor5.Text.Trim());
  1006. try
  1007. {
  1008. CallingMessage par = new CallingMessage();
  1009. par.ServerName = "PurviewManager";
  1010. //par.AssemblyName = "Core.Mes.PurviewManager";
  1011. par.ClassName = "Core.Mes.PurviewManager.PurviewManager";
  1012. par.MethodName = "InsertUAM_FUNCTION";
  1013. par.args = new object[]{al};
  1014. par.ServerType = MesServerType.MesSystemBaseServer;
  1015. string strOut = "";
  1016. object obj = Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod(par, out strOut);
  1017. if (strOut != "")
  1018. {
  1019. MessageBox.Show("新增失败! \n" + strOut);
  1020. return;
  1021. }
  1022. else
  1023. {
  1024. if ((int)obj != 1)
  1025. {
  1026. MessageBox.Show("新增失败!");
  1027. return;
  1028. }
  1029. }
  1030. }
  1031. catch //(Exception ex)
  1032. {
  1033. // CoreMesLogger.log(this.GetType()).Error(ex.Message);
  1034. return;
  1035. }
  1036. GetTrDBdata("");
  1037. UltraGridRow ugr = this.ultraGrid1.DisplayLayout.Bands[0].AddNew();
  1038. ugr.Cells[0].Value = al[0];
  1039. ugr.Cells[1].Value = al[1];
  1040. ugr.Cells[2].Value = al[2];
  1041. ugr.Cells[3].Value = al[3];
  1042. ugr.Cells[4].Value = al[4];
  1043. ugr.Cells[5].Value = al[5];
  1044. this.ultraGrid1.UpdateData();
  1045. InCom();
  1046. InitTrDB();
  1047. }
  1048. private void Edit()
  1049. {
  1050. UltraGridRow ugr = this.ultraGrid1.ActiveRow;
  1051. if (ugr == null)
  1052. {
  1053. MessageBox.Show("请选择要修改的功能编码!");
  1054. return;
  1055. }
  1056. if (this.ultraComboEditor1.Value == null)
  1057. {
  1058. MessageBox.Show("请选择要修改的功能名称!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
  1059. return;
  1060. }
  1061. if (this.ultraTextEditor2.Text.Trim() == "")
  1062. {
  1063. MessageBox.Show("请选择要修改的类名称!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
  1064. return;
  1065. }
  1066. if (this.ultraTextEditor3.Text.Trim() == "")
  1067. {
  1068. MessageBox.Show("请选择要修改的程序集名称!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
  1069. return;
  1070. }
  1071. ArrayList al = new ArrayList();
  1072. al.Add(this.ultraTextEditor1.Text.Trim());
  1073. al.Add(this.ultraComboEditor1.Text.Trim());
  1074. al.Add(this.ultraTextEditor2.Text.Trim());
  1075. al.Add(this.ultraTextEditor3.Text.Trim());
  1076. al.Add(this.ultraTextEditor4.Text.Trim());
  1077. // al.Add(this.ultraTextEditor5.Text.Trim());
  1078. try
  1079. {
  1080. CallingMessage par = new CallingMessage();
  1081. par.ServerName = "PurviewManager";
  1082. //par.AssemblyName = "Core.Mes.PurviewManager";
  1083. par.ClassName = "Core.Mes.PurviewManager.PurviewManager";
  1084. par.MethodName = "UpdateUAM_FUNCTION";
  1085. par.args = new object[]{al};
  1086. par.ServerType = MesServerType.MesSystemBaseServer;
  1087. string strOut = "";
  1088. object obj = Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod(par, out strOut);
  1089. if (strOut != "")
  1090. {
  1091. MessageBox.Show("修改失败 \n" + strOut);
  1092. return;
  1093. }
  1094. else
  1095. {
  1096. int i = (int)obj;
  1097. if (i != 1)
  1098. {
  1099. MessageBox.Show("修改失败");
  1100. return;
  1101. }
  1102. }
  1103. }
  1104. catch //(Exception ex)
  1105. {
  1106. // CoreMesLogger.log(this.GetType()).Error(ex.Message);
  1107. return;
  1108. }
  1109. ugr.Cells[0].Value = al[0];
  1110. ugr.Cells[1].Value = al[1];
  1111. ugr.Cells[2].Value = al[2];
  1112. ugr.Cells[3].Value = al[3];
  1113. ugr.Cells[4].Value = al[4];
  1114. ugr.Cells[5].Value = al[5];
  1115. ultraGrid1.UpdateData();
  1116. InCom();
  1117. InitTrDB();
  1118. }
  1119. private void ultraGrid1_AfterRowActivate(object sender, System.EventArgs e)
  1120. {
  1121. try
  1122. {
  1123. if (this.ultraGrid1.ActiveRow == null) return;
  1124. UltraGridRow ugr = this.ultraGrid1.ActiveRow;
  1125. this.ultraTextEditor1.Text = ugr.Cells[0].Value.ToString();
  1126. this.ultraComboEditor1.Text= ugr.Cells[1].Value.ToString();
  1127. this.ultraTextEditor2.Text = ugr.Cells[2].Value.ToString();
  1128. this.ultraTextEditor3.Text = ugr.Cells[3].Value.ToString();
  1129. this.ultraTextEditor4.Text = ugr.Cells[4].Value.ToString();
  1130. // this.ultraTextEditor5.Text = ugr.Cells[5].Value.ToString();
  1131. }
  1132. catch (Exception ex)
  1133. {
  1134. Console.WriteLine(ex.Message);
  1135. }
  1136. }
  1137. #endregion
  1138. #region "工具栏2"
  1139. private void ultraToolbarsManager2_ToolClick(object sender, Infragistics.Win.UltraWinToolbars.ToolClickEventArgs e)
  1140. {
  1141. switch (e.Tool.Key)
  1142. {
  1143. case "open" :
  1144. openFile();
  1145. break;
  1146. case "save" :
  1147. saveFile();
  1148. break;
  1149. }
  1150. }
  1151. #region " save "
  1152. private void saveFile()
  1153. {
  1154. DialogResult rs = MessageBox.Show("保存到本地?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Information);
  1155. switch (rs)
  1156. {
  1157. case DialogResult.OK :
  1158. saveLocalFile();
  1159. break;
  1160. case DialogResult.Cancel :
  1161. break;
  1162. }
  1163. }
  1164. private void saveLocalFile()
  1165. {
  1166. System.Windows.Forms.SaveFileDialog sfd = new SaveFileDialog();
  1167. sfd.FileName = "*.xml";
  1168. sfd.Filter = "xml文件(*.xml)|*.xml|所有文件(*.*)|*.*";
  1169. DialogResult rs = sfd.ShowDialog(this);
  1170. switch (rs)
  1171. {
  1172. case DialogResult.OK :
  1173. try
  1174. {
  1175. string fileName = sfd.FileName;
  1176. //this.trFile.SaveAsXml(fileName);
  1177. SaveAsXml(fileName);
  1178. }
  1179. catch (Exception ex)
  1180. {
  1181. Console.WriteLine(ex.Message);
  1182. MessageBox.Show("文件保存错误!");
  1183. }
  1184. break;
  1185. default :
  1186. break;
  1187. }
  1188. }
  1189. private void SaveAsXml(string fileName)
  1190. {
  1191. XmlTextWriter xtw = new XmlTextWriter(fileName,System.Text.Encoding.UTF8);
  1192. try
  1193. {
  1194. xtw.Formatting = Formatting.Indented ;
  1195. xtw.WriteStartDocument();
  1196. xtw.WriteStartElement("MainMenu");
  1197. foreach (UltraTreeNode utn in this.trFile.Nodes)
  1198. {
  1199. xtw.WriteStartElement("Group");
  1200. xtw.WriteAttributeString("GroupName", utn.Key);
  1201. if (utn.Nodes.Count > 0 )
  1202. {
  1203. if (utn.GetNodeCount(true) != utn.GetNodeCount(false))
  1204. xtw.WriteAttributeString("flag", "Tree");
  1205. else
  1206. xtw.WriteAttributeString("flag", "Default");
  1207. SetChildElement(xtw, utn.Nodes);
  1208. }
  1209. xtw.WriteEndElement();
  1210. }
  1211. xtw.WriteEndElement();
  1212. xtw.WriteEndDocument();
  1213. XmlDocument doc = new XmlDocument();
  1214. xtw.Flush();
  1215. }
  1216. catch(Exception ex)
  1217. {
  1218. MessageBox.Show(ex.Message);
  1219. }
  1220. xtw.Close();
  1221. }
  1222. private void SetChildElement(XmlTextWriter xtw, TreeNodesCollection tnc)
  1223. {
  1224. foreach(UltraTreeNode utn in tnc)
  1225. {
  1226. xtw.WriteStartElement("Item");
  1227. xtw.WriteAttributeString("ItemID", utn.Key);
  1228. xtw.WriteAttributeString("Image", utn.Tag.ToString());
  1229. if (utn.Nodes.Count > 0)
  1230. {
  1231. SetChildElement(xtw, utn.Nodes);
  1232. }
  1233. xtw.WriteEndElement();
  1234. }
  1235. }
  1236. #endregion
  1237. #region " open "
  1238. private void openFile()
  1239. {
  1240. DialogResult rs = MessageBox.Show("打开本地文件?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Information);
  1241. switch (rs)
  1242. {
  1243. case DialogResult.OK :
  1244. openLocalFile();
  1245. break;
  1246. case DialogResult.Cancel :
  1247. break;
  1248. }
  1249. }
  1250. private void openLocalFile()
  1251. {
  1252. System.Windows.Forms.OpenFileDialog ofd = new OpenFileDialog();
  1253. ofd.FileName = "*.xml";
  1254. ofd.Filter = "xml文件(*.xml)|*.xml|所有文件(*.*)|*.*";
  1255. DialogResult rs = ofd.ShowDialog(this);
  1256. switch (rs)
  1257. {
  1258. case DialogResult.OK :
  1259. try
  1260. {
  1261. string fileName = ofd.FileName;
  1262. this.RemoveAllTreeNode(this.trFile);
  1263. LoadFromXml(fileName);
  1264. }
  1265. catch (Exception ex)
  1266. {
  1267. MessageBox.Show(ex.Message);
  1268. }
  1269. break;
  1270. default :
  1271. break;
  1272. }
  1273. }
  1274. private void LoadFromXml(string fileName)
  1275. {
  1276. XmlDocument doc = new XmlDocument();
  1277. doc.Load(fileName);
  1278. XmlNodeList xnl = doc.ChildNodes[1].ChildNodes;
  1279. foreach (XmlNode xn in xnl)
  1280. {
  1281. UltraTreeNode utn = new UltraTreeNode();
  1282. string strKey = xn.Attributes[0].Value.ToString();
  1283. UltraTreeNode tn = this.trDb.GetNodeByKey(strKey);
  1284. if (this.trDb.GetNodeByKey(strKey) != null)
  1285. {
  1286. utn.Key = tn.Key;
  1287. utn.Text = tn.Text;
  1288. utn.Tag = tn.Tag;
  1289. }
  1290. else
  1291. {
  1292. utn.Key = strKey;
  1293. utn.Text = strKey;
  1294. utn.Tag = "";
  1295. }
  1296. if (xn.ChildNodes.Count >0)
  1297. {
  1298. SetChildNode(utn, xn.ChildNodes);
  1299. }
  1300. this.trFile.Nodes.Add(utn);
  1301. }
  1302. }
  1303. private void SetChildNode(UltraTreeNode utn, XmlNodeList xnl)
  1304. {
  1305. foreach (XmlNode xn in xnl)
  1306. {
  1307. UltraTreeNode tn = new UltraTreeNode();
  1308. string strKey = xn.Attributes[0].Value.ToString();
  1309. UltraTreeNode tntmp = this.trDb.GetNodeByKey(strKey);
  1310. if (this.trDb.GetNodeByKey(strKey) != null)
  1311. {
  1312. tn.Key = tntmp.Key;
  1313. tn.Text = tntmp.Text;
  1314. tn.Tag = tntmp.Tag;
  1315. }
  1316. else
  1317. {
  1318. tn.Key = strKey;
  1319. tn.Text = strKey;
  1320. tn.Tag = "";
  1321. }
  1322. if (xn.ChildNodes.Count >0)
  1323. {
  1324. SetChildNode(tn, xn.ChildNodes);
  1325. }
  1326. utn.Nodes.Add(tn);
  1327. }
  1328. }
  1329. #endregion
  1330. #endregion
  1331. private void ultraButton1_Click(object sender, System.EventArgs e)
  1332. {
  1333. if (this.trDb.SelectedNodes == null) return;
  1334. SelectedNodesCollection utn = this.trDb.SelectedNodes;
  1335. foreach(UltraTreeNode tn in utn)
  1336. {
  1337. CopyTreeNode(tn, this.trFile.Nodes);
  1338. }
  1339. }
  1340. private void CopyTreeNode(UltraTreeNode tn, TreeNodesCollection tnc)
  1341. {
  1342. if (this.trFile.GetNodeByKey(tn.Key) == null)
  1343. {
  1344. UltraTreeNode ftn = new UltraTreeNode(tn.Key, tn.Text);
  1345. ftn.Tag = tn.Tag;
  1346. tnc.Add(ftn);
  1347. }
  1348. if (tn.Nodes.Count > 0)
  1349. {
  1350. foreach (UltraTreeNode utn in tn.Nodes)
  1351. {
  1352. CopyTreeNode(utn,this.trFile.GetNodeByKey(tn.Key).Nodes);
  1353. }
  1354. }
  1355. }
  1356. private void ultraButton2_Click(object sender, System.EventArgs e)
  1357. {
  1358. if ( this.trFile.ActiveNode == null) return;
  1359. DialogResult rs = MessageBox.Show("是否确认移除?","提示",MessageBoxButtons.YesNo,MessageBoxIcon.Question);
  1360. switch (rs)
  1361. {
  1362. case DialogResult.Yes :
  1363. this.trFile.ActiveNode.Remove();
  1364. break;
  1365. case DialogResult.No :
  1366. break;
  1367. }
  1368. }
  1369. private void ultraButton6_Click(object sender, System.EventArgs e)
  1370. {
  1371. try
  1372. {
  1373. if ( this.trFile.SelectedNodes == null) return;
  1374. UltraTreeNode tn= this.trFile.ActiveNode;
  1375. int i = tn.Index ;
  1376. if (i == 0) return;
  1377. if (tn.Level == 0)
  1378. tn.Reposition(this.trFile.Nodes, i - 1);
  1379. else
  1380. tn.Reposition(tn.Parent.Nodes, i - 1);
  1381. }
  1382. catch
  1383. {}
  1384. }
  1385. private void ultraButton7_Click(object sender, System.EventArgs e)
  1386. {
  1387. try
  1388. {
  1389. if ( this.trFile.SelectedNodes == null) return;
  1390. UltraTreeNode tn= this.trFile.ActiveNode;
  1391. int i = tn.Index ;
  1392. if (tn.Level == 0)
  1393. {
  1394. if (i == this.trFile.Nodes.Count-1) return;
  1395. tn.Reposition(this.trFile.Nodes, i + 1);
  1396. }
  1397. else
  1398. {
  1399. if (i == tn.Parent.Nodes.Count-1) return;
  1400. tn.Reposition(tn.Parent.Nodes, i + 1);
  1401. }
  1402. }
  1403. catch {}
  1404. }
  1405. private void ultraButton5_Click(object sender, System.EventArgs e)
  1406. {
  1407. try
  1408. {
  1409. if ( this.trFile.SelectedNodes == null) return;
  1410. UltraTreeNode tn= this.trFile.ActiveNode;
  1411. if (tn.Level == 0 )
  1412. return;
  1413. else if (tn.Level == 1 )
  1414. tn.Reposition(this.trFile.Nodes);
  1415. else
  1416. {
  1417. UltraTreeNode utn = tn.Parent.Parent;
  1418. tn.Reposition(utn.Nodes);
  1419. }
  1420. }
  1421. catch {}
  1422. }
  1423. private void ultraButton8_Click(object sender, System.EventArgs e)
  1424. {
  1425. try
  1426. {
  1427. if ( this.trFile.SelectedNodes == null) return;
  1428. UltraTreeNode tn= this.trFile.ActiveNode;
  1429. int i = tn.Index;
  1430. if (i == 0) return;
  1431. UltraTreeNode utn;
  1432. if (tn.Level == 0)
  1433. utn = this.trFile.Nodes[i -1];
  1434. else
  1435. utn = tn.Parent.Nodes[i -1];
  1436. tn.Reposition(utn.Nodes);
  1437. utn.ExpandAll();
  1438. }
  1439. catch {}
  1440. }
  1441. private void ultraButton3_Click(object sender, System.EventArgs e)
  1442. {
  1443. try
  1444. {
  1445. if ( this.trFile.SelectedNodes == null) return;
  1446. UltraTreeNode tn= this.trFile.ActiveNode;
  1447. if (tn.Level == 0)
  1448. {
  1449. UltraTreeNode utn = new UltraTreeNode();
  1450. this.trFile.Nodes.Add(utn);
  1451. utn.BeginEdit();
  1452. }
  1453. else
  1454. {
  1455. UltraTreeNode utn = new UltraTreeNode();
  1456. tn.Parent.Nodes.Add(utn);
  1457. utn.BeginEdit();
  1458. }
  1459. }
  1460. catch {}
  1461. }
  1462. private void ultraButton4_Click(object sender, System.EventArgs e)
  1463. {
  1464. }
  1465. private void ultraGroupBox1_Click(object sender, System.EventArgs e)
  1466. {
  1467. }
  1468. }
  1469. }