diff --git a/Hussin-Pr-1/prakteka1/prakteka1.sln b/Hussin-Pr-1/prakteka1/prakteka1.sln new file mode 100644 index 0000000..f058446 --- /dev/null +++ b/Hussin-Pr-1/prakteka1/prakteka1.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.31105.61 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "prakteka1", "prakteka1\prakteka1.csproj", "{819B0F81-2D20-4261-A221-41EFC7F61C52}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {819B0F81-2D20-4261-A221-41EFC7F61C52}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {819B0F81-2D20-4261-A221-41EFC7F61C52}.Debug|Any CPU.Build.0 = Debug|Any CPU + {819B0F81-2D20-4261-A221-41EFC7F61C52}.Release|Any CPU.ActiveCfg = Release|Any CPU + {819B0F81-2D20-4261-A221-41EFC7F61C52}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {8AB235C4-383D-4B73-94A0-D6C1326976B7} + EndGlobalSection +EndGlobal diff --git a/Hussin-Pr-1/prakteka1/prakteka1/Form1.Designer.cs b/Hussin-Pr-1/prakteka1/prakteka1/Form1.Designer.cs new file mode 100644 index 0000000..da47251 --- /dev/null +++ b/Hussin-Pr-1/prakteka1/prakteka1/Form1.Designer.cs @@ -0,0 +1,77 @@ + +namespace prakteka1 +{ + partial class Form1 + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.listBox1 = new System.Windows.Forms.ListBox(); + this.button1 = new System.Windows.Forms.Button(); + this.SuspendLayout(); + // + // listBox1 + // + this.listBox1.FormattingEnabled = true; + this.listBox1.ItemHeight = 15; + this.listBox1.Location = new System.Drawing.Point(0, -3); + this.listBox1.Name = "listBox1"; + this.listBox1.Size = new System.Drawing.Size(405, 574); + this.listBox1.TabIndex = 1; + // + // button1 + // + this.button1.BackColor = System.Drawing.Color.Green; + this.button1.Location = new System.Drawing.Point(0, 562); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(405, 49); + this.button1.TabIndex = 2; + this.button1.Text = "OK"; + this.button1.UseVisualStyleBackColor = false; + this.button1.Click += new System.EventHandler(this.button1_Click); + // + // Form1 + // + this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.DimGray; + this.ClientSize = new System.Drawing.Size(405, 607); + this.Controls.Add(this.button1); + this.Controls.Add(this.listBox1); + this.Name = "Form1"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "Form1"; + this.Load += new System.EventHandler(this.Form1_Load); + this.ResumeLayout(false); + + } + + #endregion + private System.Windows.Forms.ListBox listBox1; + private System.Windows.Forms.Button button1; + } +} + diff --git a/Hussin-Pr-1/prakteka1/prakteka1/Form1.cs b/Hussin-Pr-1/prakteka1/prakteka1/Form1.cs new file mode 100644 index 0000000..e8798d1 --- /dev/null +++ b/Hussin-Pr-1/prakteka1/prakteka1/Form1.cs @@ -0,0 +1,73 @@ +using Microsoft.Win32; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Diagnostics; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace prakteka1 +{ + public partial class Form1 : Form + { + public Form1() + { + InitializeComponent(); + } + + void GetInstalledApps() + + + {List items = new List(); + string SoftwareKey = @"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"; + using (RegistryKey rk = Registry.LocalMachine.OpenSubKey(SoftwareKey)) + { + foreach (string skName in rk.GetSubKeyNames()) + { + using (RegistryKey sk = rk.OpenSubKey(skName)) + { + try + { + + if (sk.GetValue("DisplayName") != null) + { + listBox1.Items.Add(sk.GetValue("DisplayName")); + + } + } + catch (Exception ex) + { + MessageBox.Show(ex.Message, "Exception", + MessageBoxButtons.OK, MessageBoxIcon.Warning); + } + } + items.Clear(); + } + } + + } + + private void button1_Click(object sender, EventArgs e) + { + GetInstalledApps(); + + } + + private void Form1_Load(object sender, EventArgs e) + { + // GetAllProcess(); + } + + + + + } +} + + + + diff --git a/Hussin-Pr-1/prakteka1/prakteka1/Form1.resx b/Hussin-Pr-1/prakteka1/prakteka1/Form1.resx new file mode 100644 index 0000000..f298a7b --- /dev/null +++ b/Hussin-Pr-1/prakteka1/prakteka1/Form1.resx @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Hussin-Pr-1/prakteka1/prakteka1/Program.cs b/Hussin-Pr-1/prakteka1/prakteka1/Program.cs new file mode 100644 index 0000000..d744782 --- /dev/null +++ b/Hussin-Pr-1/prakteka1/prakteka1/Program.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace prakteka1 +{ + static class Program + { + /// + /// The main entry point for the application. + /// + [STAThread] + static void Main() + { + Application.SetHighDpiMode(HighDpiMode.SystemAware); + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new Form1()); + } + } +} diff --git a/Hussin-Pr-1/prakteka1/prakteka1/prakteka1.csproj b/Hussin-Pr-1/prakteka1/prakteka1/prakteka1.csproj new file mode 100644 index 0000000..130a486 --- /dev/null +++ b/Hussin-Pr-1/prakteka1/prakteka1/prakteka1.csproj @@ -0,0 +1,9 @@ + + + + WinExe + netcoreapp3.1 + true + + + \ No newline at end of file diff --git a/Hussin-Pr-1/prakteka1/Скриншот 06-02-2023 110222.png b/Hussin-Pr-1/prakteka1/Скриншот 06-02-2023 110222.png new file mode 100644 index 0000000..69974ef Binary files /dev/null and b/Hussin-Pr-1/prakteka1/Скриншот 06-02-2023 110222.png differ