Example #1
0
        private void OpenRoute_OnClick(object sender, RoutedEventArgs e)
        {
            Microsoft.Win32.OpenFileDialog dlg = new Microsoft.Win32.OpenFileDialog();
            dlg.DefaultExt = ".rut";
            dlg.Filter     = "Route Files (*.rut)|*.rut";
            bool?result = dlg.ShowDialog();

            if (result == true)
            {
                ClearRoute_OnClick(null, null);
                var filename = dlg.FileName;
                var route    = _routeHelper.LoadRoute(filename);
                _visualObjectHelper.LoadRoute(route);
            }

            EventsHelper.OnMenuStatusEvent(_menuState);
        }
Example #2
0
        private void Mode_OnChecked(object sender, RoutedEventArgs e)
        {
            var rb = (RadioButton)sender;

            switch (rb.Tag?.ToString())
            {
            case "NavigationPoint":
                _menuState = MenuStates.NavigationPoint;
                EventsHelper.OnMenuStatusEvent(_menuState);
                break;

            case "Edit":
                _menuState = MenuStates.Edit;
                EventsHelper.OnMenuStatusEvent(_menuState);
                break;

            case "Measure":
                _menuState = MenuStates.Measure;
                EventsHelper.OnMenuStatusEvent(_menuState);
                break;
            }
        }