Skip to content

Commit

Permalink
add tooltip to IsOneShot control; add messaging for loading profiles …
Browse files Browse the repository at this point in the history
…with an old version number;
  • Loading branch information
joekolodz committed Aug 28, 2022
1 parent 5c6d2fe commit 892fe70
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 16 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -339,4 +339,6 @@ ASALocalRun/
.localhistory/

# BeatPulse healthcheck temp database
healthchecksdb
healthchecksdb
/fastJSON
/output/net40/fastJSON.dll
2 changes: 1 addition & 1 deletion src/Controls/MacroTransport.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
VerticalAlignment="Center"/>

<StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="0,0,0,0">
<CheckBox Margin="0,2,0,0" IsChecked="{Binding IsOneShot}">One Shot</CheckBox>
<CheckBox Margin="0,2,0,0" IsChecked="{Binding IsOneShot}" ToolTip="Play all keystrokes in order. Do not wait for button release" ToolTipService.InitialShowDelay="800">One Shot</CheckBox>
<Label Content="Repeats" Foreground="{StaticResource TextBrush}" Margin="81,0,0,0"/>
<TextBox Text="{Binding RepeatCount}" ToolTip="Number of times to repeat this button press. -1 for infinite" ToolTipService.InitialShowDelay="800" Foreground="{StaticResource TextBrush}" CaretBrush="{StaticResource TextBrush}" Margin="0,0,2,0" Width="100" Height="20" FontSize="12" Background="{StaticResource WindowBackgroundBrush}" BorderBrush="{StaticResource NormalBorderBrush}"/>
</StackPanel>
Expand Down
6 changes: 6 additions & 0 deletions src/Models/FileSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,12 @@ public IHOTASCollection FileOpen(string path)
collection = (HOTASCollection)serializer.Deserialize(new JTokenReader(o), typeof(HOTASCollection));
}
//else - based on version, use factory to get old version and convert/map to latest version, then re-save
else
{
LastSavedFileName = "Version not supported. Auto conversion not implemented for this version.";
Logging.Log.Warn($"Warning opening file: {LastSavedFileName} Path:{path}");
return null;
}
}
catch (JsonReaderException readerException)
{
Expand Down
12 changes: 0 additions & 12 deletions src/SierraHOTAS.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -59,23 +59,11 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.ComponentModel.Composition" />
<Reference Include="System.Configuration" />
<Reference Include="System.Data" />
<Reference Include="System.Drawing" />
<Reference Include="System.IO.Compression" />
<Reference Include="System.Management" />
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.ServiceModel" />
<Reference Include="System.Transactions" />
<Reference Include="System.Windows" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xaml">
<RequiredTargetFramework>4.0</RequiredTargetFramework>
</Reference>
Expand Down
6 changes: 5 additions & 1 deletion src/ViewModels/HOTASCollectionViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,11 @@ private void FileSaveAs()
private void FileOpenDialog()
{
var loadedDeviceList = _fileSystem.FileOpenDialog();
if (loadedDeviceList == null) return;
if (loadedDeviceList == null)
{
ProfileSetFileName = _fileSystem.LastSavedFileName;
return;
}
LoadHotas(loadedDeviceList);
}

Expand Down
2 changes: 1 addition & 1 deletion src/Win32/WindowsProcedure.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public class WindowsProcedure
public static void Initialize(Views.MainWindow main)
{
if (!(PresentationSource.FromVisual(main) is HwndSource source))
throw new ArgumentNullException(nameof(main), @"Can't found a handle to the main window. Application stopping.");
throw new ArgumentNullException(nameof(main), @"Can't find a handle to the main window. Application stopping.");

source.AddHook(WndProc);
}
Expand Down

0 comments on commit 892fe70

Please sign in to comment.