From 93665353c2855648590253efd1cb1fdbadb19778 Mon Sep 17 00:00:00 2001 From: syneffort Date: Thu, 16 Nov 2023 11:16:01 +0900 Subject: [PATCH] geo map --- .../Tutorial/BasicPlots/GeoMapWindow.xaml | 17 + .../Tutorial/BasicPlots/GeoMapWindow.xaml.cs | 66 ++ LC_Tutorial/Tutorial/MainWindow.xaml | 3 +- LC_Tutorial/Tutorial/MainWindow.xaml.cs | 6 + LC_Tutorial/Tutorial/Resource.Designer.cs | 87 ++ LC_Tutorial/Tutorial/Resource.resx | 124 +++ LC_Tutorial/Tutorial/Resources/World.xml | 894 ++++++++++++++++++ LC_Tutorial/Tutorial/Tutorial.csproj | 25 + 8 files changed, 1221 insertions(+), 1 deletion(-) create mode 100644 LC_Tutorial/Tutorial/BasicPlots/GeoMapWindow.xaml create mode 100644 LC_Tutorial/Tutorial/BasicPlots/GeoMapWindow.xaml.cs create mode 100644 LC_Tutorial/Tutorial/Resource.Designer.cs create mode 100644 LC_Tutorial/Tutorial/Resource.resx create mode 100644 LC_Tutorial/Tutorial/Resources/World.xml diff --git a/LC_Tutorial/Tutorial/BasicPlots/GeoMapWindow.xaml b/LC_Tutorial/Tutorial/BasicPlots/GeoMapWindow.xaml new file mode 100644 index 0000000..e1f1362 --- /dev/null +++ b/LC_Tutorial/Tutorial/BasicPlots/GeoMapWindow.xaml @@ -0,0 +1,17 @@ + + + + + + + + + diff --git a/LC_Tutorial/Tutorial/BasicPlots/GeoMapWindow.xaml.cs b/LC_Tutorial/Tutorial/BasicPlots/GeoMapWindow.xaml.cs new file mode 100644 index 0000000..d8a8c7a --- /dev/null +++ b/LC_Tutorial/Tutorial/BasicPlots/GeoMapWindow.xaml.cs @@ -0,0 +1,66 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Shapes; + +namespace Tutorial.BasicPlots +{ + /// + /// GeoMapWindow.xaml에 대한 상호 작용 논리 + /// + public partial class GeoMapWindow : Window + { + public Dictionary LanguagePack { get; set; } + + public Dictionary Values { get; set; } + + public GeoMapWindow() + { + InitializeComponent(); + InitInstance(); + } + + protected virtual void InitInstance() + { + Random rand = new Random(); + Values = new Dictionary(); + + Values["MX"] = rand.Next(0, 100); + Values["CA"] = rand.Next(0, 100); + Values["US"] = rand.Next(0, 100); + Values["IN"] = rand.Next(0, 100); + Values["CN"] = rand.Next(0, 100); + Values["JP"] = rand.Next(0, 100); + Values["KR"] = rand.Next(0, 100); + Values["BR"] = rand.Next(0, 100); + Values["DE"] = rand.Next(0, 100); + Values["FR"] = rand.Next(0, 100); + Values["GB"] = rand.Next(0, 100); + + LanguagePack = new Dictionary(); + LanguagePack["KR"] = "Korean"; + LanguagePack["MX"] = "México"; + + DataContext = this; + } + + private void btnRandomize_Click(object sender, RoutedEventArgs e) + { + Random rand = new Random(); + foreach (var pair in Values) + { + Values[pair.Key] = rand.Next(0, 100); + } + } + } +} diff --git a/LC_Tutorial/Tutorial/MainWindow.xaml b/LC_Tutorial/Tutorial/MainWindow.xaml index 00b776e..9df0dc6 100644 --- a/LC_Tutorial/Tutorial/MainWindow.xaml +++ b/LC_Tutorial/Tutorial/MainWindow.xaml @@ -5,7 +5,7 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:local="clr-namespace:Tutorial" mc:Ignorable="d" - Title="MainWindow" Height="450" Width="800"> + Title="MainWindow" Height="500" Width="800"> @@ -28,6 +28,7 @@