<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{10F57573-3782-4F08-B170-0082BFDD01DF}</ProjectGuid>
<OutputType>WinExe</OutputType>
<RootNamespace>FSA</RootNamespace>
<AssemblyName>FSA</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="MySql.Data, Version=8.0.29.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL" />
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Windows.Forms.DataVisualization" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Form1.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Form1.Designer.cs">
<DependentUpon>Form1.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="Form1.resx">
<DependentUpon>Form1.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
private async void button1_Click(object sender, EventArgs e)
{
try
{
using (var process = Process.Start(psi))
{
bool hasOutput, hasErrors;
do
{
string output = await process.StandardOutput.ReadLineAsync();
string errors = await process.StandardError.ReadLineAsync();
hasOutput = !(output is null);
hasErrors = !(errors is null);
if (hasOutput) richTextBox2.AppendText(output);
if (hasErrors) richTextBox2.AppendText(errors);
}
while (hasOutput || hasErrors);
}
}
catch (Exception eU)
{
// Сообщение о ошибке
MessageBox.Show(eU.Message);
// Информаци о ошибке
MessageBox.Show(eU.ToString());
}
}
private async void button1_Click(object sender, EventArgs e)
{
try
{
bool hasOutput, hasErrors;
string output = await process.StandardOutput.ReadLineAsync();
string errors = await process.StandardError.ReadLineAsync();
hasOutput = !(output is null);
hasErrors = !(errors is null);
if (hasOutput) richTextBox2.AppendText(output);
if (hasErrors) richTextBox2.AppendText(errors);
}
catch (Exception eU)
{
// Сообщение о ошибке
MessageBox.Show(eU.Message);
// Информаци о ошибке
MessageBox.Show(eU.ToString());
}
}
Feature 'nullable reference types' is not available in C# 7.3. Please use language version 8.0 or greater.
Next step 0
Next step 1
Next step 2
Next step 3
Next step 4
Next step 5
Next step 6
Next step 7
Next step 8
Next step 9
Next step 10
'The stream is currently in use by a previous operation on the stream.'
private void button1_Click(object sender, EventArgs e)
{
output = process.StandardOutput.ReadLineAsync().Result;
errors = process.StandardError.ReadLineAsync().Result;
richTextBox2.AppendText(errors);
richTextBox2.AppendText(output);
}