using _3DTools; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Animation; using System.Windows.Media.Imaging; using System.Windows.Media.Media3D; using System.Windows.Navigation; using System.Windows.Shapes; namespace _20230724_MBJC_upperpc.Views { /// /// FirstPageView.xaml 的交互逻辑 /// public partial class FirstPageView : UserControl { public FirstPageView() { InitializeComponent(); this.DataContext = MainWindow.viewModel; } private async void re(List End) { //await Task.Run(() => //{ // for (int i = 0; i < End.Count; i++) // { // float a = single.Rotate_X; // float b = single.Rotate_Y; // float c = single.Rotate_Z; // for (int j = 0; j < 100; j++) // { // Thread.Sleep(10); // single.Rotate_X += (End[i].Rotate_X - a) / 100; // single.Rotate_Y += (End[i].Rotate_Y - b) / 100; // single.Rotate_Z += (End[i].Rotate_Z - c) / 100; // } // } // //for (int i = 0; i < 6000; i++) // //{ // // Thread.Sleep(1); // // //single.Rotate_X += 0.1f; // // single.Rotate_Y += 0.1f; // // //single.Rotate_Z += 0.1f; // //} //}); } private void TrackballDecorator_MouseUp(object sender, MouseButtonEventArgs e) { Console.WriteLine(); } private void Button_Click(object sender, RoutedEventArgs e) { //re(new List { new Single() { Rotate_X = -180, Rotate_Y = -90, Rotate_Z = 0 }, //new Single() { Rotate_X = -90, Rotate_Y = -90, Rotate_Z = 0 }, //new Single() { Rotate_X = -90, Rotate_Y = -180, Rotate_Z = 0 }, //new Single() { Rotate_X = -90, Rotate_Y = -90, Rotate_Z = 0 }, //new Single() { Rotate_X = -90, Rotate_Y = -90, Rotate_Z = 90 }, //new Single() { Rotate_X = -90, Rotate_Y = -90, Rotate_Z = 0 }}); re(new List { new Single() { Rotate_X = -90f + 2.02f, Rotate_Y = -90f + 0.41f, Rotate_Z = 0.05f } }); } private void Anchor1_ButtonClick(object sender, RoutedEventArgs e) { MainWindow.viewModel.DoNavChanged("Point1"); } private void Anchor2_ButtonClick(object sender, RoutedEventArgs e) { MainWindow.viewModel.DoNavChanged("Point2"); } private void Anchor3_ButtonClick(object sender, RoutedEventArgs e) { MainWindow.viewModel.DoNavChanged("Point3"); } private void Anchor4_ButtonClick(object sender, RoutedEventArgs e) { MainWindow.viewModel.DoNavChanged("Point4"); } private void Anchor5_ButtonClick(object sender, RoutedEventArgs e) { MainWindow.viewModel.DoNavChanged("Point5"); } private void Anchor6_ButtonClick(object sender, RoutedEventArgs e) { MainWindow.viewModel.DoNavChanged("Point6"); } private void Support1_ButtonClick(object sender, RoutedEventArgs e) { MainWindow.viewModel.DoNavChanged("Benchmark1"); } private void Support2_ButtonClick(object sender, RoutedEventArgs e) { MainWindow.viewModel.DoNavChanged("Benchmark2"); } private void Buoy_ButtonClick(object sender, RoutedEventArgs e) { MainWindow.viewModel.DoNavChanged("BuoyPlatformView"); } } }