Skip to content

Commit 05fba78

Browse files
Add files via upload
1 parent 7c4608a commit 05fba78

File tree

6 files changed

+149
-0
lines changed

6 files changed

+149
-0
lines changed

DynamicStatus.sln

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio 15
4+
VisualStudioVersion = 15.0.28307.1758
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DynamicStatus", "DynamicStatus\DynamicStatus.csproj", "{946C7A82-6110-44B8-9C50-8C70069CA65F}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|Any CPU = Debug|Any CPU
11+
Release|Any CPU = Release|Any CPU
12+
EndGlobalSection
13+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14+
{946C7A82-6110-44B8-9C50-8C70069CA65F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{946C7A82-6110-44B8-9C50-8C70069CA65F}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{946C7A82-6110-44B8-9C50-8C70069CA65F}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{946C7A82-6110-44B8-9C50-8C70069CA65F}.Release|Any CPU.Build.0 = Release|Any CPU
18+
EndGlobalSection
19+
GlobalSection(SolutionProperties) = preSolution
20+
HideSolutionNode = FALSE
21+
EndGlobalSection
22+
GlobalSection(ExtensibilityGlobals) = postSolution
23+
SolutionGuid = {860AFBF0-E9FA-4EAD-AB9A-FB55B085B3EC}
24+
EndGlobalSection
25+
EndGlobal

DynamicStatus/DynamicStatus.csproj

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4+
<PropertyGroup>
5+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7+
<ProjectGuid>{946C7A82-6110-44B8-9C50-8C70069CA65F}</ProjectGuid>
8+
<OutputType>Exe</OutputType>
9+
<RootNamespace>DynamicStatus</RootNamespace>
10+
<AssemblyName>DynamicStatus</AssemblyName>
11+
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
12+
<FileAlignment>512</FileAlignment>
13+
<Deterministic>true</Deterministic>
14+
</PropertyGroup>
15+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
16+
<PlatformTarget>AnyCPU</PlatformTarget>
17+
<DebugSymbols>true</DebugSymbols>
18+
<DebugType>full</DebugType>
19+
<Optimize>false</Optimize>
20+
<OutputPath>bin\Debug\</OutputPath>
21+
<DefineConstants>DEBUG;TRACE</DefineConstants>
22+
<ErrorReport>prompt</ErrorReport>
23+
<WarningLevel>4</WarningLevel>
24+
</PropertyGroup>
25+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
26+
<PlatformTarget>AnyCPU</PlatformTarget>
27+
<DebugType>pdbonly</DebugType>
28+
<Optimize>true</Optimize>
29+
<OutputPath>bin\Release\</OutputPath>
30+
<DefineConstants>TRACE</DefineConstants>
31+
<ErrorReport>prompt</ErrorReport>
32+
<WarningLevel>4</WarningLevel>
33+
</PropertyGroup>
34+
<ItemGroup>
35+
<Reference Include="DeniedNetLib, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
36+
<SpecificVersion>False</SpecificVersion>
37+
<HintPath>bin\Debug\DeniedNetLib.dll</HintPath>
38+
</Reference>
39+
<Reference Include="System" />
40+
<Reference Include="System.Data" />
41+
<Reference Include="System.Xml" />
42+
</ItemGroup>
43+
<ItemGroup>
44+
<Compile Include="Program.cs" />
45+
<Compile Include="Properties\AssemblyInfo.cs" />
46+
</ItemGroup>
47+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
48+
</Project>

DynamicStatus/Program.cs

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
using System;
2+
using System.ComponentModel;
3+
using System.Threading;
4+
5+
namespace DynamicStatus
6+
{
7+
class Program
8+
{
9+
private static string token;
10+
private static BackgroundWorker worker = new BackgroundWorker();
11+
12+
static void Main()
13+
{
14+
worker.DoWork += worker_DoWork;
15+
worker.WorkerReportsProgress = true;
16+
worker.WorkerSupportsCancellation = true;
17+
worker.RunWorkerCompleted += worker_RunWorkerCompleted;
18+
19+
Console.WriteLine("Starting Application...");
20+
Console.WriteLine("Waiting for an authorization token...");
21+
token = Console.ReadLine();
22+
worker.RunWorkerAsync();
23+
Console.ReadKey();
24+
}
25+
26+
static void worker_DoWork(object sender, DoWorkEventArgs e)
27+
{
28+
Random random = new Random();
29+
int delay = random.Next(30, 60);
30+
Thread.Sleep(delay * 1000);
31+
32+
Console.WriteLine(Utils.Request(token));
33+
}
34+
35+
static void worker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
36+
{
37+
worker.RunWorkerAsync();
38+
}
39+
}
40+
}
+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
using System.Reflection;
2+
using System.Runtime.CompilerServices;
3+
using System.Runtime.InteropServices;
4+
5+
// Общие сведения об этой сборке предоставляются следующим набором
6+
// набора атрибутов. Измените значения этих атрибутов, чтобы изменить сведения,
7+
// связанные со сборкой.
8+
[assembly: AssemblyTitle("DynamicStatus")]
9+
[assembly: AssemblyDescription("")]
10+
[assembly: AssemblyConfiguration("")]
11+
[assembly: AssemblyCompany("")]
12+
[assembly: AssemblyProduct("DynamicStatus")]
13+
[assembly: AssemblyCopyright("Copyright © 2021")]
14+
[assembly: AssemblyTrademark("")]
15+
[assembly: AssemblyCulture("")]
16+
17+
// Установка значения False для параметра ComVisible делает типы в этой сборке невидимыми
18+
// для компонентов COM. Если необходимо обратиться к типу в этой сборке через
19+
// COM, задайте атрибуту ComVisible значение TRUE для этого типа.
20+
[assembly: ComVisible(false)]
21+
22+
// Следующий GUID служит для идентификации библиотеки типов, если этот проект будет видимым для COM
23+
[assembly: Guid("946c7a82-6110-44b8-9c50-8c70069ca65f")]
24+
25+
// Сведения о версии сборки состоят из следующих четырех значений:
26+
//
27+
// Основной номер версии
28+
// Дополнительный номер версии
29+
// Номер сборки
30+
// Редакция
31+
//
32+
// Можно задать все значения или принять номер сборки и номер редакции по умолчанию.
33+
// используя "*", как показано ниже:
34+
// [assembly: AssemblyVersion("1.0.*")]
35+
[assembly: AssemblyVersion("1.0.0.0")]
36+
[assembly: AssemblyFileVersion("1.0.0.0")]
5.5 KB
Binary file not shown.
5.5 KB
Binary file not shown.

0 commit comments

Comments
 (0)