Исправили старт без конфиг файла

This commit is contained in:
klavirshik 2024-09-18 08:38:26 +02:00
parent 89b2d3b139
commit 519c366687
7 changed files with 120 additions and 79 deletions

View File

@ -1,6 +1,25 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
<appSettings>
<add key="ClientSettingsProvider.ServiceUri" value="" />
<add key="ClientSettingsProvider.ConnectionStringName" value="DefaultConnection" />
</appSettings>
<system.web>
<membership defaultProvider="ClientAuthenticationMembershipProvider">
<providers>
<add name="ClientAuthenticationMembershipProvider" type="System.Web.ClientServices.Providers.ClientWindowsAuthenticationMembershipProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" connectionStringName="DefaultConnection" credentialsProvider="" />
</providers>
</membership>
<roleManager defaultProvider="ClientRoleProvider" enabled="true">
<providers>
<add name="ClientRoleProvider" type="System.Web.ClientServices.Providers.ClientRoleProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" cacheTimeout="86400" connectionStringName="DefaultConnection" />
</providers>
</roleManager>
</system.web>
<connectionStrings>
<add name="DefaultConnection" connectionString="Data Source = |SQL/CE|" />
</connectionStrings>
</configuration>

View File

@ -44,6 +44,8 @@
this.tabPage2 = new System.Windows.Forms.TabPage();
this.label2 = new System.Windows.Forms.Label();
this.bt_resetAll = new System.Windows.Forms.Button();
this.checkControl1 = new Reseter2.CheckControl();
this.treeView1 = new Reseter2.NewTreeView();
this.imageList1 = new System.Windows.Forms.ImageList(this.components);
this.imageList2 = new System.Windows.Forms.ImageList(this.components);
this.tabPage3 = new System.Windows.Forms.TabPage();
@ -57,6 +59,9 @@
this.sm_RebootItem = new System.Windows.Forms.ToolStripMenuItem();
this.sm_SaveItem = new System.Windows.Forms.ToolStripMenuItem();
this.tabPage4 = new System.Windows.Forms.TabPage();
this.settingRebootControl1 = new Reseter2.Setting.SettingRebootControl();
this.settingSCCMControl1 = new Reseter2.Setting.SettingSCCMControl();
this.settingWordsControl1 = new Reseter2.Setting.SettingWordsControl();
this.button4 = new System.Windows.Forms.Button();
this.tabPage5 = new System.Windows.Forms.TabPage();
this.label20 = new System.Windows.Forms.Label();
@ -77,13 +82,8 @@
this.label16 = new System.Windows.Forms.Label();
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.checkControl1 = new Reseter2.CheckControl();
this.treeView1 = new Reseter2.NewTreeView();
this.settingRebootControl1 = new Reseter2.Setting.SettingRebootControl();
this.settingSCCMControl1 = new Reseter2.Setting.SettingSCCMControl();
this.settingWordsControl1 = new Reseter2.Setting.SettingWordsControl();
this.WordsCopy = new System.Windows.Forms.ToolStripMenuItem();
this.tb_comp = new System.Windows.Forms.TextBox();
this.tabControl1.SuspendLayout();
this.tabPage1.SuspendLayout();
this.statusStrip1.SuspendLayout();
@ -248,6 +248,35 @@
this.bt_resetAll.UseVisualStyleBackColor = false;
this.bt_resetAll.Click += new System.EventHandler(this.bt_resetAll_Click);
//
// checkControl1
//
this.checkControl1.Location = new System.Drawing.Point(14, 7);
this.checkControl1.Name = "checkControl1";
this.checkControl1.Size = new System.Drawing.Size(18, 18);
this.checkControl1.TabIndex = 2;
//
// treeView1
//
this.treeView1.Dock = System.Windows.Forms.DockStyle.Bottom;
this.treeView1.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.treeView1.HideSelection = false;
this.treeView1.ImageIndex = 0;
this.treeView1.ImageList = this.imageList1;
this.treeView1.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.treeView1.Indent = 27;
this.treeView1.ItemHeight = 24;
this.treeView1.Location = new System.Drawing.Point(3, 32);
this.treeView1.Name = "treeView1";
this.treeView1.SelectedImageIndex = 0;
this.treeView1.ShowLines = false;
this.treeView1.ShowNodeToolTips = true;
this.treeView1.Size = new System.Drawing.Size(396, 653);
this.treeView1.StateImageList = this.imageList2;
this.treeView1.TabIndex = 0;
this.treeView1.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.treeView1_AfterCheck);
this.treeView1.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.treeView1_NodeMouseClick);
this.treeView1.NodeMouseDoubleClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.treeView1_NodeMouseDoubleClick);
//
// imageList1
//
this.imageList1.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList1.ImageStream")));
@ -392,6 +421,27 @@
this.tabPage4.Text = "Настройки";
this.tabPage4.UseVisualStyleBackColor = true;
//
// settingRebootControl1
//
this.settingRebootControl1.Location = new System.Drawing.Point(6, 299);
this.settingRebootControl1.Name = "settingRebootControl1";
this.settingRebootControl1.Size = new System.Drawing.Size(391, 130);
this.settingRebootControl1.TabIndex = 7;
//
// settingSCCMControl1
//
this.settingSCCMControl1.Location = new System.Drawing.Point(6, 115);
this.settingSCCMControl1.Name = "settingSCCMControl1";
this.settingSCCMControl1.Size = new System.Drawing.Size(391, 178);
this.settingSCCMControl1.TabIndex = 6;
//
// settingWordsControl1
//
this.settingWordsControl1.Location = new System.Drawing.Point(6, 6);
this.settingWordsControl1.Name = "settingWordsControl1";
this.settingWordsControl1.Size = new System.Drawing.Size(391, 103);
this.settingWordsControl1.TabIndex = 5;
//
// button4
//
this.button4.Location = new System.Drawing.Point(317, 435);
@ -442,7 +492,7 @@
// label18
//
this.label18.AutoSize = true;
this.label18.Location = new System.Drawing.Point(6, 221);
this.label18.Location = new System.Drawing.Point(6, 235);
this.label18.Name = "label18";
this.label18.Size = new System.Drawing.Size(62, 13);
this.label18.TabIndex = 4;
@ -451,7 +501,7 @@
// label17
//
this.label17.AutoSize = true;
this.label17.Location = new System.Drawing.Point(6, 208);
this.label17.Location = new System.Drawing.Point(6, 222);
this.label17.Name = "label17";
this.label17.Size = new System.Drawing.Size(325, 13);
this.label17.TabIndex = 3;
@ -561,7 +611,7 @@
//
this.pictureBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
this.pictureBox1.Location = new System.Drawing.Point(153, 44);
this.pictureBox1.Location = new System.Drawing.Point(153, 51);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(96, 96);
this.pictureBox1.TabIndex = 1;
@ -570,7 +620,7 @@
// label16
//
this.label16.AutoSize = true;
this.label16.Location = new System.Drawing.Point(6, 195);
this.label16.Location = new System.Drawing.Point(6, 209);
this.label16.Name = "label16";
this.label16.Size = new System.Drawing.Size(50, 13);
this.label16.TabIndex = 0;
@ -583,7 +633,7 @@
this.WordsCopy});
this.cm_words.Name = "cm_words";
this.cm_words.ShowImageMargin = false;
this.cm_words.Size = new System.Drawing.Size(169, 70);
this.cm_words.Size = new System.Drawing.Size(169, 48);
//
// WordsReboot
//
@ -592,6 +642,13 @@
this.WordsReboot.Text = "Перезарузить";
this.WordsReboot.Click += new System.EventHandler(this.WordsReboot_Click);
//
// WordsCopy
//
this.WordsCopy.Name = "WordsCopy";
this.WordsCopy.Size = new System.Drawing.Size(168, 22);
this.WordsCopy.Text = "Скопировать в буфер";
this.WordsCopy.Click += new System.EventHandler(this.WordsCopy_Click);
//
// tb_comp
//
this.tb_comp.BackColor = System.Drawing.SystemColors.Window;
@ -604,63 +661,6 @@
this.tb_comp.Enter += new System.EventHandler(this.tb_comp_Enter);
this.tb_comp.KeyDown += new System.Windows.Forms.KeyEventHandler(this.tb_comp_KeyDown);
//
// checkControl1
//
this.checkControl1.Location = new System.Drawing.Point(14, 7);
this.checkControl1.Name = "checkControl1";
this.checkControl1.Size = new System.Drawing.Size(18, 18);
this.checkControl1.TabIndex = 2;
//
// treeView1
//
this.treeView1.Dock = System.Windows.Forms.DockStyle.Bottom;
this.treeView1.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.treeView1.HideSelection = false;
this.treeView1.ImageIndex = 0;
this.treeView1.ImageList = this.imageList1;
this.treeView1.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.treeView1.Indent = 27;
this.treeView1.ItemHeight = 24;
this.treeView1.Location = new System.Drawing.Point(3, 32);
this.treeView1.Name = "treeView1";
this.treeView1.SelectedImageIndex = 0;
this.treeView1.ShowLines = false;
this.treeView1.ShowNodeToolTips = true;
this.treeView1.Size = new System.Drawing.Size(396, 653);
this.treeView1.StateImageList = this.imageList2;
this.treeView1.TabIndex = 0;
this.treeView1.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.treeView1_AfterCheck);
this.treeView1.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.treeView1_NodeMouseClick);
this.treeView1.NodeMouseDoubleClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.treeView1_NodeMouseDoubleClick);
//
// settingRebootControl1
//
this.settingRebootControl1.Location = new System.Drawing.Point(6, 299);
this.settingRebootControl1.Name = "settingRebootControl1";
this.settingRebootControl1.Size = new System.Drawing.Size(391, 130);
this.settingRebootControl1.TabIndex = 7;
//
// settingSCCMControl1
//
this.settingSCCMControl1.Location = new System.Drawing.Point(6, 115);
this.settingSCCMControl1.Name = "settingSCCMControl1";
this.settingSCCMControl1.Size = new System.Drawing.Size(391, 178);
this.settingSCCMControl1.TabIndex = 6;
//
// settingWordsControl1
//
this.settingWordsControl1.Location = new System.Drawing.Point(6, 6);
this.settingWordsControl1.Name = "settingWordsControl1";
this.settingWordsControl1.Size = new System.Drawing.Size(391, 103);
this.settingWordsControl1.TabIndex = 5;
//
// WordsCopy
//
this.WordsCopy.Name = "WordsCopy";
this.WordsCopy.Size = new System.Drawing.Size(168, 22);
this.WordsCopy.Text = "Скопировать в буфер";
this.WordsCopy.Click += new System.EventHandler(this.WordsCopy_Click);
//
// Form1
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;

