Esempio n. 1
0
 private void btnRealView_Click(object sender, EventArgs e)
 {
     if (lstPaths.SelectedItem != null && lstPoints.SelectedItem != null)
     {
         RealNavigationForm navigationForm = new RealNavigationForm();
         navigationForm.ProjectImagePath = Globals.ImagesDir;
         navigationForm.CurrentPlace     = Globals.NavigatorPlace;
         navigationForm.CurrentPath      = (NavigatorPath)lstPaths.SelectedItem;
         navigationForm.CurrentPoint     = (NavigatorPoint)lstPoints.SelectedItem;
         navigationForm.CurrentAngle     = 0;
         navigationForm.StartRealView();
         navigationForm.ShowDialog();
     }
 }
Esempio n. 2
0
        private void btnDefineYouAreHere_Click(object sender, EventArgs e)
        {
            RealNavigationForm navigationForm = new RealNavigationForm();

            navigationForm.CurrentPlace = Globals.NavigatorPlace;
            navigationForm.CurrentPath  = Globals.NavigatorPlace.Paths[0];
            navigationForm.CurrentPoint = Globals.NavigatorPlace.Paths[0].Points[0];
            navigationForm.CurrentAngle = 0;
            navigationForm.StartRealView();
            if (navigationForm.ShowDialog() == DialogResult.OK)
            {
                YouAreHereLocation.Instance.PathId = navigationForm.CurrentPath.Id;
                YouAreHereLocation.Instance.Point  = navigationForm.CurrentPoint;
                YouAreHereLocation.Instance.Angle  = navigationForm.CurrentAngle;

                YouAreHereLocation.Instance.Save();

                ShowPreview();
            }
        }