добавили мозгов в поиск
This commit is contained in:
parent
60fa5005aa
commit
ca3345dce7
|
|
@ -69,6 +69,16 @@
|
|||
this.cm_words = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||
this.WordsReboot = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.tb_comp = new System.Windows.Forms.TextBox();
|
||||
this.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||
this.label7 = new System.Windows.Forms.Label();
|
||||
this.label8 = new System.Windows.Forms.Label();
|
||||
this.label9 = new System.Windows.Forms.Label();
|
||||
this.label10 = new System.Windows.Forms.Label();
|
||||
this.label11 = new System.Windows.Forms.Label();
|
||||
this.label12 = new System.Windows.Forms.Label();
|
||||
this.label13 = new System.Windows.Forms.Label();
|
||||
this.label14 = new System.Windows.Forms.Label();
|
||||
this.label15 = new System.Windows.Forms.Label();
|
||||
this.tabControl1.SuspendLayout();
|
||||
this.tabPage1.SuspendLayout();
|
||||
this.statusStrip1.SuspendLayout();
|
||||
|
|
@ -79,6 +89,7 @@
|
|||
this.tabPage5.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
|
||||
this.cm_words.SuspendLayout();
|
||||
this.groupBox1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// label1
|
||||
|
|
@ -439,6 +450,7 @@
|
|||
//
|
||||
// tabPage5
|
||||
//
|
||||
this.tabPage5.Controls.Add(this.groupBox1);
|
||||
this.tabPage5.Controls.Add(this.pictureBox1);
|
||||
this.tabPage5.Controls.Add(this.label16);
|
||||
this.tabPage5.Location = new System.Drawing.Point(4, 22);
|
||||
|
|
@ -493,6 +505,106 @@
|
|||
this.tb_comp.Enter += new System.EventHandler(this.tb_comp_Enter);
|
||||
this.tb_comp.KeyDown += new System.Windows.Forms.KeyEventHandler(this.tb_comp_KeyDown);
|
||||
//
|
||||
// groupBox1
|
||||
//
|
||||
this.groupBox1.Controls.Add(this.label15);
|
||||
this.groupBox1.Controls.Add(this.label14);
|
||||
this.groupBox1.Controls.Add(this.label13);
|
||||
this.groupBox1.Controls.Add(this.label7);
|
||||
this.groupBox1.Controls.Add(this.label9);
|
||||
this.groupBox1.Controls.Add(this.label8);
|
||||
this.groupBox1.Controls.Add(this.label12);
|
||||
this.groupBox1.Controls.Add(this.label10);
|
||||
this.groupBox1.Controls.Add(this.label11);
|
||||
this.groupBox1.Location = new System.Drawing.Point(6, 523);
|
||||
this.groupBox1.Name = "groupBox1";
|
||||
this.groupBox1.Size = new System.Drawing.Size(386, 141);
|
||||
this.groupBox1.TabIndex = 2;
|
||||
this.groupBox1.TabStop = false;
|
||||
this.groupBox1.Text = "Расшифровка статусов истории";
|
||||
this.groupBox1.Enter += new System.EventHandler(this.groupBox1_Enter);
|
||||
//
|
||||
// label7
|
||||
//
|
||||
this.label7.AutoSize = true;
|
||||
this.label7.Location = new System.Drawing.Point(3, 120);
|
||||
this.label7.Name = "label7";
|
||||
this.label7.Size = new System.Drawing.Size(198, 13);
|
||||
this.label7.TabIndex = 0;
|
||||
this.label7.Text = "Canceled - отмененно пользователем";
|
||||
//
|
||||
// label8
|
||||
//
|
||||
this.label8.AutoSize = true;
|
||||
this.label8.Location = new System.Drawing.Point(3, 29);
|
||||
this.label8.Name = "label8";
|
||||
this.label8.Size = new System.Drawing.Size(334, 13);
|
||||
this.label8.TabIndex = 1;
|
||||
this.label8.Text = "Send RST - отправление команды перезагрузки удаленному ПК";
|
||||
//
|
||||
// label9
|
||||
//
|
||||
this.label9.AutoSize = true;
|
||||
this.label9.Location = new System.Drawing.Point(3, 107);
|
||||
this.label9.Name = "label9";
|
||||
this.label9.Size = new System.Drawing.Size(329, 13);
|
||||
this.label9.TabIndex = 2;
|
||||
this.label9.Text = "Error RST - ПК не начал перезагрузку после отправки команды";
|
||||
//
|
||||
// label10
|
||||
//
|
||||
this.label10.AutoSize = true;
|
||||
this.label10.Location = new System.Drawing.Point(3, 94);
|
||||
this.label10.Name = "label10";
|
||||
this.label10.Size = new System.Drawing.Size(277, 13);
|
||||
this.label10.TabIndex = 3;
|
||||
this.label10.Text = "Error UP - ПК не вышел на связь после перезагрузки";
|
||||
//
|
||||
// label11
|
||||
//
|
||||
this.label11.AutoSize = true;
|
||||
this.label11.Location = new System.Drawing.Point(3, 68);
|
||||
this.label11.Name = "label11";
|
||||
this.label11.Size = new System.Drawing.Size(191, 13);
|
||||
this.label11.TabIndex = 4;
|
||||
this.label11.Text = "Stop - остановленно пользователем";
|
||||
//
|
||||
// label12
|
||||
//
|
||||
this.label12.AutoSize = true;
|
||||
this.label12.Location = new System.Drawing.Point(3, 42);
|
||||
this.label12.Name = "label12";
|
||||
this.label12.Size = new System.Drawing.Size(233, 13);
|
||||
this.label12.TabIndex = 5;
|
||||
this.label12.Text = "Rebooting - удаленный пк перезагружаеться";
|
||||
//
|
||||
// label13
|
||||
//
|
||||
this.label13.AutoSize = true;
|
||||
this.label13.Location = new System.Drawing.Point(3, 55);
|
||||
this.label13.Name = "label13";
|
||||
this.label13.Size = new System.Drawing.Size(233, 13);
|
||||
this.label13.TabIndex = 6;
|
||||
this.label13.Text = "Succes - перезагрузка завершенна успешно";
|
||||
//
|
||||
// label14
|
||||
//
|
||||
this.label14.AutoSize = true;
|
||||
this.label14.Location = new System.Drawing.Point(3, 81);
|
||||
this.label14.Name = "label14";
|
||||
this.label14.Size = new System.Drawing.Size(202, 13);
|
||||
this.label14.TabIndex = 7;
|
||||
this.label14.Text = "Error NET- нету связи с удаленным ПК";
|
||||
//
|
||||
// label15
|
||||
//
|
||||
this.label15.AutoSize = true;
|
||||
this.label15.Location = new System.Drawing.Point(3, 16);
|
||||
this.label15.Name = "label15";
|
||||
this.label15.Size = new System.Drawing.Size(237, 13);
|
||||
this.label15.TabIndex = 8;
|
||||
this.label15.Text = "Check Net - Проверка связи с удаленным ПК";
|
||||
//
|
||||
// Form1
|
||||
//
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
||||
|
|
@ -522,6 +634,8 @@
|
|||
this.tabPage5.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
|
||||
this.cm_words.ResumeLayout(false);
|
||||
this.groupBox1.ResumeLayout(false);
|
||||
this.groupBox1.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
|
|
@ -567,6 +681,16 @@
|
|||
private System.Windows.Forms.ContextMenuStrip cm_words;
|
||||
private System.Windows.Forms.ToolStripMenuItem WordsReboot;
|
||||
private System.Windows.Forms.TextBox tb_comp;
|
||||
private System.Windows.Forms.GroupBox groupBox1;
|
||||
private System.Windows.Forms.Label label8;
|
||||
private System.Windows.Forms.Label label7;
|
||||
private System.Windows.Forms.Label label10;
|
||||
private System.Windows.Forms.Label label9;
|
||||
private System.Windows.Forms.Label label11;
|
||||
private System.Windows.Forms.Label label12;
|
||||
private System.Windows.Forms.Label label13;
|
||||
private System.Windows.Forms.Label label15;
|
||||
private System.Windows.Forms.Label label14;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -683,6 +683,11 @@ namespace Reseter2
|
|||
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void groupBox1_Enter(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -123,6 +123,9 @@
|
|||
<metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>654, 17</value>
|
||||
</metadata>
|
||||
<metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>654, 17</value>
|
||||
</metadata>
|
||||
<metadata name="imageList1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>434, 17</value>
|
||||
</metad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UIBTQE2AQQGAAE2AQQCAAEo
|
||||
CgAAAk1TRnQBSQFMAgEBAwEAAVgBBQFYAQUBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
||||
AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
|
||||
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
|
||||
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ using System.Data;
|
|||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using static Reseter2.Seacher.SeahcLocal;
|
||||
|
|
@ -61,6 +62,26 @@ namespace Reseter2.Seacher
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
private string QueryBilder(string query)
|
||||
{
|
||||
string result = "";
|
||||
Regex regexCyrillic = new(@"\p{IsCyrillic}*", RegexOptions.IgnoreCase);
|
||||
Regex regexNumrable = new(@"\d*", RegexOptions.IgnoreCase);
|
||||
if (regexCyrillic.Matches(query).Count > 0)
|
||||
{
|
||||
result = "SELECT * FROM " + SGlobalSetting.settingSCCM.dataBase + " WHERE pcname LIKE '%" + query + "%'";
|
||||
}
|
||||
else if(regexNumrable.Matches(query).Count > 0)
|
||||
{
|
||||
result = "SELECT * FROM " + SGlobalSetting.settingSCCM.dataBase + " WHERE pcname LIKE '%" + query + "%'";
|
||||
}
|
||||
else
|
||||
{
|
||||
result = "SELECT * FROM " + SGlobalSetting.settingSCCM.dataBase + " WHERE login LIKE '%" + query + "%'";
|
||||
}
|
||||
return null;
|
||||
}
|
||||
public List<string> ResultSeach(string seach)
|
||||
{
|
||||
int y = 0;
|
||||
|
|
@ -70,7 +91,7 @@ namespace Reseter2.Seacher
|
|||
{
|
||||
try
|
||||
{
|
||||
string sql = "SELECT * FROM " + SGlobalSetting.settingSCCM.dataBase + " WHERE pcname LIKE '%" + seach + "%'";
|
||||
string sql = QueryBilder(seach);
|
||||
MySqlCommand sqlCom = new MySqlCommand(sql, Connection);
|
||||
// Connection.Open();
|
||||
sqlCom.ExecuteNonQuery();
|
||||
|
|
|
|||
Loading…
Reference in New Issue