private void logsToolStripMenuItem_Click(object sender, EventArgs e) { FormLogs formlogs = new FormLogs(); pm.formlog = formlogs; formlogs.Show(); formlogs.DownLog(pm.logystring); }
private void initial() { //инициализация программы currentUser = Registry.CurrentUser; string path, balance; if (cmdargs != null) { path = cmdargs; } //если была комманда из cmd с параметром else { using (myProgramm = currentUser.CreateSubKey(registrPath)) { path = (string)myProgramm.GetValue("pathConfig"); }; } if (path != null) { textBoxFolderPath.Text = path; using (StreamReader filereaderStream = new StreamReader(textBoxFolderPath.Text)) { string lineCmd = filereaderStream.ReadLine(); if (lineCmd != null) { switch (lineCmd) { case "[AUTORUNHIDE]": { /// автозапуск с скрытием окна Hide = true; autostart(); } break; case "[AUTORUN]": { /// автозапуск autostart(); } break; case "[DEBUGAUTORUN]": { /// автозапуск pm.isDebug = true; FormLogs formlogs = new FormLogs(); pm.formlog = formlogs; formlogs.Show(); formlogs.DownLog(pm.logystring); autostart(); } break; } } }; } using (myProgramm = currentUser.CreateSubKey(registrPath)) { balance = (string)myProgramm.GetValue("pathBalance"); pathbalanceFile = (string)myProgramm.GetValue("pathBalanceFile"); }; if (balance != null) { textBoxBalance.Text = balance; pm.isBalanceUse = true; pm.balancefailPath = balance; } if (pathbalanceFile != null) { textBoxBalanceFile.Text = pathbalanceFile; } notifyIcon1.ContextMenuStrip = contextMenuStrip2; notifyIcon1.Visible = true; }