по меклочи

This commit is contained in:
klavirshik 2024-10-25 10:41:25 +02:00
parent 2afe9b8d92
commit 9a00a0c841
30 changed files with 131 additions and 13 deletions

Binary file not shown.

View File

@ -42,7 +42,7 @@ namespace Remontor
} }
else else
{ {
if (!SConnector.FormMain.CloseOn && !unSave && (settingAppControl1.edited() || if (!SConnector.FormMain.ShowOn && !SConnector.FormMain.CloseOn && !unSave && (settingAppControl1.edited() ||
settingSCCMControl1.edited() || settingSCCMControl1.edited() ||
settingWordsControl1.edited())) settingWordsControl1.edited()))
{ {
@ -61,6 +61,10 @@ namespace Remontor
} }
} }
else if(SConnector.FormMain.ShowOn)
{
this.Visible = true;
}
else else
{ {
this.Visible = false; this.Visible = false;

View File

@ -22,6 +22,7 @@ namespace Remontor
{ {
public bool CloseOn = false; public bool CloseOn = false;
public bool ShowOn = false;
public Form1() public Form1()
{ {

View File

@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Remontor.Picter
{
internal class PicBase
{
}
}

View File

@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Remontor.Picter
{
internal class PicLoaderTask
{
}
}

View File

@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Remontor.Picter
{
internal class SPicManager
{
Dictionary<string, PicBase> PicList = new Dictionary<string, PicBase>();
public void PictureSet(PictureBox image, IComp comp)
{
}
}
}

View File

@ -107,6 +107,9 @@
<Compile Include="History\HistoryItem.cs" /> <Compile Include="History\HistoryItem.cs" />
<Compile Include="History\HistoryList.cs" /> <Compile Include="History\HistoryList.cs" />
<Compile Include="History\SHistory.cs" /> <Compile Include="History\SHistory.cs" />
<Compile Include="Picter\PicBase.cs" />
<Compile Include="Picter\PicLoaderTask.cs" />
<Compile Include="Picter\SPicManager.cs" />
<Compile Include="Pinger\PingManager.cs" /> <Compile Include="Pinger\PingManager.cs" />
<Compile Include="Pinger\PingResult.cs" /> <Compile Include="Pinger\PingResult.cs" />
<Compile Include="Pinger\PingTask.cs" /> <Compile Include="Pinger\PingTask.cs" />

View File

@ -60,6 +60,30 @@ namespace Remontor.Seacher
} }
public void Change(ResultUpdate sender, string seach) public void Change(ResultUpdate sender, string seach)
{ {
Activate();
Update = sender;
if (Connection != null && Connection.State == ConnectionState.Open)
{
List<ISeacherResult> result;
if (seach.Length > 2)
{
result = ResultSeach(seach);
Update(result);
}
else
{
result = new List<ISeacherResult>();
result.Add(new NoResult("Введите запрос, к бд подключенно"));
Update(result);
}
}
else
{
List<ISeacherResult> result = new List<ISeacherResult>();
result.Add(new NoResult(error));
Update(result);
}
//Activate(); //Activate();
//Update = sender; //Update = sender;
//if (Connection != null && Connection.State == ConnectionState.Open) //if (Connection != null && Connection.State == ConnectionState.Open)
@ -85,7 +109,7 @@ namespace Remontor.Seacher
// result.Add(error); // result.Add(error);
// Update(result, false,14); // Update(result, false,14);
//} //}
} }
private string QueryBilder(string query) private string QueryBilder(string query)

View File

@ -34,6 +34,8 @@
this.LbNetName = new System.Windows.Forms.Label(); this.LbNetName = new System.Windows.Forms.Label();
this.PbPerson = new System.Windows.Forms.PictureBox(); this.PbPerson = new System.Windows.Forms.PictureBox();
this.PPingStat = new System.Windows.Forms.Panel(); this.PPingStat = new System.Windows.Forms.Panel();
this.LbLoginStatic = new System.Windows.Forms.Label();
this.LbLogin = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.PbPerson)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.PbPerson)).BeginInit();
this.SuspendLayout(); this.SuspendLayout();
// //
@ -96,11 +98,31 @@
this.PPingStat.TabIndex = 5; this.PPingStat.TabIndex = 5;
this.PPingStat.Click += new System.EventHandler(this.SessionItemControl_Click); this.PPingStat.Click += new System.EventHandler(this.SessionItemControl_Click);
// //
// LbLoginStatic
//
this.LbLoginStatic.AutoSize = true;
this.LbLoginStatic.Location = new System.Drawing.Point(204, 20);
this.LbLoginStatic.Name = "LbLoginStatic";
this.LbLoginStatic.Size = new System.Drawing.Size(38, 13);
this.LbLoginStatic.TabIndex = 6;
this.LbLoginStatic.Text = "Логин";
//
// LbLogin
//
this.LbLogin.AutoSize = true;
this.LbLogin.Location = new System.Drawing.Point(248, 20);
this.LbLogin.Name = "LbLogin";
this.LbLogin.Size = new System.Drawing.Size(10, 13);
this.LbLogin.TabIndex = 7;
this.LbLogin.Text = "-";
//
// SessionItemControl // SessionItemControl
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.SystemColors.Window; this.BackColor = System.Drawing.SystemColors.Window;
this.Controls.Add(this.LbLogin);
this.Controls.Add(this.LbLoginStatic);
this.Controls.Add(this.PPingStat); this.Controls.Add(this.PPingStat);
this.Controls.Add(this.LbNetName); this.Controls.Add(this.LbNetName);
this.Controls.Add(this.LbName); this.Controls.Add(this.LbName);
@ -126,5 +148,7 @@
private System.Windows.Forms.Label LbName; private System.Windows.Forms.Label LbName;
private System.Windows.Forms.Label LbNetName; private System.Windows.Forms.Label LbNetName;
private System.Windows.Forms.Panel PPingStat; private System.Windows.Forms.Panel PPingStat;
private System.Windows.Forms.Label LbLoginStatic;
private System.Windows.Forms.Label LbLogin;
} }
} }

