Skip to content

Commit

Permalink
Added random option
Browse files Browse the repository at this point in the history
  • Loading branch information
changbowen committed Aug 13, 2016
1 parent 9aa0791 commit eb5169e
Show file tree
Hide file tree
Showing 7 changed files with 183 additions and 186 deletions.
Binary file modified Ken Burns Slideshow.v12.suo
Binary file not shown.
5 changes: 3 additions & 2 deletions Localization/StringResources.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
<system:String x:Key="register menu">Register menu</system:String>
<system:String x:Key="unregister menu">Unregister menu</system:String>
<system:String x:Key="tip_registermenu">Register right-click menu entry for folders in Windows Explorer.</system:String>
<system:String x:Key="randomize">Randomize order</system:String>
<system:String x:Key="tip_randomize">This will ignore custom ordering in Edit Slides for next runs.</system:String>
<system:String x:Key="randomizeV">Random image order</system:String>
<system:String x:Key="randomizeA">Random music order</system:String>
<system:String x:Key="tip_randomizeV">This will ignore custom ordering in Edit Slides for next runs. Restart program to revert back to default order.</system:String>
</ResourceDictionary>
5 changes: 3 additions & 2 deletions Localization/StringResources.zh-CN.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
<system:String x:Key="register menu">注册文件夹关联</system:String>
<system:String x:Key="unregister menu">解除文件夹关联</system:String>
<system:String x:Key="tip_registermenu">在Windows资源管理器的文件夹右键菜单中添加播放选项。</system:String>
<system:String x:Key="randomize">随机顺序</system:String>
<system:String x:Key="tip_randomize">选择此项会忽视编辑幻灯片中的自定义顺序。下次启动生效。</system:String>
<system:String x:Key="randomizeV">随机图片顺序</system:String>
<system:String x:Key="randomizeA">随机音乐顺序</system:String>
<system:String x:Key="tip_randomizeV">选择此项会忽视编辑幻灯片中的自定义顺序。下次启动恢复默认顺序。</system:String>
</ResourceDictionary>
347 changes: 169 additions & 178 deletions MainWindow.xaml.vb

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion OptWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@
<ComboBoxItem Content="{StaticResource load_onebyone}"/>
<ComboBoxItem Content="{StaticResource load_allatonce}"/>
</ComboBox>
<CheckBox x:Name="CB_Randomize" Canvas.Left="345" Canvas.Top="280" ContentStringFormat="* {0}" Content="{StaticResource randomize}" ToolTip="{StaticResource tip_randomize}"/>
<CheckBox x:Name="CB_RandomizeV" Canvas.Left="345" Canvas.Top="280" ContentStringFormat="* {0}" Content="{StaticResource randomizeV}" ToolTip="{StaticResource tip_randomizeV}"/>
<CheckBox x:Name="CB_RandomizeA" Canvas.Left="345" Canvas.Top="300" ContentStringFormat="* {0}" Content="{StaticResource randomizeA}"/>
<TextBlock Canvas.Left="10" TextWrapping="Wrap" Text="{StaticResource star}" Canvas.Top="437"/>
</Canvas>
</Window>
9 changes: 6 additions & 3 deletions OptWindow.xaml.vb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
TB_LoadQuality.Text = MainWindow.loadquality
CbB_ScaleMode.SelectedItem = New KeyValuePair(Of Integer, String)(MainWindow.scalemode, MainWindow.ScaleMode_Dic(MainWindow.scalemode))
CbB_BlurMode.SelectedIndex = MainWindow.blurmode
CB_Randomize.IsChecked = MainWindow.randomize
CB_RandomizeV.IsChecked = MainWindow.randomizeV
CB_RandomizeA.IsChecked = MainWindow.randomizeA

If Microsoft.Win32.Registry.CurrentUser.OpenSubKey("Software\Classes\Directory\shell\OpenWithKenBurns\command") Is Nothing Then
Btn_FolderAsso.Content = Application.Current.Resources("register menu")
Expand Down Expand Up @@ -121,7 +122,8 @@
MainWindow.loadmode_next = CbB_LoadMode.SelectedIndex
MainWindow.scalemode = CbB_ScaleMode.SelectedItem.Key
MainWindow.blurmode = CbB_BlurMode.SelectedIndex
MainWindow.randomize = CB_Randomize.IsChecked
MainWindow.randomizeV = CB_RandomizeV.IsChecked
MainWindow.randomizeA = CB_RandomizeA.IsChecked

'saving to file
Dim config As New XElement("CfgRoot")
Expand All @@ -148,7 +150,8 @@
config.Add(New XElement("ScaleMode", CbB_ScaleMode.SelectedItem.Key))
config.Add(New XElement("BlurMode", CbB_BlurMode.SelectedIndex))
config.Add(New XElement("LoadMode", CbB_LoadMode.SelectedIndex))
config.Add(New XElement("Randomize", CB_Randomize.IsChecked.Value))
config.Add(New XElement("RandomizeV", CB_RandomizeV.IsChecked.Value))
config.Add(New XElement("RandomizeA", CB_RandomizeA.IsChecked.Value))

'copy slides data if exists
If My.Computer.FileSystem.FileExists(MainWindow.config_path) Then
Expand Down
Binary file modified bin/Release/Ken Burns Slideshow.exe
Binary file not shown.

0 comments on commit eb5169e

Please sign in to comment.