Compare commits

...

14 Commits
v1.1 ... master

Author SHA1 Message Date
J. Fronny 9301859691 Update .gitlab-ci.yml 2020-08-31 19:20:21 +00:00
J. Fronny ff93bd23e9 Update .gitlab-ci.yml 2020-07-31 13:35:41 +00:00
J. Fronny 7327f47e0c Add LICENSE 2020-06-27 16:22:47 +00:00
J. Fronny e33b004d2d Merge branch 'renovate/configure' into 'master'
Configure Renovate

See merge request JFronny/WinPart!1
2020-06-23 12:08:12 +00:00
Renovate Bot ae465be295
Add renovate.json 2020-06-23 08:46:52 +00:00
J. Fronny 481abe6385 Delete main.yml 2020-06-18 15:22:06 +00:00
J. Fronny a702c29831 Update README.md 2020-06-18 15:17:22 +00:00
J. Fronny 13704cbbfd Add .gitlab-ci.yml 2020-06-18 15:16:13 +00:00
J. Fronny 256cf55619
Update main.yml 2020-04-02 15:42:57 +02:00
J. Fronny 1ce9dee81e
Update README.md 2020-03-24 15:45:41 +01:00
J. Fronny 6861d7d9a4
Fix MainFile in main.yml 2020-03-16 20:33:17 +01:00
J. Fronny 503d47f19c
Add automatic builds 2020-03-16 20:28:17 +01:00
CreepyCrafter24 a4cd8537f6 batchscript in package 2020-03-16 20:27:21 +01:00
CreepyCrafter24 731a2dff4b Cool stuffs 2020-03-16 20:05:44 +01:00
15 changed files with 236 additions and 288 deletions

48
.gitlab-ci.yml Normal file
View File

