Skip to content

Commit

Permalink
Merge pull request #31 from XanatosX/develop
Browse files Browse the repository at this point in the history
Version 0.0.5 release
  • Loading branch information
XanatosX authored Feb 13, 2020
2 parents 875ea05 + 8c06b8e commit f762555
Show file tree
Hide file tree
Showing 23 changed files with 1,410 additions and 152 deletions.
Binary file added .github/Screenshots/AddPathToFile.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/Screenshots/FileSelector.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/Screenshots/ModeSelection.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/Screenshots/SelectButton.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions CONTRIBUTING.MD
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Contributing to the XML Formatter

Thank you for your interest in helping to develop this tool.

Please read this document first before contributing.

## How to Contribute

This project is using a `master` and `develop` branch.
The `master` branch is used for stables releases while the `develop` branch is used for daily changes.
If you want to create a Pull Request, please make sure to always submit them to the `develop` branch.

You should learn or be familiar [how to use git](https://help.github.com/en/github/getting-started-with-github/set-up-git), how you can create a [fork for a project](https://help.github.com/en/github/getting-started-with-github/fork-a-repo) and how you can [submit a Pull Request](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests)

## Guidelines

* **NEVER** commit code you did not write on your own
* **Please** keep your Pull Requests focused to a single feature or bug, keep them reasonable sized so it can be reviewed quicker.
* **Please** write always a commit message which is simple and descriptive.
* **Do not** create a new big feature without discussing this in an [Feature Request](https://github.com/D-Generation-S/Tank/issues) first
* **Please** be friendly to any contributor you write to in an issue or by reviewing his code.

## License

Please read the [License](LICENSE) for more information about this project.
94 changes: 94 additions & 0 deletions README.MD
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
# XML Formatter

This project is a lightweight tool to convert xml files from a flat to a formatted format or the other way round.


## How to use this application

### Select a file to format

There are different ways to select the file you want to format

#### 1. Use the select button

To "open" an xml file use the `Select XML`



![SelectButton.png](/.github/Screenshots/SelectButton.png)



This will open up a file selector where you can choose the file for converting





![FileSelector.png](/.github/Screenshots/FileSelector.png)



#### 2. Write the path to the into the Textbox

You can write the path to the file into the textbox to select it for the formatting task



![AddPathToFile.png](/.github/Screenshots/AddPathToFile.png)



Please make sure that the file is a valid xml file and is located at the path you did provide in the textbox



#### 3. Drag the file onto the window

The last option is to simple drag and drop the file into the window, please keep in mind that you can only drag one file for converting.

This will automatically fill the textbox with the correct file path.

### Select the formatting mode

There are two different modes to format one to flat out the file and one for proper formatting. You can select the mode on the dropdown near the save button.

![ModeSelection.png](/.github/Screenshots/ModeSelection.png)



* Formatted -> Format the file in a human readable format
* Flat -> Flat the file so it will need less space on your disk

### Save the file

To finally save the file just click on the `Save` button. This will load the file into your ram convert it and write it back to the disk. While this action is in progress the window will be locked for other interactions.

## Pre-requirements for creating a build

To get started with the project you should check the following requirements

1. You will need a program which allows you to write C# and can compile and build Windows forms applications.
* Check out [Visual Studio Community](https://visualstudio.microsoft.com/de/vs/community/)

## Getting a working build

You should fulfill the pre-requirements for these steps first.

1. Clone this project `git clone git@github.com:XanatosX/XmlFormatter.git`
2. Download the NuGet dependencies before compiling. If you IDE is not doing this on loading the project file use `nuget restore` in the root folder
3. Start the build in your IDE


## Contributions

If you have found a bug or a feature idea feel free to create an issue [here](https://github.com/XanatosX/XmlFormatter/issues). Before you open up a new issue, please search to see if it was already reported. In your issue try to be as detailed as possible.

If you want to contribute fixes or features to this project, please read our [contributors guide](CONTRIBUTING.MD) first.


## Using the Source Code

The full source code and all the required assets are available here on GitHub.


24 changes: 24 additions & 0 deletions XmlFormatter/App.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,30 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="XmlFormatter.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
</sectionGroup>
</configSections>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
<userSettings>
<XmlFormatter.Properties.Settings>
<setting name="MinimizeToTray" serializeAs="String">
<value>True</value>
</setting>
<setting name="AskBeforeClosing" serializeAs="String">
<value>False</value>
</setting>
<setting name="FirstTimeTray" serializeAs="String">
<value>True</value>
</setting>
<setting name="SearchUpdateOnStartup" serializeAs="String">
<value>False</value>
</setting>
<setting name="ApplicationVersion" serializeAs="String">
<value>0.0.0</value>
</setting>
</XmlFormatter.Properties.Settings>
</userSettings>
</configuration>
1 change: 1 addition & 0 deletions XmlFormatter/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
using XmlFormatter.src.Windows;

namespace XmlFormatter
{
Expand Down
99 changes: 73 additions & 26 deletions XmlFormatter/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 27 additions & 5 deletions XmlFormatter/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
Expand All @@ -60,6 +60,7 @@
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
Expand All @@ -68,9 +69,10 @@
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
Expand All @@ -85,9 +87,10 @@
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
Expand All @@ -109,9 +112,28 @@
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="Settings_CB_AskBeforeClose_Message" xml:space="preserve">
<value>If this option is active the application will ask you before closing.</value>
</data>
<data name="Settings_CB_AskBeforeClose_Title" xml:space="preserve">
<value>Ask before closing</value>
</data>
<data name="Settings_CB_CheckUpdatesOnStartup_Message" xml:space="preserve">
<value>If you activate this option the application will search for updates on startup</value>
</data>
<data name="Settings_CB_CheckUpdatesOnStartup_Title" xml:space="preserve">
<value>Search for updates on startup</value>
</data>
<data name="Settings_CB_MinimizeToTray_Message" xml:space="preserve">
<value>This option will change the minimize behavior of the main window
If this is set the application will be minimized to an tray icon instead of the task bar.</value>
</data>
<data name="Settings_CB_MinimizeToTray_Title" xml:space="preserve">
<value>Minimize to tray</value>
</data>
</root>
Loading

0 comments on commit f762555

Please sign in to comment.