本文整理汇总了C#中ZedGraph.ZedGraphControl.DrawToBitmap方法的典型用法代码示例。如果您正苦于以下问题:C# ZedGraphControl.DrawToBitmap方法的具体用法?C# ZedGraphControl.DrawToBitmap怎么用?C# ZedGraphControl.DrawToBitmap使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ZedGraph.ZedGraphControl
的用法示例。
在下文中一共展示了ZedGraphControl.DrawToBitmap方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnIvFtpBrowserItemActivated_ZedGraph
//==================ZEDGRAPH=================
void OnIvFtpBrowserItemActivated_ZedGraph(object o, ItemActivatedArgs args)
{
string selected_file = get_BrowserItem_Value (ivFtpBrowser);
StreamReader file_reader = c_current_ftp_session.CFTP_GetFile (selected_file);
Viewport _port = new Viewport (new Adjustment(1000, 500, 1000, 5, 0, 500),
new Adjustment (500, 500, 500, 0, 0, 500));
_port.WidthRequest = 2000;
_port.ResizeMode = ResizeMode.Parent;
ZedGraphControl g_graph = new ZedGraphControl ();
c_current_logfile = new CLogFile
(
file_reader,
c_current_ftp_session.CFTP_LogFileDate,
c_current_device.DeviceFileDescription
);
c_current_graph = new CGraph (c_current_logfile.LogFileEntries);
//c_current_graph.YAxisCodeIndex = c_current_logfile.CLogFile_Get_Y_Axis_Code_Index (c_current_device);
c_current_graph.Title = selected_file;
c_current_graph.YAxisCode = "CURTEMP";
c_current_graph.YAxisLabel = "Current Temperature";
c_current_graph.XAxisLabel = "Time Stamp";
c_current_graph.CGRAPH_X_AxisData = c_current_logfile.LogFileTime;
c_current_graph.CGRAPH_Y_AxisData = c_current_logfile.LogFileTemps;
//Plot Graph
c_current_graph.ploy_zedgraph (out g_graph);
System.Drawing.Bitmap bmp_graph =
new System.Drawing.Bitmap (g_graph.Width, g_graph.Height);
g_graph.DrawToBitmap(bmp_graph,
new System.Drawing.Rectangle(0, 0, g_graph.Width, g_graph.Height));
bmp_graph.Save ("graph.bmp");
img_graph.ModifyBg (StateType.Normal, CUtil.get_light_grey ());
img_graph.ModifyBase (StateType.Normal, CUtil.get_light_grey ());
img_graph.File = "graph.bmp";
img_graph.QueueDraw ();
img_graph.ShowAll ();
/**
* Fill Alarms Table
*/
FillAlarmsTable (c_current_logfile.LogFileAlarms);
file_reader.Close ();
file_reader.Dispose ();
nbFrames.CurrentPage = (int)nb_Notebook_Pages.GRAPH;
}