Skip to content

Commit

Permalink
Добавьте файлы проекта.
Browse files Browse the repository at this point in the history
  • Loading branch information
ksasef committed Mar 15, 2022
1 parent 513cfe6 commit 196a96a
Show file tree
Hide file tree
Showing 15 changed files with 1,014 additions and 0 deletions.
25 changes: 25 additions & 0 deletions yobit software.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.32126.315
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "yobit software", "yobit software\yobit software.csproj", "{170D3E73-0BD2-4A25-A04E-F52AFD0D1B05}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{170D3E73-0BD2-4A25-A04E-F52AFD0D1B05}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{170D3E73-0BD2-4A25-A04E-F52AFD0D1B05}.Debug|Any CPU.Build.0 = Debug|Any CPU
{170D3E73-0BD2-4A25-A04E-F52AFD0D1B05}.Release|Any CPU.ActiveCfg = Release|Any CPU
{170D3E73-0BD2-4A25-A04E-F52AFD0D1B05}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {5A03309A-0B94-4B42-9502-4C3F2DC1038C}
EndGlobalSection
EndGlobal
6 changes: 6 additions & 0 deletions yobit software/App.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
</configuration>
137 changes: 137 additions & 0 deletions yobit software/Form1.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

124 changes: 124 additions & 0 deletions yobit software/Form1.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace yobit_software
{
public partial class Form1 : Form
{
ToolStripLabel info_label_text;
int instrumenty_kol_yobit = 0;
string[,] instrumenty_yobit_array = new string[200, 500000];
Random rgb_yobit = new Random();
string[,] graph_yobit = new string[4000, 2000];
int[,] message_array_color = new int[400, 400];

float graph_massht_yobit = 0;
Bitmap bmp_yobit = new Bitmap(1000, 1000);
Graphics g;
byte graph = 0;

public Form1()
{
InitializeComponent();
}

private void Form1_Load(object sender, EventArgs e)
{
dataGridView_edit();
WebSocket_start();
}

private void time_step_timer_yobit_Tick(object sender, EventArgs e)
{
{
time_step_timer_yobit.Interval = Convert.ToInt32(time_step_yobit.Text);
for (int n = 1; n <= instrumenty_kol_yobit; n++)
{
for (int k = 0; k < 1000; k++)
{
graph_yobit[n, k] = graph_yobit[n, k + 1]; graph_yobit[n, k + 1] = null;
}
}
try
{
if (graph == 0)
{
g = Graphics.FromImage(bmp_yobit);
g.Clear(Color.White);
g.DrawLine(new Pen(Color.FromArgb(230, 230, 230)), 0, pictureBox_yobit.Height / 2, pictureBox_yobit.Width, pictureBox_yobit.Height / 2);
for (int n = 1; n <= instrumenty_kol_yobit; n++)
{
if (instrumenty_yobit_array[n, 1] == "1")
{
int pred = 0; float znach = 0;
for (int k = 0; k <= 1000; k++)
{
if (graph_yobit[n, k] != null)
{
if (pred == 0)
{
pred = k; znach = Convert.ToSingle(graph_yobit[n, k].ToString().Replace(".", ","));
}
else
{
g.DrawLine(new Pen(Color.FromArgb(Convert.ToInt32(instrumenty_yobit_array[n, 6]), Convert.ToInt32(instrumenty_yobit_array[n, 7]), Convert.ToInt32(instrumenty_yobit_array[n, 8]))),
(pred + 2),
pictureBox_yobit.Height / 2 - znach * graph_massht_yobit,
(k + 2),
pictureBox_yobit.Height / 2 - Convert.ToSingle(graph_yobit[n, k].ToString().Replace(".", ",")) * graph_massht_yobit);
pred = k; znach = Convert.ToSingle(graph_yobit[n, k].ToString().Replace(".", ","));
}
g.DrawLine(new Pen(Color.FromArgb(Convert.ToInt32(instrumenty_yobit_array[n, 6]), Convert.ToInt32(instrumenty_yobit_array[n, 7]), Convert.ToInt32(instrumenty_yobit_array[n, 8]))),
(k + 2) - 1,
pictureBox_yobit.Height / 2 - Convert.ToSingle(graph_yobit[n, k].ToString().Replace(".", ",")) * graph_massht_yobit - 1,
(k + 2) + 1,
pictureBox_yobit.Height / 2 - Convert.ToSingle(graph_yobit[n, k].ToString().Replace(".", ",")) * graph_massht_yobit + 1);
g.DrawLine(new Pen(Color.FromArgb(Convert.ToInt32(instrumenty_yobit_array[n, 6]), Convert.ToInt32(instrumenty_yobit_array[n, 7]), Convert.ToInt32(instrumenty_yobit_array[n, 8]))),
(k + 2) + 1,
pictureBox_yobit.Height / 2 - Convert.ToSingle(graph_yobit[n, k].ToString().Replace(".", ",")) * graph_massht_yobit - 1,
(k + 2) - 1,
pictureBox_yobit.Height / 2 - Convert.ToSingle(graph_yobit[n, k].ToString().Replace(".", ",")) * graph_massht_yobit + 1);
}
}
}
}
pictureBox_yobit.Image = bmp_yobit;
}
}
catch (Exception ex)
{
Console.WriteLine(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff") + " error graph:" + ex);
}
}
}

private void proc_yobit_TextChanged(object sender, EventArgs e)
{
graph_massht_yobit = pictureBox_yobit.Height / Convert.ToSingle(proc_yobit.Text) / 2;
}

private void dataGridView_yobit_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e)
{
System.Diagnostics.Process.Start("chrome.exe", "https://yobit.io/ru/trade/" + dataGridView_yobit.Rows[e.RowIndex].Cells["name"].EditedFormattedValue.ToString());
}
}


public class dataGridView_yobit : DataGridView
{
public dataGridView_yobit()
{
this.DoubleBuffered = true;
this.SetStyle(ControlStyles.DoubleBuffer |
ControlStyles.UserPaint | ControlStyles.AllPaintingInWmPaint, true);
this.UpdateStyles();
}
}
}
Loading

0 comments on commit 196a96a

Please sign in to comment.