资源简介

netron开源项目的源代码,2.1版本,有文档和应用例子,在vs2010下编译通过,是很好的参考代码,可以用来画流程图等,该项目已经停止更新,代码很难找了

资源截图

代码片段和文件信息

using System;
using System.Collections;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Drawing.Printing;
using System.IO;
using System.Runtime.CompilerServices;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Formatters.Binary;
//using System.Runtime.Serialization.Formatters.Soap;
using System.Reflection;
using System.Threading;
using System.Windows.Forms;
using Netron.GraphLib.Attributes;
using Netron.GraphLib.UI;
using Netron.GraphLib.Interfaces;
using Netron.GraphLib;
using System.Text;
namespace Netron.AutomataShapes
{
/// 
/// This node allows an affine (aka linear)  mapping of data
/// 

[Serializable]
[Description(“Affine Transformation“)]
[NetronGraphShape(“Affine map““7A231785-4198-4828-9BA9-24895BE54A59““Automata““Netron.AutomataShapes.AffineTransformation“
 “Scales and shift the given input.“)]
public class AffineTransformation : Shape
{
#region Fields
/// 
/// the data shift
/// 

protected float shiftValue=0;
/// 
/// the scaling value
/// 

protected float scalingValue=100;
/// 
/// the out connector
/// 

protected Connector outConnector;
/// 
/// the in connector
/// 

protected Connector inConnector;
/// 
/// the kinda data type send out
/// 

protected AutomataDataTypes outputType;
#endregion

#region Properties
/// 
/// Gets or sets the shift value
/// 

public float ShiftValue
{
get{return shiftValue;}
set{shiftValue=value;}
}
/// 
/// Gets or set the scaling of the incoming data
/// 

public float ScalingValue
{
get{return scalingValue;}
set{scalingValue=value;}
}
#endregion


#region Constructor

/// 
/// the ctor
/// 

public AffineTransformation():base()
{
Rectangle = new RectangleF(0 0 100 40);
outConnector=new Connector(this“Output“true);
outConnector.ConnectorLocation = ConnectorLocations.East;
inConnector = new Connector(this“Input“false);
inConnector.ConnectorLocation = ConnectorLocations.West;
this.Connectors.Add(outConnector);
this.Connectors.Add(inConnector);
InitEntity();
}
#endregion

#region Methods

/// 
/// Initalizes the shape
/// 

protected override void InitEntity()
{
base.InitEntity();
this.Resizable=false;

}

/// 
/// How the shape is drawn on the canvas
/// 

/// 
protected override void Paint(System.Drawing.Graphics g)
{

//g.DrawRectangle(new Pen(Color.BlackIsSelected ? 2F : 1F)Rectangle.LeftRectangle.TopRectangle.WidthRectangle.Height);
StringFormat sf = new StringFormat();

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       7213  2004-11-08 07:53  NetronGraphSourceCode\AutomataShapes\AffineMap.cs

     文件       3437  2004-11-15 05:54  NetronGraphSourceCode\AutomataShapes\AssemblyInfo.cs

     文件      10576  2004-09-14 14:49  NetronGraphSourceCode\AutomataShapes\AutomataShapes.csproj

     文件       1803  2004-11-24 18:23  NetronGraphSourceCode\AutomataShapes\AutomataShapes.csproj.user

     文件      10503  2004-11-15 11:33  NetronGraphSourceCode\AutomataShapes\BasicFunction.cs

     文件      98304  2004-11-24 18:21  NetronGraphSourceCode\AutomataShapes\bin\Debug\AutomataShapes.dll

     文件     212992  2004-11-24 18:21  NetronGraphSourceCode\AutomataShapes\bin\Debug\NetronGraphLib.dll

     文件      24576  2004-11-24 18:20  NetronGraphSourceCode\AutomataShapes\bin\Debug\NetronMaths.dll

     文件       7397  2004-11-08 07:53  NetronGraphSourceCode\AutomataShapes\BitPlotter.cs

     文件       3243  2004-09-15 04:48  NetronGraphSourceCode\AutomataShapes\Compiler.cs

     文件       6366  2004-11-08 07:53  NetronGraphSourceCode\AutomataShapes\Counter.cs

    .......     98304  2004-11-24 18:21  NetronGraphSourceCode\AutomataShapes\obj\Debug\AutomataShapes.dll

    ..A..H.     81288  2004-11-24 18:23  NetronGraphSourceCode\AutomataShapes\obj\Debug\AutomataShapes.projdata

     文件      12874  2004-11-24 18:21  NetronGraphSourceCode\AutomataShapes\obj\Debug\Netron.AutomataShapes.scriptEditor.resources

     文件       8139  2004-11-15 11:36  NetronGraphSourceCode\AutomataShapes\Operator.cs

     文件      10578  2004-11-08 07:53  NetronGraphSourceCode\AutomataShapes\RandomGenerator.cs

     文件        546  2004-09-14 14:12  NetronGraphSourceCode\AutomataShapes\Resources\AffineMap.gif

     文件        429  2004-09-14 14:19  NetronGraphSourceCode\AutomataShapes\Resources\BasicFunction.gif

     文件        289  2004-09-14 14:23  NetronGraphSourceCode\AutomataShapes\Resources\BitPlotter.gif

     文件        415  2004-09-14 14:25  NetronGraphSourceCode\AutomataShapes\Resources\Counter.gif

     文件        394  2004-09-14 14:26  NetronGraphSourceCode\AutomataShapes\Resources\Operator.gif

     文件        401  2004-09-14 14:32  NetronGraphSourceCode\AutomataShapes\Resources\RandomGenerator.gif

     文件        459  2004-09-14 14:33  NetronGraphSourceCode\AutomataShapes\Resources\scripter.gif

     文件       1974  2004-11-15 10:01  NetronGraphSourceCode\AutomataShapes\Resources\scripts\Biomorphscript.txt

     文件       1790  2004-08-01 17:09  NetronGraphSourceCode\AutomataShapes\Resources\scripts\Moire.txt

     文件       1179  2004-08-01 11:15  NetronGraphSourceCode\AutomataShapes\Resources\scripts\Templatescript.txt

     文件        281  2004-09-14 14:35  NetronGraphSourceCode\AutomataShapes\Resources\ShowValue.gif

     文件        435  2004-07-23 12:02  NetronGraphSourceCode\AutomataShapes\Resources\SimpleNode.gif

     文件        330  2004-07-23 12:02  NetronGraphSourceCode\AutomataShapes\Resources\TextLabel.gif

     文件        392  2004-09-14 14:37  NetronGraphSourceCode\AutomataShapes\Resources\Value2Color.gif

............此处省略792个文件信息

评论

共有 条评论