OpenViewDialog.cs 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578
  1. using PaintDotNet.Annotation.Enum;
  2. using PaintDotNet.Annotation.FieldView;
  3. using PaintDotNet.Base.CommTool;
  4. using PaintDotNet.DbOpreate.DbBll;
  5. using PaintDotNet.DbOpreate.DbModel;
  6. using PaintDotNet.Base.SettingModel.LVMModel;
  7. using System;
  8. using System.Collections.Generic;
  9. using System.Drawing;
  10. using System.Drawing.Drawing2D;
  11. using System.Drawing.Imaging;
  12. using System.Windows.Forms;
  13. namespace PaintDotNet.FieldView
  14. {
  15. internal class OpenViewDialog : PdnBaseForm
  16. {
  17. #region 控件
  18. private GroupBox groupBox1;
  19. private GroupBox groupBox2;
  20. private GroupBox groupBox3;
  21. private GroupBox groupBox4;
  22. private ListView listView1;
  23. private Panel panel1;
  24. private PictureBox pictureBox1;
  25. private AppWorkspace appWorkspace;
  26. private Button button4;
  27. private Button button3;
  28. private Button button2;
  29. private Button button1;
  30. private Label label1;
  31. #endregion
  32. /// <summary>
  33. /// 重命名
  34. /// </summary>
  35. private EditViewDialog createNameDialog;
  36. /// <summary>
  37. /// 选定的视场在listview的items内的下标
  38. /// </summary>
  39. private int index = -1;
  40. /// <summary>
  41. /// 视场数据
  42. /// </summary>
  43. private List<mic_view_infos> list;
  44. /// <summary>
  45. /// 选定的视场数据的model
  46. /// </summary>
  47. private ViewListModel viewListModel;
  48. public OpenViewDialog(AppWorkspace appWorkspace)
  49. {
  50. this.appWorkspace = appWorkspace;
  51. InitializeComponent();
  52. InitializeLanguageText();
  53. InitListViewHeader();
  54. InitViewData();
  55. }
  56. private void InitListViewHeader()
  57. {
  58. this.listView1.View = View.Details;
  59. ColumnHeader header0 = new ColumnHeader();
  60. header0.Text = "";
  61. header0.Width = 25;
  62. this.listView1.Columns.Add(header0);
  63. ColumnHeader header = new ColumnHeader();
  64. header.Text = PdnResources.GetString("Menu.viewname.text");
  65. header.Width = 150;
  66. this.listView1.Columns.Add(header);
  67. }
  68. private void InitViewData()
  69. {
  70. this.listView1.Items.Clear();
  71. list = mic_view_infos_BLL.FindAll();
  72. if (list != null)
  73. {
  74. for (int i = 0; i < list.Count; i++)
  75. {
  76. mic_view_infos view = list[i];
  77. ListViewItem item = new ListViewItem();
  78. item.Tag = view.id;
  79. item.Text = "";
  80. item.SubItems.Add(view.view_name);
  81. this.listView1.Items.Add(item);
  82. }
  83. }
  84. }
  85. private void InitializeLanguageText()
  86. {
  87. this.groupBox1.Text = PdnResources.GetString("Menu.operation.text");
  88. this.button4.Text = PdnResources.GetString("Menu.Rename.text");
  89. this.button3.Text = PdnResources.GetString("Menu.viewsetting.Openview.Openrecord.text");
  90. this.button2.Text = PdnResources.GetString("Menu.viewsetting.Openview.DeleteRecord.text");
  91. this.button1.Text = PdnResources.GetString("Menu.Applyall.text");
  92. this.groupBox2.Text = PdnResources.GetString("Menu.viewsetting.Openview.List.text");
  93. this.groupBox3.Text = PdnResources.GetString("Menu.Preview.text");
  94. this.groupBox4.Text = PdnResources.GetString("Menu.viewsetting.Openview.brief.text");
  95. this.Text = PdnResources.GetString("Menu.ViewSetting.OpenFieldOfView.Text");
  96. }
  97. private void InitializeComponent()
  98. {
  99. this.groupBox1 = new System.Windows.Forms.GroupBox();
  100. this.button4 = new System.Windows.Forms.Button();
  101. this.button3 = new System.Windows.Forms.Button();
  102. this.button2 = new System.Windows.Forms.Button();
  103. this.button1 = new System.Windows.Forms.Button();
  104. this.groupBox2 = new System.Windows.Forms.GroupBox();
  105. this.listView1 = new System.Windows.Forms.ListView();
  106. this.groupBox3 = new System.Windows.Forms.GroupBox();
  107. this.panel1 = new System.Windows.Forms.Panel();
  108. this.pictureBox1 = new System.Windows.Forms.PictureBox();
  109. this.groupBox4 = new System.Windows.Forms.GroupBox();
  110. this.label1 = new System.Windows.Forms.Label();
  111. this.groupBox1.SuspendLayout();
  112. this.groupBox2.SuspendLayout();
  113. this.groupBox3.SuspendLayout();
  114. this.panel1.SuspendLayout();
  115. ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
  116. this.groupBox4.SuspendLayout();
  117. this.SuspendLayout();
  118. //
  119. // groupBox1
  120. //
  121. this.groupBox1.Controls.Add(this.button4);
  122. this.groupBox1.Controls.Add(this.button3);
  123. this.groupBox1.Controls.Add(this.button2);
  124. this.groupBox1.Controls.Add(this.button1);
  125. this.groupBox1.Location = new System.Drawing.Point(13, 13);
  126. this.groupBox1.Name = "groupBox1";
  127. this.groupBox1.Size = new System.Drawing.Size(526, 46);
  128. this.groupBox1.TabIndex = 1;
  129. this.groupBox1.TabStop = false;
  130. this.groupBox1.Text = "操作";
  131. //
  132. // button4
  133. //
  134. this.button4.Location = new System.Drawing.Point(445, 14);
  135. this.button4.Name = "button4";
  136. this.button4.Size = new System.Drawing.Size(75, 23);
  137. this.button4.TabIndex = 1;
  138. this.button4.Text = "重命名";
  139. this.button4.UseVisualStyleBackColor = true;
  140. this.button4.Click += new System.EventHandler(this.button4_Click);
  141. //
  142. // button3
  143. //
  144. this.button3.Location = new System.Drawing.Point(364, 14);
  145. this.button3.Name = "button3";
  146. this.button3.Size = new System.Drawing.Size(75, 23);
  147. this.button3.TabIndex = 2;
  148. this.button3.Text = "打开记录";
  149. this.button3.UseVisualStyleBackColor = true;
  150. this.button3.Click += new System.EventHandler(this.button3_Click);
  151. //
  152. // button2
  153. //
  154. this.button2.Location = new System.Drawing.Point(283, 14);
  155. this.button2.Name = "button2";
  156. this.button2.Size = new System.Drawing.Size(75, 23);
  157. this.button2.TabIndex = 1;
  158. this.button2.Text = "删除记录";
  159. this.button2.UseVisualStyleBackColor = true;
  160. this.button2.Click += new System.EventHandler(this.button2_Click);
  161. //
  162. // button1
  163. //
  164. this.button1.Location = new System.Drawing.Point(202, 14);
  165. this.button1.Name = "button1";
  166. this.button1.Size = new System.Drawing.Size(75, 23);
  167. this.button1.TabIndex = 0;
  168. this.button1.Text = "应用全部";
  169. this.button1.UseVisualStyleBackColor = true;
  170. this.button1.Click += new System.EventHandler(this.button1_Click);
  171. //
  172. // groupBox2
  173. //
  174. this.groupBox2.Controls.Add(this.listView1);
  175. this.groupBox2.Location = new System.Drawing.Point(13, 66);
  176. this.groupBox2.Name = "groupBox2";
  177. this.groupBox2.Size = new System.Drawing.Size(200, 295);
  178. this.groupBox2.TabIndex = 2;
  179. this.groupBox2.TabStop = false;
  180. this.groupBox2.Text = "列表";
  181. //
  182. // listView1
  183. //
  184. this.listView1.FullRowSelect = true;
  185. this.listView1.HideSelection = false;
  186. this.listView1.Location = new System.Drawing.Point(7, 21);
  187. this.listView1.MultiSelect = false;
  188. this.listView1.Name = "listView1";
  189. this.listView1.Size = new System.Drawing.Size(187, 268);
  190. this.listView1.TabIndex = 0;
  191. this.listView1.UseCompatibleStateImageBehavior = false;
  192. this.listView1.ItemSelectionChanged += new System.Windows.Forms.ListViewItemSelectionChangedEventHandler(this.listView1_ItemSelectionChanged);
  193. //
  194. // groupBox3
  195. //
  196. this.groupBox3.Controls.Add(this.panel1);
  197. this.groupBox3.Location = new System.Drawing.Point(220, 66);
  198. this.groupBox3.Name = "groupBox3";
  199. this.groupBox3.Size = new System.Drawing.Size(319, 295);
  200. this.groupBox3.TabIndex = 3;
  201. this.groupBox3.TabStop = false;
  202. this.groupBox3.Text = "预览";
  203. //
  204. // panel1
  205. //
  206. this.panel1.BackColor = System.Drawing.Color.Black;
  207. this.panel1.Controls.Add(this.pictureBox1);
  208. this.panel1.Location = new System.Drawing.Point(7, 21);
  209. this.panel1.Name = "panel1";
  210. this.panel1.Size = new System.Drawing.Size(306, 268);
  211. this.panel1.TabIndex = 0;
  212. //
  213. // pictureBox1
  214. //
  215. this.pictureBox1.BackColor = System.Drawing.Color.Black;
  216. this.pictureBox1.Location = new System.Drawing.Point(3, 3);
  217. this.pictureBox1.Name = "pictureBox1";
  218. this.pictureBox1.Size = new System.Drawing.Size(300, 262);
  219. this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
  220. this.pictureBox1.TabIndex = 0;
  221. this.pictureBox1.TabStop = false;
  222. //
  223. // groupBox4
  224. //
  225. this.groupBox4.Controls.Add(this.label1);
  226. this.groupBox4.Location = new System.Drawing.Point(13, 368);
  227. this.groupBox4.Name = "groupBox4";
  228. this.groupBox4.Size = new System.Drawing.Size(526, 64);
  229. this.groupBox4.TabIndex = 4;
  230. this.groupBox4.TabStop = false;
  231. this.groupBox4.Text = "简介";
  232. //
  233. // label1
  234. //
  235. this.label1.AutoSize = true;
  236. this.label1.Dock = System.Windows.Forms.DockStyle.Fill;
  237. this.label1.Location = new System.Drawing.Point(3, 17);
  238. this.label1.Name = "label1";
  239. this.label1.Size = new System.Drawing.Size(0, 12);
  240. this.label1.TabIndex = 0;
  241. //
  242. // OpenViewDialog
  243. //
  244. this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
  245. this.ClientSize = new System.Drawing.Size(551, 444);
  246. this.Controls.Add(this.groupBox4);
  247. this.Controls.Add(this.groupBox3);
  248. this.Controls.Add(this.groupBox2);
  249. this.Controls.Add(this.groupBox1);
  250. this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
  251. this.MaximizeBox = false;
  252. this.Name = "OpenViewDialog";
  253. this.Text = "打开视场";
  254. this.Controls.SetChildIndex(this.groupBox1, 0);
  255. this.Controls.SetChildIndex(this.groupBox2, 0);
  256. this.Controls.SetChildIndex(this.groupBox3, 0);
  257. this.Controls.SetChildIndex(this.groupBox4, 0);
  258. this.groupBox1.ResumeLayout(false);
  259. this.groupBox2.ResumeLayout(false);
  260. this.groupBox3.ResumeLayout(false);
  261. this.panel1.ResumeLayout(false);
  262. ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
  263. this.groupBox4.ResumeLayout(false);
  264. this.groupBox4.PerformLayout();
  265. this.ResumeLayout(false);
  266. }
  267. /// <summary>
  268. /// listView1 ItemSelectionChanged事件
  269. /// </summary>
  270. /// <param name="sender"></param>
  271. /// <param name="e"></param>
  272. private void listView1_ItemSelectionChanged(object sender, ListViewItemSelectionChangedEventArgs e)
  273. {
  274. listView1.FullRowSelect = true;
  275. if (this.listView1.SelectedItems.Count > 0)
  276. {
  277. listView1.SelectedItems[0].SubItems[0].ForeColor = Color.Blue;
  278. //先清除原有格式
  279.                 foreach (ListViewItem item in listView1.Items)
  280. {
  281. item.ForeColor = Color.Black;
  282. }
  283. foreach (ListViewItem item in listView1.Items)
  284. {
  285. item.BackColor = Color.White;
  286. Font f = new Font(Control.DefaultFont, FontStyle.Regular);
  287. item.Font = f;
  288. }
  289.                 //加粗字体
  290.                 Font f2 = new Font(Control.DefaultFont, FontStyle.Bold);
  291. listView1.SelectedItems[0].SubItems[0].Font = f2;
  292.                 //设置选中行背景颜色
  293.                 listView1.SelectedItems[0].BackColor = Color.LightBlue;
  294. listView1.SelectedItems[0].Selected = true;
  295. //赋值当前选中索引
  296. this.index = e.ItemIndex;
  297. //处理UI
  298. this.label1.Text = " " + list.Find(a => a.id == (int)(listView1.SelectedItems[0].Tag)).view_descrption;
  299. //获得model
  300. this.viewListModel = XmlSerializeHelper.DESerializer<ViewListModel>(list.Find(a => a.id == (int)(listView1.SelectedItems[0].Tag)).view_xml);
  301. //绘制右侧预览
  302. this.pictureBox1.Image = this.panel1_Paint(viewListModel);
  303. }
  304. }
  305. /// <summary>
  306. /// 绘制视场到图片
  307. /// </summary>
  308. /// <returns></returns>
  309. private Bitmap panel1_Paint(ViewListModel viewListModel)
  310. {
  311. Region a = null;
  312. for (int i = 0; i < viewListModel.Views.Count; i++)
  313. {
  314. if (viewListModel.Views[i].Type != null)
  315. {
  316. GraphicsPath path = new GraphicsPath();
  317. DrawToolType type = (DrawToolType)Enum.Parse(typeof(DrawToolType), viewListModel.Views[i].Type);
  318. if (type == DrawToolType.ViewCircle)
  319. {
  320. path.AddEllipse(viewListModel.Views[i].Rectangle);
  321. }
  322. else if (type == DrawToolType.ViewOval)
  323. {
  324. path.AddClosedCurve(viewListModel.Views[i].Points.ToArray());
  325. }
  326. else
  327. {
  328. path.AddPolygon(viewListModel.Views[i].Points.ToArray());
  329. }
  330. if (a == null)
  331. {
  332. a = new Region(path);
  333. }
  334. else
  335. {
  336. if ((CombineMode)Enum.Parse(typeof(CombineMode), viewListModel.Views[i].CombineMode) == CombineMode.Union)
  337. a.Union(path);
  338. else
  339. a.Exclude(path);
  340. }
  341. }
  342. }
  343. int width = (int)viewListModel.RectangleFW;
  344. int height = (int)viewListModel.RectangleFH;
  345. Rectangle rect = new Rectangle(0, 0, width, height);
  346. Bitmap dstBitmap = new Bitmap(width, height);
  347. BitmapData dstBmData = dstBitmap.LockBits(rect, ImageLockMode.ReadWrite, PixelFormat.Format32bppRgb);
  348. IntPtr dstScan = dstBmData.Scan0;
  349. unsafe
  350. {
  351. byte* dstP = (byte*)(void*)dstScan;
  352. int dstOffset = dstBmData.Stride - width * 4;
  353. for (int y = 0; y < height; y++)
  354. {
  355. for (int x = 0; x < width; x++, dstP += 4)
  356. {
  357. if (a.IsVisible(new Point(x + (int)(viewListModel.RectangleFX), y + (int)(viewListModel.RectangleFY))))
  358. {
  359. dstP[0] = 255;
  360. dstP[1] = 255;
  361. dstP[2] = 255;
  362. dstP[3] = 255;
  363. }
  364. else
  365. {
  366. dstP[0] = 0;
  367. dstP[1] = 0;
  368. dstP[2] = 0;
  369. dstP[3] = 255;
  370. }
  371. }
  372. dstP += dstOffset;
  373. }
  374. }
  375. dstBitmap.UnlockBits(dstBmData);
  376. return dstBitmap;
  377. }
  378. /// <summary>
  379. /// 应用全部
  380. /// </summary>
  381. /// <param name="sender"></param>
  382. /// <param name="e"></param>
  383. private void button1_Click(object sender, EventArgs e)
  384. {
  385. if (viewListModel != null && viewListModel.Views.Count > 0
  386. && this.appWorkspace.DocumentWorkspaces != null
  387. && this.appWorkspace.DocumentWorkspaces.Length > 0)
  388. {
  389. foreach (DocumentWorkspace dw in this.appWorkspace.DocumentWorkspaces)
  390. {
  391. for (int i = 0; i < viewListModel.Views.Count; i++)
  392. {
  393. DrawToolType type = (DrawToolType)Enum.Parse(typeof(DrawToolType), viewListModel.Views[i].Type);
  394. ViewBase line = null;
  395. switch (type)
  396. {
  397. case DrawToolType.ViewOval:
  398. line = new ViewOval(viewListModel.Views[i].Points);
  399. break;
  400. case DrawToolType.ViewCircle:
  401. line = new ViewCircle(viewListModel.Views[i].Points);
  402. break;
  403. case DrawToolType.ViewRectangle:
  404. line = new ViewRectangle(viewListModel.Views[i].Points);
  405. break;
  406. case DrawToolType.ViewTriangle:
  407. line = new ViewTriangle(viewListModel.Views[i].Points);
  408. break;
  409. case DrawToolType.ViewSquare:
  410. line = new ViewSquare(viewListModel.Views[i].Points);
  411. break;
  412. case DrawToolType.ViewRectangleEx:
  413. line = new ViewRectangleEx(viewListModel.Views[i].Points);
  414. break;
  415. case DrawToolType.ViewPolygon:
  416. line = new ViewPolygon(viewListModel.Views[i].Points);
  417. break;
  418. case DrawToolType.ViewTriangleEx:
  419. line = new ViewTriangleEx(viewListModel.Views[i].Points);
  420. break;
  421. }
  422. if (line != null)
  423. {
  424. line.ISurfaceBox = dw;
  425. line.combineMode = (CombineMode)Enum.Parse(typeof(CombineMode), viewListModel.Views[i].CombineMode);
  426. line.Selected = true;
  427. dw.AddGraphicsFromForm(line);
  428. }
  429. }
  430. }
  431. }
  432. }
  433. /// <summary>
  434. /// 删除记录
  435. /// </summary>
  436. /// <param name="sender"></param>
  437. /// <param name="e"></param>
  438. private void button2_Click(object sender, EventArgs e)
  439. {
  440. if (this.listView1.SelectedItems != null && this.listView1.SelectedItems.Count > 0)
  441. {
  442. DialogResult dr = MessageBox.Show(PdnResources.GetString("Menu.Areyousuretodeletethefie.text") + "?", PdnResources.GetString("Menu.ensure.text"), MessageBoxButtons.OKCancel, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button1);
  443. if (dr == DialogResult.OK)
  444. {
  445. int id = (int)(this.listView1.SelectedItems[0].Tag);
  446. if (id > 0)
  447. {
  448. //删除数据库文件
  449. mic_view_infos_BLL.Del(id);
  450. InitViewData();
  451. }
  452. }
  453. }
  454. }
  455. /// <summary>
  456. /// 打开记录
  457. /// </summary>
  458. /// <param name="sender"></param>
  459. /// <param name="e"></param>
  460. private void button3_Click(object sender, EventArgs e)
  461. {
  462. //将所有的视场反向还原到surface中
  463. if (viewListModel != null && viewListModel.Views.Count > 0 && this.appWorkspace.ActiveDocumentWorkspace != null
  464. && this.appWorkspace.ActiveDocumentWorkspace.CompositionSurface != null
  465. && this.appWorkspace.ActiveDocumentWorkspace.GraphicsList != null)
  466. {
  467. for (int i = 0; i < viewListModel.Views.Count; i++)
  468. {
  469. DrawToolType type = (DrawToolType)Enum.Parse(typeof(DrawToolType), viewListModel.Views[i].Type);
  470. ViewBase line = null;
  471. switch (type)
  472. {
  473. case DrawToolType.ViewOval:
  474. line = new ViewOval(viewListModel.Views[i].Points);
  475. break;
  476. case DrawToolType.ViewCircle:
  477. line = new ViewCircle(viewListModel.Views[i].Points);
  478. break;
  479. case DrawToolType.ViewRectangle:
  480. line = new ViewRectangle(viewListModel.Views[i].Points);
  481. break;
  482. case DrawToolType.ViewRectangleEx:
  483. line = new ViewRectangleEx(viewListModel.Views[i].Points);
  484. break;
  485. case DrawToolType.ViewTriangle:
  486. line = new ViewTriangle(viewListModel.Views[i].Points);
  487. break;
  488. case DrawToolType.ViewSquare:
  489. line = new ViewSquare(viewListModel.Views[i].Points);
  490. break;
  491. case DrawToolType.ViewPolygon:
  492. line = new ViewPolygon(viewListModel.Views[i].Points);
  493. break;
  494. case DrawToolType.ViewTriangleEx:
  495. line = new ViewTriangleEx(viewListModel.Views[i].Points);
  496. break;
  497. }
  498. if (line != null)
  499. {
  500. line.ISurfaceBox = this.appWorkspace.ActiveDocumentWorkspace;
  501. line.combineMode = (CombineMode)Enum.Parse(typeof(CombineMode), viewListModel.Views[i].CombineMode);
  502. line.Selected = true;
  503. this.appWorkspace.ActiveDocumentWorkspace.AddGraphicsFromForm(line);
  504. }
  505. }
  506. }
  507. }
  508. /// <summary>
  509. /// 重命名
  510. /// </summary>
  511. /// <param name="sender"></param>
  512. /// <param name="e"></param>
  513. private void button4_Click(object sender, EventArgs e)
  514. {
  515. if (this.listView1.SelectedItems != null && this.listView1.SelectedItems.Count > 0)
  516. {
  517. createNameDialog = new EditViewDialog(this);
  518. createNameDialog.Text = PdnResources.GetString("Menu.Rename.text");
  519. createNameDialog.textBox1.Text = list[this.index].view_name;
  520. createNameDialog.richTextBox1.Text = list[this.index].view_descrption;
  521. createNameDialog.StartPosition = FormStartPosition.CenterParent;
  522. createNameDialog.ShowDialog();
  523. }
  524. }
  525. /// <summary>
  526. /// 另存为弹窗 确定保存
  527. /// </summary>
  528. /// <param name="name"></param>
  529. public override void GetCreateName(string name, string desc)
  530. {
  531. mic_view_infos model = list[this.index];
  532. mic_view_infos query = list.Find(a => a.view_name.Equals(name));
  533. if (query != null)
  534. {
  535. if (model.id != query.id)
  536. {
  537. MessageBox.Show(PdnResources.GetString("Menu.viewnamerepeated,pleaserename.text"));
  538. return;
  539. }
  540. }
  541. model.view_name = name;
  542. model.view_descrption = desc;
  543. mic_view_infos_BLL.Update(model);
  544. createNameDialog.Close();
  545. InitViewData();
  546. }
  547. }
  548. }