View File

@ -131,7 +131,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAACk
UQAAAk1TRnQBSQFMAgEBCQEAAXgBBwF4AQcBGAEAARgBAAT/AREBAAj/AUIBTQE2BwABNgMAASgDAAFg
UQAAAk1TRnQBSQFMAgEBCQEAAYABBwGAAQcBGAEAARgBAAT/AREBAAj/AUIBTQE2BwABNgMAASgDAAFg
AwABSAMAAQEBAAEQBgABNhIAAf8BfwH/AX8B/wF/Af8BfwH/AX8B/wF/Af8BfwH/AX8B/wF/Af8BfwH/
AX8B/wF/Af8BfwH/AX8B/wF/Af8BfwH/AX8B/wF/Af8BfwH/AX8B/wF/Af8BfwH/AX8B/wF/kAAB/wF/
Af8BfwH/AX8B/wF/Af8BfwH/AX8B/wF/Af8BfwH/AX8B/wF/Af8BfwH/AX8B/wF/Af8BfwH/AX8B/wF/
@ -490,7 +490,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAABQ
CgAAAk1TRnQBSQFMAgEBAwEAARgBBgEYAQYBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
CgAAAk1TRnQBSQFMAgEBAwEAASABBgEgAQYBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA

Binary file not shown.

View File

@ -20,7 +20,7 @@
</requestedPrivileges>
<applicationRequestMinimum>
<defaultAssemblyRequest permissionSetReference="Custom" />
<PermissionSet class="System.Security.PermissionSet" version="1" Unrestricted="true" ID="Custom" SameSite="site" />
<PermissionSet class="System.Security.PermissionSet" version="1" ID="Custom" SameSite="site" />
</applicationRequestMinimum>
</security>
</trustInfo>

View File

@ -69,11 +69,25 @@
<PropertyGroup>
<ApplicationManifest>Properties\app.manifest</ApplicationManifest>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>true</SignAssembly>
</PropertyGroup>
<PropertyGroup>
<AssemblyOriginatorKeyFile>Klavirshik.pfx</AssemblyOriginatorKeyFile>
</PropertyGroup>
<PropertyGroup>
<ManifestCertificateThumbprint>9A04F507AAE2666E7DAF9DC3357A574132BA2697</ManifestCertificateThumbprint>
</PropertyGroup>
<PropertyGroup>
<ManifestKeyFile>KlavaOrg.pfx</ManifestKeyFile>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Core" />
<Reference Include="System.DirectoryServices" />
<Reference Include="System.ServiceProcess" />
<Reference Include="System.Web.Extensions" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
@ -235,6 +249,7 @@
<EmbeddedResource Include="Words\WordsItemControl.resx">
<DependentUpon>WordsItemControl.cs</DependentUpon>
</EmbeddedResource>
<None Include="Klavirshik.pfx" />
<None Include="Properties\app.manifest" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
@ -250,7 +265,6 @@
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<None Include="Properties\MySql.Data.dll" />
<Content Include="reseter.ico" />
</ItemGroup>
<ItemGroup>

View File

@ -34,14 +34,22 @@ namespace Reseter2.Setting
public static void LoadSetting()
{
SSetting setting;
object output = Load("res.dat");
if (!(output is SSetting)) return;
SSetting setting = (SSetting)output;
if (!(output is SSetting))
{
setting = new SSetting();
}
else
{
setting = (SSetting)output;
}
if (setting.settingWords != null) settingWords = setting.settingWords;
if (setting.settingExpand != null) settingExpand = setting.settingExpand;
if (setting.settingSCCM != null) settingSCCM = setting.settingSCCM;
if (setting.settingReboot != null) settingReboot = setting.settingReboot;
HistoryList.Hitem = setting.historyItems;
if (setting.historyItems != null) HistoryList.Hitem = setting.historyItems;
SSeaher.LoadSetting();
// return output;
}