Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit77cb76e

Browse files
Add "download editor in browser" button to the upgrade window. Changed 'Open Release Notes' button label to 'Release Notes' to save a bit of horizontal space so that the upgrade window isn't too wide.
1 parent1ab96fb commit77cb76e

File tree

2 files changed

+23
-6
lines changed

2 files changed

+23
-6
lines changed

‎UnityLauncherPro/UpgradeWindow.xaml‎

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
66
xmlns:local="clr-namespace:UnityLauncherPro"
77
mc:Ignorable="d"
8-
Title="Upgrade Project Version"Height="533.165"Width="455"Background="{DynamicResource ThemeDarkestBackground}"MinWidth="319"MinHeight="555"ResizeMode="NoResize"WindowStartupLocation="CenterOwner"HorizontalAlignment="Left"VerticalAlignment="Top"PreviewKeyDown="Window_PreviewKeyDown"ShowInTaskbar="False">
8+
Title="Upgrade Project Version"Height="533.165"Width="552"Background="{DynamicResource ThemeDarkestBackground}"MinWidth="319"MinHeight="555"ResizeMode="NoResize"WindowStartupLocation="CenterOwner"HorizontalAlignment="Left"VerticalAlignment="Top"PreviewKeyDown="Window_PreviewKeyDown"ShowInTaskbar="False">
99

1010
<Grid>
1111
<StackPanelOrientation="Horizontal">
@@ -15,19 +15,22 @@
1515
<TextBoxMinWidth="100"CaretBrush="#FFE2E2E2"x:Name="txtCurrentPlatform"Background="{DynamicResource ThemeDarkMenuBar}"BorderBrush="{x:Null}"Foreground="#FFC7C7C7"SelectionBrush="#FF003966"BorderThickness="0"Margin="0,16,0,0"UndoLimit="64"Text="Platform"IsReadOnly="True"VerticalAlignment="Top" />
1616
</StackPanel>
1717
<Labelx:Name="lblAvailableVersions"Content="Available Unity Versions"HorizontalAlignment="Left"Margin="9,94,0,0"VerticalAlignment="Top"Foreground="{DynamicResource ThemeButtonForeground}"/>
18-
18+
1919
<StackPanelOrientation="Horizontal"Margin="9,47,9,0">
20-
<ButtonStyle="{StaticResource CustomButton}"x:Name="btnOpenReleasePage"ToolTip="Open Release Notes Page in Browser"Background="{DynamicResource ThemeButtonBackground}"Foreground="#FFC1C1C1"BorderBrush="{x:Null}"HorizontalAlignment="Left"VerticalAlignment="Top"Height="35"Click="BtnOpenReleasePage_Click"Width="125" >
21-
<LabelForeground="{DynamicResource ThemeButtonForeground}"Content="_Open Release Notes"/>
20+
<ButtonStyle="{StaticResource CustomButton}"x:Name="btnOpenReleasePage"ToolTip="Open Release Notes Page in Browser"Background="{DynamicResource ThemeButtonBackground}"Foreground="#FFC1C1C1"BorderBrush="{x:Null}"VerticalAlignment="Top"Height="35"Click="BtnOpenReleasePage_Click"Width="98" >
21+
<LabelForeground="{DynamicResource ThemeButtonForeground}"Content="_Release Notes"/>
2222
</Button>
23-
<ButtonStyle="{StaticResource CustomButton}"x:Name="btnDownload"Background="{DynamicResource ThemeButtonBackground}"Foreground="#FFC1C1C1"Margin="9,0,9,0"BorderBrush="{x:Null}"HorizontalAlignment="Right"VerticalAlignment="Top"Height="35"Click="BtnDownload_Click"Width="125" >
23+
<ButtonStyle="{StaticResource CustomButton}"x:Name="btnDownload"Background="{DynamicResource ThemeButtonBackground}"Foreground="#FFC1C1C1"Margin="9,0,0,0"BorderBrush="{x:Null}"HorizontalAlignment="Right"VerticalAlignment="Top"Height="35"Click="BtnDownload_Click"Width="125" >
2424
<LabelForeground="{DynamicResource ThemeButtonForeground}"Content="Download in _Browser"/>
2525
</Button>
26+
<ButtonStyle="{StaticResource CustomButton}"x:Name="btnDownloadEditorInBrwwoser"Background="{DynamicResource ThemeButtonBackground}"Foreground="#FFC1C1C1"Margin="9,0,9,0"BorderBrush="{x:Null}"VerticalAlignment="Top"Height="35"Click="BtnDownloadEditor_Click"Width="159" >
27+
<LabelForeground="{DynamicResource ThemeButtonForeground}"Content="Download Editor in _Browser"/>
28+
</Button>
2629
<ButtonStyle="{StaticResource CustomButton}"x:Name="btnInstall"Background="{DynamicResource ThemeButtonBackground}"Foreground="#FFC1C1C1"BorderBrush="{x:Null}"HorizontalAlignment="Right"VerticalAlignment="Top"Height="35"Width="125"Click="btnInstall_Click"ToolTip="Downloads Unity web installer into Temp folder and runs it (Root folder path is copied to clipboard)" >
2730
<LabelForeground="{DynamicResource ThemeButtonForeground}"Content="_Download&amp; Install"/>
2831
</Button>
2932
</StackPanel>
30-
33+
3134
<ButtonStyle="{StaticResource CustomButton}"x:Name="btnCancelUpgrade"Background="{DynamicResource ThemeButtonBackground}"Foreground="#FFC1C1C1"Margin="9,434,0,0"BorderBrush="{x:Null}"HorizontalAlignment="Left"Width="111"VerticalAlignment="Top"Height="51"Click="BtnCancelUpgrade_Click" >
3235
<LabelForeground="{DynamicResource ThemeButtonForeground}"Content="_Cancel"/>
3336
</Button>

‎UnityLauncherPro/UpgradeWindow.xaml.cs‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,20 @@ private void BtnOpenReleasePage_Click(object sender, RoutedEventArgs e)
106106
Tools.OpenReleaseNotes(txtCurrentVersion.Text);
107107
}
108108

109+
110+
privatevoidBtnDownloadEditor_Click(objectsender,RoutedEventArgse)
111+
{
112+
stringurl=Tools.GetUnityReleaseURL(txtCurrentVersion.Text);
113+
if(string.IsNullOrEmpty(url)==false)
114+
{
115+
Tools.DownloadInBrowser(url,txtCurrentVersion.Text,true);
116+
}
117+
else
118+
{
119+
Console.WriteLine("Failed getting Unity Installer URL for "+txtCurrentVersion.Text);
120+
}
121+
}
122+
109123
privatevoidBtnDownload_Click(objectsender,RoutedEventArgse)
110124
{
111125
stringurl=Tools.GetUnityReleaseURL(txtCurrentVersion.Text);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp