當前位置: 首頁>>代碼示例>>C#>>正文


C# ZedGraphControl.DrawToBitmap方法代碼示例

本文整理匯總了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;
    }
開發者ID:johnnyrequiem,項目名稱:SubZeroViewer2,代碼行數:56,代碼來源:MainWindow.cs


注:本文中的ZedGraph.ZedGraphControl.DrawToBitmap方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。