Adjust Image Visibility
|
Before Width: | Height: | Size: 49 KiB After Width: | Height: | Size: 4.9 KiB |
|
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 4.7 KiB |
|
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 5.1 KiB |
|
|
@ -72,8 +72,11 @@
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
Width="18"
|
Width="18"
|
||||||
Height="18"
|
Height="18"
|
||||||
Margin="30,0,10,0"
|
Margin="30,10,0,0"
|
||||||
HorizontalAlignment="Left"
|
HorizontalAlignment="Left"
|
||||||
|
VerticalAlignment="Top"
|
||||||
|
RenderOptions.BitmapScalingMode="Fant"
|
||||||
|
Stretch="UniformToFill"
|
||||||
Visibility="Collapsed" />
|
Visibility="Collapsed" />
|
||||||
<TextBlock
|
<TextBlock
|
||||||
x:Name="TitleTextBlock"
|
x:Name="TitleTextBlock"
|
||||||
|
|
@ -117,19 +120,19 @@
|
||||||
MinWidth="140"
|
MinWidth="140"
|
||||||
Margin="5,0,5,0"
|
Margin="5,0,5,0"
|
||||||
Click="Button_Click"
|
Click="Button_Click"
|
||||||
Content="{DynamicResource cancel}" />
|
Content="No" />
|
||||||
<Button
|
<Button
|
||||||
x:Name="btnOk"
|
x:Name="btnOk"
|
||||||
MinWidth="140"
|
MinWidth="140"
|
||||||
Margin="5,0,5,0"
|
Margin="5,0,5,0"
|
||||||
Click="Button_Click"
|
Click="Button_Click"
|
||||||
Content="{DynamicResource done}" />
|
Content="OK" />
|
||||||
<Button
|
<Button
|
||||||
x:Name="btnYes"
|
x:Name="btnYes"
|
||||||
MinWidth="140"
|
MinWidth="140"
|
||||||
Margin="5,0,5,0"
|
Margin="5,0,5,0"
|
||||||
Click="Button_Click"
|
Click="Button_Click"
|
||||||
Content="{DynamicResource done}" />
|
Content="Yes" />
|
||||||
</WrapPanel>
|
</WrapPanel>
|
||||||
</Border>
|
</Border>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,8 @@ using System.Windows.Media;
|
||||||
using System.Windows.Media.Imaging;
|
using System.Windows.Media.Imaging;
|
||||||
using System.Windows.Shapes;
|
using System.Windows.Shapes;
|
||||||
using Flow.Launcher.Core.Resource;
|
using Flow.Launcher.Core.Resource;
|
||||||
|
using Flow.Launcher.Infrastructure;
|
||||||
|
using Flow.Launcher.Infrastructure.Image;
|
||||||
using YamlDotNet.Core.Tokens;
|
using YamlDotNet.Core.Tokens;
|
||||||
|
|
||||||
namespace Flow.Launcher
|
namespace Flow.Launcher
|
||||||
|
|
@ -145,15 +147,19 @@ namespace Flow.Launcher
|
||||||
{
|
{
|
||||||
case MessageBoxImage.Warning:
|
case MessageBoxImage.Warning:
|
||||||
msgBox.SetImage("Warning.png");
|
msgBox.SetImage("Warning.png");
|
||||||
|
msgBox.Img.Visibility = Visibility.Visible;
|
||||||
break;
|
break;
|
||||||
case MessageBoxImage.Question:
|
case MessageBoxImage.Question:
|
||||||
msgBox.SetImage("Question.png");
|
msgBox.SetImage("Question.png");
|
||||||
|
msgBox.Img.Visibility = Visibility.Visible;
|
||||||
break;
|
break;
|
||||||
case MessageBoxImage.Information:
|
case MessageBoxImage.Information:
|
||||||
msgBox.SetImage("Information.png");
|
msgBox.SetImage("Information.png");
|
||||||
|
msgBox.Img.Visibility = Visibility.Visible;
|
||||||
break;
|
break;
|
||||||
case MessageBoxImage.Error:
|
case MessageBoxImage.Error:
|
||||||
msgBox.SetImage("Error.png");
|
msgBox.SetImage("Error.png");
|
||||||
|
msgBox.Img.Visibility = Visibility.Visible;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
msgBox.Img.Visibility = Visibility.Collapsed;
|
msgBox.Img.Visibility = Visibility.Collapsed;
|
||||||
|
|
@ -162,7 +168,8 @@ namespace Flow.Launcher
|
||||||
}
|
}
|
||||||
private void SetImage(string imageName)
|
private void SetImage(string imageName)
|
||||||
{
|
{
|
||||||
string uri = string.Format("/Images/{0}", imageName);
|
//string uri = string.Format("/Resources/Images/{0}", imageName);
|
||||||
|
string uri = Constant.ProgramDirectory + "/Images/" + imageName;
|
||||||
var uriSource = new Uri(uri, UriKind.RelativeOrAbsolute);
|
var uriSource = new Uri(uri, UriKind.RelativeOrAbsolute);
|
||||||
Img.Source = new BitmapImage(uriSource);
|
Img.Source = new BitmapImage(uriSource);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,7 @@ using System.Windows.Input;
|
||||||
using System.Windows.Interop;
|
using System.Windows.Interop;
|
||||||
using System.Windows.Media;
|
using System.Windows.Media;
|
||||||
using System.Windows.Navigation;
|
using System.Windows.Navigation;
|
||||||
|
using static Flow.Launcher.MessageBoxEx;
|
||||||
using static System.Windows.Forms.VisualStyles.VisualStyleElement.Window;
|
using static System.Windows.Forms.VisualStyles.VisualStyleElement.Window;
|
||||||
using Button = System.Windows.Controls.Button;
|
using Button = System.Windows.Controls.Button;
|
||||||
using Control = System.Windows.Controls.Control;
|
using Control = System.Windows.Controls.Control;
|
||||||
|
|
@ -280,7 +281,7 @@ namespace Flow.Launcher
|
||||||
}
|
}
|
||||||
private void OpenTestBtn(object sender, RoutedEventArgs e)
|
private void OpenTestBtn(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
var messageBoxResult = MessageBoxEx.Show("The TitleBarBackground property can be used to set the background for the Title bar. ... The following screen shots illustrate the title bar background changes.", "This is Title Part This is Title Part This is Title Part This is Title Part");
|
var messageBoxResult = MessageBoxEx.Show("Yes, This is sucks", "MessageBox is bad?", MessageBoxType.ConfirmationWithYesNo);
|
||||||
}
|
}
|
||||||
private void OpenLogFolder(object sender, RoutedEventArgs e)
|
private void OpenLogFolder(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
|
|
|
||||||