コード例 #1
0
ファイル: MainWindow.cs プロジェクト: Azmalent/itmo3
    private void updatePlot()
    {
        try
        {
            var    func  = FunctionParser.CreateFunction(entry2.Text);
            double x0    = spinbutton3.Value;
            double h     = spinbutton4.Value;
            int    count = (int)spinbutton5.Value;

            drawPlot(func, x0, h, count);
        }
        catch (Exception e)
        {
            var dialog = new MessageDialog(this,
                                           DialogFlags.DestroyWithParent,
                                           MessageType.Error,
                                           ButtonsType.Close,
                                           e.Message);
            dialog.Title = "Ошибка";
            dialog.Run();
            dialog.Destroy();
        }
    }