Implemented method to send overview via telegram
This commit is contained in:
@@ -4,7 +4,7 @@
|
|||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Title="Debt Manager - Select Database" Height="285" Width="400"
|
Title="eJay - Select Database" Height="285" Width="400"
|
||||||
KeyUp="Window_OnKeyUp">
|
KeyUp="Window_OnKeyUp">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Name="MainViewWindow"
|
Name="MainViewWindow"
|
||||||
Icon="../Content/money_green.ico"
|
Icon="../Content/money_green.ico"
|
||||||
Title="Debt Manager" Height="600" MinHeight="600" Width="900" MinWidth="900"
|
Title="eJay" Height="600" MinHeight="600" Width="900" MinWidth="900"
|
||||||
Background="White">
|
Background="White">
|
||||||
<Window.Resources>
|
<Window.Resources>
|
||||||
<converters:AmountToColorConverter x:Key="AmountToColorConverter" />
|
<converters:AmountToColorConverter x:Key="AmountToColorConverter" />
|
||||||
@@ -36,7 +36,7 @@
|
|||||||
<RibbonButton Label="Edit Person" SmallImageSource="../Content/addperson.ico" Command="{Binding EditPersonContextMenuCommand}"></RibbonButton>
|
<RibbonButton Label="Edit Person" SmallImageSource="../Content/addperson.ico" Command="{Binding EditPersonContextMenuCommand}"></RibbonButton>
|
||||||
<RibbonButton Label="Delete Person" SmallImageSource="../Content/delete.ico" Command="{Binding DeletePersonContextMenuCommand}"></RibbonButton>
|
<RibbonButton Label="Delete Person" SmallImageSource="../Content/delete.ico" Command="{Binding DeletePersonContextMenuCommand}"></RibbonButton>
|
||||||
<RibbonButton Label="Save Screenshot" LargeImageSource="../Content/camera.png" Command="{Binding SaveScreenshotCommand}" CommandParameter="{Binding ElementName=RightPanel}" IsEnabled="{Binding ScreenshotPossible}"></RibbonButton>
|
<RibbonButton Label="Save Screenshot" LargeImageSource="../Content/camera.png" Command="{Binding SaveScreenshotCommand}" CommandParameter="{Binding ElementName=RightPanel}" IsEnabled="{Binding ScreenshotPossible}"></RibbonButton>
|
||||||
<RibbonButton Label="Send via Telegram" LargeImageSource="../Content/telegram.png" Command="{Binding SendViaTelegramCommand}" CommandParameter="{Binding ElementName=RightPanel}" IsEnabled="False"></RibbonButton>
|
<RibbonButton Label="Send via Telegram" LargeImageSource="../Content/telegram.png" Command="{Binding SendViaTelegramCommand}" CommandParameter="{Binding ElementName=RightPanel}"></RibbonButton>
|
||||||
</RibbonGroup>
|
</RibbonGroup>
|
||||||
<RibbonGroup Header="Transaction">
|
<RibbonGroup Header="Transaction">
|
||||||
<RibbonButton Label="Edit Transaction" SmallImageSource="../Content/addperson.ico" Command="{Binding EditTransactionContextMenuCommand}"></RibbonButton>
|
<RibbonButton Label="Edit Transaction" SmallImageSource="../Content/addperson.ico" Command="{Binding EditTransactionContextMenuCommand}"></RibbonButton>
|
||||||
@@ -46,7 +46,7 @@
|
|||||||
</RibbonGroup>
|
</RibbonGroup>
|
||||||
<RibbonGroup Header="Settings">
|
<RibbonGroup Header="Settings">
|
||||||
<RibbonButton Label="Switch Database" SmallImageSource="../Content/db_plus.ico" Command="{Binding SwitchDatabaseMenuCommand}"></RibbonButton>
|
<RibbonButton Label="Switch Database" SmallImageSource="../Content/db_plus.ico" Command="{Binding SwitchDatabaseMenuCommand}"></RibbonButton>
|
||||||
<RibbonButton Label="Show Database Location" SmallImageSource="../Content/db_info.ico" Command="{Binding OpenDatabaseLocationMenuCommand}"></RibbonButton>
|
<RibbonButton Label="Open Database Location" SmallImageSource="../Content/db_info.ico" Command="{Binding OpenDatabaseLocationMenuCommand}"></RibbonButton>
|
||||||
<RibbonButton Label="Select Telegram Path" SmallImageSource="../Content/telegram.png" Command="{Binding SetTelegramLocationCommand}"></RibbonButton>
|
<RibbonButton Label="Select Telegram Path" SmallImageSource="../Content/telegram.png" Command="{Binding SetTelegramLocationCommand}"></RibbonButton>
|
||||||
</RibbonGroup>
|
</RibbonGroup>
|
||||||
</RibbonTab>
|
</RibbonTab>
|
||||||
|
|||||||
@@ -236,8 +236,23 @@ namespace DebtMgr.ViewModel
|
|||||||
var fileName = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString() + ".png");
|
var fileName = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString() + ".png");
|
||||||
var parameter = string.Format("-sendpath \"{0}\"", fileName);
|
var parameter = string.Format("-sendpath \"{0}\"", fileName);
|
||||||
|
|
||||||
//var proc = System.Diagnostics.Process.Start(Properties.Settings.Default.TelegramPath, parameter);
|
// Create temp screenshot
|
||||||
var proc = System.Diagnostics.Process.Start("explorer");
|
PrintHelper.SaveUsingEncoder(fileName, grid);
|
||||||
|
|
||||||
|
// Create cmd process
|
||||||
|
Process process = new Process();
|
||||||
|
|
||||||
|
ProcessStartInfo startInfo = new ProcessStartInfo();
|
||||||
|
startInfo.WindowStyle = ProcessWindowStyle.Hidden;
|
||||||
|
startInfo.FileName = Properties.Settings.Default.TelegramPath;
|
||||||
|
|
||||||
|
startInfo.Arguments = parameter;
|
||||||
|
|
||||||
|
// Attach command to process
|
||||||
|
process.StartInfo = startInfo;
|
||||||
|
|
||||||
|
// Start process
|
||||||
|
process.Start();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|||||||
Reference in New Issue
Block a user