Передали управлени

This commit is contained in:
klavirshik 2025-04-22 17:56:40 +02:00
parent 250a59a78d
commit 512fa239b0
23 changed files with 2209 additions and 2105 deletions

Binary file not shown.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1 @@
{"ShowEmptyProjects":false,"CustomColumnOrderings":{"name":0,"file-path":1,"file-name":2,"neutral-value":3,"neutral-comment":4,"type":5},"ShowValidationErrors":true,"SelectedResourceGroupsByProject":{"C:\\Users\\\u0412\u043B\u0430\u0434\u0438\u043C\u0438\u0440\\source\\repos\\Remontor\\Remontor\\Remontor.csproj":["C:\\Users\\\u0412\u043B\u0430\u0434\u0438\u043C\u0438\u0440\\source\\repos\\Remontor\\Remontor\\Properties\\Resources.resx","C:\\Users\\\u0412\u043B\u0430\u0434\u0438\u043C\u0438\u0440\\source\\repos\\Remontor\\Remontor\\Setting\\SettingSCCMControl.resx"]},"VisibleColumnKeys":["name","neutral-value","neutral-comment"]}

View File

@ -45,9 +45,9 @@
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(12, 181);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(347, 13);
this.label1.Size = new System.Drawing.Size(353, 13);
this.label1.TabIndex = 0;
this.label1.Text = "SCCMанагер программа для удобной организации работы c SCCM\r\n";
this.label1.Text = "SCCMанагер - программа для удобной организации работы c SCCM\r\n";
//
// label20
//
@ -76,7 +76,7 @@
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(31, 13);
this.label2.TabIndex = 9;
this.label2.Text = "2024";
this.label2.Text = "2025";
//
// pictureBox1
//
@ -94,7 +94,7 @@
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(62, 13);
this.label3.TabIndex = 11;
this.label3.Text = "Версия 0.3";
this.label3.Text = "Версия 0.4";
//
// groupBox1
//

View File

@ -50,7 +50,7 @@
this.FlowButton.Location = new System.Drawing.Point(0, 0);
this.FlowButton.Margin = new System.Windows.Forms.Padding(0);
this.FlowButton.Name = "FlowButton";
this.FlowButton.Size = new System.Drawing.Size(687, 40);
this.FlowButton.Size = new System.Drawing.Size(688, 40);
this.FlowButton.TabIndex = 8;
this.FlowButton.ControlRemoved += new System.Windows.Forms.ControlEventHandler(this.FlowButton_ControlRemoved);
//
@ -170,7 +170,7 @@
this.RecoonectBt.FlatAppearance.BorderSize = 0;
this.RecoonectBt.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.RecoonectBt.Font = new System.Drawing.Font("Microsoft Sans Serif", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.RecoonectBt.Location = new System.Drawing.Point(690, -1);
this.RecoonectBt.Location = new System.Drawing.Point(691, 0);
this.RecoonectBt.Name = "RecoonectBt";
this.RecoonectBt.Size = new System.Drawing.Size(40, 40);
this.RecoonectBt.TabIndex = 5;

View File

@ -133,21 +133,25 @@ namespace Remontor
private void OneMonBt_Click(object sender, EventArgs e)
{
SConnector.ResizeActiv();
SConnector.SetModeMon(new OneMon());
}
private void DobleMonOneBt_Click(object sender, EventArgs e)
{
SConnector.ResizeActiv();
SConnector.SetModeMon(new DobleMonOne());
}
private void DobleMonTwoBt_Click(object sender, EventArgs e)
{
SConnector.ResizeActiv();
SConnector.SetModeMon(new DobleMonTwo());
}
private void DobleMonFull_Click(object sender, EventArgs e)
{
SConnector.ResizeActiv();
SConnector.SetModeMon(new DobleMonFull());
}

View File

@ -125,7 +125,7 @@ namespace Remontor.Connector
MoveWindow(hwnd, CenterDraw.X- 325, CenterDraw.Y - 125 ,675,275,true);
Task.Run(new Action(() => {
Thread.Sleep(4000);
Thread.Sleep(6000);
SConnector.FormMain.Invoke(new MethodInvoker(delegate

View File

@ -1,6 +1,7 @@
using Remontor.Connector;
using Remontor.Pinger;
using Remontor.Seacher;
using Remontor.Setting;
using System;
using System.Collections.Generic;
using System.ComponentModel;
@ -37,7 +38,12 @@ namespace Remontor.Finder
}
else
{
if (CompNameLB.Text.Length > 0)
if (((SessionItemControl)SeaherPanel.Controls[0]).seacherResult.Result() != null && SGlobalSetting.settingApp.ConnectMode)
{
SConnector.NewConnect(((SessionItemControl)SeaherPanel.Controls[0]).seacherResult.Result());
this.Close();
}
else if (CompNameLB.Text.Length > 0)
{
SConnector.NewConnect(new CompId(CompNameLB.Text));
}
@ -173,7 +179,12 @@ namespace Remontor.Finder
}
if (PreSelected == -1)
{
if (CompNameLB.Text.Length > 0)
if (((SessionItemControl)SeaherPanel.Controls[0]).seacherResult.Result() != null && SGlobalSetting.settingApp.ConnectMode)
{
SConnector.NewConnect(((SessionItemControl)SeaherPanel.Controls[0]).seacherResult.Result());
this.Close();
}
else if (CompNameLB.Text.Length > 0)
{
SConnector.NewConnect(new CompId(CompNameLB.Text));
this.Close();

View File

@ -29,11 +29,11 @@
private void InitializeComponent()
{
this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
this.BtSave = new System.Windows.Forms.Button();
this.BtAbout = new System.Windows.Forms.Button();
this.settingWordsControl1 = new Remontor.Setting.SettingWordsControl();
this.settingSCCMControl1 = new Remontor.Setting.SettingSCCMControl();
this.settingAppControl1 = new Remontor.Setting.settingAppControl();
this.BtSave = new System.Windows.Forms.Button();
this.BtAbout = new System.Windows.Forms.Button();
this.flowLayoutPanel1.SuspendLayout();
this.SuspendLayout();
//
@ -51,28 +51,6 @@
this.flowLayoutPanel1.Size = new System.Drawing.Size(330, 616);
this.flowLayoutPanel1.TabIndex = 0;
//
// BtSave
//
this.BtSave.Location = new System.Drawing.Point(3, 545);
this.BtSave.Name = "BtSave";
this.BtSave.Size = new System.Drawing.Size(323, 28);
this.BtSave.TabIndex = 3;
this.BtSave.Text = "Сохранить";
this.BtSave.UseVisualStyleBackColor = true;
this.BtSave.Click += new System.EventHandler(this.BtSave_Click);
//
// BtAbout
//
this.BtAbout.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.BtAbout.Location = new System.Drawing.Point(3, 622);
this.BtAbout.Name = "BtAbout";
this.BtAbout.Size = new System.Drawing.Size(324, 28);
this.BtAbout.TabIndex = 4;
this.BtAbout.Text = "О программе";
this.BtAbout.UseVisualStyleBackColor = true;
this.BtAbout.Click += new System.EventHandler(this.BtAbout_Click);
//
// settingWordsControl1
//
this.settingWordsControl1.Location = new System.Drawing.Point(3, 3);
@ -91,9 +69,31 @@
//
this.settingAppControl1.Location = new System.Drawing.Point(3, 238);
this.settingAppControl1.Name = "settingAppControl1";
this.settingAppControl1.Size = new System.Drawing.Size(325, 301);
this.settingAppControl1.Size = new System.Drawing.Size(325, 335);
this.settingAppControl1.TabIndex = 2;
//
// BtSave
//
this.BtSave.Location = new System.Drawing.Point(3, 579);
this.BtSave.Name = "BtSave";
this.BtSave.Size = new System.Drawing.Size(323, 28);
this.BtSave.TabIndex = 3;
this.BtSave.Text = "Сохранить";
this.BtSave.UseVisualStyleBackColor = true;
this.BtSave.Click += new System.EventHandler(this.BtSave_Click);
//
// BtAbout
//
this.BtAbout.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.BtAbout.Location = new System.Drawing.Point(3, 622);
this.BtAbout.Name = "BtAbout";
this.BtAbout.Size = new System.Drawing.Size(324, 28);
this.BtAbout.TabIndex = 4;
this.BtAbout.Text = "О программе";
this.BtAbout.UseVisualStyleBackColor = true;
this.BtAbout.Click += new System.EventHandler(this.BtAbout_Click);
//
// FlowConteinerSetting
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);

View File

@ -125,6 +125,7 @@
this.Deactivate += new System.EventHandler(this.Form1_Deactivate);
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form1_FormClosing);
this.Load += new System.EventHandler(this.Form1_Load);
this.Shown += new System.EventHandler(this.Form1_Shown);
this.Move += new System.EventHandler(this.tabControl1_SizeChanged);
this.Resize += new System.EventHandler(this.tabControl1_SizeChanged);
this.panel3.ResumeLayout(false);

View File

@ -86,7 +86,7 @@ namespace Remontor
SConnector.x = this.Bounds.X;
SConnector.y = this.Bounds.Y;
SConnector.Width = this.Bounds.Width;
SConnector.Height = this.Bounds.Height;
SConnector.Height = this.Bounds.Height;
}
private void barSessionControl1_Load(object sender, EventArgs e)
@ -125,6 +125,15 @@ namespace Remontor
{
}
private void Form1_Shown(object sender, EventArgs e)
{
if (SGlobalSetting.settingApp.StartMode)
{
Finder.Finder finder = new Finder.Finder();
finder.ShowDialog();
}
}
}
}

View File

@ -43,6 +43,23 @@ namespace Remontor
}
Comp = comp;
if (comp.GetDescription() != null) {
contextMenuCommand.Items[10].Enabled = true;
}
else
{
contextMenuCommand.Items[10].Enabled = false;
}
if (comp.GetNetNameStr() != null)
{
contextMenuCommand.Items[8].Enabled = true;
}
else
{
contextMenuCommand.Items[8].Enabled = false;
}
contextMenuCommand.Items[7].Visible = true;
contextMenuCommand.Items[8].Visible = true;
contextMenuCommand.Show(point);

View File

@ -18,6 +18,8 @@ namespace Remontor.Setting
public int WidthDoble;
public int HeightDoble;
public string DialogName;
public bool StartMode;
public bool ConnectMode;
public SettingApp()
{
this.pathApp = "CmRcViewer.exe";
@ -29,6 +31,8 @@ namespace Remontor.Setting
this.WidthDoble = 3840;
this.HeightDoble = 1040;
this.DialogName = "Устанавливается контакт с агентом удаленного управления на клиенте {#PCName}";
this.StartMode = true;
this.ConnectMode = true;
}
}

View File

@ -29,6 +29,7 @@
private void InitializeComponent()
{
this.groupBox3 = new System.Windows.Forms.GroupBox();
this.BtSetCurrentPos = new System.Windows.Forms.Button();
this.TbDlgName = new System.Windows.Forms.TextBox();
this.label9 = new System.Windows.Forms.Label();
this.label8 = new System.Windows.Forms.Label();
@ -50,7 +51,8 @@
this.path = new System.Windows.Forms.TextBox();
this.label12 = new System.Windows.Forms.Label();
this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
this.BtSetCurrentPos = new System.Windows.Forms.Button();
this.cbStartMode = new System.Windows.Forms.CheckBox();
this.cbConnectMode = new System.Windows.Forms.CheckBox();
this.groupBox3.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.NbHeight)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.NbWidth)).BeginInit();
@ -62,6 +64,8 @@
//
// groupBox3
//
this.groupBox3.Controls.Add(this.cbConnectMode);
this.groupBox3.Controls.Add(this.cbStartMode);
this.groupBox3.Controls.Add(this.BtSetCurrentPos);
this.groupBox3.Controls.Add(this.TbDlgName);
this.groupBox3.Controls.Add(this.label9);
@ -85,11 +89,21 @@
this.groupBox3.Controls.Add(this.label12);
this.groupBox3.Location = new System.Drawing.Point(3, 3);
this.groupBox3.Name = "groupBox3";
this.groupBox3.Size = new System.Drawing.Size(319, 296);
this.groupBox3.Size = new System.Drawing.Size(319, 349);
this.groupBox3.TabIndex = 4;
this.groupBox3.TabStop = false;
this.groupBox3.Text = "Параметры приложения";
//
// BtSetCurrentPos
//
this.BtSetCurrentPos.Location = new System.Drawing.Point(84, 209);
this.BtSetCurrentPos.Name = "BtSetCurrentPos";
this.BtSetCurrentPos.Size = new System.Drawing.Size(226, 23);
this.BtSetCurrentPos.TabIndex = 25;
this.BtSetCurrentPos.Text = "Задать текущую позицию окна";
this.BtSetCurrentPos.UseVisualStyleBackColor = true;
this.BtSetCurrentPos.Click += new System.EventHandler(this.BtSetCurrentPos_Click);
//
// TbDlgName
//
this.TbDlgName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
@ -304,15 +318,25 @@
//
this.openFileDialog1.FileName = "CmRcViewer.exe";
//
// BtSetCurrentPos
// cbStartMode
//
this.BtSetCurrentPos.Location = new System.Drawing.Point(84, 209);
this.BtSetCurrentPos.Name = "BtSetCurrentPos";
this.BtSetCurrentPos.Size = new System.Drawing.Size(226, 23);
this.BtSetCurrentPos.TabIndex = 25;
this.BtSetCurrentPos.Text = "Задать текущую позицию окна";
this.BtSetCurrentPos.UseVisualStyleBackColor = true;
this.BtSetCurrentPos.Click += new System.EventHandler(this.BtSetCurrentPos_Click);
this.cbStartMode.AutoSize = true;
this.cbStartMode.Location = new System.Drawing.Point(10, 287);
this.cbStartMode.Name = "cbStartMode";
this.cbStartMode.Size = new System.Drawing.Size(206, 17);
this.cbStartMode.TabIndex = 26;
this.cbStartMode.Text = "Открывать при старте окно поиска";
this.cbStartMode.UseVisualStyleBackColor = true;
//
// cbConnectMode
//
this.cbConnectMode.AutoSize = true;
this.cbConnectMode.Location = new System.Drawing.Point(10, 310);
this.cbConnectMode.Name = "cbConnectMode";
this.cbConnectMode.Size = new System.Drawing.Size(306, 17);
this.cbConnectMode.TabIndex = 27;
this.cbConnectMode.Text = "Подключаться к первому найденному в списке поиска";
this.cbConnectMode.UseVisualStyleBackColor = true;
//
// settingAppControl
//
@ -320,7 +344,7 @@
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.groupBox3);
this.Name = "settingAppControl";
this.Size = new System.Drawing.Size(325, 302);
this.Size = new System.Drawing.Size(325, 387);
this.groupBox3.ResumeLayout(false);
this.groupBox3.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.NbHeight)).EndInit();
@ -358,5 +382,7 @@
private System.Windows.Forms.TextBox TbDlgName;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.Button BtSetCurrentPos;
private System.Windows.Forms.CheckBox cbConnectMode;
private System.Windows.Forms.CheckBox cbStartMode;
}
}

