add projects
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 13s

This commit is contained in:
2026-03-18 15:37:59 +03:00
parent ed55e77e98
commit bf51924adb
158 changed files with 82479 additions and 1 deletions
+14
View File
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
</startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
+633
View File
@@ -0,0 +1,633 @@
namespace LC_ConfigCamer
{
partial class Form1
{
/// <summary>
/// Обязательная переменная конструктора.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Освободить все используемые ресурсы.
/// </summary>
/// <param name="disposing">истинно, если управляемый ресурс должен быть удален; иначе ложно.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Код, автоматически созданный конструктором форм Windows
/// <summary>
/// Требуемый метод для поддержки конструктора — не изменяйте
/// содержимое этого метода с помощью редактора кода.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
this.tabControl1 = new System.Windows.Forms.TabControl();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.groupBox4 = new System.Windows.Forms.GroupBox();
this.btn_check_params = new System.Windows.Forms.Button();
this.btn_start = new System.Windows.Forms.Button();
this.tb_log = new System.Windows.Forms.TextBox();
this.groupBox3 = new System.Windows.Forms.GroupBox();
this.lbl_valid_new_pass = new System.Windows.Forms.Label();
this.tb_new_pass = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.label3 = new System.Windows.Forms.Label();
this.tb_list_old_pass = new System.Windows.Forms.TextBox();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.label2 = new System.Windows.Forms.Label();
this.lbl_count_cams_in_list = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.btn_opent_file = new System.Windows.Forms.Button();
this.tabPage2 = new System.Windows.Forms.TabPage();
this.groupBox9 = new System.Windows.Forms.GroupBox();
this.btn_check_params1 = new System.Windows.Forms.Button();
this.btn_start1 = new System.Windows.Forms.Button();
this.textBox2 = new System.Windows.Forms.TextBox();
this.groupBox8 = new System.Windows.Forms.GroupBox();
this.label10 = new System.Windows.Forms.Label();
this.tb_pass = new System.Windows.Forms.TextBox();
this.groupBox7 = new System.Windows.Forms.GroupBox();
this.rb_Conn_Ssh = new System.Windows.Forms.RadioButton();
this.rb_Conn_Web = new System.Windows.Forms.RadioButton();
this.label9 = new System.Windows.Forms.Label();
this.groupBox6 = new System.Windows.Forms.GroupBox();
this.rb_SetSync_Time = new System.Windows.Forms.RadioButton();
this.rb_GetCheck_Time = new System.Windows.Forms.RadioButton();
this.label8 = new System.Windows.Forms.Label();
this.groupBox5 = new System.Windows.Forms.GroupBox();
this.label5 = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
this.label7 = new System.Windows.Forms.Label();
this.btn_opent_file1 = new System.Windows.Forms.Button();
this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
this.tabControl1.SuspendLayout();
this.tabPage1.SuspendLayout();
this.groupBox4.SuspendLayout();
this.groupBox3.SuspendLayout();
this.groupBox2.SuspendLayout();
this.groupBox1.SuspendLayout();
this.tabPage2.SuspendLayout();
this.groupBox9.SuspendLayout();
this.groupBox8.SuspendLayout();
this.groupBox7.SuspendLayout();
this.groupBox6.SuspendLayout();
this.groupBox5.SuspendLayout();
this.SuspendLayout();
//
// tabControl1
//
this.tabControl1.Controls.Add(this.tabPage1);
this.tabControl1.Controls.Add(this.tabPage2);
this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tabControl1.Location = new System.Drawing.Point(0, 0);
this.tabControl1.Margin = new System.Windows.Forms.Padding(4);
this.tabControl1.Name = "tabControl1";
this.tabControl1.SelectedIndex = 0;
this.tabControl1.Size = new System.Drawing.Size(1051, 528);
this.tabControl1.TabIndex = 0;
//
// tabPage1
//
this.tabPage1.Controls.Add(this.groupBox4);
this.tabPage1.Controls.Add(this.groupBox3);
this.tabPage1.Controls.Add(this.groupBox2);
this.tabPage1.Controls.Add(this.groupBox1);
this.tabPage1.Location = new System.Drawing.Point(4, 25);
this.tabPage1.Margin = new System.Windows.Forms.Padding(4);
this.tabPage1.Name = "tabPage1";
this.tabPage1.Padding = new System.Windows.Forms.Padding(4);
this.tabPage1.Size = new System.Drawing.Size(1043, 499);
this.tabPage1.TabIndex = 0;
this.tabPage1.Text = "ПАРОЛЬ";
this.tabPage1.UseVisualStyleBackColor = true;
//
// groupBox4
//
this.groupBox4.Controls.Add(this.btn_check_params);
this.groupBox4.Controls.Add(this.btn_start);
this.groupBox4.Controls.Add(this.tb_log);
this.groupBox4.Location = new System.Drawing.Point(471, 9);
this.groupBox4.Margin = new System.Windows.Forms.Padding(4);
this.groupBox4.Name = "groupBox4";
this.groupBox4.Padding = new System.Windows.Forms.Padding(4);
this.groupBox4.Size = new System.Drawing.Size(557, 471);
this.groupBox4.TabIndex = 3;
this.groupBox4.TabStop = false;
this.groupBox4.Text = "Ход операций";
//
// btn_check_params
//
this.btn_check_params.Enabled = false;
this.btn_check_params.Location = new System.Drawing.Point(8, 423);
this.btn_check_params.Margin = new System.Windows.Forms.Padding(4);
this.btn_check_params.Name = "btn_check_params";
this.btn_check_params.Size = new System.Drawing.Size(239, 41);
this.btn_check_params.TabIndex = 2;
this.btn_check_params.Text = "Проверить параметры";
this.btn_check_params.UseVisualStyleBackColor = true;
this.btn_check_params.Click += new System.EventHandler(this.btn_check_params_Click);
//
// btn_start
//
this.btn_start.Enabled = false;
this.btn_start.Location = new System.Drawing.Point(311, 423);
this.btn_start.Margin = new System.Windows.Forms.Padding(4);
this.btn_start.Name = "btn_start";
this.btn_start.Size = new System.Drawing.Size(239, 41);
this.btn_start.TabIndex = 1;
this.btn_start.Text = "Запуск процесса";
this.btn_start.UseVisualStyleBackColor = true;
this.btn_start.Click += new System.EventHandler(this.btn_start_Click);
//
// tb_log
//
this.tb_log.Location = new System.Drawing.Point(8, 25);
this.tb_log.Margin = new System.Windows.Forms.Padding(4);
this.tb_log.Multiline = true;
this.tb_log.Name = "tb_log";
this.tb_log.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
this.tb_log.Size = new System.Drawing.Size(540, 390);
this.tb_log.TabIndex = 0;
//
// groupBox3
//
this.groupBox3.Controls.Add(this.lbl_valid_new_pass);
this.groupBox3.Controls.Add(this.tb_new_pass);
this.groupBox3.Controls.Add(this.label4);
this.groupBox3.Enabled = false;
this.groupBox3.Location = new System.Drawing.Point(11, 327);
this.groupBox3.Margin = new System.Windows.Forms.Padding(4);
this.groupBox3.Name = "groupBox3";
this.groupBox3.Padding = new System.Windows.Forms.Padding(4);
this.groupBox3.Size = new System.Drawing.Size(451, 153);
this.groupBox3.TabIndex = 2;
this.groupBox3.TabStop = false;
this.groupBox3.Text = "Новый пароль";
//
// lbl_valid_new_pass
//
this.lbl_valid_new_pass.AutoSize = true;
this.lbl_valid_new_pass.ForeColor = System.Drawing.Color.Green;
this.lbl_valid_new_pass.Location = new System.Drawing.Point(197, 101);
this.lbl_valid_new_pass.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lbl_valid_new_pass.Name = "lbl_valid_new_pass";
this.lbl_valid_new_pass.Size = new System.Drawing.Size(0, 16);
this.lbl_valid_new_pass.TabIndex = 2;
//
// tb_new_pass
//
this.tb_new_pass.Location = new System.Drawing.Point(8, 121);
this.tb_new_pass.Margin = new System.Windows.Forms.Padding(4);
this.tb_new_pass.Name = "tb_new_pass";
this.tb_new_pass.Size = new System.Drawing.Size(433, 22);
this.tb_new_pass.TabIndex = 1;
this.tb_new_pass.TextChanged += new System.EventHandler(this.tb_new_pass_TextChanged);
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(12, 25);
this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(406, 64);
this.label4.TabIndex = 0;
this.label4.Text = "Введите новый пароль для камеры. Пароль должен состоять,\r\nминимум, из 8 знаков. Д" +
"олжны присутствовать большие и\r\nмаленьки буквы, цифры, спецыальные знаки.\r\nНе до" +
"пустимы точки, запятые и пробелы.";
//
// groupBox2
//
this.groupBox2.Controls.Add(this.label3);
this.groupBox2.Controls.Add(this.tb_list_old_pass);
this.groupBox2.Enabled = false;
this.groupBox2.Location = new System.Drawing.Point(11, 168);
this.groupBox2.Margin = new System.Windows.Forms.Padding(4);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Padding = new System.Windows.Forms.Padding(4);
this.groupBox2.Size = new System.Drawing.Size(451, 153);
this.groupBox2.TabIndex = 1;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "Пароли для входа";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(8, 20);
this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(388, 64);
this.label3.TabIndex = 1;
this.label3.Text = "Введите пароль, который используются в камерах из\r\nсписка. Перед паролем и после " +
"не должно быть пробелов.\r\n\r\nПроверьте, чтоб не было пой строки.";
//
// tb_list_old_pass
//
this.tb_list_old_pass.Location = new System.Drawing.Point(8, 121);
this.tb_list_old_pass.Margin = new System.Windows.Forms.Padding(4);
this.tb_list_old_pass.Name = "tb_list_old_pass";
this.tb_list_old_pass.ScrollBars = System.Windows.Forms.ScrollBars.Both;
this.tb_list_old_pass.Size = new System.Drawing.Size(433, 22);
this.tb_list_old_pass.TabIndex = 0;
this.tb_list_old_pass.TextChanged += new System.EventHandler(this.tb_list_old_pass_TextChanged);
//
// groupBox1
//
this.groupBox1.Controls.Add(this.label2);
this.groupBox1.Controls.Add(this.lbl_count_cams_in_list);
this.groupBox1.Controls.Add(this.label1);
this.groupBox1.Controls.Add(this.btn_opent_file);
this.groupBox1.Location = new System.Drawing.Point(11, 7);
this.groupBox1.Margin = new System.Windows.Forms.Padding(4);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Padding = new System.Windows.Forms.Padding(4);
this.groupBox1.Size = new System.Drawing.Size(452, 153);
this.groupBox1.TabIndex = 0;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "Список камер";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(9, 25);
this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(390, 64);
this.label2.TabIndex = 3;
this.label2.Text = resources.GetString("label2.Text");
//
// lbl_count_cams_in_list
//
this.lbl_count_cams_in_list.AutoSize = true;
this.lbl_count_cams_in_list.Location = new System.Drawing.Point(349, 122);
this.lbl_count_cams_in_list.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lbl_count_cams_in_list.Name = "lbl_count_cams_in_list";
this.lbl_count_cams_in_list.Size = new System.Drawing.Size(14, 16);
this.lbl_count_cams_in_list.TabIndex = 2;
this.lbl_count_cams_in_list.Text = "0";
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(119, 122);
this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(209, 16);
this.label1.TabIndex = 1;
this.label1.Text = "Количество выбранных камер: ";
//
// btn_opent_file
//
this.btn_opent_file.Location = new System.Drawing.Point(8, 116);
this.btn_opent_file.Margin = new System.Windows.Forms.Padding(4);
this.btn_opent_file.Name = "btn_opent_file";
this.btn_opent_file.Size = new System.Drawing.Size(100, 28);
this.btn_opent_file.TabIndex = 0;
this.btn_opent_file.Text = "... ОБЗОР";
this.btn_opent_file.UseVisualStyleBackColor = true;
this.btn_opent_file.Click += new System.EventHandler(this.btn_opent_file_Click);
//
// tabPage2
//
this.tabPage2.Controls.Add(this.groupBox9);
this.tabPage2.Controls.Add(this.groupBox8);
this.tabPage2.Controls.Add(this.groupBox7);
this.tabPage2.Controls.Add(this.groupBox6);
this.tabPage2.Controls.Add(this.groupBox5);
this.tabPage2.Location = new System.Drawing.Point(4, 25);
this.tabPage2.Margin = new System.Windows.Forms.Padding(4);
this.tabPage2.Name = "tabPage2";
this.tabPage2.Padding = new System.Windows.Forms.Padding(4);
this.tabPage2.Size = new System.Drawing.Size(1043, 499);
this.tabPage2.TabIndex = 1;
this.tabPage2.Text = "ВРЕМЯ";
this.tabPage2.UseVisualStyleBackColor = true;
//
// groupBox9
//
this.groupBox9.Controls.Add(this.btn_check_params1);
this.groupBox9.Controls.Add(this.btn_start1);
this.groupBox9.Controls.Add(this.textBox2);
this.groupBox9.Location = new System.Drawing.Point(427, 8);
this.groupBox9.Margin = new System.Windows.Forms.Padding(4);
this.groupBox9.Name = "groupBox9";
this.groupBox9.Padding = new System.Windows.Forms.Padding(4);
this.groupBox9.Size = new System.Drawing.Size(557, 482);
this.groupBox9.TabIndex = 6;
this.groupBox9.TabStop = false;
this.groupBox9.Text = "Ход операций";
//
// btn_check_params1
//
this.btn_check_params1.Enabled = false;
this.btn_check_params1.Location = new System.Drawing.Point(8, 433);
this.btn_check_params1.Margin = new System.Windows.Forms.Padding(4);
this.btn_check_params1.Name = "btn_check_params1";
this.btn_check_params1.Size = new System.Drawing.Size(239, 41);
this.btn_check_params1.TabIndex = 2;
this.btn_check_params1.Text = "Проверить параметры";
this.btn_check_params1.UseVisualStyleBackColor = true;
this.btn_check_params1.Click += new System.EventHandler(this.btn_check_params1_Click);
//
// btn_start1
//
this.btn_start1.Enabled = false;
this.btn_start1.Location = new System.Drawing.Point(309, 433);
this.btn_start1.Margin = new System.Windows.Forms.Padding(4);
this.btn_start1.Name = "btn_start1";
this.btn_start1.Size = new System.Drawing.Size(239, 41);
this.btn_start1.TabIndex = 1;
this.btn_start1.Text = "Запуск процесса";
this.btn_start1.UseVisualStyleBackColor = true;
//
// textBox2
//
this.textBox2.Location = new System.Drawing.Point(8, 25);
this.textBox2.Margin = new System.Windows.Forms.Padding(4);
this.textBox2.Multiline = true;
this.textBox2.Name = "textBox2";
this.textBox2.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
this.textBox2.Size = new System.Drawing.Size(540, 400);
this.textBox2.TabIndex = 0;
//
// groupBox8
//
this.groupBox8.Controls.Add(this.label10);
this.groupBox8.Controls.Add(this.tb_pass);
this.groupBox8.Enabled = false;
this.groupBox8.Location = new System.Drawing.Point(9, 407);
this.groupBox8.Margin = new System.Windows.Forms.Padding(4);
this.groupBox8.Name = "groupBox8";
this.groupBox8.Padding = new System.Windows.Forms.Padding(4);
this.groupBox8.Size = new System.Drawing.Size(410, 83);
this.groupBox8.TabIndex = 5;
this.groupBox8.TabStop = false;
this.groupBox8.Text = "Пароли для входа";
//
// label10
//
this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(8, 20);
this.label10.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(187, 16);
this.label10.TabIndex = 1;
this.label10.Text = "Введите пароль к УЗ admin.";
//
// tb_pass
//
this.tb_pass.Location = new System.Drawing.Point(8, 53);
this.tb_pass.Margin = new System.Windows.Forms.Padding(4);
this.tb_pass.Name = "tb_pass";
this.tb_pass.ScrollBars = System.Windows.Forms.ScrollBars.Both;
this.tb_pass.Size = new System.Drawing.Size(361, 22);
this.tb_pass.TabIndex = 0;
//
// groupBox7
//
this.groupBox7.Controls.Add(this.rb_Conn_Ssh);
this.groupBox7.Controls.Add(this.rb_Conn_Web);
this.groupBox7.Controls.Add(this.label9);
this.groupBox7.Enabled = false;
this.groupBox7.Location = new System.Drawing.Point(9, 260);
this.groupBox7.Margin = new System.Windows.Forms.Padding(4);
this.groupBox7.Name = "groupBox7";
this.groupBox7.Padding = new System.Windows.Forms.Padding(4);
this.groupBox7.Size = new System.Drawing.Size(410, 139);
this.groupBox7.TabIndex = 4;
this.groupBox7.TabStop = false;
this.groupBox7.Text = "Подключение";
//
// rb_Conn_Ssh
//
this.rb_Conn_Ssh.AutoSize = true;
this.rb_Conn_Ssh.Location = new System.Drawing.Point(7, 109);
this.rb_Conn_Ssh.Name = "rb_Conn_Ssh";
this.rb_Conn_Ssh.Size = new System.Drawing.Size(56, 20);
this.rb_Conn_Ssh.TabIndex = 3;
this.rb_Conn_Ssh.Text = "SSH";
this.rb_Conn_Ssh.UseVisualStyleBackColor = true;
//
// rb_Conn_Web
//
this.rb_Conn_Web.AutoSize = true;
this.rb_Conn_Web.Checked = true;
this.rb_Conn_Web.Location = new System.Drawing.Point(7, 83);
this.rb_Conn_Web.Name = "rb_Conn_Web";
this.rb_Conn_Web.Size = new System.Drawing.Size(136, 20);
this.rb_Conn_Web.TabIndex = 2;
this.rb_Conn_Web.TabStop = true;
this.rb_Conn_Web.Text = "WEB-интерфейс";
this.rb_Conn_Web.UseVisualStyleBackColor = true;
//
// label9
//
this.label9.AutoSize = true;
this.label9.Location = new System.Drawing.Point(8, 20);
this.label9.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(288, 48);
this.label9.TabIndex = 1;
this.label9.Text = "Как производить подключение?\r\n(у камер и DVR HikVision не рекомендуется\r\nиспользо" +
"вать SSH)";
//
// groupBox6
//
this.groupBox6.Controls.Add(this.rb_SetSync_Time);
this.groupBox6.Controls.Add(this.rb_GetCheck_Time);
this.groupBox6.Controls.Add(this.label8);
this.groupBox6.Enabled = false;
this.groupBox6.Location = new System.Drawing.Point(9, 150);
this.groupBox6.Margin = new System.Windows.Forms.Padding(4);
this.groupBox6.Name = "groupBox6";
this.groupBox6.Padding = new System.Windows.Forms.Padding(4);
this.groupBox6.Size = new System.Drawing.Size(410, 102);
this.groupBox6.TabIndex = 2;
this.groupBox6.TabStop = false;
this.groupBox6.Text = "Параметр";
//
// rb_SetSync_Time
//
this.rb_SetSync_Time.AutoSize = true;
this.rb_SetSync_Time.Location = new System.Drawing.Point(7, 69);
this.rb_SetSync_Time.Name = "rb_SetSync_Time";
this.rb_SetSync_Time.Size = new System.Drawing.Size(240, 20);
this.rb_SetSync_Time.TabIndex = 3;
this.rb_SetSync_Time.TabStop = true;
this.rb_SetSync_Time.Text = "Установить / Синхронизировать";
this.rb_SetSync_Time.UseVisualStyleBackColor = true;
//
// rb_GetCheck_Time
//
this.rb_GetCheck_Time.AutoSize = true;
this.rb_GetCheck_Time.Checked = true;
this.rb_GetCheck_Time.Location = new System.Drawing.Point(7, 43);
this.rb_GetCheck_Time.Name = "rb_GetCheck_Time";
this.rb_GetCheck_Time.Size = new System.Drawing.Size(174, 20);
this.rb_GetCheck_Time.TabIndex = 2;
this.rb_GetCheck_Time.TabStop = true;
this.rb_GetCheck_Time.Text = "Получить / Проверить";
this.rb_GetCheck_Time.UseVisualStyleBackColor = true;
//
// label8
//
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(8, 20);
this.label8.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(173, 16);
this.label8.TabIndex = 1;
this.label8.Text = "Что сделать с временем?";
//
// groupBox5
//
this.groupBox5.Controls.Add(this.label5);
this.groupBox5.Controls.Add(this.label6);
this.groupBox5.Controls.Add(this.label7);
this.groupBox5.Controls.Add(this.btn_opent_file1);
this.groupBox5.Location = new System.Drawing.Point(9, 8);
this.groupBox5.Margin = new System.Windows.Forms.Padding(4);
this.groupBox5.Name = "groupBox5";
this.groupBox5.Padding = new System.Windows.Forms.Padding(4);
this.groupBox5.Size = new System.Drawing.Size(410, 134);
this.groupBox5.TabIndex = 1;
this.groupBox5.TabStop = false;
this.groupBox5.Text = "Список камер";
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(9, 25);
this.label5.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(390, 64);
this.label5.TabIndex = 3;
this.label5.Text = resources.GetString("label5.Text");
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(333, 105);
this.label6.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(14, 16);
this.label6.TabIndex = 2;
this.label6.Text = "0";
//
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(116, 105);
this.label7.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(209, 16);
this.label7.TabIndex = 1;
this.label7.Text = "Количество выбранных камер: ";
//
// btn_opent_file1
//
this.btn_opent_file1.Location = new System.Drawing.Point(11, 99);
this.btn_opent_file1.Margin = new System.Windows.Forms.Padding(4);
this.btn_opent_file1.Name = "btn_opent_file1";
this.btn_opent_file1.Size = new System.Drawing.Size(100, 28);
this.btn_opent_file1.TabIndex = 0;
this.btn_opent_file1.Text = "... ОБЗОР";
this.btn_opent_file1.UseVisualStyleBackColor = true;
this.btn_opent_file1.Click += new System.EventHandler(this.btn_opent_file_Click);
//
// openFileDialog1
//
this.openFileDialog1.FileName = "list_cam.csv";
this.openFileDialog1.Filter = "CSV файл|*.csv";
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(841, 422);
this.Controls.Add(this.tabControl1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Margin = new System.Windows.Forms.Padding(4);
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "Form1";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "НАСТРАИВАТЕЛЬ | ver. 0.0.1";
this.tabControl1.ResumeLayout(false);
this.tabPage1.ResumeLayout(false);
this.groupBox4.ResumeLayout(false);
this.groupBox4.PerformLayout();
this.groupBox3.ResumeLayout(false);
this.groupBox3.PerformLayout();
this.groupBox2.ResumeLayout(false);
this.groupBox2.PerformLayout();
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.tabPage2.ResumeLayout(false);
this.groupBox9.ResumeLayout(false);
this.groupBox9.PerformLayout();
this.groupBox8.ResumeLayout(false);
this.groupBox8.PerformLayout();
this.groupBox7.ResumeLayout(false);
this.groupBox7.PerformLayout();
this.groupBox6.ResumeLayout(false);
this.groupBox6.PerformLayout();
this.groupBox5.ResumeLayout(false);
this.groupBox5.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.TabControl tabControl1;
private System.Windows.Forms.TabPage tabPage1;
private System.Windows.Forms.TabPage tabPage2;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Button btn_opent_file;
private System.Windows.Forms.OpenFileDialog openFileDialog1;
private System.Windows.Forms.Label lbl_count_cams_in_list;
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.TextBox tb_list_old_pass;
private System.Windows.Forms.GroupBox groupBox3;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.GroupBox groupBox4;
private System.Windows.Forms.TextBox tb_new_pass;
private System.Windows.Forms.Button btn_check_params;
private System.Windows.Forms.Button btn_start;
private System.Windows.Forms.Label lbl_valid_new_pass;
public System.Windows.Forms.TextBox tb_log;
private System.Windows.Forms.GroupBox groupBox6;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.GroupBox groupBox5;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.Button btn_opent_file1;
private System.Windows.Forms.GroupBox groupBox7;
private System.Windows.Forms.RadioButton rb_Conn_Ssh;
private System.Windows.Forms.RadioButton rb_Conn_Web;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.RadioButton rb_SetSync_Time;
private System.Windows.Forms.RadioButton rb_GetCheck_Time;
private System.Windows.Forms.GroupBox groupBox8;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.TextBox tb_pass;
private System.Windows.Forms.GroupBox groupBox9;
private System.Windows.Forms.Button btn_check_params1;
private System.Windows.Forms.Button btn_start1;
public System.Windows.Forms.TextBox textBox2;
}
}
+128
View File
@@ -0,0 +1,128 @@
using System;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace LC_ConfigCamer
{
public partial class Form1 : Form
{
public static string[] arr_ip;
public static string old_pass, new_pass;
public static TextBox tb;
public static bool Web_Conn = true, GetOrCheck = true;
public Form1()
{
InitializeComponent();
tb = tb_log;
#if DEBUG
tb_list_old_pass.Text = "vg5-_kcc";
tb_new_pass.Text = "vg5-_kcc";
var a1 = Environment.CurrentDirectory;
System.Windows.Forms.MessageBox.Show(a1);
#endif
}
private void btn_opent_file_Click(object sender, EventArgs e)
{
Array.Clear(arr_ip, 0, arr_ip.Length);
if (openFileDialog1.ShowDialog() == DialogResult.Cancel)
return;
string filename = openFileDialog1.FileName;
var fileStream = openFileDialog1.OpenFile();
var fileText = string.Empty;
using (StreamReader reader = new StreamReader(fileStream))
{
fileText = reader.ReadToEnd();
}
arr_ip = fileText.Replace("\r", "").Split('\n');// new char[] { '\r', '\n' });
lbl_count_cams_in_list.Text = arr_ip.Count().ToString();
Log_add($"Получен список ip. {arr_ip.Count()} шт.");
groupBox2.Enabled = true;
}
private void tb_list_old_pass_TextChanged(object sender, EventArgs e)
{
groupBox3.Enabled = true;
}
private void tb_new_pass_TextChanged(object sender, EventArgs e)
{
if (tb_new_pass.Text.Length < 8)
{
lbl_valid_new_pass.Text = "ПЛОХОЙ ПАРОЛЬ";
lbl_valid_new_pass.ForeColor = System.Drawing.Color.Crimson;
btn_check_params.Enabled = false;
}
else
{
lbl_valid_new_pass.Text = "ОК";
lbl_valid_new_pass.ForeColor = System.Drawing.Color.Green;
btn_check_params.Enabled = true;
}
}
private void btn_check_params_Click(object sender, EventArgs e)
{
try
{
old_pass = tb_list_old_pass.Text;
new_pass = tb_new_pass.Text;
btn_start.Enabled = true;
Log_add($"Получен старый пароль: {old_pass}");
Log_add($"Получен новый пароль: {new_pass}");
}
catch (Exception)
{
MessageBox.Show("Что-то не так! Перепроверь все!");
}
}
private void btn_start_Click(object sender, EventArgs e)
{
var Set_New_Pass = new Selenium_Work(arr_ip, old_pass, new_pass);
Set_New_Pass.Start();
}
private void btn_check_params1_Click(object sender, EventArgs e)
{
try
{
new_pass = tb_new_pass.Text;
btn_start.Enabled = true;
Log_add($"Получен новый пароль: {new_pass}");
if(rb_Conn_Ssh.Checked) Web_Conn=false;
else Web_Conn=true;
Log_add($"Получен параметр соединения");
if (rb_SetSync_Time.Checked) GetOrCheck = false;
else GetOrCheck = true;
Log_add($"Получен параметр действия");
}
catch (Exception)
{
MessageBox.Show("Что-то не так! Перепроверь все!");
}
}
public static Task Log_add(string txt, bool err = false)
{
var new_txt = string.Empty;
if (err)
new_txt = " ! | " + txt;
else
new_txt = " - | " + txt;
var temp_txt = tb.Text;
tb.Text = temp_txt + $"{DateTime.Now:T} | {new_txt}" + Environment.NewLine;
return Task.CompletedTask;
}
}
}
File diff suppressed because it is too large Load Diff
Binary file not shown.

After

Width:  |  Height:  |  Size: 253 KiB

+181
View File
@@ -0,0 +1,181 @@
<?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>{A07EA5C9-9E54-4455-A8FF-2F8D6DAD7ED1}</ProjectGuid>
<OutputType>WinExe</OutputType>
<RootNamespace>LC_ConfigCamer</RootNamespace>
<AssemblyName>LC_ConfigCamer</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
<TargetFrameworkProfile />
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
<IsWebBootstrapper>false</IsWebBootstrapper>
<PublishUrl>C:\Users\astankovmi\Nextcloud\AmiCode\WorkApps\ConfigCamer\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>1</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<PublishWizardCompleted>true</PublishWizardCompleted>
<BootstrapperEnabled>true</BootstrapperEnabled>
</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>
</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>
<PropertyGroup>
<ApplicationIcon>LCS_logo.ico</ApplicationIcon>
</PropertyGroup>
<PropertyGroup>
<ManifestCertificateThumbprint>1315103038AF81885727D2920806F5D7EC8A5E91</ManifestCertificateThumbprint>
</PropertyGroup>
<PropertyGroup>
<ManifestKeyFile>LC_ConfigCamer_TemporaryKey.pfx</ManifestKeyFile>
</PropertyGroup>
<PropertyGroup>
<GenerateManifests>true</GenerateManifests>
</PropertyGroup>
<PropertyGroup>
<SignManifests>true</SignManifests>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.8.0.0\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.13.0.4\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll</HintPath>
</Reference>
<Reference Include="System.Core" />
<Reference Include="System.IO.Compression" />
<Reference Include="System.Memory, Version=4.0.1.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Memory.4.5.5\lib\net461\System.Memory.dll</HintPath>
</Reference>
<Reference Include="System.Numerics" />
<Reference Include="System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
</Reference>
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
</Reference>
<Reference Include="System.Text.Encodings.Web, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Text.Encodings.Web.8.0.0\lib\net462\System.Text.Encodings.Web.dll</HintPath>
</Reference>
<Reference Include="System.Text.Json, Version=8.0.0.5, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Text.Json.8.0.5\lib\net462\System.Text.Json.dll</HintPath>
</Reference>
<Reference Include="System.Threading.Channels, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Threading.Channels.8.0.0\lib\net462\System.Threading.Channels.dll</HintPath>
</Reference>
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll</HintPath>
</Reference>
<Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll</HintPath>
</Reference>
<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" />
<Reference Include="WebDriver, Version=4.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Selenium.WebDriver.4.41.0\lib\net462\WebDriver.dll</HintPath>
</Reference>
</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" />
<Compile Include="Selenium_Work.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>
<DesignTime>True</DesignTime>
</Compile>
<None Include="LC_ConfigCamer_TemporaryKey.pfx" />
<None Include="packages.config" />
<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>
<ItemGroup>
<Content Include="LCS_logo.ico" />
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include=".NETFramework,Version=v4.8">
<Visible>False</Visible>
<ProductName>Microsoft .NET Framework 4.8 %28x86 и x64%29</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>false</Install>
</BootstrapperPackage>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\packages\Selenium.WebDriver.4.41.0\build\Selenium.WebDriver.targets" Condition="Exists('..\packages\Selenium.WebDriver.4.41.0\build\Selenium.WebDriver.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>Данный проект ссылается на пакеты NuGet, отсутствующие на этом компьютере. Используйте восстановление пакетов NuGet, чтобы скачать их. Дополнительную информацию см. по адресу: http://go.microsoft.com/fwlink/?LinkID=322105. Отсутствует следующий файл: {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\Selenium.WebDriver.4.41.0\build\Selenium.WebDriver.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Selenium.WebDriver.4.41.0\build\Selenium.WebDriver.targets'))" />
</Target>
</Project>
+22
View File
@@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace LC_ConfigCamer
{
internal static class Program
{
/// <summary>
/// Главная точка входа для приложения.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
}
}
}
+36
View File
@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// Общие сведения об этой сборке предоставляются следующим набором
// набора атрибутов. Измените значения этих атрибутов для изменения сведений,
// связанных со сборкой.
[assembly: AssemblyTitle("LC_ConfigCamer")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("LC_ConfigCamer")]
[assembly: AssemblyCopyright("Copyright © 2024")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Установка значения False для параметра ComVisible делает типы в этой сборке невидимыми
// для компонентов COM. Если необходимо обратиться к типу в этой сборке через
// COM, следует установить атрибут ComVisible в TRUE для этого типа.
[assembly: ComVisible(false)]
// Следующий GUID служит для идентификации библиотеки типов, если этот проект будет видимым для COM
[assembly: Guid("a07ea5c9-9e54-4455-a8ff-2f8d6dad7ed1")]
// Сведения о версии сборки состоят из указанных ниже четырех значений:
//
// Основной номер версии
// Дополнительный номер версии
// Номер сборки
// Редакция
//
// Можно задать все значения или принять номера сборки и редакции по умолчанию
// используя "*", как показано ниже:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
+63
View File
@@ -0,0 +1,63 @@
//------------------------------------------------------------------------------
// <auto-generated>
// Этот код создан программой.
// Исполняемая версия:4.0.30319.42000
//
// Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае
// повторной генерации кода.
// </auto-generated>
//------------------------------------------------------------------------------
namespace LC_ConfigCamer.Properties {
using System;
/// <summary>
/// Класс ресурса со строгой типизацией для поиска локализованных строк и т.д.
/// </summary>
// Этот класс создан автоматически классом StronglyTypedResourceBuilder
// с помощью такого средства, как ResGen или Visual Studio.
// Чтобы добавить или удалить член, измените файл .ResX и снова запустите ResGen
// с параметром /str или перестройте свой проект VS.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// Возвращает кэшированный экземпляр ResourceManager, использованный этим классом.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("LC_ConfigCamer.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Перезаписывает свойство CurrentUICulture текущего потока для всех
/// обращений к ресурсу с помощью этого класса ресурса со строгой типизацией.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
}
}
+117
View File
@@ -0,0 +1,117 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
+26
View File
@@ -0,0 +1,26 @@
//------------------------------------------------------------------------------
// <auto-generated>
// Этот код создан программой.
// Исполняемая версия:4.0.30319.42000
//
// Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае
// повторной генерации кода.
// </auto-generated>
//------------------------------------------------------------------------------
namespace LC_ConfigCamer.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.9.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default {
get {
return defaultInstance;
}
}
}
}
@@ -0,0 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>
+144
View File
@@ -0,0 +1,144 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
using OpenQA.Selenium;
using OpenQA.Selenium.Chrome;
using OpenQA.Selenium.Firefox;
namespace LC_ConfigCamer
{
internal class Selenium_Work
{
public string[] Ip_list { get; set; }
public string Old_pass { get; set; }
public string New_Pass { get; set; }
FirefoxDriver driver;
public Selenium_Work(string[] ip, string old_pass, string new_pass)
{
Ip_list = ip;
Old_pass = old_pass;
New_Pass = new_pass;
}
public async void Start()
{
FirefoxOptions options = new FirefoxOptions();
//options.AddArgument("-headless");
FirefoxDriverService service = FirefoxDriverService.CreateDefaultService();
service.HideCommandPromptWindow = true;
driver = new FirefoxDriver(Environment.CurrentDirectory, options);
for (int i = 0; i < Ip_list.Count(); i++)
{
driver.Navigate().GoToUrl($"http://{Ip_list[i]}");
await Form1.Log_add($"Открыл Web-интерфейс камеры {Ip_list[i]}");
Thread.Sleep(500);
#region Ввод логин пароль
driver.FindElement(By.XPath("//*[@id=\"username\"]")).SendKeys("admin");
driver.FindElement(By.XPath("//*[@id='password']")).SendKeys(Old_pass);
try
{
driver.FindElement(By.XPath("//*[@id=\"login\"]/table/tbody/tr/td[2]/div/div[5]/button")).Click();
}
catch (Exception)
{
MessageBox.Show("Не нашел XPath кнопки входа");
}
await Form1.Log_add($"Ввел логин и пароль");
Thread.Sleep(2000);
#endregion
if (CheckXPath("/html/body/div[2]/table/tbody/tr/td[2]/div/div[2]/div/label"))
{
await Form1.Log_add($"Не правильный пароль к {Ip_list[i]}", true);
await Form1.Log_add($"===================================", true);
continue;
}
else
{
#region Переход в конфигурацию
driver.Navigate().GoToUrl($"http://{Ip_list[i]}/doc/page/config.asp");
await Form1.Log_add($"Перешел в режим конфигурации");
Thread.Sleep(1000);
#endregion
#region Выбрать пользователя и нажать ИЗМЕНИТЬ
driver.FindElement(By.Name("user")).Click();
await Form1.Log_add($"Перешел в настройки пользователей");
Thread.Sleep(1000);
if (CheckXPath("/html/body/div[4]/div[1]/div/div/div[1]/div/div[1]/div[2]/div/div[2]/div"))
driver.FindElement(By.XPath("/html/body/div[4]/div[1]/div/div/div[1]/div/div[1]/div[2]/div/div[2]/div")).Click();
else
MessageBox.Show("Ткнуть на строку admin");
Thread.Sleep(500);
if (CheckXPath("/html/body/div[4]/div[1]/div/div/div[1]/div/div[1]/div[1]/span[2]/button[2]"))
driver.FindElement(By.XPath("/html/body/div[4]/div[1]/div/div/div[1]/div/div[1]/div[1]/span[2]/button[2]")).Click();
//else if (await CheckXPath("/html/body/div[3]/div[1]/div/div/div[1]/div/div/div[1]/span[2]/button[2]"))
// driver.FindElement(By.XPath("/html/body/div[4]/div[1]/div/div/div[1]/div/div[1]/div[1]/span[2]/button[3]")).Click();
//else if (await CheckXPath("/html/body/div[4]/div[1]/div/div/div[1]/div/div[1]/div[1]/span[2]/button[2]"))
// driver.FindElement(By.XPath("/html/body/div[4]/div[1]/div/div/div[1]/div/div[1]/div[1]/span[2]/button[3]")).Click();
else
MessageBox.Show("Ткнуть изменить");
await Form1.Log_add($"Открыл изменение настроек пользователя");
Thread.Sleep(1000);
#endregion
#region Изменение пароля
if (CheckXPath("/html/body/div[1]/div/table/tbody/tr[2]/td[2]/div/table/tbody/tr[2]/td[2]/div/div[1]/div[4]/div[1]/span[2]/input"))
{
var el = driver.FindElement(By.XPath("/html/body/div[1]/div/table/tbody/tr[2]/td[2]/div/table/tbody/tr[2]/td[2]/div/div[1]/div[4]/div[1]/span[2]/input"));
el.Clear(); el.SendKeys(Old_pass);
await Form1.Log_add($"Ввел старый пароль");
}
else
{
MessageBox.Show("Ввод старого пароля");
}
if (CheckXPath("/html/body/div[1]/div/table/tbody/tr[2]/td[2]/div/table/tbody/tr[2]/td[2]/div/div[1]/div[4]/div[2]/span[2]/input"))
{
var el = driver.FindElement(By.XPath("/html/body/div[1]/div/table/tbody/tr[2]/td[2]/div/table/tbody/tr[2]/td[2]/div/div[1]/div[4]/div[2]/span[2]/input"));
el.Clear(); el.SendKeys(New_Pass);
el = driver.FindElement(By.XPath("/html/body/div[1]/div/table/tbody/tr[2]/td[2]/div/table/tbody/tr[2]/td[2]/div/div[1]/div[4]/div[4]/span[2]/input"));
el.Clear(); el.SendKeys(New_Pass);
await Form1.Log_add($"Ввел 2 раза новый пароль");
}
else
{
MessageBox.Show("Ввод нового пароля");
}
driver.FindElement(By.XPath("//html/body/div[1]/div/table/tbody/tr[2]/td[2]/div/table/tbody/tr[3]/td/div/button[1]")).Click();
await Form1.Log_add($"Сохранил изменения.");
await Form1.Log_add($"===================================");
#endregion
continue;
}
}
driver.Quit();
}
private bool CheckXPath(string xPath)
{
try
{
_ = driver.FindElement(By.XPath(xPath));
return true;
}
catch (Exception)
{
return false;
}
}
}
}
+15
View File
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.Bcl.AsyncInterfaces" version="8.0.0" targetFramework="net48" />
<package id="Newtonsoft.Json" version="13.0.4" targetFramework="net48" />
<package id="Selenium.WebDriver" version="4.41.0" targetFramework="net48" />
<package id="System.Buffers" version="4.5.1" targetFramework="net48" />
<package id="System.Memory" version="4.5.5" targetFramework="net48" />
<package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net48" />
<package id="System.Runtime.CompilerServices.Unsafe" version="6.0.0" targetFramework="net48" />
<package id="System.Text.Encodings.Web" version="8.0.0" targetFramework="net48" />
<package id="System.Text.Json" version="8.0.5" targetFramework="net48" />
<package id="System.Threading.Channels" version="8.0.0" targetFramework="net48" />
<package id="System.Threading.Tasks.Extensions" version="4.5.4" targetFramework="net48" />
<package id="System.ValueTuple" version="4.5.0" targetFramework="net48" />
</packages>