Skip to content

Commit

Permalink
Shortcuts to create a personal meeting and copy invite text
Browse files Browse the repository at this point in the history
Includes:
    * Persistent Settings with a Settings SettingsWindow
    * Start Meeting shortcut in meetings list popup as well as in the
      tray context menu
    * Tray menu items to copy short and long invite Chime meeting invite
      strings
  • Loading branch information
nachmore committed Jan 6, 2020
1 parent cb17f4b commit b893347
Show file tree
Hide file tree
Showing 9 changed files with 365 additions and 28 deletions.
18 changes: 18 additions & 0 deletions ChimeHelper/ChimeHelper/App.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="ChimeHelper.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
</sectionGroup>
</configSections>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
Expand Down Expand Up @@ -27,4 +32,17 @@
</dependentAssembly>
</assemblyBinding>
</runtime>
<userSettings>
<ChimeHelper.Properties.Settings>
<setting name="ChimeBridgePersonalizedID" serializeAs="String">
<value />
</setting>
<setting name="ChimeBridgePersonalID" serializeAs="String">
<value />
</setting>
<setting name="UpgradeRequired" serializeAs="String">
<value>True</value>
</setting>
</ChimeHelper.Properties.Settings>
</userSettings>
</configuration>
2 changes: 2 additions & 0 deletions ChimeHelper/ChimeHelper/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ protected override void OnStartup(StartupEventArgs e)

new ChimeHelperTray(TrayIcon);
ChimeHelperState.Create();

SettingsWindow.LoadSettings();
}

}
Expand Down
122 changes: 122 additions & 0 deletions ChimeHelper/ChimeHelper/ChimeHelperTray.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using static ChimeOutlookHelper.ChimeOutlookHelper;
Expand Down Expand Up @@ -91,6 +92,127 @@ public ICommand JoinMeetingCommand
}
}

public ICommand StartMeetingMenuCommand
{
get
{
return new DelegateCommand(
(object parameter) =>
{
var personalID = Properties.Settings.Default.ChimeBridgePersonalID ?? Properties.Settings.Default.ChimeBridgePersonalizedID;
var personalizedID = Properties.Settings.Default.ChimeBridgePersonalizedID ?? personalID;
if (string.IsNullOrEmpty(personalID) && string.IsNullOrEmpty(personalizedID))
{
SettingsWindow.CreateAndShow();
}
else
{
System.Diagnostics.Process.Start(String.Format(ChimeOutlookHelper.ChimeOutlookHelper.MEETING_URL_FORMAT, personalizedID));
}
}
);
}
}

public ICommand ShortChimeStringMenuCommand
{
get
{
return new DelegateCommand(
(object parameter) =>
{
var personalID = Properties.Settings.Default.ChimeBridgePersonalID;
var personalizedID = Properties.Settings.Default.ChimeBridgePersonalizedID;
if (string.IsNullOrEmpty(personalID) &&
string.IsNullOrEmpty(personalizedID))
{
SettingsWindow.CreateAndShow();
}
else
{
string chimeText;
if (personalID != null && personalizedID != null)
{
chimeText = $"Chime ({personalizedID} / {personalID})";
}
else if (personalID != null)
{
chimeText = $"Chime ({personalID})";
}
else
{
chimeText = $"Chime ({personalizedID})";
}
Clipboard.SetText(chimeText);
}
}
);
}
}
public ICommand FullChimeStringMenuCommand
{
get
{
return new DelegateCommand(
(object parameter) =>
{
var personalID = Properties.Settings.Default.ChimeBridgePersonalID ?? Properties.Settings.Default.ChimeBridgePersonalizedID;
var personalizedID = Properties.Settings.Default.ChimeBridgePersonalizedID ?? personalID;
if (string.IsNullOrEmpty(personalID) && string.IsNullOrEmpty(personalizedID))
{
SettingsWindow.CreateAndShow();
return;
}
var fullChimeText =
$@"You have been invited to an online meeting, powered by Amazon Chime.
1.Click to join the meeting: https://chime.aws/{personalizedID}
Meeting ID: {personalizedID}
Meeting PIN: {personalID}
2.You can use your computer’s microphone and speakers; however, a headset is recommended.Or, call in using your phone:
Meeting PIN: {personalID}
One-click Dial-in (US) : +1 206 - 462 - 5569,,3795341803#
United States Toll - Free : +1 855 - 552 - 4463
United States(1) : +1 206 - 462 - 5569
United States(2) : +1 929 - 432 - 4463
Australia Toll-Free(1) : +61 1800 910 205
Australia Toll-Free(2) : +61 1800 791 104
Australia : +61 2 8311 0237
Singapore Toll-Free : +65 1800 622 3606
Singapore : +65 3158 2702
International: https://chime.aws/dialinnumbers/
";
Clipboard.SetText(fullChimeText);
}
);
}
}
public ICommand SettingsMenuCommand
{
get
{
return new DelegateCommand(
(object parameter) =>
{
SettingsWindow.CreateAndShow();
}
);
}
}

public ICommand AboutMenuCommand
{
get
Expand Down
7 changes: 7 additions & 0 deletions ChimeHelper/ChimeHelper/ChimeHelperUX.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -211,12 +211,19 @@
<DependentUpon>AboutWindow.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Page Include="SettingsWindow.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="TrayIconResource.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
</ItemGroup>
<ItemGroup>
<Compile Include="SettingsWindow.xaml.cs">
<DependentUpon>SettingsWindow.xaml</DependentUpon>
</Compile>
<Compile Include="XAMLExtenders\BoolToObjectConverter.cs" />
<Compile Include="XAMLExtenders\HyperlinkAuto.cs" />
<Compile Include="Properties\AssemblyInfo.cs">
Expand Down
68 changes: 50 additions & 18 deletions ChimeHelper/ChimeHelper/Properties/Settings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 13 additions & 5 deletions ChimeHelper/ChimeHelper/Properties/Settings.settings
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="uri:settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="ChimeHelper.Properties" GeneratedClassName="Settings">
<Profiles />
<Settings>
<Setting Name="ChimeBridgePersonalizedID" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
<Setting Name="ChimeBridgePersonalID" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
<Setting Name="UpgradeRequired" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
</Settings>
</SettingsFile>
48 changes: 48 additions & 0 deletions ChimeHelper/ChimeHelper/SettingsWindow.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<Window x:Class="ChimeHelper.SettingsWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:ChimeHelper"
mc:Ignorable="d"
Icon="/Icons/fan.ico"
Title="Chime Helper Settings" Height="230" Width="400">
<StackPanel>
<Border Background="#192A38" BorderBrush="Black" BorderThickness="1" HorizontalAlignment="Left" Height="42" VerticalAlignment="Top" Width="574">
<StackPanel Orientation="Horizontal">
<Image Height="28" Width="28" Source="/Icons/fan.ico" Margin="10,0,0,0"></Image>
<TextBlock VerticalAlignment="Center" FontSize="25" Foreground="White" FontWeight="Light" Margin="5,0,0,0">Settings</TextBlock>
</StackPanel>
</Border>
<TextBlock Margin="10,10,10,0" TextWrapping="Wrap">You can configure your Personalized ID and Personal ID to enable shortcuts to start a meeting as well as copy meeting details.</TextBlock>

<Grid Margin="10,20,20,0">

<Grid.ColumnDefinitions>
<ColumnDefinition Width="248"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>

<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>

<TextBlock Grid.Row="0" Grid.Column="0">Personalized ID (eg: "my_awesome_bridge"):</TextBlock>
<TextBox Grid.Row="0" Grid.Column="1" MaxLength="50" Text="{Binding PersonalizedId, Mode=TwoWay}"></TextBox>

<TextBlock Grid.Row="1" Grid.Column="0">Personal ID (eg: "123456789"):</TextBlock>
<TextBox Grid.Row="1" Grid.Column="1" MaxLength="20" Text="{Binding PersonalId, Mode=TwoWay}"></TextBox>
</Grid>

<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
<Button Name="btnSave" Click="btnSave_Click" Margin="0,20, 20, 0" Padding="5,0,5,0">Save</Button>
<Button Name="btnCancel" Click="btnCancel_Click" Margin="0,20,0,0" Padding="5,0,5,0">Cancel</Button>
</StackPanel>



</StackPanel>
</Window>
Loading

0 comments on commit b893347

Please sign in to comment.