Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added double click stw file (workbook file) to launch Signals and Transforms #7

Merged
merged 1 commit into from
Nov 24, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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();
}
}
}