Kbuilder.cs Give ME K

xiaoxiao2021-03-06  14

Using system; using system.drawing; using system.drawing.imaging;

Namespace ktest {///

/// kbuilder's summary description.

/// public class kbuilder {private int bottom = 10; private int = 20; ///

/// default width /// private int m_width = 640; /// /// Height default 400 pixels /// private int m_height = 480; /// /// Default display 30 days data /// private int m_linecount = 30; /// /// The default display is 50 yuan /// private int m_maxprice = 50; /// /// store price list /// private arraylist M_Price; public kbuilder () {m_price = new arraylist ();} /// /// width /// public int width {incount {m_width;} set {m_width = value;}} /// /// Height /// public int Height {get {return m_height;} set {m_height = value;}} /// /// display line number ///// public int linecount {get {return {m_Linecount;} set {m_linecount = value;}} public int markprice {incker {return m_maxprice;} set {m_maxprice = valu e;}} /// /// Add price /// /// open price /// The highest price /// lowest price /// Closed price public void add (double openprice, double maxprice, Double Minprice, Double ClosePrice) {ktest.price a = new price (); a.open = openprice; a.max = maxprice; a.min = minprice; a.close = closeprice; if (m_prices.count> =

M_LineCount) {m_price.removeat (0);} m_price.add (a);} ///

/// Public Bitmap getImage ) {Bitmap image = new bitmap (m_width, m_height); graphics g = graphics.fromimage (image); pen black1 = new pen (color.black, 1); pen black2 = new pen (color.black, 2); pen Red = new pen (color.red, 1); Point O = New Point (LeftMarge, M_Height-Bottommarge); Point Y = New Point (LeftMarge, 0); Point X = New Point (m_width, m_height-bottommarge); font Font = New font ("Song", 8); int hstep = (m_height-bottommarge) / m_maxprice; int wstep = (m_width-leftmarge) / m_LineCount;

转载请注明原文地址:https://www.9cbs.com/read-50780.html

New Post(0)