UI: Uygulama simgesi ve logo güncellendi
- hDM.ico ve Down_nb-02.png dosyaları projeye eklendi. - Eski AppIcon.ico ve AppIcon.png dosyaları kaldırıldı. - MainWindow.xaml ve MainWindow.xaml.cs içerisindeki ikon referansları güncellendi. - .csproj dosyasındaki uygulama simgesi güncellendi.
This commit is contained in:
@@ -2,15 +2,26 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>WinExe</OutputType>
|
<OutputType>WinExe</OutputType>
|
||||||
<TargetFramework>net8.0-windows</TargetFramework>
|
<TargetFramework>net8.0-windows10.0.19041.0</TargetFramework>
|
||||||
|
<SupportedOSPlatformVersion>7.0</SupportedOSPlatformVersion>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<UseWPF>true</UseWPF>
|
<UseWPF>true</UseWPF>
|
||||||
<UseWindowsForms>true</UseWindowsForms>
|
<AssemblyName>hDM</AssemblyName>
|
||||||
|
<RootNamespace>DownloadManager.WPF</RootNamespace>
|
||||||
|
<ApplicationIcon>Resources\hDM.ico</ApplicationIcon>
|
||||||
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
|
<ApplicationManifest>app.manifest</ApplicationManifest>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\Down_nb-02.png" />
|
||||||
|
<Resource Include="Resources\hDM.ico" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.*" />
|
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.*" />
|
||||||
|
<PackageReference Include="devexpress.wpf.core" Version="22.2.4" />
|
||||||
<PackageReference Include="H.NotifyIcon.Wpf" Version="2.*" />
|
<PackageReference Include="H.NotifyIcon.Wpf" Version="2.*" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="8.*" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="8.*" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.*" />
|
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.*" />
|
||||||
|
|||||||
BIN
src/DownloadManager.WPF/Resources/AppIcon.ico
Normal file
BIN
src/DownloadManager.WPF/Resources/AppIcon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 40 KiB |
BIN
src/DownloadManager.WPF/Resources/AppIcon.png
Normal file
BIN
src/DownloadManager.WPF/Resources/AppIcon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 19 KiB |
BIN
src/DownloadManager.WPF/Resources/Down_nb-02.png
Normal file
BIN
src/DownloadManager.WPF/Resources/Down_nb-02.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 32 KiB |
BIN
src/DownloadManager.WPF/Resources/hDM.ico
Normal file
BIN
src/DownloadManager.WPF/Resources/hDM.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 204 KiB |
@@ -12,7 +12,7 @@
|
|||||||
x:Name="RootWindow"
|
x:Name="RootWindow"
|
||||||
ui:WindowHelper.UseModernWindowStyle="True"
|
ui:WindowHelper.UseModernWindowStyle="True"
|
||||||
ui:ThemeManager.IsThemeAware="True"
|
ui:ThemeManager.IsThemeAware="True"
|
||||||
Icon="{DynamicResource AppIcon}"
|
Icon="pack://application:,,,/Resources/Down_nb-02.png"
|
||||||
Title="hOLOlu Download Manager" Height="650" Width="1150">
|
Title="hOLOlu Download Manager" Height="650" Width="1150">
|
||||||
|
|
||||||
<Window.Resources>
|
<Window.Resources>
|
||||||
@@ -56,14 +56,14 @@
|
|||||||
<Setter Property="ContextMenu">
|
<Setter Property="ContextMenu">
|
||||||
<Setter.Value>
|
<Setter.Value>
|
||||||
<ContextMenu DataContext="{Binding PlacementTarget.Tag, RelativeSource={RelativeSource Self}}">
|
<ContextMenu DataContext="{Binding PlacementTarget.Tag, RelativeSource={RelativeSource Self}}">
|
||||||
<MenuItem Header="Dosyayı aç" Command="{Binding OpenFileCommand}" CommandParameter="{Binding PlacementTarget.DataContext, RelativeSource={RelativeSource Self}}"/>
|
<MenuItem Header="Dosyayı aç" Command="{Binding OpenFileCommand}" CommandParameter="{Binding PlacementTarget.DataContext, RelativeSource={RelativeSource AncestorType=ContextMenu}}"/>
|
||||||
<MenuItem Header="Klasörü aç" Command="{Binding OpenFolderCommand}" CommandParameter="{Binding PlacementTarget.DataContext, RelativeSource={RelativeSource Self}}"/>
|
<MenuItem Header="Klasörü aç" Command="{Binding OpenFolderCommand}" CommandParameter="{Binding PlacementTarget.DataContext, RelativeSource={RelativeSource AncestorType=ContextMenu}}"/>
|
||||||
<Separator/>
|
<Separator/>
|
||||||
<MenuItem Header="İndirmeyi Durdur / Duraklat" Command="{Binding PauseDownloadCommand}" CommandParameter="{Binding PlacementTarget.DataContext, RelativeSource={RelativeSource Self}}"/>
|
<MenuItem Header="İndirmeyi Durdur / Duraklat" Command="{Binding PauseDownloadCommand}" CommandParameter="{Binding PlacementTarget.DataContext, RelativeSource={RelativeSource AncestorType=ContextMenu}}"/>
|
||||||
<MenuItem Header="İndirmeye Devam Et" Command="{Binding ResumeDownloadCommand}" CommandParameter="{Binding PlacementTarget.DataContext, RelativeSource={RelativeSource Self}}"/>
|
<MenuItem Header="İndirmeye Devam Et" Command="{Binding ResumeDownloadCommand}" CommandParameter="{Binding PlacementTarget.DataContext, RelativeSource={RelativeSource AncestorType=ContextMenu}}"/>
|
||||||
<Separator/>
|
<Separator/>
|
||||||
<MenuItem Header="Kaldır" Command="{Binding RemoveCommand}" CommandParameter="{Binding PlacementTarget.DataContext, RelativeSource={RelativeSource Self}}"/>
|
<MenuItem Header="Kaldır" Command="{Binding RemoveCommand}" CommandParameter="{Binding PlacementTarget.DataContext, RelativeSource={RelativeSource AncestorType=ContextMenu}}"/>
|
||||||
<MenuItem Header="Dosyanın özelliklerini görüntüle" Command="{Binding ViewPropertiesCommand}" CommandParameter="{Binding PlacementTarget.DataContext, RelativeSource={RelativeSource Self}}"/>
|
<MenuItem Header="Dosyanın özelliklerini görüntüle" Command="{Binding ViewPropertiesCommand}" CommandParameter="{Binding PlacementTarget.DataContext, RelativeSource={RelativeSource AncestorType=ContextMenu}}"/>
|
||||||
</ContextMenu>
|
</ContextMenu>
|
||||||
</Setter.Value>
|
</Setter.Value>
|
||||||
</Setter>
|
</Setter>
|
||||||
@@ -105,10 +105,15 @@
|
|||||||
|
|
||||||
<!-- Banner / Header Image -->
|
<!-- Banner / Header Image -->
|
||||||
<Border x:Name="bannerbg" Grid.Row="0" Grid.ColumnSpan="2" Height="60" Background="#FF1E78BA">
|
<Border x:Name="bannerbg" Grid.Row="0" Grid.ColumnSpan="2" Height="60" Background="#FF1E78BA">
|
||||||
|
|
||||||
<Grid>
|
<Grid>
|
||||||
<Image Source="{DynamicResource AppIcon}" HorizontalAlignment="Left" Margin="20,5" Width="40" Height="40"/>
|
<Image Source="pack://application:,,,/Resources/Down_nb-02.png" HorizontalAlignment="Left" Margin="20,5" Width="40" Height="40"/>
|
||||||
<TextBlock Text="hOLOlu Download Manager" VerticalAlignment="Center" HorizontalAlignment="Left"
|
<TextBlock Text="hOLOlu Download Manager" VerticalAlignment="Center" HorizontalAlignment="Left"
|
||||||
Foreground="White" FontSize="20" FontWeight="Bold" Opacity="0.9" Margin="65,0,0,0" Height="26" Width="260"/>
|
Foreground="White" FontSize="20" FontWeight="Bold" Opacity="0.9" Margin="65,0,0,0" Height="30" Width="266">
|
||||||
|
<TextBlock.BitmapEffect>
|
||||||
|
<DropShadowBitmapEffect Color="Black" Direction="320" ShadowDepth="2" Opacity=".9" Softness=".2" />
|
||||||
|
</TextBlock.BitmapEffect>
|
||||||
|
</TextBlock>
|
||||||
|
|
||||||
<!-- Canlı Hız Grafiği -->
|
<!-- Canlı Hız Grafiği -->
|
||||||
<Polyline Points="{Binding SpeedPoints}" Stroke="White" StrokeThickness="2"
|
<Polyline Points="{Binding SpeedPoints}" Stroke="White" StrokeThickness="2"
|
||||||
@@ -118,7 +123,21 @@
|
|||||||
<DropShadowEffect BlurRadius="5" ShadowDepth="0" Color="White" Opacity="0.5"/>
|
<DropShadowEffect BlurRadius="5" ShadowDepth="0" Color="White" Opacity="0.5"/>
|
||||||
</Polyline.Effect>
|
</Polyline.Effect>
|
||||||
</Polyline>
|
</Polyline>
|
||||||
|
<Canvas>
|
||||||
|
<Line X1="0" Y1="10" X2="2000" Y2="10" Stroke="WhiteSmoke" StrokeThickness="0.5"
|
||||||
|
StrokeDashArray="1,15"/>
|
||||||
|
<Line X1="0" Y1="20" X2="2000" Y2="20" Stroke="WhiteSmoke" StrokeThickness="0.5"
|
||||||
|
StrokeDashArray="1,15"/>
|
||||||
|
<Line X1="0" Y1="30" X2="2000" Y2="30" Stroke="WhiteSmoke" StrokeThickness="0.5"
|
||||||
|
StrokeDashArray="1,15"/>
|
||||||
|
<Line X1="0" Y1="40" X2="2000" Y2="40" Stroke="WhiteSmoke" StrokeThickness="0.5"
|
||||||
|
StrokeDashArray="1,15"/>
|
||||||
|
<Line X1="0" Y1="50" X2="2000" Y2="50" Stroke="WhiteSmoke" StrokeThickness="0.5"
|
||||||
|
StrokeDashArray="1,15"/>
|
||||||
|
</Canvas>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
|
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
<!-- CommandBar -->
|
<!-- CommandBar -->
|
||||||
@@ -128,7 +147,7 @@
|
|||||||
<ui:AppBarButton Icon="Play" Label="Devam Et" Command="{Binding ResumeDownloadCommand}" CommandParameter="{Binding SelectedDownload}"/>
|
<ui:AppBarButton Icon="Play" Label="Devam Et" Command="{Binding ResumeDownloadCommand}" CommandParameter="{Binding SelectedDownload}"/>
|
||||||
<ui:AppBarSeparator/>
|
<ui:AppBarSeparator/>
|
||||||
<ui:AppBarButton Icon="Clock" Label="Zamanlayıcı" Command="{Binding OpenSchedulerCommand}"/>
|
<ui:AppBarButton Icon="Clock" Label="Zamanlayıcı" Command="{Binding OpenSchedulerCommand}"/>
|
||||||
<ui:AppBarButton Icon="World" Label="Site Grabber" Command="{Binding OpenGrabberCommand}"/>
|
<ui:AppBarButton Icon="World" Label="Site İncele" Command="{Binding OpenGrabberCommand}"/>
|
||||||
<ui:AppBarSeparator/>
|
<ui:AppBarSeparator/>
|
||||||
<ui:AppBarButton Icon="Setting" Label="Ayarlar" Command="{Binding OpenSettingsCommand}"/>
|
<ui:AppBarButton Icon="Setting" Label="Ayarlar" Command="{Binding OpenSettingsCommand}"/>
|
||||||
</ui:CommandBar>
|
</ui:CommandBar>
|
||||||
@@ -229,7 +248,7 @@
|
|||||||
</GridViewColumn.Header>
|
</GridViewColumn.Header>
|
||||||
<GridViewColumn.CellTemplate>
|
<GridViewColumn.CellTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<TextBlock Text="{Binding Status}" VerticalAlignment="Center" Margin="5,0"
|
<TextBlock Text="{Binding StatusText}" VerticalAlignment="Center" Margin="5,0"
|
||||||
Foreground="{Binding RelativeSource={RelativeSource AncestorType=ListViewItem}, Path=Foreground}"/>
|
Foreground="{Binding RelativeSource={RelativeSource AncestorType=ListViewItem}, Path=Foreground}"/>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</GridViewColumn.CellTemplate>
|
</GridViewColumn.CellTemplate>
|
||||||
|
|||||||
@@ -32,38 +32,19 @@ public partial class MainWindow : System.Windows.Window
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void InitializeTrayIcon()
|
private void InitializeTrayIcon()
|
||||||
{
|
|
||||||
var iconRes = TryFindResource("AppIcon");
|
|
||||||
if (iconRes is DrawingImage drawingImage)
|
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var drawingVisual = new DrawingVisual();
|
var uri = new Uri("pack://application:,,,/Resources/hDM.ico");
|
||||||
using (var context = drawingVisual.RenderOpen())
|
var streamInfo = System.Windows.Application.GetResourceStream(uri);
|
||||||
|
if (streamInfo != null)
|
||||||
{
|
{
|
||||||
context.DrawImage(drawingImage, new Rect(0, 0, 48, 48));
|
MainTaskbarIcon.Icon = new System.Drawing.Icon(streamInfo.Stream);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
var rtb = new System.Windows.Media.Imaging.RenderTargetBitmap(48, 48, 96, 96, PixelFormats.Pbgra32);
|
catch (Exception ex)
|
||||||
rtb.Render(drawingVisual);
|
|
||||||
|
|
||||||
var encoder = new System.Windows.Media.Imaging.PngBitmapEncoder();
|
|
||||||
encoder.Frames.Add(System.Windows.Media.Imaging.BitmapFrame.Create(rtb));
|
|
||||||
|
|
||||||
using (var ms = new MemoryStream())
|
|
||||||
{
|
{
|
||||||
encoder.Save(ms);
|
Serilog.Log.Error(ex, "Tray icon yüklenemedi.");
|
||||||
ms.Seek(0, SeekOrigin.Begin);
|
|
||||||
using (var bitmap = new System.Drawing.Bitmap(ms))
|
|
||||||
{
|
|
||||||
MainTaskbarIcon.Icon = System.Drawing.Icon.FromHandle(bitmap.GetHicon());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (System.Exception ex)
|
|
||||||
{
|
|
||||||
Serilog.Log.Warning(ex, "Tepsi simgesi oluşturulurken hata.");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user