Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
charleypeng committed Aug 1, 2023
2 parents 5c03ff1 + 0f6be8a commit 9845688
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 16 deletions.
19 changes: 5 additions & 14 deletions aot/Cagaya/Cagaya/Controls/RadarBase/BaseRadarDisplay.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,16 @@
>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"> </RowDefinition>
<RowDefinition Height="60"> </RowDefinition>
<RowDefinition Height="*"></RowDefinition>
</Grid.RowDefinitions>
<Canvas Grid.Row="0" x:Name="cvs" Background="Gray" >
<Button Name="btntest" Click="Btntest_OnClick">FastMove</Button>
<vm:RadarTarget></vm:RadarTarget>
<Ellipse Stroke="Firebrick"
Fill="Chartreuse"
ContextMenu="{}"

Height="{Binding OHeight}"
Width="{Binding OWidth}"
Canvas.Left="{Binding CWidth, Mode=TwoWay}"
Canvas.Top="{Binding CHeight, Mode=TwoWay}"/>
</Canvas>
<TextBlock Grid.Row="0" x:Name="cvs" Text="{Binding Path=LogText}" >

</TextBlock>
<ItemsControl Grid.Row="1" ItemsSource="{Binding Targets}" >
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<Canvas Width="1920" Height="1080" Background="Gray"/>
<Canvas Background="Gray"/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ private void AttachDevTools()
private void InitializeComponent()
{
AvaloniaXamlLoader.Load(this);
btntest = this.FindControl<Button>("btntest");

}

private async void Btntest_OnClick(object? sender, RoutedEventArgs e)
Expand All @@ -36,7 +36,7 @@ private async void Btntest_OnClick(object? sender, RoutedEventArgs e)
await Task.Delay(TimeSpan.FromSeconds(1));
foreach (var w in wid)
{
Canvas.SetLeft(btntest, w);

await Task.Delay(TimeSpan.FromSeconds(3));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ public partial class BaseRadarDisplayViewModel : ObservableObject
private event EventHandler? radarOutput;
public double? OWidth { get; set; } = 10;
public double? OHeight { get; set; } = 10;

[ObservableProperty]
private string? _logText = "Logger";

public BaseRadarDisplayViewModel()
{

Expand Down Expand Up @@ -104,6 +108,7 @@ private async Task StartNow()

radarOutput?.Invoke(_t, null!);
await Task.Delay(100);
LogText = $"current txt:{_t?.Item?.CallSign}:{_t?.Top}:{_t?.Left}";
}
}
}
Expand Down

0 comments on commit 9845688

Please sign in to comment.