View File

@ -42,12 +42,16 @@ namespace Remontor
LbNetName.Visible = false; LbNetName.Visible = false;
LbNetNameStatic.Visible = false; LbNetNameStatic.Visible = false;
PPingStat.Visible = false; PPingStat.Visible = false;
LbLogin.Visible = false;
LbLoginStatic.Visible = false;
} }
else if(seacherResult is HistoryResult) else if(seacherResult is HistoryResult)
{ {
HistoryResult result = (HistoryResult) seacherResult; HistoryResult result = (HistoryResult) seacherResult;
LbName.Text = result.GetComp().GetName(); LbName.Text = result.GetComp().GetDescription();
LbLogin.Text = result.GetComp().GetName();
LbNetName.Text = result.GetComp().GetNetName(); LbNetName.Text = result.GetComp().GetNetName();
LbData.Text = "last connect:" + result.GetLastConnect(); LbData.Text = "last connect:" + result.GetLastConnect();
Select += UpdateAct; Select += UpdateAct;
@ -58,8 +62,9 @@ namespace Remontor
else if (seacherResult is SCCMResult) else if (seacherResult is SCCMResult)
{ {
SCCMResult result = (SCCMResult)seacherResult; SCCMResult result = (SCCMResult)seacherResult;
LbName.Text = result.GetComp().GetName(); LbName.Text = result.GetComp().GetDescription();
LbNetName.Text = result.GetComp().GetNetName(); LbNetName.Text = result.GetComp().GetNetName();
LbLogin.Text = result.GetComp().GetName();
LbData.Text = "last login:" + result.GetLastConnect(); LbData.Text = "last login:" + result.GetLastConnect();
Select += UpdateAct; Select += UpdateAct;
Index = index; Index = index;
@ -120,6 +125,10 @@ namespace Remontor
{ {
HistoryResult result = (HistoryResult)seacherResult; HistoryResult result = (HistoryResult)seacherResult;
PingManager.NewTaskPing(PPingStat, result.GetComp()); PingManager.NewTaskPing(PPingStat, result.GetComp());
}else if (seacherResult is SCCMResult)
{
SCCMResult result = (SCCMResult)seacherResult;
PingManager.NewTaskPing(PPingStat, result.GetComp());
} }
} }

View File

@ -1,4 +1,5 @@
using System; using Remontor.Connector;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
using System.Data; using System.Data;
@ -46,11 +47,13 @@ namespace Remontor.Setting
private void bt_path_open_Click(object sender, EventArgs e) private void bt_path_open_Click(object sender, EventArgs e)
{ {
openFileDialog1.ShowDialog(); SConnector.FormMain.ShowOn = true;
if (openFileDialog1.FileName != null) DialogResult result = openFileDialog1.ShowDialog();
if (result == DialogResult.OK)
{ {
path.Text = openFileDialog1.FileName; path.Text = openFileDialog1.FileName;
} }
SConnector.FormMain.ShowOn = false;
} }
} }
} }

View File

@ -1,4 +1,5 @@
using Remontor.Seacher; using Remontor.Connector;
using Remontor.Seacher;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
@ -82,8 +83,10 @@ namespace Remontor.Setting
private void bt_checkConnect_Click(object sender, EventArgs e) private void bt_checkConnect_Click(object sender, EventArgs e)
{ {
SConnector.FormMain.ShowOn = true;
SeachSCCM SeacherCheck = new SeachSCCM(cb_windowsAuth.Checked, ib_username.Text, ib_password.Text); SeachSCCM SeacherCheck = new SeachSCCM(cb_windowsAuth.Checked, ib_username.Text, ib_password.Text);
MessageBox.Show(SeacherCheck.CheckConnect(ib_server.Text,ib_dataBase.Text)); MessageBox.Show(SeacherCheck.CheckConnect(ib_server.Text,ib_dataBase.Text));
SConnector.FormMain.ShowOn = false;
} }
private void groupBox2_Enter(object sender, EventArgs e) private void groupBox2_Enter(object sender, EventArgs e)

View File

@ -1,4 +1,5 @@
using Remontor.Words; using Remontor.Connector;
using Remontor.Words;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
@ -35,21 +36,25 @@ namespace Remontor.Setting
private void bt_wordsBilder_Click(object sender, EventArgs e) private void bt_wordsBilder_Click(object sender, EventArgs e)
{ {
SConnector.FormMain.ShowOn = true;
BilderWords bilderWords = new BilderWords(); BilderWords bilderWords = new BilderWords();
DialogResult result = bilderWords.ShowDialog(); DialogResult result = bilderWords.ShowDialog();
if (result == DialogResult.OK) if (result == DialogResult.OK)
{ {
UpdateTree(); UpdateTree();
} }
SConnector.FormMain.ShowOn = false;
} }
private void bt_path_open_Click(object sender, EventArgs e) private void bt_path_open_Click(object sender, EventArgs e)
{ {
openFileDialog1.ShowDialog(); SConnector.FormMain.ShowOn = true;
if(openFileDialog1.FileName != null) DialogResult result = openFileDialog1.ShowDialog();
if (result == DialogResult.OK)
{ {
path.Text = openFileDialog1.FileName; path.Text = openFileDialog1.FileName;
} }
SConnector.FormMain.ShowOn = false;
} }
public bool edited() public bool edited()

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1 +1 @@
8715987b8e28705d0f46bc923af3b41a4afd1d49 09d76672eda20daf058c432a32f616590893aaa4

Binary file not shown.

Binary file not shown.