-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from daredloco/subfolders-update
Update to stable version 1.7
- Loading branch information
Showing
10 changed files
with
129 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<Window x:Class="GitInstaller.ManualWindow" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
xmlns:local="clr-namespace:GitInstaller" | ||
mc:Ignorable="d" | ||
Title="ManualWindow" Height="125" Width="400" ResizeMode="NoResize" WindowStartupLocation="CenterOwner"> | ||
<Grid> | ||
<Grid.ColumnDefinitions> | ||
<ColumnDefinition Width="*"/> | ||
<ColumnDefinition Width="2*"/> | ||
<ColumnDefinition Width="4*"/> | ||
<ColumnDefinition Width="*"/> | ||
</Grid.ColumnDefinitions> | ||
<Grid.RowDefinitions> | ||
<RowDefinition Height="*" /> | ||
<RowDefinition Height="3*" /> | ||
<RowDefinition Height="*" /> | ||
<RowDefinition Height="3*" /> | ||
<RowDefinition Height="*" /> | ||
</Grid.RowDefinitions> | ||
<Label Content="Repository URL:" Grid.Column="1" Grid.Row="1"/> | ||
<TextBox Margin="5,5,5,5" Name="tb_url" Grid.Column="2" Grid.Row="1"/> | ||
<Button Name="bt_confirm" Grid.Column="1" Grid.ColumnSpan="2" Grid.Row="3" Content="Load"/> | ||
</Grid> | ||
</Window> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
using Newtonsoft.Json; | ||
using System; | ||
using System.Diagnostics; | ||
using System.IO; | ||
using System.Windows; | ||
|
||
namespace GitInstaller | ||
{ | ||
/// <summary> | ||
/// Interaktionslogik für ManualWindow.xaml | ||
/// </summary> | ||
public partial class ManualWindow : Window | ||
{ | ||
public ManualWindow() | ||
{ | ||
InitializeComponent(); | ||
bt_confirm.Click += ClickConfirm; | ||
} | ||
|
||
private void ClickConfirm(object sender, RoutedEventArgs e) | ||
{ | ||
try | ||
{ | ||
|
||
Uri url = new Uri(tb_url.Text); | ||
if (url.Host != "github.com" && url.Host != "www.github.com") | ||
{ | ||
MessageBox.Show("Invalid URL. Needs to be a github.com url!", "Warning!", MessageBoxButton.OK, MessageBoxImage.Warning); | ||
return; | ||
} | ||
|
||
string ustr = url.AbsoluteUri; | ||
ustr = ustr.Replace("://", ""); | ||
|
||
Settings.SettingsFile sfile = new Settings.SettingsFile() { | ||
ignored_files = new string[]{ "" }, | ||
ignored_tags = new string[] { "" }, | ||
project = ustr.Split('/')[2], | ||
uninstall = false, | ||
unzip = true, | ||
preview = true, | ||
user = ustr.Split('/')[1], | ||
repo = ustr.Split('/')[2] | ||
}; | ||
string jsondata = JsonConvert.SerializeObject(sfile); | ||
File.WriteAllText("config.json", jsondata); | ||
Process.Start("GitInstaller.exe"); | ||
Environment.Exit(4); | ||
} | ||
catch(Exception ex) | ||
{ | ||
MessageBox.Show("Error creating configuration file... => " + ex.Message, "Error!", MessageBoxButton.OK, MessageBoxImage.Error); | ||
return; | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters