private void Form1_Load(object sender, EventArgs e) { Settings.Load(); BinanceAPI.Init(); trades.Load(); ParseBinanceStreamOrders(); CalcBalances(); trades.Save(); Task task = new Task(GetHistories); task.Start(); dataGridView1.DataSource = trades; dataGridView2.DataSource = balances; dataGridView1.ColumnHeaderMouseClick += DataGridView_ColumnHeaderMouseClick; dataGridView2.ColumnHeaderMouseClick += DataGridView_ColumnHeaderMouseClick; scopeView1.DataSource = scopeController1; markerView1.DataSource = scopeController1; traceView1.DataSource = scopeController1; scopeView2.DataSource = scopeController2; markerView2.DataSource = scopeController2; traceView2.DataSource = scopeController2; scopeView3.DataSource = scopeController3; markerView3.DataSource = scopeController3; traceView3.DataSource = scopeController3; }
void Save(string filePath) { using (FileStream zipToOpen = new FileStream(filePath, FileMode.Create)) { using (ZipArchive archive = new ZipArchive(zipToOpen, ZipArchiveMode.Update)) { pageSettings.Save(archive.CreateEntry("pageSettings.json").Open()); labelItems.Save(archive.CreateEntry("labelItems.json").Open()); } } openedFile = filePath; this.Text = filePath; }