1
0
This commit is contained in:
Debug_pro
2026-02-12 01:01:44 +03:00
commit 43d7845cf1
23 changed files with 1353 additions and 0 deletions

View File

@@ -0,0 +1,52 @@
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.Shapes;
namespace Lab
{
/// <summary>
/// Interaction logic for ArrayReverseWindow.xaml
/// </summary>
public partial class ArrayReverseWindow : Window
{
private void ClickBack(object sender, RoutedEventArgs e) => Close();
private void ClickClear(object sender, RoutedEventArgs e)
{
ArrayInBox.Clear();
ArrayOutBox.Clear();
ArrayInfoText.Text = "";
}
private void ClickReverse(object sender, RoutedEventArgs e)
{
ArrayOutBox.Clear();
ArrayInfoText.Text = "";
if (!Parsers.TryParseDoubleArray(ArrayInBox.Text, out double[] vals, out string err))
{
ArrayInfoText.Text = err;
return;
}
for(int i=0,j=vals.Length-1;i<j;i++,j--)(vals[i],vals[j])=(vals[j],vals[i]);
ArrayOutBox.Text = string.Join(", ", vals);
ArrayInfoText.Text = $"Готово. Длина массива: {vals.Length}.";
}
public ArrayReverseWindow()
{
InitializeComponent();
}
}
}