Beispiel #1
0
        private void refresh_Click(object sender, RoutedEventArgs e)
        {
            BGMPlayer.PlayButton9();
            //controller.outputCoordinates[0].geometryList.Clear();
            controller = null;
            controller = LevelLoader.GetLevel(localLevel.ID);

            controller.historyDfaList.Clear();
            controller.outputCoordinates[0].refreshCanvas(canvas1);
            redo.IsEnabled = controller.CanRedo();
            undo.IsEnabled = controller.CanUndo();

            for (int i = 0; i < controller.givenConditionsId.Count; i++)
            {
                Models.Geometry.Geometry geometry = controller.coordinate.GetGeometryById(controller.givenConditionsId[i]);
                if (geometry is Point2)
                {
                    Point2 p2 = geometry as Point2;
                    p2.resultPoint.lineColor = Color.FromArgb(255, 201, 84, 191);
                }
            }

            controller.outputCoordinates[0].refreshGeometrys();         //刷新
            controller.missionSuccess += success;
        }
 private void refresh_Click(object sender, RoutedEventArgs e)
 {
     BGMPlayer.PlayButton9();
     controller = new Controllers.Geometry.Controllers(1);
     controller.outputCoordinates[0].WindowHeight = (float)canvas1.ActualHeight;
     controller.outputCoordinates[0].WindowWidth  = (float)canvas1.ActualWidth;
 }
 public Freestyle()
 {
     this.InitializeComponent();
     View = new ViewModel.ViewModel();
     if (!APPDATA.app_data.Views.Contains(View))
     {
         APPDATA.app_data.Views.Add(View);
     }
     userTools  = UserToolsManager.GetInstance().GetTools();
     controller = new Controllers.Geometry.Controllers(1);
 }
Beispiel #4
0
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            var x = localLevel = e.Parameter as Level;

            GameId.Text       = x.ID.ToString();
            GameName.Text     = x.name;
            GameImage.Source  = new BitmapImage(new Uri(x.cover, UriKind.Absolute));
            GameDiscribe.Text = x.Discribe;

            controller = LevelLoader.GetLevel(x.ID);
            for (int i = 0; i < controller.givenConditionsId.Count; i++)
            {
                Models.Geometry.Geometry geometry = controller.coordinate.GetGeometryById(controller.givenConditionsId[i]);
                if (geometry is Point2)
                {
                    Point2 p2 = geometry as Point2;
                    p2.resultPoint.lineColor = Color.FromArgb(255, 201, 84, 191);
                }
            }
            init();

            this.Loaded += delegate { this.Focus(FocusState.Programmatic); };
        }