mirror of
https://github.com/crskycode/GARbro.git
synced 2024-11-23 21:55:34 +08:00
added new items to main menu.
This commit is contained in:
parent
f6bb4716a6
commit
1f6df25f6c
17
App.config
17
App.config
@ -53,19 +53,28 @@
|
|||||||
<value>True</value>
|
<value>True</value>
|
||||||
</setting>
|
</setting>
|
||||||
<setting name="appImageFormat" serializeAs="String">
|
<setting name="appImageFormat" serializeAs="String">
|
||||||
<value/>
|
<value />
|
||||||
</setting>
|
</setting>
|
||||||
<setting name="appTextEncoding" serializeAs="String">
|
<setting name="appTextEncoding" serializeAs="String">
|
||||||
<value>UTF-8</value>
|
<value>UTF-8</value>
|
||||||
</setting>
|
</setting>
|
||||||
<setting name="appLastDirectory" serializeAs="String">
|
<setting name="appLastDirectory" serializeAs="String">
|
||||||
<value/>
|
<value />
|
||||||
</setting>
|
</setting>
|
||||||
<setting name="appArchiveFormat" serializeAs="String">
|
<setting name="appArchiveFormat" serializeAs="String">
|
||||||
<value/>
|
<value />
|
||||||
</setting>
|
</setting>
|
||||||
<setting name="appLastCreatedArchive" serializeAs="String">
|
<setting name="appLastCreatedArchive" serializeAs="String">
|
||||||
<value/>
|
<value />
|
||||||
|
</setting>
|
||||||
|
<setting name="winMenuBarVisibility" serializeAs="String">
|
||||||
|
<value>Visible</value>
|
||||||
|
</setting>
|
||||||
|
<setting name="winToolBarVisibility" serializeAs="String">
|
||||||
|
<value>Visible</value>
|
||||||
|
</setting>
|
||||||
|
<setting name="winStatusBarVisibility" serializeAs="String">
|
||||||
|
<value>Visible</value>
|
||||||
</setting>
|
</setting>
|
||||||
</GARbro.GUI.Properties.Settings>
|
</GARbro.GUI.Properties.Settings>
|
||||||
</userSettings>
|
</userSettings>
|
||||||
|
123
MainWindow.xaml
123
MainWindow.xaml
@ -13,12 +13,17 @@
|
|||||||
Width="{Binding Source={x:Static p:Settings.Default}, Path=winWidth, Mode=TwoWay}"
|
Width="{Binding Source={x:Static p:Settings.Default}, Path=winWidth, Mode=TwoWay}"
|
||||||
WindowState="{Binding Source={x:Static p:Settings.Default}, Path=winState, Mode=TwoWay}">
|
WindowState="{Binding Source={x:Static p:Settings.Default}, Path=winState, Mode=TwoWay}">
|
||||||
<Window.Resources>
|
<Window.Resources>
|
||||||
|
<!-- alternate colors for directory view -->
|
||||||
<SolidColorBrush x:Key="AlternateColor1" Color="#f2f5f9" />
|
<SolidColorBrush x:Key="AlternateColor1" Color="#f2f5f9" />
|
||||||
<SolidColorBrush x:Key="AlternateColor2" Color="White" />
|
<SolidColorBrush x:Key="AlternateColor2" Color="White" />
|
||||||
|
|
||||||
|
<!-- toolbar icons -->
|
||||||
<BitmapImage x:Key="Icon32x32Back" UriSource="Images/32x32/back button.png"/>
|
<BitmapImage x:Key="Icon32x32Back" UriSource="Images/32x32/back button.png"/>
|
||||||
<BitmapImage x:Key="Icon32x32Forward" UriSource="Images/32x32/forward button.png"/>
|
<BitmapImage x:Key="Icon32x32Forward" UriSource="Images/32x32/forward button.png"/>
|
||||||
<BitmapImage x:Key="Icon32x32Help" UriSource="Images/32x32/help.png"/>
|
<BitmapImage x:Key="Icon32x32Help" UriSource="Images/32x32/help.png"/>
|
||||||
<BitmapImage x:Key="Icon48x48Refresh" UriSource="Images/48x48/refresh.png"/>
|
<BitmapImage x:Key="Icon48x48Refresh" UriSource="Images/48x48/refresh.png"/>
|
||||||
|
|
||||||
|
<!-- directory view internals -->
|
||||||
<CollectionViewSource x:Key="ListViewSource" Source="{Binding}"/>
|
<CollectionViewSource x:Key="ListViewSource" Source="{Binding}"/>
|
||||||
<local:BooleanToCollapsedVisibilityConverter x:Key="booleanToCollapsedVisibilityConverter" />
|
<local:BooleanToCollapsedVisibilityConverter x:Key="booleanToCollapsedVisibilityConverter" />
|
||||||
<local:EntryTypeConverter x:Key="entryTypeConverter"/>
|
<local:EntryTypeConverter x:Key="entryTypeConverter"/>
|
||||||
@ -40,9 +45,27 @@
|
|||||||
<DataTemplate x:Key="SortArrowNone">
|
<DataTemplate x:Key="SortArrowNone">
|
||||||
<TextBlock Margin="5,0,5,0" Text="{Binding}"/>
|
<TextBlock Margin="5,0,5,0" Text="{Binding}"/>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
|
|
||||||
<Style x:Key="DefaultMenuItemStyle" TargetType="{x:Type MenuItem}">
|
<Style x:Key="DefaultMenuItemStyle" TargetType="{x:Type MenuItem}">
|
||||||
<Setter Property="FontWeight" Value="Bold" />
|
<Setter Property="FontWeight" Value="Bold" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
|
<!-- Sort-by submenu -->
|
||||||
|
<MenuItem x:Key="sortByMenu" Header="{x:Static s:guiStrings.CtxMenuSortBy}">
|
||||||
|
<MenuItem Header="{x:Static s:guiStrings.CtxMenuSortByName}" IsCheckable="True"
|
||||||
|
IsChecked="{Binding ElementName=AppWindow, Path=IsSortByName, Mode=OneWay}"
|
||||||
|
Command="{x:Static local:Commands.SortBy}" CommandParameter="Name"/>
|
||||||
|
<MenuItem Header="{x:Static s:guiStrings.CtxMenuSortByType}" IsCheckable="True"
|
||||||
|
IsChecked="{Binding ElementName=AppWindow, Path=IsSortByType, Mode=OneWay}"
|
||||||
|
Command="{x:Static local:Commands.SortBy}" CommandParameter="Type"/>
|
||||||
|
<MenuItem Header="{x:Static s:guiStrings.CtxMenuSortBySize}" IsCheckable="True"
|
||||||
|
IsChecked="{Binding ElementName=AppWindow, Path=IsSortBySize, Mode=OneWay}"
|
||||||
|
Command="{x:Static local:Commands.SortBy}" CommandParameter="Size"/>
|
||||||
|
<MenuItem Header="{x:Static s:guiStrings.CtxMenuUnsorted}" IsCheckable="True"
|
||||||
|
IsChecked="{Binding ElementName=AppWindow, Path=IsUnsorted, Mode=OneWay}"
|
||||||
|
Command="{x:Static local:Commands.SortBy}"/>
|
||||||
|
</MenuItem>
|
||||||
|
<!-- Default listview context menu -->
|
||||||
<ContextMenu x:Key="lvDirContextMenu">
|
<ContextMenu x:Key="lvDirContextMenu">
|
||||||
<MenuItem Header="{x:Static s:guiStrings.CtxMenuOpen}" InputGestureText="Enter"
|
<MenuItem Header="{x:Static s:guiStrings.CtxMenuOpen}" InputGestureText="Enter"
|
||||||
Style="{StaticResource DefaultMenuItemStyle}"
|
Style="{StaticResource DefaultMenuItemStyle}"
|
||||||
@ -94,30 +117,63 @@
|
|||||||
|
|
||||||
</Window.Resources>
|
</Window.Resources>
|
||||||
<DockPanel LastChildFill="True">
|
<DockPanel LastChildFill="True">
|
||||||
<Menu x:Name="MainMenuBar" DockPanel.Dock="Top" IsMainMenu="True" Visibility="Visible"
|
<StackPanel x:Name="MainMenuBar" DockPanel.Dock="Top" Orientation="Vertical"
|
||||||
Background="{DynamicResource {x:Static SystemColors.MenuBrushKey}}">
|
Visibility="{Binding Source={x:Static p:Settings.Default}, Path=winMenuBarVisibility, Mode=TwoWay}">
|
||||||
<MenuItem Header="{x:Static s:guiStrings.MenuFile}">
|
<Menu IsMainMenu="True" Background="{DynamicResource {x:Static SystemColors.MenuBrushKey}}">
|
||||||
<MenuItem Header="{x:Static s:guiStrings.MenuOpen}" Command="{x:Static local:Commands.OpenFile}" InputGestureText="Ctrl+O"/>
|
<MenuItem Header="{x:Static s:guiStrings.MenuFile}">
|
||||||
<MenuItem Header="{x:Static s:guiStrings.MenuRecent}" x:Name="RecentFilesMenu">
|
<MenuItem Header="{x:Static s:guiStrings.MenuOpen}" Command="{x:Static local:Commands.OpenFile}" InputGestureText="Ctrl+O"/>
|
||||||
<MenuItem.ItemContainerStyle>
|
<MenuItem Header="{x:Static s:guiStrings.CtxMenuCreate}" InputGestureText="F3"
|
||||||
<Style TargetType="MenuItem">
|
Command="{x:Static local:Commands.CreateArchive}" />
|
||||||
<Setter Property="Header" Value="{Binding Path=Item2}"/>
|
<MenuItem Header="{x:Static s:guiStrings.MenuRecent}" x:Name="RecentFilesMenu">
|
||||||
<Setter Property="Command" Value="{x:Static local:Commands.OpenRecent}"/>
|
<MenuItem.ItemContainerStyle>
|
||||||
<Setter Property="CommandParameter" Value="{Binding Path=Item1}"/>
|
<Style TargetType="MenuItem">
|
||||||
</Style>
|
<Setter Property="Header" Value="{Binding Path=Item2}"/>
|
||||||
</MenuItem.ItemContainerStyle>
|
<Setter Property="Command" Value="{x:Static local:Commands.OpenRecent}"/>
|
||||||
|
<Setter Property="CommandParameter" Value="{Binding Path=Item1}"/>
|
||||||
|
</Style>
|
||||||
|
</MenuItem.ItemContainerStyle>
|
||||||
|
</MenuItem>
|
||||||
|
<Separator/>
|
||||||
|
<MenuItem Header="{x:Static s:guiStrings.MenuExit}" Command="{x:Static local:Commands.Exit}" InputGestureText="Ctrl+Q"/>
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
<Separator/>
|
<MenuItem Header="{x:Static s:guiStrings.MenuView}">
|
||||||
<MenuItem Header="{x:Static s:guiStrings.MenuExit}" Command="{x:Static local:Commands.Exit}" InputGestureText="Ctrl+Q"/>
|
<MenuItem Header="{x:Static s:guiStrings.MenuToggleToolBar}" InputGestureText="Alt+Shift+T"
|
||||||
</MenuItem>
|
Command="{x:Static local:Commands.HideToolBar}"/>
|
||||||
<MenuItem Header="{x:Static s:guiStrings.MenuHelp}">
|
<MenuItem Header="{x:Static s:guiStrings.MenuToggleMenuBar}" InputGestureText="Alt+Shift+M"
|
||||||
<MenuItem Header="{x:Static s:guiStrings.MenuAbout}" Command="{x:Static local:Commands.About}"/>
|
Command="{x:Static local:Commands.HideMenuBar}"/>
|
||||||
</MenuItem>
|
<MenuItem Header="{x:Static s:guiStrings.MenuToggleStatusBar}" InputGestureText="Alt+Shift+S"
|
||||||
</Menu>
|
Command="{x:Static local:Commands.HideStatusBar}"/>
|
||||||
|
<Separator/>
|
||||||
|
<MenuItem Header="{x:Static s:guiStrings.MenuFitWindow}" InputGestureText="Ctrl+H"
|
||||||
|
Command="{x:Static local:Commands.FitWindow}"/>
|
||||||
|
<MenuItem Header="{x:Static s:guiStrings.CtxMenuRefresh}" InputGestureText="F5"
|
||||||
|
Command="{x:Static local:Commands.Refresh}"/>
|
||||||
|
<Separator/>
|
||||||
|
<MenuItem Header="{x:Static s:guiStrings.CtxMenuSortBy}">
|
||||||
|
<MenuItem Header="{x:Static s:guiStrings.CtxMenuSortByName}" IsCheckable="True"
|
||||||
|
IsChecked="{Binding ElementName=AppWindow, Path=IsSortByName, Mode=OneWay}"
|
||||||
|
Command="{x:Static local:Commands.SortBy}" CommandParameter="Name"/>
|
||||||
|
<MenuItem Header="{x:Static s:guiStrings.CtxMenuSortByType}" IsCheckable="True"
|
||||||
|
IsChecked="{Binding ElementName=AppWindow, Path=IsSortByType, Mode=OneWay}"
|
||||||
|
Command="{x:Static local:Commands.SortBy}" CommandParameter="Type"/>
|
||||||
|
<MenuItem Header="{x:Static s:guiStrings.CtxMenuSortBySize}" IsCheckable="True"
|
||||||
|
IsChecked="{Binding ElementName=AppWindow, Path=IsSortBySize, Mode=OneWay}"
|
||||||
|
Command="{x:Static local:Commands.SortBy}" CommandParameter="Size"/>
|
||||||
|
<MenuItem Header="{x:Static s:guiStrings.CtxMenuUnsorted}" IsCheckable="True"
|
||||||
|
IsChecked="{Binding ElementName=AppWindow, Path=IsUnsorted, Mode=OneWay}"
|
||||||
|
Command="{x:Static local:Commands.SortBy}"/>
|
||||||
|
</MenuItem>
|
||||||
|
</MenuItem>
|
||||||
|
<MenuItem Header="{x:Static s:guiStrings.MenuHelp}">
|
||||||
|
<MenuItem Header="{x:Static s:guiStrings.MenuAbout}" Command="{x:Static local:Commands.About}"/>
|
||||||
|
</MenuItem>
|
||||||
|
</Menu>
|
||||||
|
<Separator Height="1" Margin="0"/>
|
||||||
|
</StackPanel>
|
||||||
<Menu Visibility="Collapsed" x:Name="HelperMenuBar"/>
|
<Menu Visibility="Collapsed" x:Name="HelperMenuBar"/>
|
||||||
<Separator DockPanel.Dock="Top" Height="1" Margin="0"/>
|
<DockPanel x:Name="MainToolBar" Background="{Binding Path=Background, ElementName=HelperMenuBar}"
|
||||||
<DockPanel Background="{Binding Path=Background, ElementName=HelperMenuBar}" x:Name="MainToolBar"
|
HorizontalAlignment="Stretch" DockPanel.Dock="Top"
|
||||||
HorizontalAlignment="Stretch" DockPanel.Dock="Top">
|
Visibility="{Binding Source={x:Static p:Settings.Default}, Path=winToolBarVisibility, Mode=TwoWay}">
|
||||||
<DockPanel.Resources>
|
<DockPanel.Resources>
|
||||||
<Style TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Static ToolBar.ButtonStyleKey}}">
|
<Style TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Static ToolBar.ButtonStyleKey}}">
|
||||||
<Setter Property="ToolTipService.ShowOnDisabled" Value="True"/>
|
<Setter Property="ToolTipService.ShowOnDisabled" Value="True"/>
|
||||||
@ -155,6 +211,7 @@
|
|||||||
</Style.Triggers>
|
</Style.Triggers>
|
||||||
</Style>
|
</Style>
|
||||||
</DockPanel.Resources>
|
</DockPanel.Resources>
|
||||||
|
<Separator DockPanel.Dock="Bottom" Height="1" Margin="0"/>
|
||||||
<Button x:Name="ButtonBack" ToolTip="{x:Static s:guiStrings.TooltipBack}" Margin="5,2,0,2"
|
<Button x:Name="ButtonBack" ToolTip="{x:Static s:guiStrings.TooltipBack}" Margin="5,2,0,2"
|
||||||
Command="{x:Static local:Commands.GoBack}">
|
Command="{x:Static local:Commands.GoBack}">
|
||||||
<Image Source="{StaticResource Icon32x32Back}"/>
|
<Image Source="{StaticResource Icon32x32Back}"/>
|
||||||
@ -178,13 +235,15 @@
|
|||||||
</Button>
|
</Button>
|
||||||
<TextBlock Visibility="Hidden"/>
|
<TextBlock Visibility="Hidden"/>
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
<Separator DockPanel.Dock="Top" Height="1" Margin="0"/>
|
<StackPanel DockPanel.Dock="Bottom" x:Name="AppStatusBar"
|
||||||
<StatusBar DockPanel.Dock="Bottom" x:Name="AppStatusBar">
|
Visibility="{Binding Source={x:Static p:Settings.Default}, Path=winStatusBarVisibility, Mode=TwoWay}">
|
||||||
<StatusBarItem>
|
<Separator Height="1" Margin="0"/>
|
||||||
<TextBlock x:Name="appStatusText"/>
|
<StatusBar>
|
||||||
</StatusBarItem>
|
<StatusBarItem>
|
||||||
</StatusBar>
|
<TextBlock x:Name="appStatusText"/>
|
||||||
<Separator DockPanel.Dock="Bottom" Height="1" Margin="0"/>
|
</StatusBarItem>
|
||||||
|
</StatusBar>
|
||||||
|
</StackPanel>
|
||||||
<Grid x:Name="ContentGrid" DockPanel.Dock="Left" VerticalAlignment="Stretch"
|
<Grid x:Name="ContentGrid" DockPanel.Dock="Left" VerticalAlignment="Stretch"
|
||||||
HorizontalAlignment="Stretch" ShowGridLines="False">
|
HorizontalAlignment="Stretch" ShowGridLines="False">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
@ -294,6 +353,9 @@
|
|||||||
<KeyBinding Gesture="Backspace" Command="{x:Static local:Commands.GoBack}"/>
|
<KeyBinding Gesture="Backspace" Command="{x:Static local:Commands.GoBack}"/>
|
||||||
<KeyBinding Gesture="Alt+Left" Command="{x:Static local:Commands.GoBack}"/>
|
<KeyBinding Gesture="Alt+Left" Command="{x:Static local:Commands.GoBack}"/>
|
||||||
<KeyBinding Gesture="Alt+Right" Command="{x:Static local:Commands.GoForward}"/>
|
<KeyBinding Gesture="Alt+Right" Command="{x:Static local:Commands.GoForward}"/>
|
||||||
|
<KeyBinding Gesture="Alt+Shift+M" Command="{x:Static local:Commands.HideMenuBar}"/>
|
||||||
|
<KeyBinding Gesture="Alt+Shift+T" Command="{x:Static local:Commands.HideToolBar}"/>
|
||||||
|
<KeyBinding Gesture="Alt+Shift+S" Command="{x:Static local:Commands.HideStatusBar}"/>
|
||||||
</Window.InputBindings>
|
</Window.InputBindings>
|
||||||
<Window.CommandBindings>
|
<Window.CommandBindings>
|
||||||
<CommandBinding Command="{x:Static local:Commands.OpenItem}" Executed="OpenItemExec" CanExecute="CanExecuteOnSelected"/>
|
<CommandBinding Command="{x:Static local:Commands.OpenItem}" Executed="OpenItemExec" CanExecute="CanExecuteOnSelected"/>
|
||||||
@ -309,6 +371,9 @@
|
|||||||
<CommandBinding Command="{x:Static local:Commands.GoForward}" Executed="GoForwardExec" CanExecute="CanExecuteGoForward"/>
|
<CommandBinding Command="{x:Static local:Commands.GoForward}" Executed="GoForwardExec" CanExecute="CanExecuteGoForward"/>
|
||||||
<CommandBinding Command="{x:Static local:Commands.Refresh}" Executed="RefreshExec" CanExecute="CanExecuteAlways"/>
|
<CommandBinding Command="{x:Static local:Commands.Refresh}" Executed="RefreshExec" CanExecute="CanExecuteAlways"/>
|
||||||
<CommandBinding Command="{x:Static local:Commands.FitWindow}" Executed="FitWindowExec" CanExecute="CanExecuteFitWindow"/>
|
<CommandBinding Command="{x:Static local:Commands.FitWindow}" Executed="FitWindowExec" CanExecute="CanExecuteFitWindow"/>
|
||||||
|
<CommandBinding Command="{x:Static local:Commands.HideStatusBar}" Executed="HideStatusBarExec" CanExecute="CanExecuteAlways"/>
|
||||||
|
<CommandBinding Command="{x:Static local:Commands.HideMenuBar}" Executed="HideMenuBarExec" CanExecute="CanExecuteAlways"/>
|
||||||
|
<CommandBinding Command="{x:Static local:Commands.HideToolBar}" Executed="HideToolBarExec" CanExecute="CanExecuteAlways"/>
|
||||||
<CommandBinding Command="{x:Static local:Commands.About}" Executed="AboutExec" CanExecute="CanExecuteAlways"/>
|
<CommandBinding Command="{x:Static local:Commands.About}" Executed="AboutExec" CanExecute="CanExecuteAlways"/>
|
||||||
<CommandBinding Command="{x:Static local:Commands.Exit}" Executed="ExitExec" CanExecute="CanExecuteAlways"/>
|
<CommandBinding Command="{x:Static local:Commands.Exit}" Executed="ExitExec" CanExecute="CanExecuteAlways"/>
|
||||||
</Window.CommandBindings>
|
</Window.CommandBindings>
|
||||||
|
@ -64,7 +64,7 @@ namespace GARbro.GUI
|
|||||||
|
|
||||||
if (null == Settings.Default.appRecentFiles)
|
if (null == Settings.Default.appRecentFiles)
|
||||||
Settings.Default.appRecentFiles = new StringCollection();
|
Settings.Default.appRecentFiles = new StringCollection();
|
||||||
m_recent_files = new LinkedList<string> (Settings.Default.appRecentFiles.Cast<string>());
|
m_recent_files = new LinkedList<string> (Settings.Default.appRecentFiles.Cast<string>().Take (MaxRecentFiles));
|
||||||
RecentFilesMenu.ItemsSource = RecentFiles;
|
RecentFilesMenu.ItemsSource = RecentFiles;
|
||||||
|
|
||||||
FormatCatalog.Instance.ParametersRequest += OnParametersRequest;
|
FormatCatalog.Instance.ParametersRequest += OnParametersRequest;
|
||||||
@ -145,7 +145,7 @@ namespace GARbro.GUI
|
|||||||
Dispatcher.Invoke (() => MessageBox.Show (this, message, title, MessageBoxButton.OK, MessageBoxImage.Error));
|
Dispatcher.Invoke (() => MessageBox.Show (this, message, title, MessageBoxButton.OK, MessageBoxImage.Error));
|
||||||
}
|
}
|
||||||
|
|
||||||
const int MaxRecentFiles = 10;
|
const int MaxRecentFiles = 9;
|
||||||
LinkedList<string> m_recent_files;
|
LinkedList<string> m_recent_files;
|
||||||
|
|
||||||
// Item1 = file name, Item2 = menu item string
|
// Item1 = file name, Item2 = menu item string
|
||||||
@ -154,7 +154,7 @@ namespace GARbro.GUI
|
|||||||
get
|
get
|
||||||
{
|
{
|
||||||
int i = 1;
|
int i = 1;
|
||||||
return m_recent_files.Select (f => new Tuple<string,string> (f, string.Format ("{0} {1}", i++, f)));
|
return m_recent_files.Select (f => new Tuple<string,string> (f, string.Format ("_{0} {1}", i++, f)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -165,7 +165,7 @@ namespace GARbro.GUI
|
|||||||
return;
|
return;
|
||||||
if (null == node)
|
if (null == node)
|
||||||
{
|
{
|
||||||
if (MaxRecentFiles == m_recent_files.Count)
|
while (MaxRecentFiles < m_recent_files.Count)
|
||||||
m_recent_files.RemoveLast();
|
m_recent_files.RemoveLast();
|
||||||
m_recent_files.AddFirst (file);
|
m_recent_files.AddFirst (file);
|
||||||
}
|
}
|
||||||
@ -631,6 +631,10 @@ namespace GARbro.GUI
|
|||||||
SetStatusText (m_app.CurrentArchive.Description);
|
SetStatusText (m_app.CurrentArchive.Description);
|
||||||
lv_SelectItem (0);
|
lv_SelectItem (0);
|
||||||
}
|
}
|
||||||
|
catch (OperationCanceledException X)
|
||||||
|
{
|
||||||
|
SetStatusText (X.Message);
|
||||||
|
}
|
||||||
catch (Exception X)
|
catch (Exception X)
|
||||||
{
|
{
|
||||||
PopupError (string.Format("{0}:\n{1}", filename, X.Message), guiStrings.MsgErrorOpening);
|
PopupError (string.Format("{0}:\n{1}", filename, X.Message), guiStrings.MsgErrorOpening);
|
||||||
@ -997,6 +1001,33 @@ namespace GARbro.GUI
|
|||||||
{
|
{
|
||||||
e.CanExecute = PreviewPane.Source != null;
|
e.CanExecute = PreviewPane.Source != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void HideStatusBarExec (object sender, ExecutedRoutedEventArgs e)
|
||||||
|
{
|
||||||
|
var status = AppStatusBar.Visibility;
|
||||||
|
if (Visibility.Visible == status)
|
||||||
|
AppStatusBar.Visibility = Visibility.Collapsed;
|
||||||
|
else
|
||||||
|
AppStatusBar.Visibility = Visibility.Visible;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void HideMenuBarExec (object sender, ExecutedRoutedEventArgs e)
|
||||||
|
{
|
||||||
|
var status = MainMenuBar.Visibility;
|
||||||
|
if (Visibility.Visible == status)
|
||||||
|
MainMenuBar.Visibility = Visibility.Collapsed;
|
||||||
|
else
|
||||||
|
MainMenuBar.Visibility = Visibility.Visible;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void HideToolBarExec (object sender, ExecutedRoutedEventArgs e)
|
||||||
|
{
|
||||||
|
var status = MainToolBar.Visibility;
|
||||||
|
if (Visibility.Visible == status)
|
||||||
|
MainToolBar.Visibility = Visibility.Collapsed;
|
||||||
|
else
|
||||||
|
MainToolBar.Visibility = Visibility.Visible;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -1093,5 +1124,8 @@ namespace GARbro.GUI
|
|||||||
public static readonly RoutedCommand Refresh = new RoutedCommand();
|
public static readonly RoutedCommand Refresh = new RoutedCommand();
|
||||||
public static readonly RoutedCommand Browse = new RoutedCommand();
|
public static readonly RoutedCommand Browse = new RoutedCommand();
|
||||||
public static readonly RoutedCommand FitWindow = new RoutedCommand();
|
public static readonly RoutedCommand FitWindow = new RoutedCommand();
|
||||||
|
public static readonly RoutedCommand HideStatusBar = new RoutedCommand();
|
||||||
|
public static readonly RoutedCommand HideMenuBar = new RoutedCommand();
|
||||||
|
public static readonly RoutedCommand HideToolBar = new RoutedCommand();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
36
Properties/Settings.Designer.cs
generated
36
Properties/Settings.Designer.cs
generated
@ -261,5 +261,41 @@ namespace GARbro.GUI.Properties {
|
|||||||
this["appLastCreatedArchive"] = value;
|
this["appLastCreatedArchive"] = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||||
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
|
[global::System.Configuration.DefaultSettingValueAttribute("Visible")]
|
||||||
|
public global::System.Windows.Visibility winMenuBarVisibility {
|
||||||
|
get {
|
||||||
|
return ((global::System.Windows.Visibility)(this["winMenuBarVisibility"]));
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
this["winMenuBarVisibility"] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||||
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
|
[global::System.Configuration.DefaultSettingValueAttribute("Visible")]
|
||||||
|
public global::System.Windows.Visibility winToolBarVisibility {
|
||||||
|
get {
|
||||||
|
return ((global::System.Windows.Visibility)(this["winToolBarVisibility"]));
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
this["winToolBarVisibility"] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||||
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
|
[global::System.Configuration.DefaultSettingValueAttribute("Visible")]
|
||||||
|
public global::System.Windows.Visibility winStatusBarVisibility {
|
||||||
|
get {
|
||||||
|
return ((global::System.Windows.Visibility)(this["winStatusBarVisibility"]));
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
this["winStatusBarVisibility"] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -62,5 +62,14 @@
|
|||||||
<Setting Name="appLastCreatedArchive" Type="System.String" Scope="User">
|
<Setting Name="appLastCreatedArchive" Type="System.String" Scope="User">
|
||||||
<Value Profile="(Default)" />
|
<Value Profile="(Default)" />
|
||||||
</Setting>
|
</Setting>
|
||||||
|
<Setting Name="winMenuBarVisibility" Type="System.Windows.Visibility" Scope="User">
|
||||||
|
<Value Profile="(Default)">Visible</Value>
|
||||||
|
</Setting>
|
||||||
|
<Setting Name="winToolBarVisibility" Type="System.Windows.Visibility" Scope="User">
|
||||||
|
<Value Profile="(Default)">Visible</Value>
|
||||||
|
</Setting>
|
||||||
|
<Setting Name="winStatusBarVisibility" Type="System.Windows.Visibility" Scope="User">
|
||||||
|
<Value Profile="(Default)">Visible</Value>
|
||||||
|
</Setting>
|
||||||
</Settings>
|
</Settings>
|
||||||
</SettingsFile>
|
</SettingsFile>
|
45
Strings/guiStrings.Designer.cs
generated
45
Strings/guiStrings.Designer.cs
generated
@ -330,6 +330,15 @@ namespace GARbro.GUI.Strings {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to Fit preview _window to image.
|
||||||
|
/// </summary>
|
||||||
|
public static string MenuFitWindow {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("MenuFitWindow", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to _Help.
|
/// Looks up a localized string similar to _Help.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -357,6 +366,42 @@ namespace GARbro.GUI.Strings {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to Show/hide main _menu bar.
|
||||||
|
/// </summary>
|
||||||
|
public static string MenuToggleMenuBar {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("MenuToggleMenuBar", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to Show/hide _status bar.
|
||||||
|
/// </summary>
|
||||||
|
public static string MenuToggleStatusBar {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("MenuToggleStatusBar", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to Show/hide _toolbar.
|
||||||
|
/// </summary>
|
||||||
|
public static string MenuToggleToolBar {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("MenuToggleToolBar", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to _View.
|
||||||
|
/// </summary>
|
||||||
|
public static string MenuView {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("MenuView", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Choose files to extract.
|
/// Looks up a localized string similar to Choose files to extract.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -363,4 +363,19 @@ Overwrite?</value>
|
|||||||
<data name="MsgDeletedItems2" xml:space="preserve">
|
<data name="MsgDeletedItems2" xml:space="preserve">
|
||||||
<value>Deleted {0} files</value>
|
<value>Deleted {0} files</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="MenuFitWindow" xml:space="preserve">
|
||||||
|
<value>Fit preview _window to image</value>
|
||||||
|
</data>
|
||||||
|
<data name="MenuToggleMenuBar" xml:space="preserve">
|
||||||
|
<value>Show/hide main _menu bar</value>
|
||||||
|
</data>
|
||||||
|
<data name="MenuToggleStatusBar" xml:space="preserve">
|
||||||
|
<value>Show/hide _status bar</value>
|
||||||
|
</data>
|
||||||
|
<data name="MenuToggleToolBar" xml:space="preserve">
|
||||||
|
<value>Show/hide _toolbar</value>
|
||||||
|
</data>
|
||||||
|
<data name="MenuView" xml:space="preserve">
|
||||||
|
<value>_View</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
@ -381,4 +381,19 @@
|
|||||||
<data name="MsgDeletedItems3" xml:space="preserve">
|
<data name="MsgDeletedItems3" xml:space="preserve">
|
||||||
<value>Удалено {0} файлов</value>
|
<value>Удалено {0} файлов</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="MenuFitWindow" xml:space="preserve">
|
||||||
|
<value>Подогнать размер окна под изображение</value>
|
||||||
|
</data>
|
||||||
|
<data name="MenuToggleMenuBar" xml:space="preserve">
|
||||||
|
<value>Вкл/выкл главное меню</value>
|
||||||
|
</data>
|
||||||
|
<data name="MenuToggleStatusBar" xml:space="preserve">
|
||||||
|
<value>Вкл/выкл полосу статуса</value>
|
||||||
|
</data>
|
||||||
|
<data name="MenuToggleToolBar" xml:space="preserve">
|
||||||
|
<value>Вкл/выкл панель инструментов</value>
|
||||||
|
</data>
|
||||||
|
<data name="MenuView" xml:space="preserve">
|
||||||
|
<value>Просмотр</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
Loading…
Reference in New Issue
Block a user