From 55d7b47820431a4669f890fd57def5529ac56047 Mon Sep 17 00:00:00 2001 From: Lisias Date: Fri, 14 May 2021 03:55:31 -0300 Subject: [PATCH] Something that it's not relevant, as it appears. --- CKAN.sln | 33 ++++++++++-- .../CKAN-ThisDoesNotExists.csproj | 49 +++++++++++++++++ .../Properties/AssemblyInfo.cs | 26 +++++++++ Plugins/ThisDoesNotExists/Startup.cs | 54 +++++++++++++++++++ 4 files changed, 157 insertions(+), 5 deletions(-) create mode 100644 Plugins/ThisDoesNotExists/CKAN-ThisDoesNotExists.csproj create mode 100644 Plugins/ThisDoesNotExists/Properties/AssemblyInfo.cs create mode 100644 Plugins/ThisDoesNotExists/Startup.cs diff --git a/CKAN.sln b/CKAN.sln index d733f4d59a..239e943cab 100644 --- a/CKAN.sln +++ b/CKAN.sln @@ -17,6 +17,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CKAN-netkan", "Netkan\CKAN- EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests", "Tests\Tests.csproj", "{4F41255E-8BC1-465B-82D5-1C5665BC099A}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CKAN-ThisDoesNotExists", "Plugins\ThisDoesNotExists\CKAN-ThisDoesNotExists.csproj", "{4FA5A288-1836-4182-B025-6407455AED63}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug_NetCore|Any CPU = Debug_NetCore|Any CPU @@ -71,6 +73,14 @@ Global {4F41255E-8BC1-465B-82D5-1C5665BC099A}.Release_NetCore|Any CPU.Build.0 = Release_NetCore|Any CPU {4F41255E-8BC1-465B-82D5-1C5665BC099A}.Release|Any CPU.ActiveCfg = Release|Any CPU {4F41255E-8BC1-465B-82D5-1C5665BC099A}.Release|Any CPU.Build.0 = Release|Any CPU + {4FA5A288-1836-4182-B025-6407455AED63}.Debug_NetCore|Any CPU.ActiveCfg = Debug|Any CPU + {4FA5A288-1836-4182-B025-6407455AED63}.Debug_NetCore|Any CPU.Build.0 = Debug|Any CPU + {4FA5A288-1836-4182-B025-6407455AED63}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4FA5A288-1836-4182-B025-6407455AED63}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4FA5A288-1836-4182-B025-6407455AED63}.Release_NetCore|Any CPU.ActiveCfg = Release|Any CPU + {4FA5A288-1836-4182-B025-6407455AED63}.Release_NetCore|Any CPU.Build.0 = Release|Any CPU + {4FA5A288-1836-4182-B025-6407455AED63}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4FA5A288-1836-4182-B025-6407455AED63}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -78,9 +88,9 @@ Global GlobalSection(MonoDevelopProperties) = preSolution Policies = $0 $0.TextStylePolicy = $1 - $1.inheritsSet = VisualStudio - $1.inheritsScope = text/plain $1.scope = text/x-csharp + $1.FileWidth = 80 + $1.TabsToSpaces = True $0.CSharpFormattingPolicy = $2 $2.IndentSwitchBody = True $2.IndentBlocksInsideExpressions = True @@ -106,9 +116,22 @@ Global $2.BeforeDelegateDeclarationParentheses = False $2.NewParentheses = False $2.SpacesBeforeBrackets = False - $2.inheritsSet = Mono - $2.inheritsScope = text/x-csharp $2.scope = text/x-csharp - $2.SpaceAfterMethodCallName = False + $2.IndentSwitchSection = False + $2.NewLinesForBracesInProperties = False + $2.NewLinesForBracesInAccessors = False + $2.NewLinesForBracesInAnonymousMethods = False + $2.NewLinesForBracesInControlBlocks = False + $2.NewLinesForBracesInAnonymousTypes = False + $2.NewLinesForBracesInObjectCollectionArrayInitializers = False + $2.NewLinesForBracesInLambdaExpressionBody = False + $2.NewLineForElse = False + $2.NewLineForCatch = False + $2.NewLineForFinally = False + $2.NewLineForMembersInObjectInit = False + $2.NewLineForMembersInAnonymousTypes = False + $2.NewLineForClausesInQuery = False + $2.SpacingAfterMethodDeclarationName = True + $2.SpaceBeforeOpenSquareBracket = True EndGlobalSection EndGlobal diff --git a/Plugins/ThisDoesNotExists/CKAN-ThisDoesNotExists.csproj b/Plugins/ThisDoesNotExists/CKAN-ThisDoesNotExists.csproj new file mode 100644 index 0000000000..2794e17bdb --- /dev/null +++ b/Plugins/ThisDoesNotExists/CKAN-ThisDoesNotExists.csproj @@ -0,0 +1,49 @@ + + + + Debug + AnyCPU + {4FA5A288-1836-4182-B025-6407455AED63} + Library + CKANThisDoesNotExists + CKANPluginThisDoesNotExists + v4.5 + + + true + full + false + bin\Debug + DEBUG; + prompt + 4 + false + + + true + bin\Release + prompt + 4 + false + + + + + + + + + + + + + {3B9AEA22-FA3B-4E43-9283-EABDD81CF271} + CKAN-core + + + {A79F9D54-315C-472B-928F-713A5860B2BE} + CKAN-GUI + + + + \ No newline at end of file diff --git a/Plugins/ThisDoesNotExists/Properties/AssemblyInfo.cs b/Plugins/ThisDoesNotExists/Properties/AssemblyInfo.cs new file mode 100644 index 0000000000..b1d148ddc6 --- /dev/null +++ b/Plugins/ThisDoesNotExists/Properties/AssemblyInfo.cs @@ -0,0 +1,26 @@ +using System.Reflection; +using System.Runtime.CompilerServices; + +// Information about this assembly is defined by the following attributes. +// Change them to the values specific to your project. + +[assembly: AssemblyTitle("CKAN-ThisDoesNotExists")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("")] +[assembly: AssemblyCopyright("${AuthorCopyright}")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". +// The form "{Major}.{Minor}.*" will automatically update the build and revision, +// and "{Major}.{Minor}.{Build}.*" will update just the revision. + +[assembly: AssemblyVersion("1.0.*")] + +// The following attributes are used to specify the signing key for the assembly, +// if desired. See the Mono documentation for more information about signing. + +//[assembly: AssemblyDelaySign(false)] +//[assembly: AssemblyKeyFile("")] diff --git a/Plugins/ThisDoesNotExists/Startup.cs b/Plugins/ThisDoesNotExists/Startup.cs new file mode 100644 index 0000000000..4b1218183b --- /dev/null +++ b/Plugins/ThisDoesNotExists/Startup.cs @@ -0,0 +1,54 @@ +/* + This file is part of KSP CKAN and its ©2021 LisiasT + + THIE FILE is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ +using System; +using System.Windows.Forms; +using CKAN; + +namespace CKANPluginThisDoesNotExists +{ + public class CKANPluginThisDoesNotExists : IGUIPlugin + { + private static readonly CKAN.Versioning.ModuleVersion VERSION = new CKAN.Versioning.ModuleVersion("0"); + public override void Deinitialize () + { + throw new NotImplementedException(); + } + + public override string GetName () + { + return "I don't exist. Move on."; + } + + public override CKAN.Versioning.ModuleVersion GetVersion () + { + return VERSION; + } + + public override void Initialize () + { + MessageBox.Show("Hi, Mom!"); + try { + MenuStrip menuStrip = new MenuStrip(); + menuStrip.Dock = DockStyle.Top; + Main.Instance.Controls.Add(menuStrip); + MenuStrip menu = new MenuStrip(); + menuStrip.Items.Add("This thingy does not exists!", null, Installed); + } catch (Exception e) { + MessageBox.Show(e.Message); + } + } + + private void Installed (object sender, EventArgs e) + { + DialogResult res = MessageBox.Show("This Plugin does not exists and should not be pursued.", "Confirmation", MessageBoxButtons.OKCancel, MessageBoxIcon.Information); + if (res != DialogResult.OK) { + MessageBox.Show("My man, you can't cancel something that does not exists!"); + } + } + } +}