Objective
Executable File Download Qfdhouse-exe.zip
Because the project needs to do a quality function configuration (Quality function Deployment QFD) of the quality of the building tool software, the software is published in a free open source software-pad flowchart drawing software Padflowchart based on the results of the following:
Support new, save, export pictures, customize user requirements and technical features, cell Click to toggle correlation matrix degree and autocorrelation matrix.
Problems solved in the development
Believe that the people here are not interested in QFD, the following will be the problem to say.
How to set the initial size of a graphic
1. Increase the default height and Width properties in the Shape class
/// <summary> /// Default width /// </summary> Private float mdefaultwidth = 0f; /// <summary> /// Default Height /// </summary> Private float mdefaultheigh = 0f;
/// <summary> ///Default Width/// </summary>[Graphmldata] Public floatDefaultWidth {Get{returnMdefaultwidth;} Set{mdefaultwidth =value;} } /// <summary> ///Default Height/// </summary>[Graphmldata] Public floatDefaultheigh {Get{returnMdefaultheigh;} Set{Mdefaultheigh =value;} }
2. Initialize in the Tableshape class
Public Base () { this. Init (); This . InitTestData3 (); Bindingeventhandler (); Base - ; Base - ; }
3. Modify the Graphcontrol drawshapemouseup (PointF p) function
Private voiddrawshapemouseup (PointF p) {Cursor=System.Windows.Forms.Cursors.Default; floatT_left = (Mmousedownpoint.x < p.x?)mmousedownpoint.x:p.x); floatT_right = (mmousedownpoint.x >= p.x?)mmousedownpoint.x:p.x); floatT_top = (Mmousedownpoint.y < p.y?)mmousedownpoint.y:p.y); floatT_bottom = (mmousedownpoint.y >= p.y?)mmousedownpoint.y:p.y); if(T_right-t_left <Ten) { //t_right = T_left + mdefaultshapewidth;T_right = T_left +Math.max (Mdefaultshapewidth, mshapeobject.defaultwidth); } if(T_bottom-t_top <Ten) { //T_bottom = t_top + mdefaultshapeheight;T_bottom = T_top +Math.max (Mdefaultshapeheight, Mshapeobject.defaultheigh); } mshapeobject.rectangle=rectanglef.fromltrb (T_left, T_top, T_right, T_bottom); Invalidate (); Enddrawshapewithmouse (); }
Comment out the original code
How to export graphics to picture format
1. Add a method to save graphic images in FlowChartForm.cs
Public BOOLSaveshapeimage () {if(GraphControl.SelectedShapes.Count! =1) {MessageBox.Show ("Please select a graphic"); return false; } varFileName =string. Empty; using(SaveFileDialog SFD =NewSaveFileDialog ()) {sfd. DefaultExt=". jpg"; SfD. Filter="jpg file (*.jpg) |*.jpg"; if(SFD. ShowDialog () = =DialogResult.OK) {fileName=SFD. FileName; } Else { return false; } } varShape = graphcontrol.selectedshapes[0]; Graphcontrol.saveshapeimage (FileName, shape); return true; }
2. Increase the Saveshapeimage method in GraphControl.cs
Public voidSaveshapeimage (stringPath,shape Shape) {Image BMP=getshapeimage (Shape); Bmp. Save (path); } PublicImage getshapeimage (Shape shape) {varOldrectangle =shape. Rectangle; varNewrectangle =NewRectangleF (0,0, Oldrectangle.width, oldrectangle.height); Shape. Rectangle=Newrectangle; Bitmap BMP=NewBitmap ((int) shape. Rectangle.width, (int) shape. Rectangle.height, This. CreateGraphics ()); using(Graphics g =graphics.fromimage (BMP)) {G.smoothingmode=Smoothingmode.antialias; Shape. Paint (g); } shape. Rectangle=Oldrectangle; Image.getthumbnailimageabort Tcallback=NewSystem.Drawing.Image.GetThumbnailImageAbort (Thumbnailcallback); returnBmp. Getthumbnailimage ((int) shape. Rectangle.width, (int) shape. Rectangle.height, Tcallback, IntPtr.Zero); }
Development of QFD Quality House compiling tool using Netrongraphlib class Library