Skip to content

Commit

Permalink
Merge pull request #7 from hybridmachine/FFT_Filters
Browse files Browse the repository at this point in the history
Added double click stw file (workbook file) to launch Signals and Transforms
  • Loading branch information
hybridmachine authored Nov 24, 2019
2 parents 84bc4ab + 47a705f commit 9045a64
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Signals And Transforms/App.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:SignalsAndTransforms"
StartupUri="MainWindow.xaml">
Startup="Application_Startup">
<Application.Resources>
<SolidColorBrush x:Key="WindowBackground" Color="#FFEEEEFF"/>
<Style x:Key="LabelText" TargetType="TextBlock">
Expand Down
12 changes: 11 additions & 1 deletion Signals And Transforms/App.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using SignalsAndTransforms.Managers;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
Expand All @@ -13,5 +14,14 @@ namespace SignalsAndTransforms
/// </summary>
public partial class App : Application
{
private void Application_Startup(object sender, StartupEventArgs e)
{
MainWindow window = new MainWindow();
if (e.Args.Length == 1)
{
WorkBookManager.Manager().Load(e.Args[0], true);
}
window.Show();
}
}
}
14 changes: 12 additions & 2 deletions Signals And Transforms/Installer/Product.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,29 @@

<Feature Id="ProductFeature" Title="Product" Level="1">
<ComponentGroupRef Id="ProductComponents" />
<ComponentRef Id="FileExtensions"/>
</Feature>

</Product>

<Fragment>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="INSTALLFOLDER" Name="Signals And Transforms">
<Directory Id="INSTALLLOCATION" Name=".">
<Directory Id="ProductComponents"></Directory>
<Directory Id="ProductComponents"/>
</Directory>
</Directory>
</Directory>
</Directory>
</Fragment>

<Fragment>
<Component Id="FileExtensions" Directory="TARGETDIR" Guid="{39568E18-4098-44F3-9845-A52DF783A979}">
<ProgId Id="SignalsAndTransforms.stw" Description="Workbook">
<Extension Id="stw" ContentType="application/stw">
<Verb Id="open" Command="Open" TargetFile="fil41798E866BC736CEC72FD22DC3251767" Argument="&quot;%1&quot;" />
</Extension>
</ProgId>
</Component>
</Fragment>
</Wix>
3 changes: 2 additions & 1 deletion Signals And Transforms/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
xmlns:res="clr-namespace:SignalsAndTransforms.Properties"
xmlns:ribbon="clr-namespace:System.Windows.Controls.Ribbon;assembly=System.Windows.Controls.Ribbon"
mc:Ignorable="d"
Title="Signals And Transforms" Height="768" Width="1380">
Title="Signals And Transforms" Height="768" Width="1380"
Loaded="Window_Loaded">
<Grid x:Name="LayoutRoot" AllowDrop="True" Drop="LayoutRoot_Drop">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
Expand Down
5 changes: 5 additions & 0 deletions Signals And Transforms/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -150,5 +150,10 @@ private void SetActiveWorkbook(string file)
WorkBookManager.Manager().Load(file, true);
SetActiveWorkbookTitle();
}

private void Window_Loaded(object sender, RoutedEventArgs e)
{
SetActiveWorkbookTitle();
}
}
}

0 comments on commit 9045a64

Please sign in to comment.