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

Commit05a0dc3

Browse files
committed
add statusbar messagetypes & colors, show error message if new project root folder is missing (on new project creation)#175
1 parent572ca0e commit05a0dc3

File tree

4 files changed

+32
-1
lines changed

4 files changed

+32
-1
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
namespaceUnityLauncherPro.Data
2+
{
3+
publicenumMessageType
4+
{
5+
Info,
6+
Warning,
7+
Error
8+
}
9+
}

‎UnityLauncherPro/MainWindow.xaml.cs‎

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
usingSystem.Windows.Input;
2020
usingSystem.Windows.Media;
2121
usingSystem.Windows.Shell;
22+
usingUnityLauncherPro.Data;
2223
usingUnityLauncherPro.Helpers;
2324
usingUnityLauncherPro.Properties;
2425

@@ -1930,6 +1931,7 @@ void CreateNewEmptyProject(string targetFolder = null)
19301931
tabControl.SelectedIndex=4;
19311932
this.UpdateLayout();
19321933
txtRootFolderForNewProjects.Focus();
1934+
SetStatus("Root folder for new projects is missing or doesn't exist: "+rootFolder,MessageType.Error);
19331935
return;
19341936
}
19351937
}
@@ -3353,8 +3355,22 @@ private void Window_MouseDown(object sender, MouseButtonEventArgs e)
33533355
gridSettingsBg.Focus();
33543356
}
33553357

3356-
publicvoidSetStatus(stringmsg)
3358+
publicvoidSetStatus(stringmsg,MessageTypemessageType=MessageType.Info)
33573359
{
3360+
Console.WriteLine(messageType);
3361+
switch(messageType)
3362+
{
3363+
caseMessageType.Info:
3364+
txtStatus.Foreground=(SolidColorBrush)Application.Current.Resources["ThemeStatusText"];
3365+
break;
3366+
caseMessageType.Warning:
3367+
txtStatus.Foreground=(SolidColorBrush)Application.Current.Resources["ThemeMessageWarning"];
3368+
break;
3369+
caseMessageType.Error:
3370+
txtStatus.Foreground=(SolidColorBrush)Application.Current.Resources["ThemeMessageError"];
3371+
break;
3372+
}
3373+
33583374
txtStatus.Text=msg;
33593375
}
33603376

‎UnityLauncherPro/Resources/Colors.xaml‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,5 +66,10 @@
6666
<SolidColorBrushx:Key="ThemeSystemHighlight"Color="#FF0078D7"/>
6767
<!--<SolidColorBrush x:Key="ThemeButtonWhiteText" Color="#FFFFFFFF"/>-->
6868
<SolidColorBrushx:Key="ThemeBrightText"Color="#FFFFFFFF"/>
69+
70+
<!--messages-->
71+
<!--<SolidColorBrush x:Key="ThemeMessageInfo" Color="#FF1E1E1E"/>-->
72+
<SolidColorBrushx:Key="ThemeMessageWarning"Color="#FFFF5200"/>
73+
<SolidColorBrushx:Key="ThemeMessageError"Color="Red"/>
6974

7075
</ResourceDictionary>

‎UnityLauncherPro/UnityLauncherPro.csproj‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@
8888
<CompileInclude="Data\BuildReport.cs" />
8989
<CompileInclude="Data\BuildReportItem.cs" />
9090
<CompileInclude="Data\DownloadProgress.cs" />
91+
<CompileInclude="Data\MessageType.cs" />
9192
<CompileInclude="Data\Platform.cs" />
9293
<CompileInclude="Data\Tabs.cs" />
9394
<CompileInclude="Data\ThemeColor.cs" />

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp