├── View-Spot-of-City
├── View-Spot-of-City
│ ├── Icon
│ │ ├── map.ico
│ │ ├── map.png
│ │ ├── Blog.png
│ │ ├── Device.png
│ │ ├── Earth.png
│ │ ├── Error.png
│ │ ├── Find.png
│ │ ├── Pizza.png
│ │ ├── Talk.png
│ │ ├── User.png
│ │ ├── logo.png
│ │ ├── Correct.png
│ │ ├── Keyboard.png
│ │ ├── 3D-Glasses.png
│ │ ├── Customize.png
│ │ ├── Transparent.png
│ │ ├── logo_blue.png
│ │ ├── logo_darkblue.png
│ │ ├── Direction-North.png
│ │ └── Horizontal-Align-Left.png
│ ├── desktop.ico
│ ├── Properties
│ │ ├── Settings.settings
│ │ ├── Settings.Designer.cs
│ │ ├── AssemblyInfo.cs
│ │ ├── Resources.Designer.cs
│ │ └── app.manifest
│ ├── Form
│ │ ├── RepoInfoWindow.xaml.cs
│ │ ├── RepoInfoWindow.xaml
│ │ ├── LoginDlg.xaml
│ │ └── LicenseDlg.xaml
│ ├── Converter
│ │ ├── ConverterDictionary.xaml
│ │ ├── Enum2LoginUI.cs
│ │ ├── ImageConverter.cs
│ │ └── Enum2UIControl.cs
│ ├── helper
│ │ ├── MD5_Encryption.cs
│ │ ├── RegisterMaster.cs
│ │ └── SpeechRecognition.cs
│ ├── packages.config
│ └── App.xaml
├── View-Spot-of-City.UIControls
│ ├── Icon
│ │ ├── Error.png
│ │ ├── close.png
│ │ ├── end.png
│ │ ├── go_to.png
│ │ ├── hunt.png
│ │ ├── logo.png
│ │ ├── pin.png
│ │ ├── start.png
│ │ ├── tag.png
│ │ ├── Correct.png
│ │ ├── hotel1.png
│ │ ├── station.png
│ │ ├── GasStation.png
│ │ ├── Microphone.png
│ │ ├── close_02.png
│ │ ├── close_03.png
│ │ ├── logo_blue.png
│ │ ├── pin_bule.png
│ │ ├── search_02.png
│ │ ├── restaurant2.png
│ │ └── conversion_pre.png
│ ├── Helper
│ │ ├── GisgraphyHelper.cs
│ │ ├── LoginDlgMaster.cs
│ │ ├── MD5_Encryption.cs
│ │ ├── IconDictionaryHelper.cs
│ │ ├── SpeechRecognition.cs
│ │ ├── WebServiceHelper.cs
│ │ ├── RoutingHelper.cs
│ │ ├── GraphHooperHelper.cs
│ │ ├── EmailHelper.cs
│ │ └── AvatarHelper.cs
│ ├── VisualizationControl
│ │ ├── VisitorSeries.cs
│ │ ├── VisualizationControlBase.cs
│ │ ├── GeoHeatMap.xaml
│ │ ├── VisitorsByYear.xaml
│ │ ├── BasicRowExample.xaml
│ │ ├── BasicRowExample.xaml.cs
│ │ ├── VisitorsByMonth.xaml
│ │ ├── GeoHeatMap.xaml.cs
│ │ ├── HistogramOfType.xaml
│ │ ├── VisitorFlow.xaml
│ │ └── VisitorsByMonth.xaml.cs
│ ├── Properties
│ │ ├── Settings.settings
│ │ ├── Settings.Designer.cs
│ │ ├── AssemblyInfo.cs
│ │ └── Resources.Designer.cs
│ ├── Form
│ │ ├── ViewTypeForm.xaml.cs
│ │ ├── VisitorsForm.xaml.cs
│ │ ├── SpotStatistics.xaml.cs
│ │ ├── VisitorsForm.xaml
│ │ ├── ViewTypeForm.xaml
│ │ ├── SpotStatistics.xaml
│ │ ├── VisualizationParamsPicker.xaml.cs
│ │ ├── VisualizationParamsPicker.xaml
│ │ ├── MessageboxMaster.cs
│ │ ├── MyMessageBoxEvents.cs
│ │ └── MyMessageBox.xaml
│ ├── UIcontrol
│ │ ├── CircleProgressControl.xaml.cs
│ │ ├── VisitorCallout.xaml.cs
│ │ ├── VisitorCallout.xaml
│ │ ├── RepoInfo.xaml.cs
│ │ ├── SpotViewerMaster.xaml
│ │ ├── MyMessageBox_Ok.xaml
│ │ ├── MyMessageBox_Ok.xaml.cs
│ │ ├── MyMessageBox_YesNo.xaml.cs
│ │ ├── MyMessageBox_YesNo.xaml
│ │ ├── MyMessageBox_OkCancel.xaml
│ │ ├── MyMessageBox_OkCancel.xaml.cs
│ │ ├── MyMessageBox_YesNoCancel.xaml.cs
│ │ ├── MyMessageBox_YesNoCancel.xaml
│ │ ├── SpotViewerDisscuss.xaml.cs
│ │ ├── SpotViewerMaster.xaml.cs
│ │ ├── SpotViewerStatistics.xaml.cs
│ │ ├── SpotViewerDisscuss.xaml
│ │ ├── SpotViewerStatistics.xaml
│ │ ├── Register.xaml
│ │ └── Login.xaml
│ ├── Theme
│ │ ├── ThemesDictionary.xaml
│ │ └── MetroTheme.xaml
│ ├── DataTemplate
│ │ ├── SpotNameListItemTemplate.xaml
│ │ ├── VisualizationControlListItemTemplate.xaml
│ │ ├── DataTemplateDictionary.xaml
│ │ ├── MainNavBarDataTemplate.xaml
│ │ └── ViewSpotListItemTemplate.xaml
│ ├── Style
│ │ ├── SeperatorStyles.xaml
│ │ ├── StylesDictionary.xaml
│ │ ├── ToggleButtonStyles.xaml
│ │ ├── WindowStyles.cs
│ │ ├── TextBlockStyles.xaml
│ │ └── TextBoxStyles.xaml
│ ├── OverLayer
│ │ ├── OverLayerExample.xaml.cs
│ │ ├── ShowMap.xaml.cs
│ │ ├── ShowMap.xaml
│ │ └── OverLayerExample.xaml
│ ├── Command
│ │ ├── CommandForMainWindow.cs
│ │ ├── MyMessageBoxCommands.cs
│ │ ├── ArcGISSceneCommands.cs
│ │ ├── LoginDlgCommands.cs
│ │ ├── ViewSpotViewerCommands.cs
│ │ └── ArcGISMapCommands.cs
│ ├── Converter
│ │ ├── SpotViewPanel2Visibility.cs
│ │ ├── MyMessageBoxButtonConverter.cs
│ │ ├── String2Image.cs
│ │ ├── ViewSpotItemConverters.cs
│ │ ├── MyMessageBoxDefaultButtonConverter.cs
│ │ ├── String2ImageForComment.cs
│ │ └── Mail2AvatarBruahConverter.cs
│ ├── ArcGISControl
│ │ ├── SceneView.xaml
│ │ └── ViewModel
│ │ │ └── MapViewModel.cs
│ ├── packages.config
│ ├── Progress
│ │ ├── FromProgressBox.xaml
│ │ ├── CircleProgressAsync.xaml.cs
│ │ ├── CircleProgress.xaml.cs
│ │ └── ProgressBox.cs
│ ├── app.config
│ ├── UIControls.xaml
│ └── ViewModel
│ │ └── OverlayerItemViewModel.cs
├── View-Spot-of-City.LogManager
│ ├── packages.config
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ └── View-Spot-of-City.LogManager.csproj
├── View-Spot-of-City.ClassModel
│ ├── packages.config
│ ├── Interface
│ │ └── IGetLngLat.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ └── Base
│ │ └── CommonPlace.cs
├── View-Spot-of-City.Language
│ ├── Properties
│ │ ├── Settings.settings
│ │ ├── Settings.Designer.cs
│ │ ├── AssemblyInfo.cs
│ │ └── Resources.Designer.cs
│ └── Language
│ │ ├── LanguagesDictionary.xaml
│ │ └── LanguageDictionaryHelper.cs
└── View-Spot-of-City.sln
├── appveyor.yml
├── .gitattributes
└── README.md
/View-Spot-of-City/View-Spot-of-City/Icon/map.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RS-GIS-Geeks/View-Spot-of-City/HEAD/View-Spot-of-City/View-Spot-of-City/Icon/map.ico
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City/Icon/map.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RS-GIS-Geeks/View-Spot-of-City/HEAD/View-Spot-of-City/View-Spot-of-City/Icon/map.png
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City/desktop.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RS-GIS-Geeks/View-Spot-of-City/HEAD/View-Spot-of-City/View-Spot-of-City/desktop.ico
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City/Icon/Blog.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RS-GIS-Geeks/View-Spot-of-City/HEAD/View-Spot-of-City/View-Spot-of-City/Icon/Blog.png
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City/Icon/Device.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RS-GIS-Geeks/View-Spot-of-City/HEAD/View-Spot-of-City/View-Spot-of-City/Icon/Device.png
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City/Icon/Earth.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RS-GIS-Geeks/View-Spot-of-City/HEAD/View-Spot-of-City/View-Spot-of-City/Icon/Earth.png
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City/Icon/Error.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RS-GIS-Geeks/View-Spot-of-City/HEAD/View-Spot-of-City/View-Spot-of-City/Icon/Error.png
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City/Icon/Find.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RS-GIS-Geeks/View-Spot-of-City/HEAD/View-Spot-of-City/View-Spot-of-City/Icon/Find.png
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City/Icon/Pizza.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RS-GIS-Geeks/View-Spot-of-City/HEAD/View-Spot-of-City/View-Spot-of-City/Icon/Pizza.png
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City/Icon/Talk.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RS-GIS-Geeks/View-Spot-of-City/HEAD/View-Spot-of-City/View-Spot-of-City/Icon/Talk.png
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City/Icon/User.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RS-GIS-Geeks/View-Spot-of-City/HEAD/View-Spot-of-City/View-Spot-of-City/Icon/User.png
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City/Icon/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RS-GIS-Geeks/View-Spot-of-City/HEAD/View-Spot-of-City/View-Spot-of-City/Icon/logo.png
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City/Icon/Correct.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RS-GIS-Geeks/View-Spot-of-City/HEAD/View-Spot-of-City/View-Spot-of-City/Icon/Correct.png
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City/Icon/Keyboard.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RS-GIS-Geeks/View-Spot-of-City/HEAD/View-Spot-of-City/View-Spot-of-City/Icon/Keyboard.png
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City/Icon/3D-Glasses.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RS-GIS-Geeks/View-Spot-of-City/HEAD/View-Spot-of-City/View-Spot-of-City/Icon/3D-Glasses.png
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City/Icon/Customize.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RS-GIS-Geeks/View-Spot-of-City/HEAD/View-Spot-of-City/View-Spot-of-City/Icon/Customize.png
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City/Icon/Transparent.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RS-GIS-Geeks/View-Spot-of-City/HEAD/View-Spot-of-City/View-Spot-of-City/Icon/Transparent.png
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City/Icon/logo_blue.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RS-GIS-Geeks/View-Spot-of-City/HEAD/View-Spot-of-City/View-Spot-of-City/Icon/logo_blue.png
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City/Icon/logo_darkblue.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RS-GIS-Geeks/View-Spot-of-City/HEAD/View-Spot-of-City/View-Spot-of-City/Icon/logo_darkblue.png
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/Icon/Error.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RS-GIS-Geeks/View-Spot-of-City/HEAD/View-Spot-of-City/View-Spot-of-City.UIControls/Icon/Error.png
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/Icon/close.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RS-GIS-Geeks/View-Spot-of-City/HEAD/View-Spot-of-City/View-Spot-of-City.UIControls/Icon/close.png
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/Icon/end.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RS-GIS-Geeks/View-Spot-of-City/HEAD/View-Spot-of-City/View-Spot-of-City.UIControls/Icon/end.png
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/Icon/go_to.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RS-GIS-Geeks/View-Spot-of-City/HEAD/View-Spot-of-City/View-Spot-of-City.UIControls/Icon/go_to.png
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/Icon/hunt.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RS-GIS-Geeks/View-Spot-of-City/HEAD/View-Spot-of-City/View-Spot-of-City.UIControls/Icon/hunt.png
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/Icon/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RS-GIS-Geeks/View-Spot-of-City/HEAD/View-Spot-of-City/View-Spot-of-City.UIControls/Icon/logo.png
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/Icon/pin.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RS-GIS-Geeks/View-Spot-of-City/HEAD/View-Spot-of-City/View-Spot-of-City.UIControls/Icon/pin.png
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/Icon/start.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RS-GIS-Geeks/View-Spot-of-City/HEAD/View-Spot-of-City/View-Spot-of-City.UIControls/Icon/start.png
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/Icon/tag.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RS-GIS-Geeks/View-Spot-of-City/HEAD/View-Spot-of-City/View-Spot-of-City.UIControls/Icon/tag.png
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City/Icon/Direction-North.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RS-GIS-Geeks/View-Spot-of-City/HEAD/View-Spot-of-City/View-Spot-of-City/Icon/Direction-North.png
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/Icon/Correct.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RS-GIS-Geeks/View-Spot-of-City/HEAD/View-Spot-of-City/View-Spot-of-City.UIControls/Icon/Correct.png
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/Icon/hotel1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RS-GIS-Geeks/View-Spot-of-City/HEAD/View-Spot-of-City/View-Spot-of-City.UIControls/Icon/hotel1.png
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/Icon/station.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RS-GIS-Geeks/View-Spot-of-City/HEAD/View-Spot-of-City/View-Spot-of-City.UIControls/Icon/station.png
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/Icon/GasStation.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RS-GIS-Geeks/View-Spot-of-City/HEAD/View-Spot-of-City/View-Spot-of-City.UIControls/Icon/GasStation.png
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/Icon/Microphone.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RS-GIS-Geeks/View-Spot-of-City/HEAD/View-Spot-of-City/View-Spot-of-City.UIControls/Icon/Microphone.png
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/Icon/close_02.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RS-GIS-Geeks/View-Spot-of-City/HEAD/View-Spot-of-City/View-Spot-of-City.UIControls/Icon/close_02.png
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/Icon/close_03.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RS-GIS-Geeks/View-Spot-of-City/HEAD/View-Spot-of-City/View-Spot-of-City.UIControls/Icon/close_03.png
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/Icon/logo_blue.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RS-GIS-Geeks/View-Spot-of-City/HEAD/View-Spot-of-City/View-Spot-of-City.UIControls/Icon/logo_blue.png
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/Icon/pin_bule.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RS-GIS-Geeks/View-Spot-of-City/HEAD/View-Spot-of-City/View-Spot-of-City.UIControls/Icon/pin_bule.png
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/Icon/search_02.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RS-GIS-Geeks/View-Spot-of-City/HEAD/View-Spot-of-City/View-Spot-of-City.UIControls/Icon/search_02.png
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City/Icon/Horizontal-Align-Left.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RS-GIS-Geeks/View-Spot-of-City/HEAD/View-Spot-of-City/View-Spot-of-City/Icon/Horizontal-Align-Left.png
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.LogManager/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/Helper/GisgraphyHelper.cs:
--------------------------------------------------------------------------------
1 | namespace View_Spot_of_City.UIControls.Helper
2 | {
3 | public static class GisgraphyHelper
4 | {
5 |
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/Icon/restaurant2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RS-GIS-Geeks/View-Spot-of-City/HEAD/View-Spot-of-City/View-Spot-of-City.UIControls/Icon/restaurant2.png
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/Icon/conversion_pre.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RS-GIS-Geeks/View-Spot-of-City/HEAD/View-Spot-of-City/View-Spot-of-City.UIControls/Icon/conversion_pre.png
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/VisualizationControl/VisitorSeries.cs:
--------------------------------------------------------------------------------
1 | namespace View_Spot_of_City.UIControls.VisualizationControl
2 | {
3 | internal class VisitorSeries
4 | {
5 | }
6 | }
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.ClassModel/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.Language/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/appveyor.yml:
--------------------------------------------------------------------------------
1 | version: 1.2.2.{build}
2 | pull_requests:
3 | do_not_increment_build_number: true
4 | image: Visual Studio 2017
5 | platform: Any CPU
6 | before_build:
7 | - cmd: nuget restore View-Spot-of-City/View-Spot-of-City.sln
8 | build:
9 | project: View-Spot-of-City/View-Spot-of-City.sln
10 | verbosity: minimal
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/Helper/LoginDlgMaster.cs:
--------------------------------------------------------------------------------
1 | namespace View_Spot_of_City.UIControls.Helper
2 | {
3 | public static class LoginDlgMaster
4 | {
5 | ///
6 | /// 主控件
7 | ///
8 | public enum LoginControls : int
9 | {
10 | Login = 0,
11 | Register = 1
12 | }
13 | }
14 | }
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City/Form/RepoInfoWindow.xaml.cs:
--------------------------------------------------------------------------------
1 | using System.Windows;
2 |
3 | namespace View_Spot_of_City.Form
4 | {
5 | ///
6 | /// RepoInfoWindow.xaml 的交互逻辑
7 | ///
8 | public partial class RepoInfoWindow : Window
9 | {
10 | public RepoInfoWindow()
11 | {
12 | InitializeComponent();
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/VisualizationControl/VisualizationControlBase.cs:
--------------------------------------------------------------------------------
1 | using System.Windows.Controls;
2 |
3 | namespace View_Spot_of_City.UIControls.VisualizationControl
4 | {
5 | public class VisualizationControlBase : UserControl
6 | {
7 | ///
8 | /// 构造函数
9 | ///
10 | public VisualizationControlBase() { }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/Form/ViewTypeForm.xaml.cs:
--------------------------------------------------------------------------------
1 | using System.Windows;
2 |
3 | namespace View_Spot_of_City.UIControls.Form
4 | {
5 | ///
6 | /// ViewTypeForm.xaml 的交互逻辑
7 | ///
8 | public partial class ViewTypeForm : Window
9 | {
10 | public ViewTypeForm()
11 | {
12 | InitializeComponent();
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/Form/VisitorsForm.xaml.cs:
--------------------------------------------------------------------------------
1 | using System.Windows;
2 |
3 | namespace View_Spot_of_City.UIControls.Form
4 | {
5 | ///
6 | /// VisitorsForm.xaml 的交互逻辑
7 | ///
8 | public partial class VisitorsForm : Window
9 | {
10 | public VisitorsForm()
11 | {
12 | InitializeComponent();
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/UIcontrol/CircleProgressControl.xaml.cs:
--------------------------------------------------------------------------------
1 | using System.Windows.Controls;
2 |
3 | namespace View_Spot_of_City.UIControls.UIcontrol
4 | {
5 | ///
6 | /// CircleProgressControl.xaml 的交互逻辑
7 | ///
8 | public partial class CircleProgressControl : UserControl
9 | {
10 | public CircleProgressControl()
11 | {
12 | InitializeComponent();
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/Form/SpotStatistics.xaml.cs:
--------------------------------------------------------------------------------
1 | using System.Windows;
2 |
3 | namespace View_Spot_of_City.UIControls.Form
4 | {
5 | ///
6 | /// SpotStatistics.xaml 的交互逻辑
7 | ///
8 | public partial class SpotStatistics : Window
9 | {
10 | public SpotStatistics(long viewId)
11 | {
12 | InitializeComponent();
13 | visitorsByYear.Init(viewId);
14 | }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/Theme/ThemesDictionary.xaml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City/Converter/ConverterDictionary.xaml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.ClassModel/Interface/IGetLngLat.cs:
--------------------------------------------------------------------------------
1 | namespace View_Spot_of_City.ClassModel.Interface
2 | {
3 | ///
4 | /// 获取经纬度接口
5 | ///
6 | public interface IGetLngLat
7 | {
8 | ///
9 | /// 返回经度
10 | ///
11 | /// 经度
12 | double GetLng();
13 |
14 | ///
15 | /// 返回纬度
16 | ///
17 | /// 纬度
18 | double GetLat();
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City/helper/MD5_Encryption.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Security.Cryptography;
3 | using System.Text;
4 |
5 | namespace View_Spot_of_City.Helper
6 | {
7 | class MD5_Encryption
8 | {
9 | public static string MD5Encode(string strText)
10 | {
11 | MD5 md5 = new MD5CryptoServiceProvider();
12 | byte[] result = md5.ComputeHash(Encoding.UTF8.GetBytes(strText));
13 | return BitConverter.ToString(result).Replace("-", "").ToLower();
14 | }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.Language/Language/LanguagesDictionary.xaml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/Helper/MD5_Encryption.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Security.Cryptography;
3 | using System.Text;
4 |
5 | namespace View_Spot_of_City.UIControls.Helper
6 | {
7 | class MD5_Encryption
8 | {
9 | public static string MD5Encode(string strText)
10 | {
11 | MD5 md5 = new MD5CryptoServiceProvider();
12 | byte[] result = md5.ComputeHash(Encoding.UTF8.GetBytes("rsgisgeeks" + strText));
13 | return BitConverter.ToString(result).Replace("-", "").ToLower();
14 | }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/UIcontrol/VisitorCallout.xaml.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Windows.Controls;
3 |
4 | using View_Spot_of_City.ClassModel;
5 |
6 | namespace View_Spot_of_City.UIControls.UIcontrol
7 | {
8 | ///
9 | /// VisitorCallout.xaml 的交互逻辑
10 | ///
11 | public partial class VisitorCallout : UserControl
12 | {
13 | public VisitorCallout(List visitorItemList)
14 | {
15 | InitializeComponent();
16 | LineChart.Init(visitorItemList);
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/DataTemplate/SpotNameListItemTemplate.xaml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/DataTemplate/VisualizationControlListItemTemplate.xaml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/Style/SeperatorStyles.xaml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
11 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/DataTemplate/DataTemplateDictionary.xaml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/UIcontrol/VisitorCallout.xaml:
--------------------------------------------------------------------------------
1 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City/Converter/Enum2LoginUI.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Globalization;
3 | using System.Windows;
4 | using System.Windows.Data;
5 |
6 | namespace View_Spot_of_City.Converter
7 | {
8 | public class Enum2LoginUI : IValueConverter
9 | {
10 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
11 | {
12 | if (value == null) { return null; }
13 | try { return (int)value == System.Convert.ToInt32((string)parameter) ? Visibility.Visible : Visibility.Collapsed; }
14 | catch { return null; }
15 | }
16 |
17 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
18 | {
19 | throw new NotImplementedException();
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City/Form/RepoInfoWindow.xaml:
--------------------------------------------------------------------------------
1 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/OverLayer/OverLayerExample.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using System.Windows;
7 | using System.Windows.Controls;
8 | using System.Windows.Data;
9 | using System.Windows.Documents;
10 | using System.Windows.Input;
11 | using System.Windows.Media;
12 | using System.Windows.Media.Imaging;
13 | using System.Windows.Navigation;
14 | using System.Windows.Shapes;
15 |
16 | namespace View_Spot_of_City.UIControls.OverLayer
17 | {
18 | ///
19 | /// Example.xaml 的交互逻辑
20 | ///
21 | public partial class OverLayerExample : UserControl
22 | {
23 | public OverLayerExample()
24 | {
25 | InitializeComponent();
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/OverLayer/ShowMap.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Windows.Controls;
3 | using static System.Configuration.ConfigurationManager;
4 |
5 | using Esri.ArcGISRuntime.Mapping;
6 | using Esri.ArcGISRuntime.UI;
7 |
8 | namespace View_Spot_of_City.UIControls.OverLayer
9 | {
10 | ///
11 | /// ShowMap.xaml 的交互逻辑
12 | ///
13 | public partial class ShowMap : UserControl
14 | {
15 | public ShowMap()
16 | {
17 | InitializeComponent();
18 | mapView.Map = new Map(new Uri(AppSettings["ARCGIS_BASEMAP"]));
19 | if (!mapView.LocationDisplay.IsEnabled)
20 | mapView.LocationDisplay.IsEnabled = true;
21 | mapView.LocationDisplay.AutoPanMode = LocationDisplayAutoPanMode.CompassNavigation;
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/Command/CommandForMainWindow.cs:
--------------------------------------------------------------------------------
1 | using System.Windows.Input;
2 |
3 | namespace View_Spot_of_City.UIControls.Command
4 | {
5 | public static class CommandForMainWindow
6 | {
7 | ///
8 | /// 更改当前用户命令
9 | ///
10 | public static RoutedCommand ChangeCurrentUserCommand { set; get; }
11 |
12 | ///
13 | /// 命令转发
14 | ///
15 | public static RoutedCommand CommandsFreightStationToOverlayerCommand { set; get; }
16 |
17 | ///
18 | /// 静态构造函数
19 | ///
20 | static CommandForMainWindow()
21 | {
22 | ChangeCurrentUserCommand = new RoutedCommand();
23 | CommandsFreightStationToOverlayerCommand = new RoutedCommand();
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/Command/MyMessageBoxCommands.cs:
--------------------------------------------------------------------------------
1 | using System.Windows.Input;
2 |
3 | namespace View_Spot_of_City.UIControls.Command
4 | {
5 | ///
6 | /// 自定义Messagebox的路由命令
7 | ///
8 | public static class MyMessageBoxCommands
9 | {
10 | public static RoutedCommand OKButtonClick { set; get; }
11 | public static RoutedCommand CancelButtonClick { set; get; }
12 | public static RoutedCommand YesButtonClick { set; get; }
13 | public static RoutedCommand NoButtonClick { set; get; }
14 |
15 | static MyMessageBoxCommands()
16 | {
17 | OKButtonClick = new RoutedCommand();
18 | CancelButtonClick = new RoutedCommand();
19 | YesButtonClick = new RoutedCommand();
20 | NoButtonClick = new RoutedCommand();
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/Converter/SpotViewPanel2Visibility.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Globalization;
3 | using System.Windows;
4 | using System.Windows.Data;
5 |
6 | namespace View_Spot_of_City.UIControls.Converter
7 | {
8 | public class SpotViewPanel2Visibility : IValueConverter
9 | {
10 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
11 | {
12 | if (value == null) { return null; }
13 | try { return (int)value == System.Convert.ToInt32((string)parameter) ? Visibility.Visible : Visibility.Collapsed; }
14 | catch { return null; }
15 | }
16 |
17 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
18 | {
19 | throw new NotImplementedException();
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/Converter/MyMessageBoxButtonConverter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Globalization;
3 | using System.Windows;
4 | using System.Windows.Data;
5 |
6 | namespace View_Spot_of_City.UIControls.Converter
7 | {
8 | public class MyMessageBoxButtonConverter : IValueConverter
9 | {
10 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
11 | {
12 | if (value == null) { return null; }
13 | try { return (int)value == System.Convert.ToInt32((string)parameter) ? Visibility.Visible : Visibility.Collapsed; }
14 | catch { return null; }
15 | }
16 |
17 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
18 | {
19 | throw new NotImplementedException();
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/DataTemplate/MainNavBarDataTemplate.xaml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/UIcontrol/RepoInfo.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Diagnostics;
3 | using System.Windows;
4 | using System.Windows.Controls;
5 | using System.Windows.Documents;
6 |
7 | namespace View_Spot_of_City.UIControls.UIcontrol
8 | {
9 | ///
10 | /// RepoInfo.xaml 的交互逻辑
11 | ///
12 | public partial class RepoInfo : UserControl
13 | {
14 | public RepoInfo()
15 | {
16 | InitializeComponent();
17 | }
18 |
19 | private void DonateButton_Click(object sender, RoutedEventArgs e)
20 | {
21 | Hyperlink link = new Hyperlink();
22 | {
23 | link.NavigateUri = new Uri(@"https://github.com/RS-GIS-Geeks/View-Spot-of-City");
24 | }
25 | Process.Start(new ProcessStartInfo(link.NavigateUri.AbsoluteUri));
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/Converter/String2Image.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Globalization;
3 | using System.Windows.Data;
4 | using System.Windows.Media;
5 | using System.Windows.Media.Imaging;
6 |
7 | namespace View_Spot_of_City.UIControls.Converter
8 | {
9 | public class String2Image : IValueConverter
10 | {
11 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
12 | {
13 | if (value == null || (value as string) == string.Empty)
14 | return Brushes.DarkBlue;
15 | string uriStr = value as string;
16 | return new ImageBrush(new BitmapImage(new Uri(uriStr)));
17 | }
18 |
19 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
20 | {
21 | throw new NotImplementedException();
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City/Converter/ImageConverter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Globalization;
3 | using System.Windows.Data;
4 | using System.Windows.Media.Imaging;
5 |
6 | namespace View_Spot_of_City.Converter
7 | {
8 | public class ImageConverter : IValueConverter
9 | {
10 | object IValueConverter.Convert(object value, Type targetType, object parameter, CultureInfo culture)
11 | {
12 | if (value == null) return null;
13 | try
14 | {
15 | return new BitmapImage(new Uri(value.ToString()));
16 | }
17 | catch
18 | {
19 | return null;
20 | }
21 | }
22 |
23 | object IValueConverter.ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
24 | {
25 | throw new NotImplementedException();
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/Converter/ViewSpotItemConverters.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Globalization;
3 | using System.Windows.Data;
4 | using View_Spot_of_City.Language.Language;
5 |
6 | namespace View_Spot_of_City.UIControls.Converter
7 | {
8 | public class ViewSpotCostConverter : IValueConverter
9 | {
10 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
11 | {
12 | double cost = (double)value;
13 | string precost = LanguageDictionaryHelper.GetString("ShowSpot_PreCost");
14 | if (precost == "$")
15 | cost /= 6;
16 | return precost + cost.ToString("f1");
17 | }
18 |
19 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
20 | {
21 | throw new NotImplementedException();
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/Command/ArcGISSceneCommands.cs:
--------------------------------------------------------------------------------
1 | using System.Windows.Input;
2 |
3 | namespace View_Spot_of_City.UIControls.Command
4 | {
5 | public static class ArcGISSceneCommands
6 | {
7 | ///
8 | /// 添加人流量数据到Scene
9 | ///
10 | public static RoutedCommand AddVisitorsData { get; set; }
11 |
12 | ///
13 | /// 改变人流量数据
14 | ///
15 | public static RoutedCommand ChangeVisitorsData { get; set; }
16 |
17 | ///
18 | /// 改变Scene的底图
19 | ///
20 | public static RoutedCommand ChangeBaseMap { get; set; }
21 |
22 | static ArcGISSceneCommands()
23 | {
24 | AddVisitorsData = new RoutedCommand();
25 | ChangeBaseMap = new RoutedCommand();
26 | ChangeVisitorsData = new RoutedCommand();
27 | }
28 | }
29 | }
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/Converter/MyMessageBoxDefaultButtonConverter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Globalization;
3 | using System.Windows.Data;
4 |
5 | namespace View_Spot_of_City.UIControls.Converter
6 | {
7 | public class MyMessageBoxDefaultButtonConverter : IValueConverter
8 | {
9 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
10 | {
11 | if (value == null) { return false; }
12 | try
13 | {
14 | bool result = (int)value == System.Convert.ToInt32((string)parameter) ? true : false;
15 | return result;
16 | }
17 | catch { return false; }
18 | }
19 |
20 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
21 | {
22 | throw new NotImplementedException();
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/Converter/String2ImageForComment.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Globalization;
3 | using System.Windows.Data;
4 | using System.Windows.Media;
5 | using System.Windows.Media.Imaging;
6 |
7 | namespace View_Spot_of_City.UIControls.Converter
8 | {
9 | class String2ImageForComment : IValueConverter
10 | {
11 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
12 | {
13 | if (value == null || (value as string) == string.Empty || (value as string) == "-")
14 | return null;
15 | string uriStr = value as string;
16 | return new ImageBrush(new BitmapImage(new Uri(uriStr)));
17 | }
18 |
19 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
20 | {
21 | throw new NotImplementedException();
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/Converter/Mail2AvatarBruahConverter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Globalization;
3 | using System.Windows.Data;
4 | using System.Windows.Media;
5 |
6 | using View_Spot_of_City.UIControls.Helper;
7 |
8 | namespace View_Spot_of_City.UIControls.Converter
9 | {
10 | public class Mail2AvatarBruahConverter : IValueConverter
11 | {
12 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
13 | {
14 | string valueStr = value as string;
15 | string userInputMail = valueStr == string.Empty ? "rsgisgeeks@qq.com" : valueStr;
16 | return new ImageBrush(AvatarHelper.GetAvatarByEmail(userInputMail));
17 | }
18 |
19 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
20 | {
21 | throw new NotImplementedException();
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/Form/VisitorsForm.xaml:
--------------------------------------------------------------------------------
1 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.Language/Language/LanguageDictionaryHelper.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Windows;
3 |
4 | namespace View_Spot_of_City.Language.Language
5 | {
6 | public static class LanguageDictionaryHelper
7 | {
8 | ///
9 | /// 返回语言资源文件中对应键的值
10 | ///
11 | /// 键
12 | ///
13 | public static string GetString(string key)
14 | {
15 | return Application.Current.FindResource(key) as string;
16 | }
17 |
18 | ///
19 | /// 语言资源字典
20 | ///
21 | public static Dictionary languageDictionary = new Dictionary(2);
22 |
23 | static LanguageDictionaryHelper()
24 | {
25 | languageDictionary.Add(0, "CN");
26 | languageDictionary.Add(1, "EN");
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/Form/ViewTypeForm.xaml:
--------------------------------------------------------------------------------
1 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/Style/StylesDictionary.xaml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/Form/SpotStatistics.xaml:
--------------------------------------------------------------------------------
1 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/ArcGISControl/SceneView.xaml:
--------------------------------------------------------------------------------
1 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/Command/LoginDlgCommands.cs:
--------------------------------------------------------------------------------
1 | using System.Windows.Input;
2 |
3 | namespace View_Spot_of_City.UIControls.Command
4 | {
5 | public static class LoginDlgCommands
6 | {
7 | ///
8 | /// 验证成功并关闭窗口命令
9 | ///
10 | public static RoutedCommand OKAndCloseFormCommand { set; get; }
11 |
12 | ///
13 | /// 取消并关闭窗口命令
14 | ///
15 | public static RoutedCommand CancelAndCloseFormCommand { set; get; }
16 |
17 | ///
18 | /// 改变页面命令
19 | ///
20 | public static RoutedCommand ChangePageCommand { set; get; }
21 |
22 | ///
23 | /// 静态构造函数
24 | ///
25 | static LoginDlgCommands()
26 | {
27 | OKAndCloseFormCommand = new RoutedCommand();
28 | CancelAndCloseFormCommand = new RoutedCommand();
29 | ChangePageCommand = new RoutedCommand();
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City/Converter/Enum2UIControl.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Globalization;
3 | using System.Windows;
4 | using System.Windows.Data;
5 |
6 | namespace View_Spot_of_City.Converter
7 | {
8 | public class Enum2UIControl : IValueConverter
9 | {
10 | ///
11 | /// 主控件
12 | ///
13 | public enum MainControls : int
14 | {
15 | ArcGISSceneView = 0,
16 | ArcGISMapView = 1
17 | }
18 |
19 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
20 | {
21 | if(value == null) { return null; }
22 | try { return (int)value == System.Convert.ToInt32((string)parameter) ? Visibility.Visible : Visibility.Collapsed; }
23 | catch { return null; }
24 | }
25 |
26 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
27 | {
28 | throw new NotImplementedException();
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/VisualizationControl/GeoHeatMap.xaml:
--------------------------------------------------------------------------------
1 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.ClassModel/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.InteropServices;
3 |
4 | // 有关程序集的一般信息由以下
5 | // 控制。更改这些特性值可修改
6 | // 与程序集关联的信息。
7 | [assembly: AssemblyTitle("View-Spot-of-City.ClassModel")]
8 | [assembly: AssemblyDescription("")]
9 | [assembly: AssemblyConfiguration("")]
10 | [assembly: AssemblyCompany("")]
11 | [assembly: AssemblyProduct("View-Spot-of-City.ClassModel")]
12 | [assembly: AssemblyCopyright("Copyright © 2017")]
13 | [assembly: AssemblyTrademark("")]
14 | [assembly: AssemblyCulture("")]
15 |
16 | // 将 ComVisible 设置为 false 会使此程序集中的类型
17 | //对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
18 | //请将此类型的 ComVisible 特性设置为 true。
19 | [assembly: ComVisible(false)]
20 |
21 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
22 | [assembly: Guid("b0d8c76f-2723-4a36-97fc-65b69e3bd973")]
23 |
24 | // 程序集的版本信息由下列四个值组成:
25 | //
26 | // 主版本
27 | // 次版本
28 | // 生成号
29 | // 修订号
30 | //
31 | // 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
32 | //通过使用 "*",如下所示:
33 | // [assembly: AssemblyVersion("1.0.*")]
34 | [assembly: AssemblyVersion("1.0.0.0")]
35 | [assembly: AssemblyFileVersion("1.0.0.0")]
36 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.LogManager/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // 有关程序集的一般信息由以下
6 | // 控制。更改这些特性值可修改
7 | // 与程序集关联的信息。
8 | [assembly: AssemblyTitle("View-Spot-of-City.LogManager")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("View-Spot-of-City.LogManager")]
13 | [assembly: AssemblyCopyright("Copyright © RS-GIS-GEEKS 2017")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // 将 ComVisible 设置为 false 会使此程序集中的类型
18 | //对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
19 | //请将此类型的 ComVisible 特性设置为 true。
20 | [assembly: ComVisible(false)]
21 |
22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
23 | [assembly: Guid("abcb9e94-22cc-4b65-87d7-6e5a7f1f9d09")]
24 |
25 | // 程序集的版本信息由下列四个值组成:
26 | //
27 | // 主版本
28 | // 次版本
29 | // 生成号
30 | // 修订号
31 | //
32 | // 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
33 | //通过使用 "*",如下所示:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/Command/ViewSpotViewerCommands.cs:
--------------------------------------------------------------------------------
1 | using System.Windows.Input;
2 |
3 | namespace View_Spot_of_City.UIControls.Command
4 | {
5 | ///
6 | /// 显示景点的命令集
7 | ///
8 | public static class ViewSpotViewerCommands
9 | {
10 | ///
11 | /// 显示景点信息命令
12 | ///
13 | public static RoutedCommand ShowViewSpotDetail { get; set; }
14 |
15 | ///
16 | /// 返回主页命令
17 | ///
18 | public static RoutedCommand BackToMaster { get; set; }
19 |
20 | ///
21 | /// 显示评论命令
22 | ///
23 | public static RoutedCommand ShowDiscuss { get; set; }
24 |
25 | ///
26 | /// 显示统计命令
27 | ///
28 | public static RoutedCommand ShowStatistics { get; set; }
29 |
30 | static ViewSpotViewerCommands()
31 | {
32 | ShowViewSpotDetail = new RoutedCommand();
33 | BackToMaster = new RoutedCommand();
34 | ShowDiscuss = new RoutedCommand();
35 | ShowStatistics = new RoutedCommand();
36 | }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/Theme/MetroTheme.xaml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace View_Spot_of_City.Properties
12 | {
13 |
14 |
15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
18 | {
19 |
20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
21 |
22 | public static Settings Default
23 | {
24 | get
25 | {
26 | return defaultInstance;
27 | }
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/ArcGISControl/ViewModel/MapViewModel.cs:
--------------------------------------------------------------------------------
1 | using System.ComponentModel;
2 | using System.Runtime.CompilerServices;
3 |
4 | using Esri.ArcGISRuntime.Mapping;
5 |
6 | namespace View_Spot_of_City.UIControls.ArcGISControl.ViewModel
7 | {
8 | public class MapViewModel : INotifyPropertyChanged
9 | {
10 | public MapViewModel()
11 | {
12 |
13 | }
14 |
15 | private Map _map = new Map(Basemap.CreateOpenStreetMap());
16 |
17 | ///
18 | /// Gets or sets the map
19 | ///
20 | public Map Map
21 | {
22 | get { return _map; }
23 | set { _map = value; OnPropertyChanged(); }
24 | }
25 |
26 | ///
27 | /// Raises the event
28 | ///
29 | /// The name of the property that has changed
30 | protected void OnPropertyChanged([CallerMemberName] string propertyName = null)
31 | {
32 | PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
33 | }
34 |
35 | public event PropertyChangedEventHandler PropertyChanged;
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.Language/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace View_Spot_of_City.Language.Properties
12 | {
13 |
14 |
15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
18 | {
19 |
20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
21 |
22 | public static Settings Default
23 | {
24 | get
25 | {
26 | return defaultInstance;
27 | }
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace View_Spot_of_City.UIControls.Properties
12 | {
13 |
14 |
15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
18 | {
19 |
20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
21 |
22 | public static Settings Default
23 | {
24 | get
25 | {
26 | return defaultInstance;
27 | }
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/Form/VisualizationParamsPicker.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Windows;
3 |
4 | namespace View_Spot_of_City.UIControls.Form
5 | {
6 | ///
7 | /// VisualizationParamsPicker.xaml 的交互逻辑
8 | ///
9 | public partial class VisualizationParamsPicker : Window
10 | {
11 | ///
12 | /// 开始日期
13 | ///
14 | public DateTime StartDate = new DateTime();
15 |
16 | ///
17 | /// 结束日期
18 | ///
19 | public DateTime EndDate = new DateTime();
20 |
21 | ///
22 | /// 构造函数
23 | ///
24 | public VisualizationParamsPicker()
25 | {
26 | InitializeComponent();
27 | }
28 |
29 | private void OkButton_Click(object sender, RoutedEventArgs e)
30 | {
31 | StartDate = StartDatePicker.SelectedDate ?? new DateTime(2015, 1, 1);
32 | EndDate = EndDatePicker.SelectedDate ?? new DateTime(2017, 12, 30);
33 |
34 | this.DialogResult = true;
35 | }
36 |
37 | private void CancelButton_Click(object sender, RoutedEventArgs e)
38 | {
39 | this.DialogResult = false;
40 | }
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/UIcontrol/SpotViewerMaster.xaml:
--------------------------------------------------------------------------------
1 |
10 |
18 |
19 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City/helper/RegisterMaster.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.IO;
3 | using System.Runtime.Serialization.Formatters.Binary;
4 |
5 | using View_Spot_of_City.Form;
6 |
7 | namespace View_Spot_of_City.UIControls.Helper
8 | {
9 | public class RegisterMaster
10 | {
11 | private static string path = AppDomain.CurrentDomain.BaseDirectory + "License.dat";
12 | public static bool CanStart()
13 | {
14 | if (!File.Exists(path))
15 | {
16 | LicenseDlg f = new LicenseDlg();
17 | if (f.ShowDialog() == true)
18 | {
19 | return true;
20 | }
21 | return false;
22 | }
23 | Stream s = File.Open(path, FileMode.Open);//打开License.bat文件
24 | BinaryFormatter b = new BinaryFormatter();//创建一个序列化的对象
25 | String result = (String)b.Deserialize(s);//将s反序列化回原来的数据格式
26 | try
27 | {
28 | DateTime date = Convert.ToDateTime(result);
29 | if ((date - DateTime.Now).Seconds > 0)
30 | {
31 | return true;
32 | }
33 | }
34 | catch
35 | {
36 | return false;
37 | }
38 | return false;
39 | }
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/UIcontrol/MyMessageBox_Ok.xaml:
--------------------------------------------------------------------------------
1 |
11 |
12 |
13 |
14 |
15 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/VisualizationControl/VisitorsByYear.xaml:
--------------------------------------------------------------------------------
1 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/DataTemplate/ViewSpotListItemTemplate.xaml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/VisualizationControl/BasicRowExample.xaml:
--------------------------------------------------------------------------------
1 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/VisualizationControl/BasicRowExample.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Windows.Controls;
3 | using LiveCharts;
4 | using LiveCharts.Wpf;
5 |
6 | namespace Wpf.CartesianChart.Basic_Bars
7 | {
8 | public partial class BasicRowExample : UserControl
9 | {
10 | public BasicRowExample()
11 | {
12 | InitializeComponent();
13 |
14 | SeriesCollection = new SeriesCollection
15 | {
16 | new RowSeries
17 | {
18 | Title = "2015",
19 | Values = new ChartValues { 10, 50, 39, 50 }
20 | }
21 | };
22 |
23 | //adding series will update and animate the chart automatically
24 | SeriesCollection.Add(new RowSeries
25 | {
26 | Title = "2016",
27 | Values = new ChartValues { 11, 56, 42}
28 | });
29 |
30 | //also adding values updates and animates the chart automatically
31 | SeriesCollection[1].Values.Add(48d);
32 |
33 | Labels = new[] {"Maria", "Susan", "Charles", "Frida"};
34 | Formatter = value => value.ToString("N");
35 |
36 | DataContext = this;
37 | }
38 |
39 | public SeriesCollection SeriesCollection { get; set; }
40 | public string[] Labels { get; set; }
41 | public Func Formatter { get; set; }
42 |
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/UIcontrol/MyMessageBox_Ok.xaml.cs:
--------------------------------------------------------------------------------
1 | using System.Windows;
2 | using System.Windows.Controls;
3 | using System.ComponentModel;
4 |
5 | using View_Spot_of_City.UIControls.Command;
6 | using static View_Spot_of_City.UIControls.Form.MessageboxMaster;
7 |
8 | namespace View_Spot_of_City.UIControls.UIcontrol
9 | {
10 | ///
11 | /// MyMessageBox_Ok.xaml 的交互逻辑
12 | ///
13 | public partial class MyMessageBox_Ok : UserControl, INotifyPropertyChanged
14 | {
15 | public event PropertyChangedEventHandler PropertyChanged;
16 |
17 | ///
18 | /// 默认响应回车的按钮
19 | ///
20 | MyMessageBoxButton? _DefaultButton = null;
21 | ///
22 | /// 默认响应回车的按钮
23 | ///
24 | public MyMessageBoxButton? DefaultButton
25 | {
26 | get { return _DefaultButton; }
27 | set
28 | {
29 | if (_DefaultButton != value)
30 | {
31 | _DefaultButton = value;
32 | PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("DefaultButton"));
33 | }
34 | }
35 | }
36 |
37 | public MyMessageBox_Ok()
38 | {
39 | InitializeComponent();
40 | }
41 |
42 | private void OKButton_Click(object sender, RoutedEventArgs e)
43 | {
44 | MyMessageBoxCommands.OKButtonClick.Execute(null, this);
45 | }
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/Progress/FromProgressBox.xaml:
--------------------------------------------------------------------------------
1 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/OverLayer/ShowMap.xaml:
--------------------------------------------------------------------------------
1 |
12 |
13 |
14 |
15 |
16 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City/helper/SpeechRecognition.cs:
--------------------------------------------------------------------------------
1 | using SpeechLib;
2 |
3 | namespace View_Spot_of_City.Helper
4 | {
5 | public class SpeechRecognition
6 | {
7 | private static SpeechRecognition _Instance = null;
8 | private ISpeechRecoGrammar isrg;
9 | private SpSharedRecoContext ssrContex = null;
10 |
11 | public delegate void StringEvent(string str);
12 | public StringEvent SetMessage;
13 |
14 | private SpeechRecognition()
15 | {
16 | ssrContex = new SpSharedRecoContext();
17 | isrg = ssrContex.CreateGrammar(1);
18 | _ISpeechRecoContextEvents_RecognitionEventHandler recHandle =
19 | new _ISpeechRecoContextEvents_RecognitionEventHandler(ContexRecognition);
20 | ssrContex.Recognition += recHandle;
21 | }
22 |
23 | public void BeginRec()
24 | {
25 | isrg.DictationSetState(SpeechRuleState.SGDSActive);
26 | }
27 |
28 | public static SpeechRecognition Instance()
29 | {
30 | if (_Instance == null)
31 | _Instance = new SpeechRecognition();
32 | return _Instance;
33 | }
34 |
35 | public void CloseRec()
36 | {
37 | isrg.DictationSetState(SpeechRuleState.SGDSInactive);
38 | }
39 |
40 | private void ContexRecognition(int iIndex, object obj, SpeechRecognitionType type, ISpeechRecoResult result)
41 | {
42 | SetMessage?.Invoke(result.PhraseInfo.GetText(0, -1, true));
43 | }
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/VisualizationControl/VisitorsByMonth.xaml:
--------------------------------------------------------------------------------
1 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/VisualizationControl/GeoHeatMap.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | namespace View_Spot_of_City.UIControls.VisualizationControl
5 | {
6 | ///
7 | /// UserControl1.xaml 的交互逻辑
8 | ///
9 | public partial class GeoHeatMap : VisualizationControlBase
10 | {
11 | public Dictionary Values { get; set; }
12 | public Dictionary LanguagePack { get; set; }
13 |
14 | public GeoHeatMap()
15 | {
16 | InitializeComponent();
17 |
18 | var r = new Random();
19 |
20 | Values = new Dictionary
21 | {
22 | ["1495"] = r.Next(0, 100),
23 | ["1512"] = r.Next(0, 100),
24 | ["6318"] = r.Next(0, 100),
25 | ["1226"] = r.Next(0, 100),
26 | ["2283"] = r.Next(0, 100),
27 | ["1876"] = r.Next(0, 100),
28 | ["2322"] = r.Next(0, 100),
29 | ["2039"] = r.Next(0, 100),
30 | ["2327"] = r.Next(0, 100),
31 | ["1923"] = r.Next(0, 100),
32 | ["1896"] = r.Next(0, 100),
33 | ["2286"] = r.Next(0, 100),
34 | ["2285"] = r.Next(0, 100),
35 | ["2329"] = r.Next(0, 100),
36 | ["2330"] = r.Next(0, 100),
37 | ["3664"] = r.Next(0, 100)
38 | };
39 | LanguagePack = new Dictionary
40 | {
41 | ["1495"] = "重庆",
42 | ["2322"] = "湖北"
43 | };
44 | DataContext = this;
45 | }
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/VisualizationControl/HistogramOfType.xaml:
--------------------------------------------------------------------------------
1 |
12 |
13 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/UIcontrol/MyMessageBox_YesNo.xaml.cs:
--------------------------------------------------------------------------------
1 | using System.ComponentModel;
2 | using System.Windows;
3 | using System.Windows.Controls;
4 |
5 | using View_Spot_of_City.UIControls.Command;
6 | using static View_Spot_of_City.UIControls.Form.MessageboxMaster;
7 |
8 | namespace View_Spot_of_City.UIControls.UIcontrol
9 | {
10 | ///
11 | /// MyMessageBox_YesNo.xaml 的交互逻辑
12 | ///
13 | public partial class MyMessageBox_YesNo : UserControl, INotifyPropertyChanged
14 | {
15 | public event PropertyChangedEventHandler PropertyChanged;
16 |
17 | ///
18 | /// 默认响应回车的按钮
19 | ///
20 | MyMessageBoxButton? _DefaultButton = null;
21 | ///
22 | /// 默认响应回车的按钮
23 | ///
24 | public MyMessageBoxButton? DefaultButton
25 | {
26 | get { return _DefaultButton; }
27 | set
28 | {
29 | if (_DefaultButton != value)
30 | {
31 | _DefaultButton = value;
32 | PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("DefaultButton"));
33 | }
34 | }
35 | }
36 |
37 | public MyMessageBox_YesNo()
38 | {
39 | InitializeComponent();
40 | }
41 |
42 | private void YesButton_Click(object sender, RoutedEventArgs e)
43 | {
44 | MyMessageBoxCommands.YesButtonClick.Execute(null, this);
45 | }
46 |
47 | private void NoButton_Click(object sender, RoutedEventArgs e)
48 | {
49 | MyMessageBoxCommands.NoButtonClick.Execute(null, this);
50 | }
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/UIcontrol/MyMessageBox_YesNo.xaml:
--------------------------------------------------------------------------------
1 |
11 |
12 |
13 |
14 |
15 |
18 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/OverLayer/OverLayerExample.xaml:
--------------------------------------------------------------------------------
1 |
12 |
13 |
14 |
16 |
17 |
18 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/UIcontrol/MyMessageBox_OkCancel.xaml:
--------------------------------------------------------------------------------
1 |
11 |
12 |
13 |
14 |
15 |
18 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/UIcontrol/MyMessageBox_OkCancel.xaml.cs:
--------------------------------------------------------------------------------
1 | using System.ComponentModel;
2 | using System.Windows;
3 | using System.Windows.Controls;
4 |
5 | using View_Spot_of_City.UIControls.Command;
6 | using static View_Spot_of_City.UIControls.Form.MessageboxMaster;
7 |
8 | namespace View_Spot_of_City.UIControls.UIcontrol
9 | {
10 | ///
11 | /// MyMessageBox_OkCancel.xaml 的交互逻辑
12 | ///
13 | public partial class MyMessageBox_OkCancel : UserControl, INotifyPropertyChanged
14 | {
15 | public event PropertyChangedEventHandler PropertyChanged;
16 |
17 | ///
18 | /// 默认响应回车的按钮
19 | ///
20 | MyMessageBoxButton? _DefaultButton = null;
21 | ///
22 | /// 默认响应回车的按钮
23 | ///
24 | public MyMessageBoxButton? DefaultButton
25 | {
26 | get { return _DefaultButton; }
27 | set
28 | {
29 | if(_DefaultButton != value)
30 | {
31 | _DefaultButton = value;
32 | PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("DefaultButton"));
33 | }
34 | }
35 | }
36 |
37 | public MyMessageBox_OkCancel()
38 | {
39 | InitializeComponent();
40 | }
41 |
42 | private void OKButton_Click(object sender, RoutedEventArgs e)
43 | {
44 | MyMessageBoxCommands.OKButtonClick.Execute(null, this);
45 | }
46 |
47 | private void CancelButton_Click(object sender, RoutedEventArgs e)
48 | {
49 | MyMessageBoxCommands.CancelButtonClick.Execute(null, this);
50 | }
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/Command/ArcGISMapCommands.cs:
--------------------------------------------------------------------------------
1 | using System.Windows.Input;
2 |
3 | namespace View_Spot_of_City.UIControls.Command
4 | {
5 | public static class ArcGISMapCommands
6 | {
7 | ///
8 | /// 在地图上显示要素
9 | ///
10 | public static RoutedCommand ShowFeatureOnMap { get; set; }
11 |
12 | ///
13 | /// 点击地图命令
14 | ///
15 | public static RoutedCommand SetScaleAndLocation { get; set; }
16 |
17 | ///
18 | /// 清除要素
19 | ///
20 | public static RoutedCommand ClearFeatures { get; set; }
21 |
22 | ///
23 | /// 清除回调框
24 | ///
25 | public static RoutedCommand ClearCallout { get; set; }
26 |
27 | ///
28 | /// 添加景点周边要素
29 | ///
30 | public static RoutedCommand AddViewSpotAround { get; set; }
31 |
32 | ///
33 | /// 导航到指定地点
34 | ///
35 | public static RoutedCommand NavigateToSomeWhere { get; set; }
36 |
37 | ///
38 | /// 景点周边要素
39 | ///
40 | public enum ViewSpotArounds : int
41 | {
42 | GasStation,
43 | TrafficStation,
44 | Restaurant,
45 | Hotel
46 | }
47 |
48 | static ArcGISMapCommands()
49 | {
50 | ShowFeatureOnMap = new RoutedCommand();
51 | SetScaleAndLocation = new RoutedCommand();
52 | ClearFeatures = new RoutedCommand();
53 | ClearCallout = new RoutedCommand();
54 | NavigateToSomeWhere = new RoutedCommand();
55 | AddViewSpotAround = new RoutedCommand();
56 | }
57 | }
58 | }
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City/App.xaml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.InteropServices;
3 | using System.Windows;
4 |
5 | // 有关程序集的一般信息由以下
6 | // 控制。更改这些特性值可修改
7 | // 与程序集关联的信息。
8 | [assembly: AssemblyTitle("景点推荐系统")]
9 | [assembly: AssemblyDescription("景点推荐系统")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("景点推荐系统")]
13 | [assembly: AssemblyCopyright("Copyright © RS-GIS-GEEKS 2017")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // 将 ComVisible 设置为 false 会使此程序集中的类型
18 | //对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
19 | //请将此类型的 ComVisible 特性设置为 true。
20 | [assembly: ComVisible(false)]
21 |
22 | //若要开始生成可本地化的应用程序,请设置
23 | //.csproj 文件中的 CultureYouAreCodingWith
24 | //例如,如果您在源文件中使用的是美国英语,
25 | //使用的是美国英语,请将 设置为 en-US。 然后取消
26 | //对以下 NeutralResourceLanguage 特性的注释。 更新
27 | //以下行中的“en-US”以匹配项目文件中的 UICulture 设置。
28 |
29 | //[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
30 |
31 |
32 | [assembly: ThemeInfo(
33 | ResourceDictionaryLocation.None, //主题特定资源词典所处位置
34 | //(未在页面中找到资源时使用,
35 | //或应用程序资源字典中找到时使用)
36 | ResourceDictionaryLocation.SourceAssembly //常规资源词典所处位置
37 | //(未在页面中找到资源时使用,
38 | //、应用程序或任何主题专用资源字典中找到时使用)
39 | )]
40 |
41 |
42 | // 程序集的版本信息由下列四个值组成:
43 | //
44 | // 主版本
45 | // 次版本
46 | // 生成号
47 | // 修订号
48 | //
49 | // 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
50 | // 方法是按如下所示使用“*”: :
51 | // [assembly: AssemblyVersion("1.0.*")]
52 | [assembly: AssemblyVersion("1.0.0.0")]
53 | [assembly: AssemblyFileVersion("1.0.0.0")]
54 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.Language/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.InteropServices;
3 | using System.Windows;
4 |
5 | // 有关程序集的一般信息由以下
6 | // 控制。更改这些特性值可修改
7 | // 与程序集关联的信息。
8 | [assembly: AssemblyTitle("View-Spot-of-City.Language")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("View-Spot-of-City.Language")]
13 | [assembly: AssemblyCopyright("Copyright © RS-GIS-GEEKS 2017")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // 将 ComVisible 设置为 false 会使此程序集中的类型
18 | //对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
19 | //请将此类型的 ComVisible 特性设置为 true。
20 | [assembly: ComVisible(false)]
21 |
22 | //若要开始生成可本地化的应用程序,请设置
23 | //.csproj 文件中的 CultureYouAreCodingWith
24 | //例如,如果您在源文件中使用的是美国英语,
25 | //使用的是美国英语,请将 设置为 en-US。 然后取消
26 | //对以下 NeutralResourceLanguage 特性的注释。 更新
27 | //以下行中的“en-US”以匹配项目文件中的 UICulture 设置。
28 |
29 | //[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
30 |
31 |
32 | [assembly: ThemeInfo(
33 | ResourceDictionaryLocation.None, //主题特定资源词典所处位置
34 | //(未在页面中找到资源时使用,
35 | //或应用程序资源字典中找到时使用)
36 | ResourceDictionaryLocation.SourceAssembly //常规资源词典所处位置
37 | //(未在页面中找到资源时使用,
38 | //、应用程序或任何主题专用资源字典中找到时使用)
39 | )]
40 |
41 |
42 | // 程序集的版本信息由下列四个值组成:
43 | //
44 | // 主版本
45 | // 次版本
46 | // 生成号
47 | // 修订号
48 | //
49 | // 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
50 | // 方法是按如下所示使用“*”: :
51 | // [assembly: AssemblyVersion("1.0.*")]
52 | [assembly: AssemblyVersion("1.0.0.0")]
53 | [assembly: AssemblyFileVersion("1.0.0.0")]
54 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/Helper/IconDictionaryHelper.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | namespace View_Spot_of_City.UIControls.Helper
5 | {
6 | public static class IconDictionaryHelper
7 | {
8 | public enum Icons : int
9 | {
10 | pin = 0,
11 | pin_blue = 1,
12 | start = 2,
13 | end = 3,
14 | gas_station,
15 | traffic_station,
16 | restaurant,
17 | hotel
18 | }
19 |
20 | //图标字典
21 | public static Dictionary IconDictionary = new Dictionary(5);
22 |
23 | static IconDictionaryHelper()
24 | {
25 | IconDictionary.Add(Icons.pin, new Uri("pack://application:,,,/View-Spot-of-City.UIControls;component/Icon/pin.png"));
26 | IconDictionary.Add(Icons.pin_blue, new Uri("pack://application:,,,/View-Spot-of-City.UIControls;component/Icon/pin_bule.png"));
27 | IconDictionary.Add(Icons.start, new Uri("pack://application:,,,/View-Spot-of-City.UIControls;component/Icon/start.png"));
28 | IconDictionary.Add(Icons.end, new Uri("pack://application:,,,/View-Spot-of-City.UIControls;component/Icon/end.png"));
29 | IconDictionary.Add(Icons.gas_station, new Uri("pack://application:,,,/View-Spot-of-City.UIControls;component/Icon/GasStation.png"));
30 | IconDictionary.Add(Icons.traffic_station, new Uri("pack://application:,,,/View-Spot-of-City.UIControls;component/Icon/station.png"));
31 | IconDictionary.Add(Icons.restaurant, new Uri("pack://application:,,,/View-Spot-of-City.UIControls;component/Icon/restaurant2.png"));
32 | IconDictionary.Add(Icons.hotel, new Uri("pack://application:,,,/View-Spot-of-City.UIControls;component/Icon/hotel1.png"));
33 | }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.InteropServices;
3 | using System.Windows;
4 |
5 | // 有关程序集的一般信息由以下
6 | // 控制。更改这些特性值可修改
7 | // 与程序集关联的信息。
8 | [assembly: AssemblyTitle("View-Spot-of-City.UIControls")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("View-Spot-of-City.UIControls")]
13 | [assembly: AssemblyCopyright("Copyright © RS-GIS-GEEKS 2017")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // 将 ComVisible 设置为 false 会使此程序集中的类型
18 | //对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
19 | //请将此类型的 ComVisible 特性设置为 true。
20 | [assembly: ComVisible(false)]
21 |
22 | //若要开始生成可本地化的应用程序,请设置
23 | //.csproj 文件中的 CultureYouAreCodingWith
24 | //例如,如果您在源文件中使用的是美国英语,
25 | //使用的是美国英语,请将 设置为 en-US。 然后取消
26 | //对以下 NeutralResourceLanguage 特性的注释。 更新
27 | //以下行中的“en-US”以匹配项目文件中的 UICulture 设置。
28 |
29 | //[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
30 |
31 |
32 | [assembly: ThemeInfo(
33 | ResourceDictionaryLocation.None, //主题特定资源词典所处位置
34 | //(未在页面中找到资源时使用,
35 | //或应用程序资源字典中找到时使用)
36 | ResourceDictionaryLocation.SourceAssembly //常规资源词典所处位置
37 | //(未在页面中找到资源时使用,
38 | //、应用程序或任何主题专用资源字典中找到时使用)
39 | )]
40 |
41 |
42 | // 程序集的版本信息由下列四个值组成:
43 | //
44 | // 主版本
45 | // 次版本
46 | // 生成号
47 | // 修订号
48 | //
49 | // 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
50 | // 方法是按如下所示使用“*”: :
51 | // [assembly: AssemblyVersion("1.0.*")]
52 | [assembly: AssemblyVersion("1.0.0.0")]
53 | [assembly: AssemblyFileVersion("1.0.0.0")]
54 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/UIcontrol/MyMessageBox_YesNoCancel.xaml.cs:
--------------------------------------------------------------------------------
1 | using System.ComponentModel;
2 | using System.Windows;
3 | using System.Windows.Controls;
4 |
5 | using View_Spot_of_City.UIControls.Command;
6 | using static View_Spot_of_City.UIControls.Form.MessageboxMaster;
7 |
8 | namespace View_Spot_of_City.UIControls.UIcontrol
9 | {
10 | ///
11 | /// MyMessageBox_YesNoCancel.xaml 的交互逻辑
12 | ///
13 | public partial class MyMessageBox_YesNoCancel : UserControl, INotifyPropertyChanged
14 | {
15 | public event PropertyChangedEventHandler PropertyChanged;
16 |
17 | ///
18 | /// 默认响应回车的按钮
19 | ///
20 | MyMessageBoxButton? _DefaultButton = null;
21 | ///
22 | /// 默认响应回车的按钮
23 | ///
24 | public MyMessageBoxButton? DefaultButton
25 | {
26 | get { return _DefaultButton; }
27 | set
28 | {
29 | if (_DefaultButton != value)
30 | {
31 | _DefaultButton = value;
32 | PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("DefaultButton"));
33 | }
34 | }
35 | }
36 |
37 | public MyMessageBox_YesNoCancel()
38 | {
39 | InitializeComponent();
40 | }
41 |
42 | private void YesButton_Click(object sender, RoutedEventArgs e)
43 | {
44 | MyMessageBoxCommands.YesButtonClick.Execute(null, this);
45 | }
46 |
47 | private void NoButton_Click(object sender, RoutedEventArgs e)
48 | {
49 | MyMessageBoxCommands.NoButtonClick.Execute(null, this);
50 | }
51 |
52 | private void CancelButton_Click(object sender, RoutedEventArgs e)
53 | {
54 | MyMessageBoxCommands.CancelButtonClick.Execute(null, this);
55 | }
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/VisualizationControl/VisitorFlow.xaml:
--------------------------------------------------------------------------------
1 |
11 |
12 |
13 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/Helper/SpeechRecognition.cs:
--------------------------------------------------------------------------------
1 | using SpeechLib;
2 |
3 | namespace View_Spot_of_City.UIControls.Helper
4 | {
5 | public class SpeechRecognition
6 | {
7 | private static SpeechRecognition _Instance = null;
8 | private ISpeechRecoGrammar isrg;
9 | private SpSharedRecoContext ssrContex = null;
10 |
11 | public delegate void StringEvent(string str);
12 | public StringEvent SetMessage;
13 |
14 | private SpeechRecognition()
15 | {
16 | ssrContex = new SpSharedRecoContext();
17 | isrg = ssrContex.CreateGrammar(1);
18 | _ISpeechRecoContextEvents_RecognitionEventHandler recHandle =
19 | new _ISpeechRecoContextEvents_RecognitionEventHandler(ContexRecognition);
20 | ssrContex.Recognition += recHandle;
21 | }
22 |
23 | public void BeginRec()
24 | {
25 | isrg.DictationSetState(SpeechRuleState.SGDSActive);
26 | }
27 |
28 | public static SpeechRecognition Instance()
29 | {
30 | if (_Instance == null)
31 | _Instance = new SpeechRecognition();
32 | return _Instance;
33 | }
34 |
35 | public void CloseRec()
36 | {
37 | isrg.DictationSetState(SpeechRuleState.SGDSInactive);
38 | }
39 |
40 | private void ContexRecognition(int iIndex, object obj, SpeechRecognitionType type, ISpeechRecoResult result)
41 | {
42 | SetMessage?.Invoke(result.PhraseInfo.GetText(0, -1, true));
43 | }
44 |
45 | ///
46 | /// 读出对应文本
47 | ///
48 | /// 文本
49 | public static void Speak(string text)
50 | {
51 | if (text != null)
52 | {
53 | SpVoice voice = new SpVoice();//SAPI 5.4
54 | voice.Voice = voice.GetVoices(string.Empty, string.Empty).Item(0);
55 | voice.Speak(text);
56 | }
57 | }
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/Helper/WebServiceHelper.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Threading.Tasks;
3 |
4 | using RestSharp;
5 |
6 | using static System.Configuration.ConfigurationManager;
7 |
8 | namespace View_Spot_of_City.UIControls.Helper
9 | {
10 | public static class WebServiceHelper
11 | {
12 | ///
13 | ///采用https协议访问网络
14 | ///
15 | ///url地址
16 | ///发送的数据
17 | ///返回的数据
18 | public static Task GetHttpResponseAsync(string URL, string strPostdata, Method method = Method.POST)
19 | {
20 | var client = new RestClient(URL);
21 | var request = new RestRequest(method)
22 | {
23 | Timeout = Convert.ToInt32(AppSettings["NET_WORK_DELAY"])
24 | };
25 | request.AddHeader("cache-control", "no-cache");
26 | if(strPostdata != null || strPostdata != string.Empty)
27 | request.AddParameter("undefined", strPostdata, ParameterType.RequestBody);
28 | return client.ExecuteGetTaskAsync(request);
29 | }
30 |
31 | ///
32 | ///采用https协议访问网络
33 | ///
34 | ///url地址
35 | ///发送的数据
36 | ///返回的数据
37 | public static IRestResponse GetHttpResponse(string URL, string strPostdata, Method method = Method.POST)
38 | {
39 | var client = new RestClient(URL);
40 | var request = new RestRequest(method)
41 | {
42 | Timeout = Convert.ToInt32(AppSettings["NET_WORK_DELAY"])
43 | };
44 | request.AddHeader("cache-control", "no-cache");
45 | if (strPostdata != null || strPostdata != string.Empty)
46 | request.AddParameter("undefined", strPostdata, ParameterType.RequestBody);
47 | return client.Execute(request);
48 | }
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/UIcontrol/MyMessageBox_YesNoCancel.xaml:
--------------------------------------------------------------------------------
1 |
11 |
12 |
13 |
14 |
15 |
18 |
21 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/Form/VisualizationParamsPicker.xaml:
--------------------------------------------------------------------------------
1 |
13 |
14 |
15 |
16 |
17 |
18 |
20 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/UIcontrol/SpotViewerDisscuss.xaml.cs:
--------------------------------------------------------------------------------
1 | using System.Windows;
2 | using System.Windows.Controls;
3 | using System.Collections.ObjectModel;
4 | using System.ComponentModel;
5 |
6 | using View_Spot_of_City.ClassModel;
7 | using View_Spot_of_City.UIControls.Command;
8 |
9 | namespace View_Spot_of_City.UIControls.UIcontrol
10 | {
11 | ///
12 | /// SpotViewerDisscuss.xaml 的交互逻辑
13 | ///
14 | public partial class SpotViewerDisscuss : UserControl, INotifyPropertyChanged
15 | {
16 | public event PropertyChangedEventHandler PropertyChanged;
17 |
18 | ViewSpot _DetailShowItem = null;
19 |
20 | ///
21 | /// 选中的内容
22 | ///
23 | public ViewSpot DetailShowItem
24 | {
25 | get { return _DetailShowItem; }
26 | set
27 | {
28 | _DetailShowItem = value;
29 | PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("DetailShowItem"));
30 | }
31 | }
32 |
33 | ObservableCollection _CommentList = new ObservableCollection();
34 |
35 | ///
36 | /// 评论列表
37 | ///
38 | public ObservableCollection CommentList
39 | {
40 | get { return _CommentList; }
41 | set
42 | {
43 | _CommentList = value;
44 | PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("CommentList"));
45 | }
46 | }
47 |
48 | ///
49 | /// 构造函数
50 | ///
51 | public SpotViewerDisscuss()
52 | {
53 | InitializeComponent();
54 | }
55 |
56 | private void BackToDetailButton_Click(object sender, RoutedEventArgs e)
57 | {
58 | if (DetailShowItem == null)
59 | ViewSpotViewerCommands.BackToMaster.Execute(null, this);
60 | else
61 | ViewSpotViewerCommands.ShowViewSpotDetail.Execute(DetailShowItem, this);
62 | }
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/UIcontrol/SpotViewerMaster.xaml.cs:
--------------------------------------------------------------------------------
1 | using System.Windows;
2 | using System.Windows.Controls;
3 | using System.ComponentModel;
4 |
5 | using View_Spot_of_City.ClassModel;
6 | using System.Collections.ObjectModel;
7 | using View_Spot_of_City.UIControls.Command;
8 |
9 | namespace View_Spot_of_City.UIControls.UIcontrol
10 | {
11 | ///
12 | /// SpotViewerMaster.xaml 的交互逻辑
13 | ///
14 | public partial class SpotViewerMaster : UserControl, INotifyPropertyChanged
15 | {
16 | public event PropertyChangedEventHandler PropertyChanged;
17 |
18 | ViewSpot _DetailShowItem = null;
19 |
20 | ///
21 | /// 选中的内容
22 | ///
23 | public ViewSpot DetailShowItem
24 | {
25 | get { return _DetailShowItem; }
26 | set
27 | {
28 | _DetailShowItem = value;
29 | PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("DetailShowItem"));
30 | }
31 | }
32 |
33 | ObservableCollection _ViewSpotList = new ObservableCollection();
34 |
35 | ///
36 | /// 查询到的景点列表
37 | ///
38 | public ObservableCollection ViewSpotList
39 | {
40 | get { return _ViewSpotList; }
41 | set
42 | {
43 | _ViewSpotList = value;
44 | PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("ViewSpotList"));
45 | }
46 | }
47 |
48 | public SpotViewerMaster()
49 | {
50 | InitializeComponent();
51 | }
52 |
53 | private void DataItemListView_SelectionChanged(object sender, SelectionChangedEventArgs e)
54 | {
55 | if (DetailShowItem != null)
56 | {
57 | ArcGISMapCommands.SetScaleAndLocation.Execute(DetailShowItem, Application.Current.MainWindow);
58 | ViewSpotViewerCommands.ShowViewSpotDetail.Execute(DetailShowItem, this);
59 | }
60 | }
61 | }
62 | }
63 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/UIcontrol/SpotViewerStatistics.xaml.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.ObjectModel;
2 | using System.ComponentModel;
3 | using System.Windows;
4 | using System.Windows.Controls;
5 |
6 | using View_Spot_of_City.ClassModel;
7 | using View_Spot_of_City.UIControls.Command;
8 | using View_Spot_of_City.UIControls.VisualizationControl;
9 |
10 | namespace View_Spot_of_City.UIControls.UIcontrol
11 | {
12 | ///
13 | /// SpotViewerStatistics.xaml 的交互逻辑
14 | ///
15 | public partial class SpotViewerStatistics : UserControl, INotifyPropertyChanged
16 | {
17 | public event PropertyChangedEventHandler PropertyChanged;
18 |
19 | ViewSpot _DetailShowItem = null;
20 |
21 | ///
22 | /// 选中的内容
23 | ///
24 | public ViewSpot DetailShowItem
25 | {
26 | get { return _DetailShowItem; }
27 | set
28 | {
29 | _DetailShowItem = value;
30 | PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("DetailShowItem"));
31 | }
32 | }
33 |
34 | ObservableCollection _ControlList = new ObservableCollection();
35 |
36 | ///
37 | /// 评论列表
38 | ///
39 | public ObservableCollection ControlList
40 | {
41 | get { return _ControlList; }
42 | set
43 | {
44 | _ControlList = value;
45 | PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("ControlList"));
46 | }
47 | }
48 |
49 | public SpotViewerStatistics()
50 | {
51 | InitializeComponent();
52 | }
53 |
54 | private void BackToDetailButton_Click(object sender, RoutedEventArgs e)
55 | {
56 | if (DetailShowItem == null)
57 | ViewSpotViewerCommands.BackToMaster.Execute(null, this);
58 | else
59 | ViewSpotViewerCommands.ShowViewSpotDetail.Execute(DetailShowItem, this);
60 | }
61 | }
62 | }
63 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/UIcontrol/SpotViewerDisscuss.xaml:
--------------------------------------------------------------------------------
1 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
27 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/Form/MessageboxMaster.cs:
--------------------------------------------------------------------------------
1 | namespace View_Spot_of_City.UIControls.Form
2 | {
3 | public static class MessageboxMaster
4 | {
5 | public enum MyMessageBoxButtons : int
6 | {
7 | Ok = 0,
8 | OkCancel = 1,
9 | YesNo = 2,
10 | YesNoCancel = 3
11 | }
12 |
13 | public enum MyMessageBoxButton : int
14 | {
15 | Ok = 1,
16 | Cancel = 2,
17 | Yes = 3,
18 | No = 4
19 | }
20 |
21 | public enum DialogResults : int
22 | {
23 | Ok = 1,
24 | Cancel = 2,
25 | Yes = 3,
26 | No = 4
27 | }
28 |
29 | ///
30 | /// 显示消息框
31 | ///
32 | /// 消息内容
33 | /// 点击OK这返回DialogResults.Ok,否则返回DialogResults.Cancel
34 | public static DialogResults Show(string message)
35 | {
36 | return MyMessageBox.ShowMyDialog(message);
37 | }
38 |
39 | ///
40 | /// 显示消息框
41 | ///
42 | /// 消息内容
43 | /// 标题
44 | /// 点击OK这返回DialogResults.Ok,否则返回DialogResults.Cancel
45 | public static DialogResults Show(string message, string title)
46 | {
47 | return MyMessageBox.ShowMyDialog(message, title);
48 | }
49 |
50 | ///
51 | /// 显示消息框
52 | ///
53 | /// 消息内容
54 | /// 标题
55 | /// 显示哪些按钮
56 | /// 默认响应回车的按钮
57 | /// 点击OK这返回DialogResults.Ok,点击Yes返回DialogResults.Yes,点击No返回DialogResults.No,否则返回DialogResults.Cancel
58 | public static DialogResults Show(string message, string title, MyMessageBoxButtons buttons, MyMessageBoxButton defaultButton)
59 | {
60 | return MyMessageBox.ShowMyDialog(message, title, buttons, defaultButton);
61 | }
62 | }
63 | }
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/Style/ToggleButtonStyles.xaml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
32 |
33 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.ClassModel/Base/CommonPlace.cs:
--------------------------------------------------------------------------------
1 | using System.ComponentModel;
2 |
3 | using View_Spot_of_City.ClassModel.Interface;
4 |
5 | namespace View_Spot_of_City.ClassModel.Base
6 | {
7 | public abstract class CommonPlace : INotifyPropertyChanged, IGetLngLat
8 | {
9 | public event PropertyChangedEventHandler PropertyChanged;
10 |
11 | long _ID = long.MaxValue;
12 | ///
13 | /// 标识符
14 | ///
15 | public long ID
16 | {
17 | get { return _ID; }
18 | set
19 | {
20 | _ID = value;
21 | PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("ID"));
22 | }
23 | }
24 |
25 | double _Lng = double.MaxValue;
26 | ///
27 | /// 经度
28 | ///
29 | public double Lng
30 | {
31 | get { return _Lng; }
32 | set
33 | {
34 | _Lng = value;
35 | PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("Lng"));
36 | }
37 | }
38 |
39 | double _Lat = double.MaxValue;
40 | ///
41 | /// 纬度
42 | ///
43 | public double Lat
44 | {
45 | get { return _Lat; }
46 | set
47 | {
48 | _Lat = value;
49 | PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("Lat"));
50 | }
51 | }
52 |
53 | ///
54 | /// 构造一个可显示地点的
55 | ///
56 | ///
57 | ///
58 | ///
59 | public CommonPlace(long id, double lng, double lat)
60 | {
61 | ID = id;
62 | Lng = lng;
63 | Lat = lat;
64 | }
65 |
66 | ///
67 | /// 获得经度
68 | ///
69 | /// 经度
70 | public double GetLng()
71 | {
72 | return Lng;
73 | }
74 |
75 | ///
76 | /// 返回纬度
77 | ///
78 | /// 纬度
79 | public double GetLat()
80 | {
81 | return Lat;
82 | }
83 | }
84 | }
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/UIControls.xaml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/UIcontrol/SpotViewerStatistics.xaml:
--------------------------------------------------------------------------------
1 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
27 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/Helper/RoutingHelper.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Threading.Tasks;
3 | using static System.Configuration.ConfigurationManager;
4 |
5 | using Esri.ArcGISRuntime.Geometry;
6 | using Esri.ArcGISRuntime.Tasks.NetworkAnalysis;
7 |
8 | namespace View_Spot_of_City.UIControls.Helper
9 | {
10 | ///
11 | /// 基于pdRouting的最短路径服务
12 | ///
13 | public static class RoutingHelper
14 | {
15 | ///
16 | /// 最短路径服务格式
17 | ///
18 | private static readonly string _pgRoutingUrlFormat = AppSettings["ShortestPathServerApi"] + "";
19 |
20 | ///
21 | /// 得到最短路径服务Url
22 | ///
23 | ///
24 | ///
25 | private static string GetPgRoutingUrl(MapPoint startPoint, MapPoint endPoint)
26 | {
27 | return "";
28 | }
29 |
30 | ///
31 | /// 得到最短路径服务Url
32 | ///
33 | ///
34 | ///
35 | private static string GetPgRoutingUrl(List stops)
36 | {
37 | return "";
38 | }
39 |
40 | ///
41 | /// 获得路径
42 | ///
43 | /// 起点
44 | /// 终点
45 | /// 站点链表
46 | public static async Task> GetRouteStopsAsync(MapPoint startPoint, MapPoint endPoint)
47 | {
48 | string pgRoutingServiceUrl = GetPgRoutingUrl(startPoint, endPoint);
49 | string responseContent = (await WebServiceHelper.GetHttpResponseAsync(pgRoutingServiceUrl, null, RestSharp.Method.GET)).Content;
50 |
51 | return new List();
52 | }
53 |
54 | ///
55 | /// 获得路径站点
56 | ///
57 | /// 必须到达的站点
58 | /// 站点链表
59 | public static async Task> GetRouteStopsAsync(List necessityStops)
60 | {
61 | string pgRoutingServiceUrl = GetPgRoutingUrl(necessityStops);
62 | string responseContent = (await WebServiceHelper.GetHttpResponseAsync(pgRoutingServiceUrl, null, RestSharp.Method.GET)).Content;
63 |
64 | return new List();
65 | }
66 | }
67 | }
68 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City/Form/LoginDlg.xaml:
--------------------------------------------------------------------------------
1 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/Progress/CircleProgressAsync.xaml.cs:
--------------------------------------------------------------------------------
1 | using System.Threading;
2 | using System.Windows;
3 |
4 | using static View_Spot_of_City.Language.Language.LanguageDictionaryHelper;
5 |
6 | namespace View_Spot_of_City.UIControls.Progress
7 | {
8 | ///
9 | /// CircleProgressAsync.xaml 的交互逻辑
10 | ///
11 | public partial class CircleProgressAsync : Window
12 | {
13 | ///
14 | /// 构造函数
15 | ///
16 | public CircleProgressAsync()
17 | {
18 | InitializeComponent();
19 | }
20 |
21 | ///
22 | /// 改变进度条显示文本
23 | ///
24 | ///
25 | private void _ChangeText(string text)
26 | {
27 | this.tbxInfo.Text = text;
28 | }
29 |
30 | private delegate void ChangeTextHandle(string text);
31 |
32 | ///
33 | /// 显示窗口
34 | ///
35 | private void _ShowWindow()
36 | {
37 | this.ShowInTaskbar = false;
38 | this.Topmost = true;
39 | this.Show();
40 | }
41 |
42 | private delegate void ShowWindowHandle();
43 |
44 | ///
45 | /// 关闭进度条
46 | ///
47 | private void _CloseProgress()
48 | {
49 | this.Close();
50 | }
51 |
52 | private delegate void CloseHandle();
53 |
54 | ///
55 | /// 开始显示进度条
56 | ///
57 | public void Begin()
58 | {
59 | Dispatcher.Invoke(System.Windows.Threading.DispatcherPriority.Send, new ShowWindowHandle(_ShowWindow));
60 |
61 | string prefixText = GetString("ProgressText") as string;
62 | string[] text = new string[] {"", ".", "..", "..." };
63 | int i = 0;
64 | while (true)
65 | {
66 | i++;
67 | i %= 4;
68 | Dispatcher.Invoke(System.Windows.Threading.DispatcherPriority.Render, new ChangeTextHandle(_ChangeText), prefixText + text[i]);
69 | Thread.Sleep(300);
70 | }
71 | }
72 |
73 | ///
74 | /// 关闭进度条
75 | ///
76 | public void CloseProgress()
77 | {
78 | Dispatcher.Invoke(System.Windows.Threading.DispatcherPriority.Normal, new CloseHandle(_CloseProgress));
79 | }
80 | }
81 | }
82 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/Style/WindowStyles.cs:
--------------------------------------------------------------------------------
1 | using System.Windows;
2 | using System.Windows.Input;
3 |
4 | namespace View_Spot_of_City.UIControls.Style
5 | {
6 | public partial class WindowStyles
7 | {
8 | private void Grid_MouseDown(object sender, MouseButtonEventArgs e)
9 | {
10 | if (e.LeftButton == MouseButtonState.Pressed)
11 | {
12 | Window win = (Window)((FrameworkElement)sender).TemplatedParent;
13 | win.DragMove();
14 | }
15 | }
16 |
17 | private void btnMin_Click(object sender, RoutedEventArgs e)
18 | {
19 | Window win = (Window)((FrameworkElement)sender).TemplatedParent;
20 | win.WindowState = WindowState.Minimized;
21 | }
22 |
23 | private void btnMaxOrMin_Click(object sender, RoutedEventArgs e)
24 | {
25 | Window win = (Window)((FrameworkElement)sender).TemplatedParent;
26 | if (win.WindowState == WindowState.Maximized)
27 | {
28 | win.WindowState = WindowState.Normal;
29 | return;
30 | }
31 | win.WindowState = WindowState.Maximized;
32 | }
33 |
34 | private void btnMax_Click(object sender, RoutedEventArgs e)
35 | {
36 | Window win = (Window)((FrameworkElement)sender).TemplatedParent;
37 | if(win.WindowState == WindowState.Normal)
38 | win.WindowState = WindowState.Maximized;
39 | else
40 | win.WindowState = WindowState.Normal;
41 | }
42 |
43 | private void closeButton_Click(object sender, RoutedEventArgs e)
44 | {
45 | Window win = (Window)((FrameworkElement)sender).TemplatedParent;
46 | win.Close();
47 | }
48 |
49 | private void btnSetting_Click(object sender, RoutedEventArgs e)
50 | {
51 | Window win = (Window)((FrameworkElement)sender).TemplatedParent;
52 | win.Close();
53 | }
54 |
55 | private void Label_MouseDoubleClick(object sender, MouseButtonEventArgs e)
56 | {
57 | Window win = (Window)((FrameworkElement)sender).TemplatedParent;
58 | if (win.WindowState == WindowState.Maximized)
59 | {
60 | win.WindowState = WindowState.Normal;
61 | return;
62 | }
63 | win.WindowState = WindowState.Maximized;
64 | }
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/Helper/GraphHooperHelper.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Threading.Tasks;
4 | using static System.Configuration.ConfigurationManager;
5 |
6 | using Esri.ArcGISRuntime.Geometry;
7 | using Esri.ArcGISRuntime.Tasks.NetworkAnalysis;
8 |
9 | using Newtonsoft.Json.Linq;
10 | using Newtonsoft.Json;
11 |
12 | namespace View_Spot_of_City.UIControls.Helper
13 | {
14 | public static class GraphHooperHelper
15 | {
16 | ///
17 | /// 获得路径
18 | ///
19 | /// 起点
20 | /// 终点
21 | /// 站点链表
22 | public static async Task> GetRouteStopsAsync(MapPoint startPoint, MapPoint endPoint)
23 | {
24 | //https://graphhopper.com/api/1/route?point=49.932707,11.588051&point=50.3404,11.64705&vehicle=car&debug=true&key=d3c705e4-cf27-4dc0-9c9e-5ff599db7ce8&type=json&points_encoded=false
25 | string grophHooperServiceUrl = AppSettings["GRAPHHOOPER_ROUTE_API_URL"] + "?point=" + startPoint.Y + "," + startPoint.X + "&point=" + endPoint.Y + "," + endPoint.X +
26 | "&vehicle=" + AppSettings["GRAPHHOOPER_ROUTE_API_VEHICLE"] + "&debug=" + AppSettings["GRAPHHOOPER_ROUTE_API_DEBUG"] + "&key=" + AppSettings["GRAPHHOOPER_ROUTE_API_KEY"] +
27 | "&type=json&points_encoded=false";
28 | string responseContent = (await WebServiceHelper.GetHttpResponseAsync(grophHooperServiceUrl, null, RestSharp.Method.GET)).Content;
29 |
30 | JObject jobject = (JObject)JsonConvert.DeserializeObject(responseContent);
31 |
32 | JToken pointsToken = jobject["paths"][0]["points"]["coordinates"];
33 |
34 | List stopList = new List();
35 |
36 | foreach (JToken pointToken in pointsToken)
37 | {
38 | stopList.Add(new MapPoint(Convert.ToDouble(pointToken[0].ToString()), Convert.ToDouble(pointToken[1].ToString()), SpatialReferences.Wgs84));
39 | }
40 |
41 | return stopList;
42 | }
43 |
44 | ///
45 | /// 获得路径站点
46 | ///
47 | /// 必须到达的站点
48 | /// 站点链表
49 | [Obsolete("已弃用")]
50 | public static List GetRouteStops(List necessityStops)
51 | {
52 | throw new NotImplementedException();
53 | }
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City/Form/LicenseDlg.xaml:
--------------------------------------------------------------------------------
1 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
38 |
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/Style/TextBlockStyles.xaml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
13 |
14 |
22 |
23 |
31 |
32 |
48 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/ViewModel/OverlayerItemViewModel.cs:
--------------------------------------------------------------------------------
1 | using System.ComponentModel;
2 | using System.Runtime.CompilerServices;
3 | using System.Windows;
4 |
5 | using static View_Spot_of_City.Language.Language.LanguageDictionaryHelper;
6 |
7 | namespace View_Spot_of_City.ViewModel
8 | {
9 | public enum OverlayerType
10 | {
11 | ShowMap,
12 | SpotQuery,
13 | SpotRecommend,
14 | Visualization,
15 | Share,
16 | }
17 |
18 | public class OverlayerItemViewModel : INotifyPropertyChanged
19 | {
20 | private string _iconPath;
21 | private string _title;
22 | private object _content;
23 | private string _titleKey;
24 |
25 | public OverlayerItemViewModel(string iconPath, string titleKey, object content)
26 | {
27 | _iconPath = iconPath;
28 | _titleKey = titleKey;
29 | _title = GetString(_titleKey) as string;
30 | _content = content;
31 | VAlignType = VerticalAlignment.Stretch;
32 | HAlignType = HorizontalAlignment.Left;
33 | OverlayerMargin = new Thickness(20, 20, 0, 53);
34 | }
35 |
36 | public string IconPath
37 | {
38 | get
39 | {
40 | return _iconPath;
41 | }
42 | set
43 | {
44 | _iconPath = value;
45 | OnNotifyPropertyChanged();
46 | }
47 | }
48 |
49 | public string TitleKey
50 | {
51 | get => _titleKey;
52 | set
53 | {
54 | Title = GetString(_titleKey) as string;
55 | }
56 | }
57 |
58 | public string Title
59 | {
60 | get { return _title; }
61 | set { _title = value; OnNotifyPropertyChanged(); }
62 | }
63 |
64 | public object Content
65 | {
66 | get { return _content; }
67 | set { _content = value; OnNotifyPropertyChanged(); }
68 | }
69 |
70 | public VerticalAlignment VAlignType { set; get; }
71 | public HorizontalAlignment HAlignType { set; get; }
72 |
73 | public OverlayerType OverlayerIndicator { set; get; }
74 |
75 | public Thickness OverlayerMargin { set; get; }
76 |
77 | public event PropertyChangedEventHandler PropertyChanged;
78 |
79 | private void OnNotifyPropertyChanged([CallerMemberName] string property = "")
80 | {
81 | PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(property));
82 | }
83 | }
84 | }
85 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/Progress/CircleProgress.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading;
6 | using System.Windows;
7 | using System.Windows.Controls;
8 | using System.Windows.Data;
9 | using System.Windows.Documents;
10 | using System.Windows.Input;
11 | using System.Windows.Media;
12 | using System.Windows.Media.Imaging;
13 | using System.Windows.Navigation;
14 | using System.Windows.Shapes;
15 |
16 | namespace View_Spot_of_City.UIControls.Progress
17 | {
18 | ///
19 | /// CircleProgress.xaml 的交互逻辑
20 | ///
21 | public partial class CircleProgress : Window
22 | {
23 | private volatile bool _shouldStop;
24 | public CircleProgress()
25 | {
26 | InitializeComponent();
27 | this.ShowInTaskbar = false;
28 | this.Topmost = true;
29 | }
30 |
31 | private delegate void ShowDefaultDelegate(string value);
32 |
33 | ///
34 | /// 设置默认描述信息
35 | ///
36 | ///
37 | public void SetDefaultDescriptionAsync(string value)
38 | {
39 | if (!Dispatcher.CheckAccess())
40 | {
41 | Dispatcher.Invoke(System.Windows.Threading.DispatcherPriority.Send, new ShowDefaultDelegate(SetDefaultDescriptionAsync), value);
42 | return;
43 | }
44 | SetProgressText(value);
45 | }
46 |
47 | private delegate void ShowLogLabelDelegate(string strLog);
48 |
49 | ///
50 | /// 设置进度条描述信息
51 | ///
52 | ///
53 | public void SetProgressText(string strLog)
54 | {
55 | if (!Dispatcher.CheckAccess())
56 | {
57 | Dispatcher.Invoke(System.Windows.Threading.DispatcherPriority.Send, new ShowLogLabelDelegate(SetProgressText), strLog);
58 | return;
59 | }
60 | this.tbxInfo.Text = strLog;
61 | }
62 |
63 | private delegate void CloseDelegate();
64 | ///
65 | /// 关闭
66 | ///
67 | public void RequestStop()
68 | {
69 | _shouldStop = true;
70 | if (!Dispatcher.CheckAccess())
71 | {
72 | Dispatcher.Invoke(System.Windows.Threading.DispatcherPriority.Normal, new CloseDelegate(Close));
73 | return;
74 | }
75 | DialogResult = true;
76 | Close();
77 | }
78 | }
79 | }
80 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/Helper/EmailHelper.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Text;
3 | using System.Net.Mail;
4 | using System.Text.RegularExpressions;
5 | using static System.Configuration.ConfigurationManager;
6 |
7 | namespace View_Spot_of_City.UIControls.Helper
8 | {
9 | public static class EmailHelper
10 | {
11 | ///
12 | /// 判断是否为邮箱
13 | ///
14 | /// 待判断字符串
15 | /// 是否为邮箱
16 | public static bool IsEmail(string str)
17 | {
18 | try
19 | {
20 | string expression = @"^([\w-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$";
21 | return Regex.IsMatch(str, expression, RegexOptions.Compiled);
22 | }
23 | catch
24 | {
25 | return false;
26 | }
27 | }
28 |
29 | ///
30 | /// 发送邮件
31 | ///
32 | /// 收件邮箱
33 | /// 邮件主题
34 | /// 邮件内容
35 | /// 是否发送成功
36 | public static bool SendEmail(string mail, string title, string content)
37 | {
38 | MailMessage message = new MailMessage();
39 | {
40 | message.To.Add(mail);
41 | message.From = new MailAddress(AppSettings["MANAGER_MAIL_NUM"], AppSettings["MANAGER_MAIL_NAME"], Encoding.UTF8);
42 | message.Subject =title;
43 | message.SubjectEncoding = Encoding.UTF8;
44 | message.Body = content;
45 | message.BodyEncoding = Encoding.UTF8;
46 | message.IsBodyHtml = false;
47 | message.Priority = MailPriority.Normal;
48 | }
49 |
50 | SmtpClient smtp = new SmtpClient();
51 | {
52 | smtp.Host = AppSettings["SmtpClient_HOST"];
53 | smtp.EnableSsl = true;
54 | smtp.UseDefaultCredentials = false;
55 | smtp.Credentials = new System.Net.NetworkCredential(AppSettings["MANAGER_MAIL_NUM"], AppSettings["MANAGER_MAIL_PASSWORD"]);
56 | }
57 |
58 | object userState = message;
59 |
60 | try
61 | {
62 | smtp.SendAsync(message, userState);
63 | return true;
64 | }
65 | catch(Exception ex)
66 | {
67 | Console.Write(ex.Message);
68 | return false;
69 | }
70 | }
71 | }
72 | }
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.LogManager/View-Spot-of-City.LogManager.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {ABCB9E94-22CC-4B65-87D7-6E5A7F1F9D09}
8 | Library
9 | Properties
10 | View_Spot_of_City.LogManager
11 | View-Spot-of-City.LogManager
12 | v4.5.2
13 | 512
14 |
15 |
16 | true
17 | full
18 | false
19 | bin\Debug\
20 | DEBUG;TRACE
21 | prompt
22 | 4
23 |
24 |
25 | pdbonly
26 | true
27 | bin\Release\
28 | TRACE
29 | prompt
30 | 4
31 |
32 |
33 |
34 | ..\packages\log4net.2.0.8\lib\net45-full\log4net.dll
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.Language/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // 此代码由工具生成。
4 | // 运行时版本: 4.0.30319.42000
5 | //
6 | // 对此文件的更改可能导致不正确的行为,如果
7 | // 重新生成代码,则所做更改将丢失。
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace View_Spot_of_City.Language.Properties {
12 |
13 |
14 | ///
15 | /// 强类型资源类,用于查找本地化字符串等。
16 | ///
17 | // 此类是由 StronglyTypedResourceBuilder
18 | // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
19 | // 若要添加或删除成员,请编辑 .ResX 文件,然后重新运行 ResGen
20 | // (以 /str 作为命令选项),或重新生成 VS 项目。
21 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
22 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
23 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
24 | internal class Resources {
25 |
26 | private static global::System.Resources.ResourceManager resourceMan;
27 |
28 | private static global::System.Globalization.CultureInfo resourceCulture;
29 |
30 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
31 | internal Resources() {
32 | }
33 |
34 | ///
35 | /// 返回此类使用的缓存 ResourceManager 实例。
36 | ///
37 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
38 | internal static global::System.Resources.ResourceManager ResourceManager {
39 | get {
40 | if ((resourceMan == null)) {
41 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("View_Spot_of_City.Language.Properties.Resources", typeof(Resources).Assembly);
42 | resourceMan = temp;
43 | }
44 | return resourceMan;
45 | }
46 | }
47 |
48 | ///
49 | /// 覆盖当前线程的 CurrentUICulture 属性
50 | /// 使用此强类型的资源类的资源查找。
51 | ///
52 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
53 | internal static global::System.Globalization.CultureInfo Culture {
54 | get {
55 | return resourceCulture;
56 | }
57 | set {
58 | resourceCulture = value;
59 | }
60 | }
61 | }
62 | }
63 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // 此代码由工具生成。
4 | // 运行时版本: 4.0.30319.42000
5 | //
6 | // 对此文件的更改可能导致不正确的行为,如果
7 | // 重新生成代码,则所做更改将丢失。
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace View_Spot_of_City.UIControls.Properties {
12 |
13 |
14 | ///
15 | /// 强类型资源类,用于查找本地化字符串等。
16 | ///
17 | // 此类是由 StronglyTypedResourceBuilder
18 | // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
19 | // 若要添加或删除成员,请编辑 .ResX 文件,然后重新运行 ResGen
20 | // (以 /str 作为命令选项),或重新生成 VS 项目。
21 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
22 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
23 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
24 | internal class Resources {
25 |
26 | private static global::System.Resources.ResourceManager resourceMan;
27 |
28 | private static global::System.Globalization.CultureInfo resourceCulture;
29 |
30 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
31 | internal Resources() {
32 | }
33 |
34 | ///
35 | /// 返回此类使用的缓存 ResourceManager 实例。
36 | ///
37 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
38 | internal static global::System.Resources.ResourceManager ResourceManager {
39 | get {
40 | if ((resourceMan == null)) {
41 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("View_Spot_of_City.UIControls.Properties.Resources", typeof(Resources).Assembly);
42 | resourceMan = temp;
43 | }
44 | return resourceMan;
45 | }
46 | }
47 |
48 | ///
49 | /// 覆盖当前线程的 CurrentUICulture 属性
50 | /// 使用此强类型的资源类的资源查找。
51 | ///
52 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
53 | internal static global::System.Globalization.CultureInfo Culture {
54 | get {
55 | return resourceCulture;
56 | }
57 | set {
58 | resourceCulture = value;
59 | }
60 | }
61 | }
62 | }
63 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | ###############################################################################
2 | # Set default behavior to automatically normalize line endings.
3 | ###############################################################################
4 | * text=auto
5 |
6 | ###############################################################################
7 | # Set default behavior for command prompt diff.
8 | #
9 | # This is need for earlier builds of msysgit that does not have it on by
10 | # default for csharp files.
11 | # Note: This is only used by command line
12 | ###############################################################################
13 | #*.cs diff=csharp
14 |
15 | ###############################################################################
16 | # Set the merge driver for project and solution files
17 | #
18 | # Merging from the command prompt will add diff markers to the files if there
19 | # are conflicts (Merging from VS is not affected by the settings below, in VS
20 | # the diff markers are never inserted). Diff markers may cause the following
21 | # file extensions to fail to load in VS. An alternative would be to treat
22 | # these files as binary and thus will always conflict and require user
23 | # intervention with every merge. To do so, just uncomment the entries below
24 | ###############################################################################
25 | #*.sln merge=binary
26 | #*.csproj merge=binary
27 | #*.vbproj merge=binary
28 | #*.vcxproj merge=binary
29 | #*.vcproj merge=binary
30 | #*.dbproj merge=binary
31 | #*.fsproj merge=binary
32 | #*.lsproj merge=binary
33 | #*.wixproj merge=binary
34 | #*.modelproj merge=binary
35 | #*.sqlproj merge=binary
36 | #*.wwaproj merge=binary
37 |
38 | ###############################################################################
39 | # behavior for image files
40 | #
41 | # image files are treated as binary by default.
42 | ###############################################################################
43 | #*.jpg binary
44 | #*.png binary
45 | #*.gif binary
46 |
47 | ###############################################################################
48 | # diff behavior for common document formats
49 | #
50 | # Convert binary document formats to text before diffing them. This feature
51 | # is only available from the command line. Turn it on by uncommenting the
52 | # entries below.
53 | ###############################################################################
54 | #*.doc diff=astextplain
55 | #*.DOC diff=astextplain
56 | #*.docx diff=astextplain
57 | #*.DOCX diff=astextplain
58 | #*.dot diff=astextplain
59 | #*.DOT diff=astextplain
60 | #*.pdf diff=astextplain
61 | #*.PDF diff=astextplain
62 | #*.rtf diff=astextplain
63 | #*.RTF diff=astextplain
64 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // 此代码由工具生成。
4 | // 运行时版本: 4.0.30319.42000
5 | //
6 | // 对此文件的更改可能导致不正确的行为,如果
7 | // 重新生成代码,则所做更改将丢失。
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace View_Spot_of_City.Properties
12 | {
13 |
14 |
15 | ///
16 | /// 强类型资源类,用于查找本地化字符串等。
17 | ///
18 | // 此类是由 StronglyTypedResourceBuilder
19 | // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
20 | // 若要添加或删除成员,请编辑 .ResX 文件,然后重新运行 ResGen
21 | // (以 /str 作为命令选项),或重新生成 VS 项目。
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources
26 | {
27 |
28 | private static global::System.Resources.ResourceManager resourceMan;
29 |
30 | private static global::System.Globalization.CultureInfo resourceCulture;
31 |
32 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
33 | internal Resources()
34 | {
35 | }
36 |
37 | ///
38 | /// 返回此类使用的缓存 ResourceManager 实例。
39 | ///
40 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
41 | internal static global::System.Resources.ResourceManager ResourceManager
42 | {
43 | get
44 | {
45 | if ((resourceMan == null))
46 | {
47 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("View_Spot_of_City.Properties.Resources", typeof(Resources).Assembly);
48 | resourceMan = temp;
49 | }
50 | return resourceMan;
51 | }
52 | }
53 |
54 | ///
55 | /// 覆盖当前线程的 CurrentUICulture 属性
56 | /// 使用此强类型的资源类的资源查找。
57 | ///
58 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
59 | internal static global::System.Globalization.CultureInfo Culture
60 | {
61 | get
62 | {
63 | return resourceCulture;
64 | }
65 | set
66 | {
67 | resourceCulture = value;
68 | }
69 | }
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | [](https://ci.appveyor.com/project/CS-Tao/view-spot-of-city) [](http://www.apache.org/licenses/LICENSE-2.0.html) [](https://github.com/RS-GIS-Geeks/View-Spot-of-City/issues) [](https://github.com/RS-GIS-Geeks/View-Spot-of-City)
2 | # View-Spot-of-City
3 | 城市景点推荐系统
4 |
5 | 欢迎大家参考我们的代码对GIS软件开发方法进行学习 [](https://github.com/RS-GIS-Geeks/View-Spot-of-City),也欢迎大家加入我们共同完善本系统 [](https://github.com/RS-GIS-Geeks/View-Spot-of-City)。
6 |
7 | # 软件截图
8 | 
9 | 
10 | 
11 | 
12 | 
13 | 
14 | 
15 | 
16 | 
17 | 
18 | 
19 | 
20 | 
21 | # 版权声明
22 | 本软件采用[Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0.html)协议,如需使用请附上本软件源码链接(https://github.com/CS-Tao/View-Spot-of-City)
23 |
24 | ©2017 RS-GIS-Geeks. All rights reserved
25 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City/Properties/app.manifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
47 |
54 |
55 |
69 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/Form/MyMessageBoxEvents.cs:
--------------------------------------------------------------------------------
1 | using System.Windows;
2 | using System.Windows.Controls;
3 | using System.Windows.Input;
4 |
5 | namespace View_Spot_of_City.UIControls.Form
6 | {
7 | public partial class MyMessageBoxEvents
8 | {
9 | private void Grid_MouseDown(object sender, MouseButtonEventArgs e)
10 | {
11 | if (e.LeftButton == MouseButtonState.Pressed)
12 | {
13 | Window win = (Window)((FrameworkElement)sender).TemplatedParent;
14 | win.DragMove();
15 | }
16 | }
17 |
18 | //拖动改变窗体大小
19 | bool isWiden = false;
20 |
21 | private void Border_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
22 | {
23 | isWiden = true;
24 | }
25 |
26 | private void Border_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
27 | {
28 | isWiden = false;
29 | Border b = (Border)sender;
30 | b.ReleaseMouseCapture();
31 | }
32 |
33 | private void Border_MouseMove(object sender, MouseEventArgs e)
34 | {
35 | Border b = (Border)sender;
36 | if (isWiden)
37 | {
38 | Window win = (Window)((FrameworkElement)sender).TemplatedParent;
39 | b.CaptureMouse();
40 | double newWidth = e.GetPosition(win).X + 5;
41 | double newheight = e.GetPosition(win).Y + 5;
42 | if (newWidth > 0)
43 | {
44 | win.Width = newWidth;
45 |
46 | }
47 | if (newheight > 0)
48 | {
49 | win.Height = newheight;
50 | }
51 | }
52 | }
53 |
54 | private void btnMin_Click(object sender, RoutedEventArgs e)
55 | {
56 | Window win = (Window)((FrameworkElement)sender).TemplatedParent;
57 | win.WindowState = WindowState.Minimized;
58 | }
59 |
60 | private void btnMaxOrMin_Click(object sender, RoutedEventArgs e)
61 | {
62 | Window win = (Window)((FrameworkElement)sender).TemplatedParent;
63 | if (win.WindowState == WindowState.Maximized)
64 | {
65 | win.WindowState = WindowState.Normal;
66 | return;
67 | }
68 | win.WindowState = WindowState.Maximized;
69 | }
70 | private void closeButton_Click(object sender, RoutedEventArgs e)
71 | {
72 | Window win = (Window)((FrameworkElement)sender).TemplatedParent;
73 | win.Close();
74 | }
75 |
76 | private void Label_MouseDoubleClick(object sender, MouseButtonEventArgs e)
77 | {
78 | Window win = (Window)((FrameworkElement)sender).TemplatedParent;
79 | if (win.WindowState == WindowState.Maximized)
80 | {
81 | win.WindowState = WindowState.Normal;
82 | return;
83 | }
84 | win.WindowState = WindowState.Maximized;
85 | }
86 |
87 | }
88 | }
89 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/UIcontrol/Register.xaml:
--------------------------------------------------------------------------------
1 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
34 |
35 |
36 |
37 |
39 |
41 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/Form/MyMessageBox.xaml:
--------------------------------------------------------------------------------
1 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/Style/TextBoxStyles.xaml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
17 |
18 |
51 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/Helper/AvatarHelper.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Net;
3 | using System.IO;
4 | using System.Windows.Media.Imaging;
5 |
6 | namespace View_Spot_of_City.UIControls.Helper
7 | {
8 | public static class AvatarHelper
9 | {
10 | ///
11 | /// 通过邮箱在Gravatar上寻找头像
12 | ///
13 | /// 邮箱
14 | /// 头像
15 | public static BitmapImage GetAvatarByEmail(string mail)
16 | {
17 | string userInputMail = (mail == null || mail == string.Empty) ? "rsgisgeeks@qq.com" : mail;
18 | BitmapImage bitmap = new BitmapImage();
19 |
20 | try
21 | {
22 | var c = new WebClient();
23 | var bytes = c.DownloadData(GravatarHelper.NetStandard.Gravatar.GetSecureGravatarImageUrl(userInputMail));
24 | bitmap = GetImage(bytes);
25 | }
26 | catch(Exception ex)
27 | {
28 | bitmap = new BitmapImage(new Uri(@"pack://application:,,,/View-Spot-of-City;component/Icon/Transparent.png"));
29 | LogManager.LogManager.Error("网络错误,头像获取失败", ex);
30 | }
31 |
32 | return bitmap;
33 | }
34 |
35 | ///
36 | /// 通过邮件名在Gravatar上寻找头像
37 | ///
38 | /// 邮箱
39 | /// 头像大小[10, 500]
40 | /// 头像
41 | public static BitmapImage GetAvatarByEmail(string mail, int avatarSize)
42 | {
43 | avatarSize = avatarSize < 10 ? 10 : (avatarSize > 500 ? 500 : avatarSize);
44 | string userInputMail = (mail == null || mail == string.Empty) ? "rsgisgeeks@qq.com" : mail;
45 | return new BitmapImage(new Uri(GravatarHelper.NetStandard.Gravatar.GetGravatarImageUrl(userInputMail, avatarSize)));
46 | }
47 |
48 | ///
49 | /// 通过byte流加载图片
50 | ///
51 | ///
52 | ///
53 | private static BitmapImage GetImage(byte[] buffer)
54 | {
55 | if (buffer == null || buffer.Length <= 0)
56 | return null;
57 |
58 | BitmapImage bitmap = null;
59 | try
60 | {
61 | bitmap = new BitmapImage();
62 | bitmap.DecodePixelHeight = 200; // 确定解码高度,宽度不同时设置
63 | bitmap.BeginInit();
64 |
65 | bitmap.CacheOption = BitmapCacheOption.OnLoad;
66 |
67 | using (Stream ms = new MemoryStream(buffer))
68 | {
69 | bitmap.StreamSource = ms;
70 | bitmap.EndInit();
71 | bitmap.Freeze();
72 |
73 | ms.Dispose();
74 | }
75 | }
76 | catch(Exception ex)
77 | {
78 | bitmap = new BitmapImage(new Uri(@"pack://application:,,,/View-Spot-of-City;component/Icon/Transparent.png"));
79 | LogManager.LogManager.Error("头像加载错误", ex);
80 | }
81 |
82 | return bitmap;
83 | }
84 | }
85 | }
86 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/VisualizationControl/VisitorsByMonth.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Windows;
4 | using System.Windows.Controls;
5 | using System.Windows.Media;
6 |
7 | using LiveCharts;
8 | using LiveCharts.Wpf;
9 |
10 | using View_Spot_of_City.ClassModel;
11 | using System.ComponentModel;
12 |
13 | namespace View_Spot_of_City.UIControls.VisualizationControl
14 | {
15 | ///
16 | /// VisitorsByMonth.xaml 的交互逻辑
17 | ///
18 | public partial class VisitorsByMonth : VisualizationControlBase, INotifyPropertyChanged
19 | {
20 | public event PropertyChangedEventHandler PropertyChanged;
21 |
22 | SeriesCollection _SeriesCollection = new SeriesCollection();
23 |
24 | public SeriesCollection SeriesCollection
25 | {
26 | get { return _SeriesCollection; }
27 | set
28 | {
29 | _SeriesCollection = value;
30 | PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("SeriesCollection"));
31 | }
32 | }
33 | public string[] Labels { get; set; }
34 | public Func Formatter { get; set; }
35 |
36 | public VisitorsByMonth()
37 | {
38 | InitializeComponent();
39 | Labels = new[] { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12" };
40 | Formatter = value => value.ToString("N");
41 |
42 | DataContext = this;
43 | }
44 |
45 | ///
46 | /// 外部初始化
47 | ///
48 | public void Init(List visitorList)
49 | {
50 | this.Visibility = Visibility.Visible;
51 |
52 | List visitorItemList = new List();
53 | ShowVisitorsInfo(SeriesCollection, visitorList);
54 | }
55 |
56 | ///
57 | /// 显示线状图
58 | ///
59 | ///
60 | ///
61 | private void ShowVisitorsInfo(SeriesCollection SeriesCollection, List visitorItemList)
62 | {
63 | if(visitorItemList != null && visitorItemList.Count > 0)
64 | {
65 | SeriesCollection.Clear();
66 | SeriesCollection.Add(new LineSeries()
67 | {
68 | Title = visitorItemList[0].ViewSpotName,
69 | Stroke = Brushes.Red
70 | });
71 |
72 | if(visitorItemList.Count < 18)
73 | ContentScroll.Width = 40 * visitorItemList.Count;
74 | else if(visitorItemList.Count >= 18 && visitorItemList.Count < 24)
75 | ContentScroll.Width = 30 * visitorItemList.Count;
76 | else
77 | ContentScroll.Width = 20 * visitorItemList.Count;
78 |
79 | SeriesCollection[0].Values = new ChartValues();
80 | Labels = new string[visitorItemList.Count];
81 | int index = 0;
82 | foreach (VisitorItem visitorItem in visitorItemList)
83 | {
84 | SeriesCollection[0].Values.Add(visitorItem.Visitors);
85 | Labels[index++] = visitorItem.Year + " " + visitorItem.Month;
86 | }
87 | }
88 | }
89 | }
90 | }
91 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/UIcontrol/Login.xaml:
--------------------------------------------------------------------------------
1 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
33 |
34 |
35 |
36 |
37 |
39 |
41 |
43 |
44 |
45 |
46 |
47 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.UIControls/Progress/ProgressBox.cs:
--------------------------------------------------------------------------------
1 | using System.Threading;
2 |
3 | namespace View_Spot_of_City.UIControls.Progress
4 | {
5 | ///
6 | /// 进度条对话框
7 | ///
8 | public class ProgressBox
9 | {
10 | private FromProgressBox m_frmProgressBox = null;
11 | private Thread m_thread = null;
12 | private string m_Title = "";
13 | private double m_MaxValue = 100;
14 | private double m_MinValue = 0;
15 |
16 | ///
17 | /// 构造
18 | ///
19 | public ProgressBox()
20 | {
21 | }
22 |
23 | public ProgressBox(int Min, int Max, string vTitle)
24 | {
25 | MaxValue = Max;
26 | MinValue = Min;
27 | Title = vTitle;
28 | }
29 |
30 | ///
31 | /// 标题
32 | ///
33 | public string Title
34 | {
35 | get { return m_Title; }
36 | set { m_Title = value; }
37 | }
38 |
39 | ///
40 | /// 最大值
41 | ///
42 | public double MaxValue
43 | {
44 | get { return m_MaxValue; }
45 | set { m_MaxValue = value; }
46 | }
47 |
48 | ///
49 | /// 最小值
50 | ///
51 | public double MinValue
52 | {
53 | get { return m_MinValue; }
54 | set { m_MinValue = value; }
55 | }
56 |
57 | ///
58 | /// 显示进度条
59 | ///
60 | public void ShowPregress()
61 | {
62 | m_thread = new Thread(Show)
63 | {
64 | IsBackground = true
65 | };
66 | m_thread.SetApartmentState(ApartmentState.STA);
67 | m_thread.Start();
68 | }
69 |
70 | private void Show()
71 | {
72 | m_frmProgressBox = new FromProgressBox()
73 | {
74 | Caption = m_Title,
75 | MaxValue = m_MaxValue,
76 | MinValue = m_MinValue
77 | };
78 | m_frmProgressBox.ShowDialog();
79 | }
80 |
81 | ///
82 | /// 关闭进度条
83 | ///
84 | public void CloseProgress()
85 | {
86 | while (!m_thread.IsAlive) ;
87 | Thread.Sleep(1);
88 | m_frmProgressBox.RequestStop();
89 | m_thread.Join();
90 | }
91 |
92 | ///
93 | /// 设置进度条当前值
94 | ///
95 | ///
96 | public void SetProgressValue(double nValue)
97 | {
98 | while(m_frmProgressBox == null)
99 | { }
100 | m_frmProgressBox.SetProgressValue(nValue);
101 | }
102 |
103 | ///
104 | /// 设置进度条当前描述信息
105 | ///
106 | ///
107 | public void SetProgressDescription(string strValue)
108 | {
109 | while (m_frmProgressBox == null)
110 | { }
111 | m_frmProgressBox.SetProgressText(strValue);
112 | }
113 |
114 | public void SetProgressDescription2(string strValue)
115 | {
116 | while (m_frmProgressBox == null)
117 | { }
118 | m_frmProgressBox.SetProgressText2(strValue);
119 | }
120 | }
121 | }
122 |
--------------------------------------------------------------------------------
/View-Spot-of-City/View-Spot-of-City.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 15
4 | VisualStudioVersion = 15.0.26430.15
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "View-Spot-of-City", "View-Spot-of-City\View-Spot-of-City.csproj", "{4387DB89-52AE-40D4-836E-1ACF569A43AF}"
7 | EndProject
8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "View-Spot-of-City.UIControls", "View-Spot-of-City.UIControls\View-Spot-of-City.UIControls.csproj", "{BC0000CB-54EF-4D53-BA23-97AD64A52DFB}"
9 | EndProject
10 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "View-Spot-of-City.Language", "View-Spot-of-City.Language\View-Spot-of-City.Language.csproj", "{719DCC4A-7B1D-46DB-84B8-8BCF764883C8}"
11 | EndProject
12 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "View-Spot-of-City.ClassModel", "View-Spot-of-City.ClassModel\View-Spot-of-City.ClassModel.csproj", "{B0D8C76F-2723-4A36-97FC-65B69E3BD973}"
13 | EndProject
14 | Project("{54435603-DBB4-11D2-8724-00A0C9A8B90C}") = "Setup", "Setup\Setup.vdproj", "{5AC4CE0D-684E-4587-8DBB-5848AC87E745}"
15 | EndProject
16 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "View-Spot-of-City.LogManager", "View-Spot-of-City.LogManager\View-Spot-of-City.LogManager.csproj", "{ABCB9E94-22CC-4B65-87D7-6E5A7F1F9D09}"
17 | EndProject
18 | Global
19 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
20 | Debug|Any CPU = Debug|Any CPU
21 | Release|Any CPU = Release|Any CPU
22 | EndGlobalSection
23 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
24 | {4387DB89-52AE-40D4-836E-1ACF569A43AF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
25 | {4387DB89-52AE-40D4-836E-1ACF569A43AF}.Debug|Any CPU.Build.0 = Debug|Any CPU
26 | {4387DB89-52AE-40D4-836E-1ACF569A43AF}.Release|Any CPU.ActiveCfg = Release|Any CPU
27 | {4387DB89-52AE-40D4-836E-1ACF569A43AF}.Release|Any CPU.Build.0 = Release|Any CPU
28 | {BC0000CB-54EF-4D53-BA23-97AD64A52DFB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
29 | {BC0000CB-54EF-4D53-BA23-97AD64A52DFB}.Debug|Any CPU.Build.0 = Debug|Any CPU
30 | {BC0000CB-54EF-4D53-BA23-97AD64A52DFB}.Release|Any CPU.ActiveCfg = Release|Any CPU
31 | {BC0000CB-54EF-4D53-BA23-97AD64A52DFB}.Release|Any CPU.Build.0 = Release|Any CPU
32 | {719DCC4A-7B1D-46DB-84B8-8BCF764883C8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
33 | {719DCC4A-7B1D-46DB-84B8-8BCF764883C8}.Debug|Any CPU.Build.0 = Debug|Any CPU
34 | {719DCC4A-7B1D-46DB-84B8-8BCF764883C8}.Release|Any CPU.ActiveCfg = Release|Any CPU
35 | {719DCC4A-7B1D-46DB-84B8-8BCF764883C8}.Release|Any CPU.Build.0 = Release|Any CPU
36 | {B0D8C76F-2723-4A36-97FC-65B69E3BD973}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
37 | {B0D8C76F-2723-4A36-97FC-65B69E3BD973}.Debug|Any CPU.Build.0 = Debug|Any CPU
38 | {B0D8C76F-2723-4A36-97FC-65B69E3BD973}.Release|Any CPU.ActiveCfg = Release|Any CPU
39 | {B0D8C76F-2723-4A36-97FC-65B69E3BD973}.Release|Any CPU.Build.0 = Release|Any CPU
40 | {5AC4CE0D-684E-4587-8DBB-5848AC87E745}.Debug|Any CPU.ActiveCfg = Debug
41 | {5AC4CE0D-684E-4587-8DBB-5848AC87E745}.Release|Any CPU.ActiveCfg = Release
42 | {ABCB9E94-22CC-4B65-87D7-6E5A7F1F9D09}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
43 | {ABCB9E94-22CC-4B65-87D7-6E5A7F1F9D09}.Debug|Any CPU.Build.0 = Debug|Any CPU
44 | {ABCB9E94-22CC-4B65-87D7-6E5A7F1F9D09}.Release|Any CPU.ActiveCfg = Release|Any CPU
45 | {ABCB9E94-22CC-4B65-87D7-6E5A7F1F9D09}.Release|Any CPU.Build.0 = Release|Any CPU
46 | EndGlobalSection
47 | GlobalSection(SolutionProperties) = preSolution
48 | HideSolutionNode = FALSE
49 | EndGlobalSection
50 | EndGlobal
51 |
--------------------------------------------------------------------------------