Skip to content

Commit

Permalink
Upgrade to .NET Core / Add GitHub Actions (#17)
Browse files Browse the repository at this point in the history
Upgrade to .NET Core and Add GitHub Actions to build it.
  • Loading branch information
aolszowka authored Jun 1, 2022
1 parent 2a109cc commit a0a4999
Show file tree
Hide file tree
Showing 6 changed files with 85 additions and 128 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: CI

on:
push:
branches:
- '*'

jobs:
build:
runs-on: windows-latest
env:
DOTNET_NOLOGO: true
steps:
# Grab The Source Code
- name: Checkout
uses: actions/checkout@v2

# Verify that the code is formatted correctly
- name: dotnet-format whitespace
run: dotnet format whitespace --verify-no-changes

# Verify that the code is formatted correctly
- name: dotnet-format style
run: dotnet format style --verify-no-changes

# Verify that the code is formatted correctly
- name: dotnet-format analzyers
run: dotnet format analyzers --verify-no-changes

# Build the Solution
- name: Build Solution
run: dotnet build --configuration Release

# Upload Artifacts
- name: Upload Artifacts to GitHub
uses: actions/upload-artifact@v3
with:
name: ManipulativeReplacer-${{ github.sha }}
path: ManipulativeReplacer/bin/Release/**/ManipulativeReplacer*
5 changes: 3 additions & 2 deletions ManipulativeReplacer/AboutManipulativeReplacerBox.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ public string AssemblyTitle
{
get
{
object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyTitleAttribute), false);
Assembly executingAssembly = Assembly.GetExecutingAssembly();
object[] attributes = executingAssembly.GetCustomAttributes(typeof(AssemblyTitleAttribute), false);
if (attributes.Length > 0)
{
AssemblyTitleAttribute titleAttribute = (AssemblyTitleAttribute)attributes[0];
Expand All @@ -32,7 +33,7 @@ public string AssemblyTitle
return titleAttribute.Title;
}
}
return System.IO.Path.GetFileNameWithoutExtension(Assembly.GetExecutingAssembly().CodeBase);
return System.IO.Path.GetFileNameWithoutExtension(executingAssembly.Location);
}
}

Expand Down
100 changes: 6 additions & 94 deletions ManipulativeReplacer/ManipulativeReplacer.csproj
Original file line number Diff line number Diff line change
@@ -1,103 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" 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>{A6A27F6C-4011-4574-8D00-CCD7EE8491DF}</ProjectGuid>
<TargetFramework>net6.0-windows</TargetFramework>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>ManipulativeReplacer</RootNamespace>
<AssemblyName>ManipulativeReplacer</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<UseWindowsForms>true</UseWindowsForms>
<ImportWindowsDesktopTargets>true</ImportWindowsDesktopTargets>
</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>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<RunCodeAnalysis>true</RunCodeAnalysis>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="AboutManipulativeReplacerBox.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="AboutManipulativeReplacerBox.Designer.cs">
<DependentUpon>AboutManipulativeReplacerBox.cs</DependentUpon>
</Compile>
<Compile Include="BindableToolStripMenuItem.cs">
<Compile Update="BindableToolStripMenuItem.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="MainForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="MainForm.Designer.cs">
<DependentUpon>MainForm.cs</DependentUpon>
</Compile>
<Compile Include="Pattern.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="AboutManipulativeReplacerBox.resx">
<DependentUpon>AboutManipulativeReplacerBox.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="MainForm.resx">
<DependentUpon>MainForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
1 change: 1 addition & 0 deletions ManipulativeReplacer/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ static class Program
static void Main()
{
Application.EnableVisualStyles();
Application.SetHighDpiMode(HighDpiMode.SystemAware);
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new MainForm());
}
Expand Down
9 changes: 5 additions & 4 deletions ManipulativeReplacer/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
Expand All @@ -10,9 +10,10 @@
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Ace Olszowka")]
[assembly: AssemblyProduct("ManipulativeReplacer")]
[assembly: AssemblyCopyright("Copyright © Ace Olszowka 2014-2015")]
[assembly: AssemblyCopyright("Copyright © Ace Olszowka 2014-2022")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: SupportedOSPlatform("windows")] // Only Support Windows For Now

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
Expand All @@ -32,5 +33,5 @@
// 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.5")]
[assembly: AssemblyFileVersion("1.0.0.5")]
[assembly: AssemblyVersion("1.0.0.6")]
[assembly: AssemblyFileVersion("1.0.0.6")]
59 changes: 31 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,31 @@
# ManipulativeReplacer
A Simple Program To Help With Bulk Data Manipulation Tasks.

This program was written to help me at work (and home), wherein I found myself in need of a quick way to generate several similar commands where only a single argument changed.

## Basic Usage
Here is a GIF of this in action:
![ManipulativeReplacerInAction](Docs/ManipulativeReplacerUsage.gif)

The program is pretty straight forward; there are three "Panels" numbered in the following screenshot:

![ManipulativeReplacerPanelsNumbered](Docs/ManipulativeReplacer.png)

1. This is the `Pattern` panel
2. This is the `Input` panel
3. This is the `Output` panel

In the `Pattern` panel you put in whatever you want repeated, the keyword `{EXT}` is used to indicate where you want the values specified in the `Input` panel inserted. You can repeat the `{EXT}` keyword as many times as you want. This can have as many NewLines or exotic formatting as you wish and it will be repeated.

The `Input` panel is a NewLine delimited list of items that will be used as replacement values.

The `Output` panel will show the results of this operation (in real time). While it is editable any change to the `Pattern` or `Input` panels will regenerate this output.

## Bugs/Feature Requests
I accept pull requests and am responsive on GitHub, Let me know!

## License
This is licensed under the MIT License.
# ManipulativeReplacer
A Simple Program To Help With Bulk Data Manipulation Tasks.

This program was written to help me at work (and home), wherein I found myself in need of a quick way to generate several similar commands where only a single argument changed.

## Basic Usage
Here is a GIF of this in action:
![ManipulativeReplacerInAction](Docs/ManipulativeReplacerUsage.gif)

The program is pretty straight forward; there are three "Panels" numbered in the following screenshot:

![ManipulativeReplacerPanelsNumbered](Docs/ManipulativeReplacer.png)

1. This is the `Pattern` panel
2. This is the `Input` panel
3. This is the `Output` panel

In the `Pattern` panel you put in whatever you want repeated, the keyword `{EXT}` is used to indicate where you want the values specified in the `Input` panel inserted. You can repeat the `{EXT}` keyword as many times as you want. This can have as many NewLines or exotic formatting as you wish and it will be repeated.

The `Input` panel is a NewLine delimited list of items that will be used as replacement values.

The `Output` panel will show the results of this operation (in real time). While it is editable any change to the `Pattern` or `Input` panels will regenerate this output.

## Hacking
I utilized the `upgrade-assistant` tool to inline upgrade this to .NET Core. However the underlying application is still using Windows Forms which means it is Windows Only until I can be bothered to convert this to something cross platform.

## Bugs/Feature Requests
I accept pull requests and am responsive on GitHub, Let me know!

## License
This is licensed under the MIT License.

0 comments on commit a0a4999

Please sign in to comment.