Skip to content

Commit 9e53308

Browse files
author
Ahmad Noman Musleh
committed
Updated Telegram library
1 parent 51f6b02 commit 9e53308

File tree

7 files changed

+14
-19
lines changed

7 files changed

+14
-19
lines changed

src/Alert/Alert.csproj

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,6 @@
5050
<Reference Include="MahApps.Metro, Version=1.6.5.1, Culture=neutral, processorArchitecture=MSIL">
5151
<HintPath>..\..\packages\MahApps.Metro.1.6.5\lib\net45\MahApps.Metro.dll</HintPath>
5252
</Reference>
53-
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
54-
<HintPath>..\..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
55-
</Reference>
5653
<Reference Include="PresentationCore" />
5754
<Reference Include="PresentationFramework" />
5855
<Reference Include="Prism, Version=7.2.0.1422, Culture=neutral, PublicKeyToken=40ee6c3a2184dc59, processorArchitecture=MSIL">
@@ -77,8 +74,8 @@
7774
<Reference Include="Microsoft.CSharp" />
7875
<Reference Include="System.Data" />
7976
<Reference Include="System.Xml" />
80-
<Reference Include="TelegramBotApi, Version=1.0.2.0, Culture=neutral, processorArchitecture=MSIL">
81-
<HintPath>..\..\packages\TelegramBotApi.1.0.2\lib\net45\TelegramBotApi.dll</HintPath>
77+
<Reference Include="TelegramBotApi, Version=1.1.2.0, Culture=neutral, processorArchitecture=MSIL">
78+
<HintPath>..\..\packages\TelegramBotApi.1.1.2\lib\net40-client\TelegramBotApi.dll</HintPath>
8279
</Reference>
8380
<Reference Include="WindowsBase" />
8481
</ItemGroup>

src/Alert/ViewModels/SettingsViewModel.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,13 @@ public class SettingsViewModel : BindableBase
1919
{
2020
#region Fields
2121

22+
private readonly EventAggregator _eventAggregator;
23+
private readonly Models.SettingsModel _model;
24+
2225
private List<SolidColorBrush> _colors;
23-
private EventAggregator _eventAggregator;
2426
private List<FontFamily> _fonts;
2527
private List<Models.FontStyleModel> _fontStyles;
2628
private List<Models.FontWeightModel> _fontWeights;
27-
private Models.SettingsModel _model;
2829
private Models.TelegramConversation _telegramConversation;
2930
private List<Models.ThemeAccentModel> _themeAccents;
3031
private List<Models.ThemeBaseModel> _themeBases;
@@ -243,7 +244,9 @@ private void AddTelegramConversation()
243244

244245
try
245246
{
246-
updates = telegramBotClient.GetUpdates();
247+
telegramBotClient.DeleteWebhook();
248+
249+
updates = telegramBotClient.GetUpdates().Result;
247250
}
248251
catch (WebException ex)
249252
{

src/Alert/ViewModels/ShellViewModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ public class ShellViewModel : BindableBase
99
{
1010
#region Fields
1111

12-
private App _app;
12+
private readonly App _app;
1313

1414
private bool _isSettingsButtonEnabled;
1515

src/Alert/Views/ShellView.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
88
xmlns:local="clr-namespace:cAlgo.API.Alert"
99
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
10-
Width="800"
10+
Width="1000"
1111
Height="500"
1212
BorderThickness="0"
1313
GlowBrush="Black"

src/Alert/packages.config

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@
44
<package id="ControlzEx" version="3.0.2.4" targetFramework="net45" />
55
<package id="LiteDB" version="5.0.8" targetFramework="net45" />
66
<package id="MahApps.Metro" version="1.6.5" targetFramework="net45" />
7-
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="net45" />
87
<package id="Prism.Core" version="7.2.0.1422" targetFramework="net45" />
98
<package id="Prism.Wpf" version="7.2.0.1422" targetFramework="net45" />
109
<package id="System.ValueTuple" version="4.5.0" targetFramework="net45" />
11-
<package id="TelegramBotApi" version="1.0.2" targetFramework="net45" />
10+
<package id="TelegramBotApi" version="1.1.2" targetFramework="net45" />
1211
</packages>

test/UITestConsole/Program.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ private static void Main(string[] args)
1212

1313
//notifications.ShowPopup();
1414

15-
//notifications.ShowPopup("Hour", "EURUSD", "Trend Line", "UITestConsole", 1.23452, "No comment 2", DateTimeOffset.Now);
15+
notifications.ShowPopup("Hour", "EURUSD", "Trend Line", "UITestConsole", 1.23452, "No comment 2", DateTimeOffset.Now);
1616

1717
//TriggerAlerts(50, notifications);
1818

19-
TestMultiThread(10);
19+
//TestMultiThread(10);
2020
}
2121

2222
private static void TriggerAlerts(int number, Notifications notifications)

test/UITestConsole/UITestConsole.csproj

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,6 @@
5656
<SpecificVersion>False</SpecificVersion>
5757
<HintPath>..\..\src\Alert\bin\Release\MahApps.Metro.dll</HintPath>
5858
</Reference>
59-
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
60-
<SpecificVersion>False</SpecificVersion>
61-
<HintPath>..\..\src\Alert\bin\Release\Newtonsoft.Json.dll</HintPath>
62-
</Reference>
6359
<Reference Include="PresentationCore" />
6460
<Reference Include="PresentationFramework" />
6561
<Reference Include="Prism, Version=7.1.0.431, Culture=neutral, PublicKeyToken=40ee6c3a2184dc59, processorArchitecture=MSIL">
@@ -85,7 +81,7 @@
8581
<Reference Include="System.Data" />
8682
<Reference Include="System.Net.Http" />
8783
<Reference Include="System.Xml" />
88-
<Reference Include="TelegramBotApi, Version=1.0.2.0, Culture=neutral, processorArchitecture=MSIL">
84+
<Reference Include="TelegramBotApi, Version=1.1.2.0, Culture=neutral, processorArchitecture=MSIL">
8985
<SpecificVersion>False</SpecificVersion>
9086
<HintPath>..\..\src\Alert\bin\Release\TelegramBotApi.dll</HintPath>
9187
</Reference>

0 commit comments

Comments
 (0)