View File

@ -42,6 +42,8 @@ namespace Remontor.Setting
NbWidth.Value = SGlobalSetting.settingApp.WidthDoble;
NbHeight.Value = SGlobalSetting.settingApp.HeightDoble;
TbDlgName.Text = SGlobalSetting.settingApp.DialogName;
cbConnectMode.Checked = SGlobalSetting.settingApp.ConnectMode;
cbStartMode.Checked = SGlobalSetting.settingApp.StartMode;
}
}
@ -57,6 +59,8 @@ namespace Remontor.Setting
SGlobalSetting.settingApp.WidthDoble = (int)NbWidth.Value;
SGlobalSetting.settingApp.HeightDoble = (int)NbHeight.Value;
SGlobalSetting.settingApp.DialogName = TbDlgName.Text;
SGlobalSetting.settingApp.ConnectMode = cbConnectMode.Checked;
SGlobalSetting.settingApp.StartMode = cbStartMode.Checked;
}
public bool edited()
@ -69,7 +73,9 @@ namespace Remontor.Setting
SGlobalSetting.settingApp.yPosDoble != (int)NbY.Value ||
SGlobalSetting.settingApp.WidthDoble != (int)NbWidth.Value ||
SGlobalSetting.settingApp.HeightDoble != (int)NbHeight.Value ||
SGlobalSetting.settingApp.DialogName != TbDlgName.Text
SGlobalSetting.settingApp.DialogName != TbDlgName.Text ||
SGlobalSetting.settingApp.ConnectMode != cbConnectMode.Checked ||
SGlobalSetting.settingApp.StartMode != cbStartMode.Checked
);
}

Binary file not shown.