Skip to content

Commit ffbb21c

Browse files
author
LAB02 Research
committed
v2022.3.10
1 parent bc56947 commit ffbb21c

28 files changed

+2643
-0
lines changed

src/ScoopBoxManager.sln

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.1.32228.430
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ScoopBoxManager", "ScoopBoxManager\ScoopBoxManager.csproj", "{4A83E129-7251-4DBC-B842-B651CF093166}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|Any CPU = Debug|Any CPU
11+
Release|Any CPU = Release|Any CPU
12+
EndGlobalSection
13+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14+
{4A83E129-7251-4DBC-B842-B651CF093166}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{4A83E129-7251-4DBC-B842-B651CF093166}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{4A83E129-7251-4DBC-B842-B651CF093166}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{4A83E129-7251-4DBC-B842-B651CF093166}.Release|Any CPU.Build.0 = Release|Any CPU
18+
EndGlobalSection
19+
GlobalSection(SolutionProperties) = preSolution
20+
HideSolutionNode = FALSE
21+
EndGlobalSection
22+
GlobalSection(ExtensibilityGlobals) = postSolution
23+
VisualSVNWorkingCopyRoot = .
24+
SolutionGuid = {71F77405-635E-4E47-A6D3-FB470BEE105C}
25+
EndGlobalSection
26+
EndGlobal
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
namespace ScoopBoxManager.Enums;
2+
3+
public enum PackageManagerType
4+
{
5+
Scoop,
6+
Chocolatey
7+
}

src/ScoopBoxManager/Forms/AddApplication.Designer.cs

Lines changed: 125 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.ComponentModel;
4+
using System.Data;
5+
using System.Drawing;
6+
using System.Linq;
7+
using System.Text;
8+
using System.Threading.Tasks;
9+
using System.Windows.Forms;
10+
using ScoopBoxManager.Enums;
11+
using ScoopBoxManager.Models;
12+
13+
namespace ScoopBoxManager.Forms
14+
{
15+
public partial class AddApplication : Form
16+
{
17+
public PackageManagerApplication Application { get; set; } = null;
18+
public int ListviewIndex { get; set; } = -1;
19+
20+
public AddApplication(PackageManagerApplication application, int listviewIndex)
21+
{
22+
Application = application;
23+
ListviewIndex = listviewIndex;
24+
25+
InitializeComponent();
26+
}
27+
28+
public AddApplication()
29+
{
30+
InitializeComponent();
31+
}
32+
33+
/// <summary>
34+
/// Optionally loads the provided application
35+
/// </summary>
36+
/// <param name="sender"></param>
37+
/// <param name="e"></param>
38+
private void Application_Load(object sender, EventArgs e)
39+
{
40+
// load enum
41+
CbPackageManager.DataSource = Enum.GetValues(typeof(PackageManagerType));
42+
43+
if (Application == null) return;
44+
45+
// load linked application
46+
CbPackageManager.Text = Application.PackageManager.ToString();
47+
TbApplication.Text = Application.Package;
48+
}
49+
50+
/// <summary>
51+
/// Converts the settings to a PackageManagerApplication object
52+
/// </summary>
53+
/// <param name="sender"></param>
54+
/// <param name="e"></param>
55+
private void BtnSave_Click(object sender, EventArgs e)
56+
{
57+
// get values
58+
var app = TbApplication.Text.Trim();
59+
var manager = Enum.Parse<PackageManagerType>(CbPackageManager.SelectedValue.ToString() ?? "Scoop");
60+
61+
// basic checks
62+
if (string.IsNullOrEmpty(app))
63+
{
64+
MessageBox.Show("Enter an application.", "ScoopBoxManager", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
65+
ActiveControl = TbApplication;
66+
return;
67+
}
68+
69+
// optionally create new obj
70+
Application ??= new PackageManagerApplication();
71+
72+
// map values
73+
Application.Package = app;
74+
Application.PackageManager = manager;
75+
76+
// done!
77+
DialogResult = DialogResult.OK;
78+
}
79+
}
80+
}
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
<root>
2+
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
3+
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
4+
<xsd:element name="root" msdata:IsDataSet="true">
5+
<xsd:complexType>
6+
<xsd:choice maxOccurs="unbounded">
7+
<xsd:element name="metadata">
8+
<xsd:complexType>
9+
<xsd:sequence>
10+
<xsd:element name="value" type="xsd:string" minOccurs="0" />
11+
</xsd:sequence>
12+
<xsd:attribute name="name" use="required" type="xsd:string" />
13+
<xsd:attribute name="type" type="xsd:string" />
14+
<xsd:attribute name="mimetype" type="xsd:string" />
15+
<xsd:attribute ref="xml:space" />
16+
</xsd:complexType>
17+
</xsd:element>
18+
<xsd:element name="assembly">
19+
<xsd:complexType>
20+
<xsd:attribute name="alias" type="xsd:string" />
21+
<xsd:attribute name="name" type="xsd:string" />
22+
</xsd:complexType>
23+
</xsd:element>
24+
<xsd:element name="data">
25+
<xsd:complexType>
26+
<xsd:sequence>
27+
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
28+
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
29+
</xsd:sequence>
30+
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
31+
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
32+
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
33+
<xsd:attribute ref="xml:space" />
34+
</xsd:complexType>
35+
</xsd:element>
36+
<xsd:element name="resheader">
37+
<xsd:complexType>
38+
<xsd:sequence>
39+
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
40+
</xsd:sequence>
41+
<xsd:attribute name="name" type="xsd:string" use="required" />
42+
</xsd:complexType>
43+
</xsd:element>
44+
</xsd:choice>
45+
</xsd:complexType>
46+
</xsd:element>
47+
</xsd:schema>
48+
<resheader name="resmimetype">
49+
<value>text/microsoft-resx</value>
50+
</resheader>
51+
<resheader name="version">
52+
<value>2.0</value>
53+
</resheader>
54+
<resheader name="reader">
55+
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
56+
</resheader>
57+
<resheader name="writer">
58+
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
59+
</resheader>
60+
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
61+
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
62+
<value>
63+
AAABAAEAICAAAAEAIADVBAAAFgAAAIlQTkcNChoKAAAADUlIRFIAAAAgAAAAIAgGAAAAc3p69AAAAAFz
64+
UkdCAK7OHOkAAAAEZ0FNQQAAsY8L/GEFAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAEaklEQVRYR+1WfUyV
65+
VRx+CvCDUjPJO76CvLvMYCZJMWk6zKyGimsR2togR6lRm4ymJmMWuO6iYjgamkU6dX1YbY4tN6GWdZcK
66+
QRRKOLQwCYFAviEEEeo8v73v5YX7XrhrFX/Us92d95z7nvf3nOc8v985N90Xl/wHphA3a+2U4X8CkxKI
67+
iVqE3du2IPreCG1kYtw2exYy01Kwcf1abWRieGxC35kzMHPGdDy07H7ELl2C0GB/zPe7Xf5r7+xGQ1ML
68+
TlecRYmjDM0tbTLuCTwiMOsWX6Q8uQ7r41dh2jQfXLz0K6prf0ZHZw98fLxhDQ3CooVWWf3w8DBOnDyD
69+
gkOf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