using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; namespace WpfApp1 { /// /// Логика взаимодействия для MainWindow.xaml /// public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); } private void Button_Click(object sender, RoutedEventArgs e) { double x12 = 0; double xn2= 20; double deltaX2 = 2; double a = 3.9; result2_txt.Text = string.Format("{0,-10}{1}\n", "x", "y"); for (double x2 = x12; x2 <= xn2; x2 += deltaX2) { double y2 = Math.Sin(x2) * 1 / Math.Sqrt(a * Math.Pow(x2, 2)) + Math.Exp(x2); result2_txt.Text += string.Format("{0,-10:F2}{1:F6}\n", x2, y2); } } private void Button_Click_1(object sender, RoutedEventArgs e) { double x1 = 0; double xn = 20; double deltaX = 2; double a = 3.9; double x = x1; result_txt.Text = string.Format("{0,-10}{1}\n", "x", "y"); while (x <= xn) { double y = Math.Sin(x) * 1 / Math.Sqrt(a * Math.Pow(x, 2)) + Math.Exp(x); result_txt.Text += string.Format("{0,-10:F2}{1:F6}\n", x, y); x += deltaX; } } private void Button_Click_2(object sender, RoutedEventArgs e) { Discript a = new Discript(); this.Hide(); a.ShowDialog(); } private void Button_Click_3(object sender, RoutedEventArgs e) { System.Diagnostics.Process.Start(@"M:\Функция\WpfApp1\Folder\Справка.pdf"); } } }