@ -0,0 +1,48 @@
.shared_windows_runners:
tags:
- windows
image: mcr.microsoft.com/dotnet/core/sdk
uptool:
extends:
- .shared_windows_runners
stage: deploy
script: |
mkdir i
cd i
$(new-object System.Net.WebClient).DownloadFile("https://gitlab.com/JFronny/UpTool2/-/jobs/artifacts/master/raw/Installer-generic.zip?job=uptool", "$($(pwd).Path)\Install.zip")
& "C:\Program Files\7-Zip\7z.exe" x .\Install.zip
.\Installer.exe --basic i -p
cd ..
rm -R i
$Env:Path="$Env:Path;$Env:APPDATA\UpTool2\Install"
uptool --basic add-repo DevTools https://gitlab.com/JFronny/UpTool2/-/snippets/2010392/raw
uptool --basic update
uptool --basic install "UpTool2 package tools"
$Env:Path="$Env:Path;$Env:APPDATA\UpTool2\Apps\0e35d154-d0d3-45e0-b080-62f521263a44\app"
mkdir .\build
dotnet publish -o .\build -c Release
$file = Get-Item $(Resolve-Path .\build\*.exe).Path
pkgtool build --binDir build --mainBin $file --packageFile .\package.zip --noLogo
$asm = $([Reflection.Assembly]::LoadFile($file.DirectoryName + "\" + $file.BaseName + ".dll"))
$asmver = $asm.GetName().Version.ToString()
[System.XML.XMLDocument]$xml=New-Object System.XML.XMLDocument
[System.XML.XMLElement]$app=$xml.CreateElement("app")
$xml.appendChild($app)
$app.appendChild($xml.CreateElement("Name")).InnerText = $asm.GetName().Name
$app.appendChild($xml.CreateElement("Description")).InnerText = "View information about your (logical) partitions"
$app.appendChild($xml.CreateElement("Version")).InnerText = $asmver
$app.appendChild($xml.CreateElement("ID")).InnerText = "a48b0879-42ec-40e1-885a-480e948242d7"
$app.appendChild($xml.CreateElement("File")).InnerText = $CI_PROJECT_URL + "/-/jobs/" + $CI_JOB_ID + "/artifacts/raw/package.zip"
$app.appendChild($xml.CreateElement("Hash")).InnerText = $(Get-FileHash .\package.zip).Hash
$app.appendChild($xml.CreateElement("MainFile")).InnerText = $file.Name
echo NULL > app.xml
$xml.save($(gi .\app.xml).Fullname)
artifacts:
paths:
- package.zip
- app.xml
only:
- master

21
LICENSE Normal file
View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2020 J. Fronny
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@ -1 +1,2 @@
# WinPart
[![UpTool2](https://img.shields.io/badge/Get%20it-on%20UpTool2-blue)](https://jfronny.gitlab.io/home/uptool)

View File

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/>
</startup>
</configuration>

View File

@ -2,28 +2,30 @@
using System.Collections.Generic;
using System.Management;
using WinPart.Properties;
#pragma warning disable IDE1006
namespace WinPart
namespace WinPart.Data_structure
{
class Device
internal class Device
{
public List<Partition> partitions;
public string name;
public ManagementObject mo;
public Device getFromMO(ManagementObject MO)
private ManagementBaseObject _mo;
public string Name;
public List<Partition> Partitions;
public Device GetFromMo(ManagementObject mo)
{
mo = MO;
partitions = new List<Partition>() { };
foreach (ManagementObject m in new ManagementObjectSearcher(string.Format("associators of {{{0}}} where AssocClass = Win32_DiskDriveToDiskPartition", MO.Path.RelativePath)).Get())
partitions.Add(new Partition().getFromMO(m));
name = (string)MO.Properties["Model"].Value;
_mo = mo;
Partitions = new List<Partition>();
foreach (ManagementObject m in new ManagementObjectSearcher(
$"associators of {{{mo.Path.RelativePath}}} where AssocClass = Win32_DiskDriveToDiskPartition").Get())
Partitions.Add(new Partition().GetFromMo(m));
Name = (string) mo.Properties["Model"].Value;
return this;
}
public void getInfo()
public void GetInfo()
{
foreach (string s in Resources.Device.Split(new[] { "\r\n" }, StringSplitOptions.None))
Program.printInfo(mo, s);
foreach (string s in Resources.Device.Split(new[] {"\r\n"}, StringSplitOptions.None))
Program.PrintInfo(_mo, s);
}
}
}
}

View File

@ -1,24 +1,25 @@
using System;
using System.Management;
using WinPart.Properties;
#pragma warning disable IDE1006
namespace WinPart
namespace WinPart.Data_structure
{
class LogicalDrive
internal class LogicalDrive
{
public string name;
public ManagementObject mo;
public LogicalDrive getFromMO(ManagementObject MO)
private ManagementBaseObject _mo;
public string Name;
public LogicalDrive GetFromMo(ManagementBaseObject mo)
{
name = (string)MO.Properties["Name"].Value;
mo = MO;
Name = (string) mo.Properties["Name"].Value;
_mo = mo;
return this;
}
public void getInfo()
public void GetInfo()
{
foreach (string s in Resources.LogicalDrive.Split(new[] { "\r\n" }, StringSplitOptions.None))
Program.printInfo(mo, s);
foreach (string s in Resources.LogicalDrive.Split(new[] {"\r\n"}, StringSplitOptions.None))
Program.PrintInfo(_mo, s);
}
}
}
}

View File

@ -2,28 +2,30 @@
using System.Collections.Generic;
using System.Management;
using WinPart.Properties;
#pragma warning disable IDE1006
namespace WinPart
namespace WinPart.Data_structure
{
class Partition
internal class Partition
{
public List<LogicalDrive> logicalDrives;
public string name;
public ManagementObject mo;
public Partition getFromMO(ManagementObject MO)
private ManagementBaseObject _mo;
public List<LogicalDrive> LogicalDrives;
public string Name;
public Partition GetFromMo(ManagementObject mo)
{
mo = MO;
logicalDrives = new List<LogicalDrive>() { };
foreach (ManagementObject m in new ManagementObjectSearcher(string.Format("associators of {{{0}}} where AssocClass = Win32_LogicalDiskToPartition", MO.Path.RelativePath)).Get())
logicalDrives.Add(new LogicalDrive().getFromMO(m));
name = (string)MO.Properties["Type"].Value;
_mo = mo;
LogicalDrives = new List<LogicalDrive>();
foreach (ManagementBaseObject m in new ManagementObjectSearcher(
$"associators of {{{mo.Path.RelativePath}}} where AssocClass = Win32_LogicalDiskToPartition").Get())
LogicalDrives.Add(new LogicalDrive().GetFromMo(m));
Name = (string) mo.Properties["Type"].Value;
return this;
}
public void getInfo()
public void GetInfo()
{
foreach (string s in Resources.Partition.Split(new[] { "\r\n" }, StringSplitOptions.None))
Program.printInfo(mo, s);
foreach (string s in Resources.Partition.Split(new[] {"\r\n"}, StringSplitOptions.None))
Program.PrintInfo(_mo, s);
}
}
}
}

View File

@ -1,82 +1,92 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Management;
using System.Collections;
using System.Linq;
#pragma warning disable IDE1006
using System.Management;
using WinPart.Data_structure;
using static System.Environment;
namespace WinPart
{
class Program
internal static class Program
{
static List<Device> drives;
static bool longInputSupport, debug;
static void Main(string[] args)
private static List<Device> _drives;
private static bool _longInputSupport, _debug;
private static void Main(string[] args)
{
List<string> li = new List<string>(args.Select(s => {
List<string> li = new List<string>(args.Select(s =>
{
if (s.StartsWith("-") || s.StartsWith("/"))
s = s.Remove(0, 1);
return s;
}));
longInputSupport = li.Contains("li");
debug = li.Contains("debug");
_longInputSupport = li.Contains("li");
_debug = li.Contains("debug");
bool run = true;
if (li.Contains("help") || li.Contains("?"))
{
Console.WriteLine("WinPart is a tool for manipulating storage.\r\n\r\nWinPart [-li] [-help] [-debug]\r\n\r\nli Enables large inputs (over 1 char)\r\nhelp Shows this message\r\ndebug Troubleshooting");
Console.WriteLine(@"WinPart is a tool for manipulating storage.
WinPart [-li] [-help] [-debug]
li Enables large inputs (over 1 char)
help Shows this message
debug Troubleshooting");
run = false;
}
if (run)
mainWindow();
}
static void mainWindow()
{
if (!run) return;
Console.WriteLine("Use \"WinPart -help\" for CMD Args");
Console.WriteLine("Welcome to WinPart. Choose one of the disks by their number to continue.");
try
{
drives = new List<Device>() { };
_drives = new List<Device>();
int i = 0;
foreach (ManagementObject mo in new ManagementObjectSearcher("select * from Win32_DiskDrive").Get())
{
i++;
drives.Add(new Device().getFromMO(mo));
Console.WriteLine(i.ToString() + ": " + drives[drives.Count - 1].name);
_drives.Add(new Device().GetFromMo(mo));
Console.WriteLine($"{i}: {_drives[^1].Name}");
}
Device drive = drives[int.Parse(getInput()) - 1];
Console.WriteLine("Choose one of the operations by their number to continue.\r\n1: Info\r\n2: Open");
switch (int.Parse(getInput()))
Device drive = _drives[int.Parse(GetInput()) - 1];
Console.WriteLine(@"Choose one of the operations by their number to continue.
1: Info
2: Open");
switch (int.Parse(GetInput()))
{
case 1:
drive.getInfo();
drive.GetInfo();
break;
case 2:
Console.WriteLine("Processing...\r\nChoose one of the partitions by their number to continue.");
for (i = 0; i < drive.partitions.Count; i++)
Console.WriteLine((i + 1).ToString() + ": " + drive.partitions[i].name);
Partition partition = drive.partitions[int.Parse(getInput()) - 1];
Console.WriteLine("Choose one of the operations by their number to continue.\r\n1: Info\r\n2: Open");
switch (int.Parse(getInput()))
Console.WriteLine(@"Processing...
Choose one of the partitions by their number to continue.");
for (i = 0; i < drive.Partitions.Count; i++)
Console.WriteLine($"{i + 1}: {drive.Partitions[i].Name}");
Partition partition = drive.Partitions[int.Parse(GetInput()) - 1];
Console.WriteLine(@"Choose one of the operations by their number to continue.
1: Info
2: Open");
switch (int.Parse(GetInput()))
{
case 1:
partition.getInfo();
partition.GetInfo();
break;
case 2:
Console.WriteLine("Processing...\r\nChoose one of the logical drives by their number to continue.");
for (i = 0; i < partition.logicalDrives.Count; i++)
Console.WriteLine((i + 1).ToString() + ": " + partition.logicalDrives[i].name);
LogicalDrive logicalDrive = partition.logicalDrives[int.Parse(getInput()) - 1];
Console.WriteLine("Choose one of the operations by their number to continue.\r\n1: Info\r\n2: Explorer");
switch (int.Parse(getInput()))
Console.WriteLine(@"Processing...
Choose one of the logical drives by their number to continue.");
for (i = 0; i < partition.LogicalDrives.Count; i++)
Console.WriteLine($"{i + 1}: {partition.LogicalDrives[i].Name}");
LogicalDrive logicalDrive = partition.LogicalDrives[int.Parse(GetInput()) - 1];
Console.WriteLine(@"Choose one of the operations by their number to continue.
1: Info
2: Explorer");
switch (int.Parse(GetInput()))
{
case 1:
logicalDrive.getInfo();
logicalDrive.GetInfo();
break;
case 2:
Process.Start(logicalDrive.name);
break;
default:
Process.Start(logicalDrive.Name);
break;
}
break;
@ -90,49 +100,53 @@ namespace WinPart
break;
}
}
catch (Exception e) { Console.WriteLine(e.ToString()); }
if (debug) Console.ReadKey();
catch (Exception e)
{
Console.WriteLine(e.ToString());
}
if (_debug) Console.ReadKey();
}
static string getInput()
private static string GetInput()
{
Console.Write("\r\n==> ");
var out_ = "";
if (longInputSupport)
out_ = Console.ReadLine();
else
out_ = Console.ReadKey().KeyChar.ToString();
string output = _longInputSupport ? Console.ReadLine() : Console.ReadKey().KeyChar.ToString();
Console.Write("\r\n\r\n");
return out_;
return output;
}
public static void printInfo(ManagementObject mo, string s)
public static void PrintInfo(ManagementBaseObject mo, string s)
{
string[] tmp1 = { };
PropertyData tmp2;
try
{
tmp1 = s.Split(" ".ToCharArray());
if (tmp1[tmp1.Length - 1].EndsWith("[]"))
PropertyData tmp2;
if (tmp1[^1].EndsWith("[]"))
{
tmp2 = mo.Properties[tmp1[tmp1.Length - 1].Replace("[]", "")];
tmp2 = mo.Properties[tmp1[^1].Replace("[]", "")];
string tmp3 = "[ ";
IList list = (Array)tmp2.Value;
IList list = (Array) tmp2.Value;
for (int i = 0; i < list.Count; i++)
{
tmp3 += list[i].ToString();
if (i + 1 < list.Count) tmp3 += " | ";
}
tmp3 += " ]";
Console.WriteLine(tmp2.Name + ": " + tmp3);
Console.WriteLine($"{tmp2.Name}: {tmp3}");
}
else
{
tmp2 = mo.Properties[tmp1[tmp1.Length - 1]];
Console.WriteLine(tmp2.Name + ": " + tmp2.Value);
tmp2 = mo.Properties[tmp1[^1]];
Console.WriteLine($"{tmp2.Name}: {tmp2.Value}");
}
}
catch (Exception e) { Console.Write("Could not read: " + tmp1[tmp1.Length - 1]); if (debug) Console.Write(" due to: " + e.ToString()); Console.Write("\r\n"); }
catch (Exception e)
{
Console.Write($"Could not read: {tmp1[^1]}");
if (_debug) Console.Write($" due to: {e}");
Console.Write(NewLine);
}
}
}
}
}

View File

@ -1,5 +1,4 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
@ -32,5 +31,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@ -8,10 +8,15 @@
// </auto-generated>
//------------------------------------------------------------------------------
using System.CodeDom.Compiler;
using System.ComponentModel;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using System.Resources;
using System.Runtime.CompilerServices;
namespace WinPart.Properties {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
@ -19,27 +24,27 @@ namespace WinPart.Properties {
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[GeneratedCode("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
[DebuggerNonUserCode()]
[CompilerGenerated()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
private static CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
[SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
[EditorBrowsable(EditorBrowsableState.Advanced)]
internal static ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("WinPart.Properties.Resources", typeof(Resources).Assembly);
if (ReferenceEquals(resourceMan, null)) {
ResourceManager temp = new ResourceManager("WinPart.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
@ -50,8 +55,8 @@ namespace WinPart.Properties {
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
[EditorBrowsable(EditorBrowsableState.Advanced)]
internal static CultureInfo Culture {
get {
return resourceCulture;
}

View File

@ -1,26 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace WinPart.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.3.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default {
get {
return defaultInstance;
}
}
}
}

View File

@ -1,6 +0,0 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
</SettingsFile>

View File

@ -1,122 +1,38 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{2EF21D5A-1476-4C07-8D1F-5440231547AE}</ProjectGuid>
<TargetFramework>netcoreapp3.1</TargetFramework>
<OutputType>Exe</OutputType>
<RootNamespace>WinPart</RootNamespace>
<AssemblyName>WinPart</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
<TargetFrameworkProfile />
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<LangVersion>8</LangVersion>
<Nullable>enable</Nullable>
<Deterministic>false</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup />
<PropertyGroup />
<PropertyGroup>
<StartupObject>WinPart.Program</StartupObject>
</PropertyGroup>
<PropertyGroup />
<PropertyGroup>
<ApplicationManifest>app.manifest</ApplicationManifest>
<PostBuildEvent>
echo @echo off > WinPart.bat
echo start %%~dp0WinPart.exe -debug >> WinPart.bat
if exist "$(SolutionDir)Data\pkgtool.exe" ($(SolutionDir)Data\pkgtool.exe build --noLogo --binDir . --mainBin WinPart.bat) else if exist "%appdata%\UpTool2\Apps\0e35d154-d0d3-45e0-b080-62f521263a44\app\pkgtool.exe" ("%appdata%\UpTool2\Apps\0e35d154-d0d3-45e0-b080-62f521263a44\app\pkgtool.exe" build --noLogo --binDir . --mainBin WinPart.bat) else echo Cound not find Package build tools, skipping
</PostBuildEvent>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Management" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Data structure\Device.cs" />
<Compile Include="Data structure\LogicalDrive.cs" />
<Compile Include="Data structure\Partition.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Properties\Resources.Designer.cs">
<Compile Update="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
<DependentUpon>Settings.settings</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
<None Include="app.manifest">
<SubType>Designer</SubType>
</None>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Properties\Resources.resx">
<EmbeddedResource Update="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include=".NETFramework,Version=v4.7.2">
<Visible>False</Visible>
<ProductName>Microsoft .NET Framework 4.7.2 %28x86 and x64%29</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>false</Install>
</BootstrapperPackage>
</ItemGroup>
<ItemGroup>
<Content Include="Data structure\Device.txt" />
<Content Include="Data structure\LogicalDrive.txt" />
<Content Include="Data structure\Partition.txt" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<ItemGroup>
<PackageReference Include="System.Management" Version="4.7.0" />
</ItemGroup>
</Project>

View File

@ -1,28 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<requestedExecutionLevel level="highestAvailable" uiAccess="false" />
</requestedPrivileges>
</security>
</trustInfo>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />
</application>
</compatibility>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="*"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
</assembly>

5
renovate.json Normal file
View File

@ -0,0 +1,5 @@
{
"extends": [
"config:base"
]
}