mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Use api function in main project
This commit is contained in:
parent
5165ce8f2a
commit
f76110856f
5 changed files with 7 additions and 7 deletions
|
|
@ -156,7 +156,7 @@ namespace Flow.Launcher
|
|||
private async Task SetImageAsync(string imageName)
|
||||
{
|
||||
var imagePath = Path.Combine(Constant.ProgramDirectory, "Images", imageName);
|
||||
var imageSource = await ImageLoader.LoadAsync(imagePath);
|
||||
var imageSource = await App.API.LoadImageAsync(imagePath);
|
||||
Img.Source = imageSource;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ namespace Flow.Launcher
|
|||
|
||||
private async System.Threading.Tasks.Task LoadImageAsync()
|
||||
{
|
||||
imgClose.Source = await ImageLoader.LoadAsync(Path.Combine(Infrastructure.Constant.ProgramDirectory, "Images\\close.png"));
|
||||
imgClose.Source = await App.API.LoadImageAsync(Path.Combine(Constant.ProgramDirectory, "Images\\close.png"));
|
||||
}
|
||||
|
||||
void imgClose_MouseUp(object sender, MouseButtonEventArgs e)
|
||||
|
|
@ -71,11 +71,11 @@ namespace Flow.Launcher
|
|||
|
||||
if (!File.Exists(iconPath))
|
||||
{
|
||||
imgIco.Source = await ImageLoader.LoadAsync(Path.Combine(Constant.ProgramDirectory, "Images\\app.png"));
|
||||
imgIco.Source = await App.API.LoadImageAsync(Path.Combine(Constant.ProgramDirectory, "Images\\app.png"));
|
||||
}
|
||||
else
|
||||
{
|
||||
imgIco.Source = await ImageLoader.LoadAsync(iconPath);
|
||||
imgIco.Source = await App.API.LoadImageAsync(iconPath);
|
||||
}
|
||||
|
||||
Show();
|
||||
|
|
|
|||
|
|
@ -1168,7 +1168,7 @@ namespace Flow.Launcher.ViewModel
|
|||
else if (plugins.Count == 1)
|
||||
{
|
||||
PluginIconPath = plugins.Single().Metadata.IcoPath;
|
||||
PluginIconSource = await ImageLoader.LoadAsync(PluginIconPath);
|
||||
PluginIconSource = await App.API.LoadImageAsync(PluginIconPath);
|
||||
SearchIconVisibility = Visibility.Hidden;
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ namespace Flow.Launcher.ViewModel
|
|||
|
||||
private async Task LoadIconAsync()
|
||||
{
|
||||
Image = await ImageLoader.LoadAsync(PluginPair.Metadata.IcoPath);
|
||||
Image = await App.API.LoadImageAsync(PluginPair.Metadata.IcoPath);
|
||||
OnPropertyChanged(nameof(Image));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -199,7 +199,7 @@ namespace Flow.Launcher.ViewModel
|
|||
}
|
||||
}
|
||||
|
||||
return await ImageLoader.LoadAsync(imagePath, loadFullImage).ConfigureAwait(false);
|
||||
return await App.API.LoadImageAsync(imagePath, loadFullImage).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
private async Task LoadImageAsync()
|
||||
|
|
|
|||
Loading…
Reference in a new issue