CN108509554B - Method for rapidly generating tissue architecture diagram based on WPF technology and EXCEL - Google Patents

Method for rapidly generating tissue architecture diagram based on WPF technology and EXCEL Download PDF

Info

Publication number
CN108509554B
CN108509554B CN201810238488.XA CN201810238488A CN108509554B CN 108509554 B CN108509554 B CN 108509554B CN 201810238488 A CN201810238488 A CN 201810238488A CN 108509554 B CN108509554 B CN 108509554B
Authority
CN
China
Prior art keywords
wpf
excel
canvas
organization
server
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810238488.XA
Other languages
Chinese (zh)
Other versions
CN108509554A (en
Inventor
李立
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Vtron Software Nanjing Co ltd
Original Assignee
Vtron Software Nanjing Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Vtron Software Nanjing Co ltd filed Critical Vtron Software Nanjing Co ltd
Priority to CN201810238488.XA priority Critical patent/CN108509554B/en
Publication of CN108509554A publication Critical patent/CN108509554A/en
Application granted granted Critical
Publication of CN108509554B publication Critical patent/CN108509554B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Processing Or Creating Images (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a method for quickly generating an organization architecture diagram based on a WPF technology and an EXCEL, which belongs to the technical field of electronic maps and comprises the steps of establishing an organization structure detail of an EXCEL list mode, displaying organization relation data of the organization structure detail in a TreeeView control according to a hierarchical tree form, generating a simulation sample diagram by a Canvas technology and a Thumb technology in the WPF, adding an editing function to the TreeeView control in a WPF server, and converting the Canvas finally generated by the WPF into a jpg graph for subsequent communication or printing.

Description

Method for rapidly generating tissue architecture diagram based on WPF technology and EXCEL
Technical Field
The invention belongs to the technical field of internet, and particularly relates to a method for rapidly generating a tissue architecture diagram based on a WPF (wavelet packet Filter) technology and EXCEL (EXCEL).
Background
When the personnel management department makes an organizational chart, the personnel management department adds the software which can support drawing, such as Office series software, Visio, Xmind and the like, according to the organizational structure manually one by one. This approach generally results in no problems in completing the fabrication. However, if a lot of organizational charts need to be prepared or the internal structure of a single organization changes greatly, the pictures need to be modified one by one, which is very inefficient and prone to errors.
Disclosure of Invention
The invention aims to provide a method for rapidly generating an organizational structure diagram based on a WPF (wavelet packet Filter) technology and EXCEL (EXCEL), and the technical problem of rapidly generating the organizational structure diagram is solved.
In order to achieve the purpose, the invention adopts the following technical scheme:
a method for rapidly generating a tissue architecture diagram based on WPF technology and EXCEL comprises the following steps:
step 1: establishing a database server and a WPF server, wherein the database server is communicated with the WPF server through a network cable;
step 2: establishing an organization structure detail in a database server, wherein the organization structure detail is an Excel list mode;
and step 3: the WPF server calls an organization structure detail in the database server, the organization structure detail in the Excel list mode is accessed and read by using the WPF, and organization relation data of the organization structure detail is displayed in the TreeeView control according to a hierarchical tree;
and 4, step 4: the WPF server generates a simulation sample graph by utilizing a Canvas technology and a Thumb technology in the WPF according to the hierarchical tree structure;
and 5: adding an editing function to the TreeeView control in the WPF server, so that the organization relation data can be reversely written back into an Excel file;
step 6: and adding an export function to the TreeeView control in the WPF server, and converting the Canvas finally generated by the WPF into a jpg graph for subsequent communication or printing.
When step 2 is executed, a Config file is preset, an Excel column header field relation table is defined in the Config file, and then Excel details are strictly referred to the specification to enter basic data.
Default pattern links at each level are defined and organized in the Config file so that a user can select a default level pattern by himself.
According to the method for rapidly generating the tissue architecture diagram based on the WPF technology and the EXCEL, the architecture diagram is generated very rapidly, and the tissue architecture diagram can be generated rapidly as long as an organization structure list is maintained in the EXCEL.
Drawings
FIG. 1 is a flow chart of the present invention;
fig. 2 is a resulting tissue architecture diagram of the present invention.
Detailed Description
Fig. 1 is a method for rapidly generating a tissue architecture diagram based on WPF technology and EXCEL, comprising the following steps:
step 1: establishing a database server and a WPF server, wherein the database server is communicated with the WPF server through a network cable;
step 2: establishing an organization structure detail in a database server, wherein the organization structure detail is an Excel list mode;
establishing a Config file, defining an Excel column header field relation table in the Config file as shown in a table 1, and then strictly referring to the specification by Excel detail and inputting basic data;
Figure BDA0001604615660000021
TABLE 1
And step 3: the WPF server calls an organization structure detail in the database server, the organization structure detail in the Excel list mode is accessed and read by using the WPF, and organization relation data of the organization structure detail is displayed in the TreeeView control according to a hierarchical tree; the method comprises the following specific steps:
step A1: storing the organization relation in the Excel into a uniform organization structure object according to the hierarchy, and executing the read structure logic according to the definition in the Config file;
step A2: and displaying the control in a TreeeView control in a hierarchical tree form by utilizing the WPF bidirectional binding.
And 4, step 4: the WPF server generates a simulation sample graph by utilizing a Canvas technology and a Thumb technology in the WPF according to the hierarchical tree structure; the method comprises the following specific steps:
step B1: defining and organizing default pattern links of each level in a Config file so that a user can select a default level pattern by himself;
step B2: defining a TabControl, and adding a Canvas as a sub-tab of the TabControl according to a selected node level in a TreeeView double-click event to display an organization architecture diagram of the current selected level;
step B3: and (3) using a recursive algorithm to place each node element of TreeeView into a Canvas as a Path, defining a connection class, and binding a father node and a child node by using a connection line so as to facilitate subsequent dragging adjustment. Default node pattern of the generated graph to be a picture pointed by an Excel photo link, and otherwise, capturing a pattern configured by a Config file;
step B4: a drag class Dragthumb is defined, inherited from Thumb. Capturing the latest position of a mouse in a DragDelta event of Dragthumb, calling a SetTop and SetLft method of Canvas, and moving a dragged element to a new position to finish a dragging function;
step B5: in order to ensure that the automatically generated organizational chart can be readjusted, adding common editing functions such as cutting, copying and pasting, and binding corresponding execution actions and operable time by using a Command Command;
step B6: and adding a search box so as to quickly locate a certain hierarchical organization and a certain specific person.
And 5: adding an editing function to the TreeeView control in the WPF server, so that the organization relation data can be reversely written back into an Excel file; the method comprises the following specific steps:
step C1: by utilizing a WPF (WPF) bidirectional binding technology, common editing operations of adding, modifying and deleting organizational structure objects are completed in TreeeView related events;
step C2: and storing the latest organization structure object into Excel.
Step 6: adding an export function to a TreeeView control in a WPF server, and converting Canvas finally generated by the WPF into a jpg graph, wherein the Canvas is a Canvas technology in a Net WPF development platform for subsequent communication or printing, and the specific steps are as follows:
step D1: establishing a virtual Canvas object DrawingVisual, and using the DrawingContext object to re-compose Canvas and objects in the Child on the DrawingVisual virtual Canvas on the basis of the virtual Canvas object DrawingVisual; creating a RenderTargetBotmap instance, and introducing the width, height and pixel values of a canvas into the RenderTargetBotmap as constructor parameters of the RenderTargetBotmap, wherein the pixel format adopts PixelFormat. Pbgra32; then calling a Render method of the object and transmitting the Render method into a drawingVisual;
step D2: a bitmap Encoder object is defined, and a Jpegbitmap Encoder instance is created to be used as the final graphic output.
When step 2 is executed, a Config file is preset, an Excel column header field relation table is defined in the Config file, and then Excel details are strictly referred to the specification to enter basic data.
Default pattern links at each level are defined and organized in the Config file so that a user can select a default level pattern by himself.
According to the method for rapidly generating the tissue architecture diagram based on the WPF technology and the EXCEL, the architecture diagram is generated very rapidly, and the tissue architecture diagram can be generated rapidly as long as an organization structure list is maintained in the EXCEL.

Claims (2)

1. A method for rapidly generating a tissue architecture diagram based on WPF technology and EXCEL is characterized in that: the method comprises the following steps:
step 1: establishing a database server and a WPF server, wherein the database server is communicated with the WPF server through a network cable;
step 2: establishing an organization structure detail in a database server, wherein the organization structure detail is an Excel list mode;
and step 3: the WPF server calls an organization structure detail in the database server, the organization structure detail in the Excel list mode is accessed and read by using the WPF, and organization relation data of the organization structure detail is displayed in the TreeeView control according to a hierarchical tree;
and 4, step 4: the WPF server generates a simulation sample graph by using a Canvas technology and a Thumb technology in WPF according to a hierarchical tree structure, and the specific steps are as follows:
step B1: defining and organizing default pattern links of each level in a Config file so that a user can select a default level pattern by himself;
step B2: defining a TabControl, and adding a Canvas as a sub-tab of the TabControl according to a selected node level in a TreeeView double-click event to display an organization architecture diagram of the current selected level;
step B3: using a recursive algorithm to place each node element of TreeeView into a Canvas as a Path, defining a connection class, and binding a father node and a child node by using a connection line so as to facilitate subsequent dragging adjustment; default node pattern of the generated graph to be a picture pointed by an Excel photo link, and otherwise, capturing a pattern configured by a Config file;
step B4: defining a drag class Dragthumb, inherited from Thumb; capturing the latest position of a mouse in a DragDelta event of Dragthumb, calling a SetTop and SetLft method of Canvas, and moving a dragged element to a new position to finish a dragging function;
step B5: in order to ensure that the automatically generated organizational chart can be readjusted, adding common editing functions such as cutting, copying and pasting, and binding corresponding execution actions and operable time by using a Command Command;
step B6: adding a search box to facilitate quick positioning to a certain hierarchical organization and a certain specific person;
and 5: adding an editing function to the TreeeView control in the WPF server, and reversely writing the organization relation data back into an Excel file;
step 6: adding an export function to a TreeeView control in a WPF server, and converting Canvas finally generated by the WPF into a jpg graph, wherein the Canvas is a Canvas technology in a Net WPF development platform for subsequent communication or printing, and the specific steps are as follows:
step D1: establishing a virtual Canvas object DrawingVisual, and using the DrawingContext object to re-compose Canvas and objects in the Child on the DrawingVisual virtual Canvas on the basis of the virtual Canvas object DrawingVisual; creating a RenderTargetBotmap instance, and introducing the width, height and pixel values of a canvas into the RenderTargetBotmap as constructor parameters of the RenderTargetBotmap, wherein the pixel format adopts PixelFormat. Pbgra32; then calling a Render method of the object and transmitting DrawingVisual;
step D2: a bitmap Encoder object is defined, and a Jpegbitmap Encoder instance is created to be used as the final graphic output.
2. The method for rapidly generating the organizational structure chart based on the WPF technology and the EXCEL is characterized in that when the step 2 is executed, a Config file is preset, an EXCEL column header field relation table is defined in the Config file, and then EXCEL details are strictly referred to the specification to enter basic data.
CN201810238488.XA 2018-03-22 2018-03-22 Method for rapidly generating tissue architecture diagram based on WPF technology and EXCEL Active CN108509554B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810238488.XA CN108509554B (en) 2018-03-22 2018-03-22 Method for rapidly generating tissue architecture diagram based on WPF technology and EXCEL

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810238488.XA CN108509554B (en) 2018-03-22 2018-03-22 Method for rapidly generating tissue architecture diagram based on WPF technology and EXCEL

Publications (2)

Publication Number Publication Date
CN108509554A CN108509554A (en) 2018-09-07
CN108509554B true CN108509554B (en) 2022-03-01

Family

ID=63378076

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810238488.XA Active CN108509554B (en) 2018-03-22 2018-03-22 Method for rapidly generating tissue architecture diagram based on WPF technology and EXCEL

Country Status (1)

Country Link
CN (1) CN108509554B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110442752A (en) * 2019-07-05 2019-11-12 中国平安人寿保险股份有限公司 Organizational structure drawing generating method, device, computer equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
FR2805907B1 (en) * 2000-03-01 2002-05-17 Bull Sa METHOD FOR GRAPHIC REPRESENTATION OF A COMPUTER APPLICATION
CN102122245A (en) * 2011-02-21 2011-07-13 北京沃泰丰通信技术有限公司 Method and system for generating configuration item setting interface
CN103605706A (en) * 2013-11-11 2014-02-26 华中师范大学 Knowledge map based resource retrieval method
CN103823793A (en) * 2014-03-05 2014-05-28 成都交大光芒科技股份有限公司 Realizing method for dynamic report based on Excel template
CN103886023A (en) * 2014-02-24 2014-06-25 国家电网公司 Storage and extraction method and system of Excel data tables

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
FR2805907B1 (en) * 2000-03-01 2002-05-17 Bull Sa METHOD FOR GRAPHIC REPRESENTATION OF A COMPUTER APPLICATION
CN102122245A (en) * 2011-02-21 2011-07-13 北京沃泰丰通信技术有限公司 Method and system for generating configuration item setting interface
CN103605706A (en) * 2013-11-11 2014-02-26 华中师范大学 Knowledge map based resource retrieval method
CN103886023A (en) * 2014-02-24 2014-06-25 国家电网公司 Storage and extraction method and system of Excel data tables
CN103823793A (en) * 2014-03-05 2014-05-28 成都交大光芒科技股份有限公司 Realizing method for dynamic report based on Excel template

Also Published As

Publication number Publication date
CN108509554A (en) 2018-09-07

Similar Documents

Publication Publication Date Title
CN105786526B (en) A kind of efficient flow figure drawing system and method based on Web
US7814427B2 (en) Object model tree diagram
US10867273B2 (en) Interface for expanding logical combinations based on relative placement
US7661071B2 (en) Creation of three-dimensional user interface
US10776725B2 (en) Graphical modeling tool
CN104020997B (en) Extensible graphical rule application system
CN107491427A (en) Data sheet processing method and processing device
WO2020015613A1 (en) Cad collaborative design system
US9787752B2 (en) Hotspot editor for a user interface
Ijiri et al. Seamless integration of initial sketching and subsequent detail editing in flower modeling
CN110807015A (en) Big data asset value delivery management method and system
WO2015196784A1 (en) Visual software modeling method based on software meta-view for constructing software view
US7899846B2 (en) Declarative model editor generation
CN116225429A (en) Pulling type component frame-based ipage webpage type low-code development platform
CN114089958A (en) Form visual configuration method and device
US11733973B2 (en) Interactive graphic design system to enable creation and use of variant component sets for interactive objects
CN113010612B (en) Visual construction method, query method and device for graph data
US10417924B2 (en) Visual work instructions for assembling product
WO2021162833A1 (en) Process architecture modeling platform
CN108509554B (en) Method for rapidly generating tissue architecture diagram based on WPF technology and EXCEL
CN108958611B (en) Information editing method and device
CN114416067A (en) Visual building system and method
US10896161B2 (en) Integrated computing environment for managing and presenting design iterations
de Lange et al. Collaborative wireframing for model-driven web engineering
KR20100137364A (en) Tool for graphically visualizing and configuring patterns

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant