This commit is contained in:
lxmou666 2021-02-16 12:47:01 +08:00
parent 295be45a3a
commit 735df0e588
4 changed files with 34 additions and 9 deletions

View File

@ -29,7 +29,6 @@
</Grid> </Grid>
<!--聊天版面--> <!--聊天版面-->
<Grid Background="#33000000"> <Grid Background="#33000000">
<Button x:Name="huabi" Click="Button_Click">画笔</Button>
</Grid> </Grid>
</DockPanel> </DockPanel>
</Window> </Window>

View File

@ -84,12 +84,5 @@ namespace JianGongYun.TRTC.Windows
} }
} }
private void Button_Click(object sender, RoutedEventArgs e)
{
Process prc = new Process { StartInfo = new ProcessStartInfo { FileName = System.IO.Path.Combine(Environment.CurrentDirectory, "Pointofix.exe"), CreateNoWindow = false, UseShellExecute = false } };
prc.Start();
huabi.Visibility = Visibility.Collapsed;
}
} }
} }

View File

@ -11,7 +11,7 @@
mc:Ignorable="d" mc:Ignorable="d"
Topmost="True" Topmost="True"
Top="0" Top="0"
Title="" Height="40" Width="400" Title="" Height="40" Width="472"
ResizeMode="NoResize" ResizeMode="NoResize"
MouseMove="Window_MouseMove" MouseMove="Window_MouseMove"
MouseLeave="Window_MouseLeave" MouseLeave="Window_MouseLeave"
@ -28,6 +28,14 @@
</Button.Content> </Button.Content>
</Button> </Button>
</StackPanel> </StackPanel>
<StackPanel Orientation="Horizontal" Width="72" DockPanel.Dock="Right">
<Button Click="Button_Click" Style="{StaticResource CusIconBtn}" Background="Transparent" BorderThickness="0">
<Button.Content>
<!--<TextBlock FontSize="13" Margin="20 0 0 0" TextAlignment="Right" Foreground="#97070e">展开教室</TextBlock>-->
<TextBlock FontSize="13" Margin="20 0 0 0" TextAlignment="Right" Foreground="#00cc66">画笔</TextBlock>
</Button.Content>
</Button>
</StackPanel>
<StackPanel Width="130" Orientation="Horizontal" DockPanel.Dock="Right"> <StackPanel Width="130" Orientation="Horizontal" DockPanel.Dock="Right">
<Ellipse VerticalAlignment="Center" Width="12" Fill="#00cc66" Height="12"></Ellipse> <Ellipse VerticalAlignment="Center" Width="12" Fill="#00cc66" Height="12"></Ellipse>
<TextBlock Margin="5 0 0 0" FontSize="13" Foreground="#00cc66">直播中</TextBlock> <TextBlock Margin="5 0 0 0" FontSize="13" Foreground="#00cc66">直播中</TextBlock>

View File

@ -13,6 +13,7 @@ using System.Windows.Media;
using System.Windows.Media.Imaging; using System.Windows.Media.Imaging;
using System.Windows.Shapes; using System.Windows.Shapes;
using Application = System.Windows.Forms.Application; using Application = System.Windows.Forms.Application;
using MessageBox = System.Windows.MessageBox;
using MouseEventArgs = System.Windows.Input.MouseEventArgs; using MouseEventArgs = System.Windows.Input.MouseEventArgs;
namespace JianGongYun.TRTC.Windows namespace JianGongYun.TRTC.Windows
@ -99,5 +100,29 @@ namespace JianGongYun.TRTC.Windows
{ {
down = false; down = false;
} }
private void Button_Click(object sender, RoutedEventArgs e)
{
this.Dispatcher.Invoke(() =>
{
try
{
var old = Process.GetProcessesByName("Pointofix");
if (old.Length > 0)
{
foreach (var item in old)
{
item.Kill();
}
}
Process prc = new Process { StartInfo = new ProcessStartInfo { FileName = System.IO.Path.Combine(Environment.CurrentDirectory, "Pointofix.exe"), CreateNoWindow = false, UseShellExecute = false } };
prc.Start();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message, "提醒");
}
});
}
} }
} }