├── .gitignore
├── ExternalFiles
├── Microsoft.VisualBasic.PowerPacks.Vs.dll
├── Microsoft.VisualBasic.PowerPacks.Vs.xml
├── SciLexer.dll
├── ScintillaNet.dll
├── x64
│ ├── SciLexer.dll
│ └── ScintillaNet.dll
└── x86
│ ├── SciLexer.dll
│ └── ScintillaNet.dll
├── Installer
├── Images
│ ├── DMS_Logo_150.jpg
│ ├── DMS_Logo_150.png
│ ├── DMS_Logo_300.jpg
│ ├── bannrbmp.bmp
│ ├── bannrbmp2.bmp
│ └── dlgbmp.bmp
├── Installer.wixproj
├── Product.wxs
├── gdal-data.wxs
└── mmshell.bat
├── MapLibrary
├── AddFontForm.Designer.cs
├── AddFontForm.cs
├── AddFontForm.resx
├── AddGraticuleLayerForm.Designer.cs
├── AddGraticuleLayerForm.cs
├── AddGraticuleLayerForm.resx
├── AddStyleCategoryForm.Designer.cs
├── AddStyleCategoryForm.cs
├── AddStyleCategoryForm.resx
├── AddWMSLayerDetailsForm.Designer.cs
├── AddWMSLayerDetailsForm.cs
├── AddWMSLayerDetailsForm.resx
├── AddWMSLayerForm.Designer.cs
├── AddWMSLayerForm.cs
├── AddWMSLayerForm.resx
├── BindingController.cs
├── ChangeViewForm.Designer.cs
├── ChangeViewForm.cs
├── ChangeViewForm.resx
├── ClassPropertyEditor.Designer.cs
├── ClassPropertyEditor.cs
├── ClassPropertyEditor.resx
├── ColorPicker.cs
├── ColorRampForm.Designer.cs
├── ColorRampForm.cs
├── ColorRampForm.resx
├── ColorRampPicker.cs
├── ColorStopForm.Designer.cs
├── ColorStopForm.cs
├── ColorStopForm.resx
├── CredentialsForm.Designer.cs
├── CredentialsForm.cs
├── CredentialsForm.resx
├── Cursors
│ ├── GrabberTool.cur
│ ├── SelectPolygonTool.cur
│ ├── SelectRectTool.cur
│ ├── SelectTool.cur
│ ├── ZoomInTool.cur
│ └── ZoomOutTool.cur
├── EventProvider.cs
├── FieldSelectionForm.Designer.cs
├── FieldSelectionForm.cs
├── FieldSelectionForm.resx
├── FontsetPicker.cs
├── IMapControl.cs
├── IPropertyEditor.cs
├── IWizard.cs
├── Images
│ ├── DataConnection.png
│ ├── Map.png
│ ├── Map_Legend.png
│ ├── Map_Legend_Big.png
│ ├── Refresh16.png
│ ├── add.png
│ ├── down.png
│ ├── group.PNG
│ ├── raster.ICO
│ ├── remove.png
│ └── up.png
├── IndividualValuesTheme.Designer.cs
├── IndividualValuesTheme.cs
├── IndividualValuesTheme.resx
├── LabelPropertyEditor.Designer.cs
├── LabelPropertyEditor.cs
├── LabelPropertyEditor.resx
├── LayerControl.Designer.cs
├── LayerControl.cs
├── LayerControl.resx
├── LayerPropertyEditor.Designer.cs
├── LayerPropertyEditor.cs
├── LayerPropertyEditor.resx
├── ListViewColumnSorter.cs
├── MapControl.Designer.cs
├── MapControl.cs
├── MapControl.resx
├── MapLibrary.csproj
├── MapObjectHolder.cs
├── MapPropertyEditor.Designer.cs
├── MapPropertyEditor.cs
├── MapPropertyEditor.resx
├── MapPropertyEditorForm.Designer.cs
├── MapPropertyEditorForm.cs
├── MapPropertyEditorForm.resx
├── MapUtils.cs
├── NavigationHistory.cs
├── NavigationHistoryItem.cs
├── PickerBase.cs
├── ProjectionBrowserDialog.Designer.cs
├── ProjectionBrowserDialog.cs
├── ProjectionBrowserDialog.resx
├── Properties
│ ├── AssemblyInfo.cs
│ ├── Resources.Designer.cs
│ └── Resources.resx
├── QueryMapPropertyEditor.Designer.cs
├── QueryMapPropertyEditor.cs
├── QueryMapPropertyEditor.resx
├── RangeTheme.Designer.cs
├── RangeTheme.cs
├── RangeTheme.resx
├── Resources
│ └── MapManager.ico
├── ScalebarPropertyEditor.Designer.cs
├── ScalebarPropertyEditor.cs
├── ScalebarPropertyEditor.resx
├── SelectList.Designer.cs
├── SelectList.cs
├── SelectList.resx
├── SqlConnectionDialog.Designer.cs
├── SqlConnectionDialog.cs
├── SqlConnectionDialog.resx
├── StyleLibrary.cs
├── StyleLibraryForm.Designer.cs
├── StyleLibraryForm.cs
├── StyleLibraryForm.resx
├── StyleLibraryPropertyEditor.Designer.cs
├── StyleLibraryPropertyEditor.cs
├── StyleLibraryPropertyEditor.resx
├── StylePropertyEditor.Designer.cs
├── StylePropertyEditor.cs
├── StylePropertyEditor.resx
├── SymbolSelectorControl.Designer.cs
├── SymbolSelectorControl.cs
├── SymbolSelectorControl.resx
├── ThemeWizardForm.Designer.cs
├── ThemeWizardForm.cs
├── ThemeWizardForm.resx
├── TreeViewNoImage.cs
└── XmlProxyUrlResolver.cs
├── MapManager.sln
├── MapManager
├── AboutBox.Designer.cs
├── AboutBox.cs
├── AboutBox.resx
├── AppSettings.cs
├── AppSettingsForm.Designer.cs
├── AppSettingsForm.cs
├── AppSettingsForm.resx
├── Images
│ ├── Add24.png
│ ├── Basemap.png
│ ├── Delete24.png
│ ├── Edit.png
│ ├── Globe16.png
│ ├── Help16.png
│ ├── Help24.png
│ ├── MapManager.ico
│ ├── Pan16.png
│ ├── Pan24.png
│ ├── Refresh16.png
│ ├── Refresh24.png
│ ├── Save16.png
│ ├── Save24.png
│ ├── Select.png
│ ├── SelectLine.png
│ ├── SelectPoly.png
│ ├── SelectRect.png
│ ├── Splash-white.png
│ ├── Splash.png
│ ├── Zoomin-16.png
│ ├── Zoomin-24.png
│ ├── Zoomout-16.png
│ └── Zoomout-24.png
├── MainForm.Designer.cs
├── MainForm.cs
├── MainForm.resx
├── MapFileConvertForm.Designer.cs
├── MapFileConvertForm.cs
├── MapFileConvertForm.resx
├── MapManager.csproj
├── MapManager.ico
├── MapfileConfig.xml
├── MapfileConverter.cs
├── Program.cs
├── Properties
│ ├── AssemblyInfo.cs
│ ├── Resources.Designer.cs
│ ├── Resources.resx
│ ├── Settings.Designer.cs
│ └── Settings.settings
├── ScriptConsoleForm.Designer.cs
├── ScriptConsoleForm.cs
├── ScriptConsoleForm.resx
├── SelectListForm.Designer.cs
├── SelectListForm.cs
├── SelectListForm.resx
├── SelectShapeForm.Designer.cs
├── SelectShapeForm.cs
├── SelectShapeForm.resx
├── TileManager
│ ├── BaseLayerTextDialog.Designer.cs
│ ├── BaseLayerTextDialog.cs
│ ├── BaseLayerTextDialog.resx
│ ├── NewPresetConfigDialog.Designer.cs
│ ├── NewPresetConfigDialog.cs
│ ├── NewPresetConfigDialog.resx
│ ├── TileGenerator.cs
│ ├── TileManagerForm.Designer.cs
│ ├── TileManagerForm.cs
│ └── TileManagerForm.resx
└── app.config
├── MapManager2015.sln
├── MapManagerLicense.rtf
├── README.md
├── Templates
├── annotation.map
├── flaeche1.png
├── flaeche1_1.png
├── flaeche2.png
├── flaeche2_1.png
├── flaeche3.png
├── font.list
├── fonts
│ ├── MapServerAnimals.ttf
│ ├── MapServerCarto.ttf
│ ├── MapServerNaturalResources.ttf
│ ├── MapServerParks.ttf
│ ├── MapServerRecreation.ttf
│ ├── MapServerSigns.ttf
│ └── MapServerSports.ttf
├── mmstyles.map
├── new.map
├── schraffur.png
├── stern.png
├── symbols.sym
└── welle.png
├── TileManager
├── Program.cs
├── TileGenerator.csproj
└── app.config
└── help
├── HelpNDoc
└── mapmanager.hnd
└── MapManager.chm
/.gitignore:
--------------------------------------------------------------------------------
1 | /Installer/obj
2 | /Installer/bin
3 | /MapLibrary/bin
4 | /MapLibrary/obj
5 | /MapManager/obj
6 | /MapManager/bin
7 | /TileManager/obj
8 | /TileManager/bin
9 | *.suo
--------------------------------------------------------------------------------
/ExternalFiles/Microsoft.VisualBasic.PowerPacks.Vs.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DMS-Aus/MapManager/1ade260ae172c9f972dcfcc736b789f8c171faf0/ExternalFiles/Microsoft.VisualBasic.PowerPacks.Vs.dll
--------------------------------------------------------------------------------
/ExternalFiles/SciLexer.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DMS-Aus/MapManager/1ade260ae172c9f972dcfcc736b789f8c171faf0/ExternalFiles/SciLexer.dll
--------------------------------------------------------------------------------
/ExternalFiles/ScintillaNet.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DMS-Aus/MapManager/1ade260ae172c9f972dcfcc736b789f8c171faf0/ExternalFiles/ScintillaNet.dll
--------------------------------------------------------------------------------
/ExternalFiles/x64/SciLexer.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DMS-Aus/MapManager/1ade260ae172c9f972dcfcc736b789f8c171faf0/ExternalFiles/x64/SciLexer.dll
--------------------------------------------------------------------------------
/ExternalFiles/x64/ScintillaNet.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DMS-Aus/MapManager/1ade260ae172c9f972dcfcc736b789f8c171faf0/ExternalFiles/x64/ScintillaNet.dll
--------------------------------------------------------------------------------
/ExternalFiles/x86/SciLexer.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DMS-Aus/MapManager/1ade260ae172c9f972dcfcc736b789f8c171faf0/ExternalFiles/x86/SciLexer.dll
--------------------------------------------------------------------------------
/ExternalFiles/x86/ScintillaNet.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DMS-Aus/MapManager/1ade260ae172c9f972dcfcc736b789f8c171faf0/ExternalFiles/x86/ScintillaNet.dll
--------------------------------------------------------------------------------
/Installer/Images/DMS_Logo_150.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DMS-Aus/MapManager/1ade260ae172c9f972dcfcc736b789f8c171faf0/Installer/Images/DMS_Logo_150.jpg
--------------------------------------------------------------------------------
/Installer/Images/DMS_Logo_150.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DMS-Aus/MapManager/1ade260ae172c9f972dcfcc736b789f8c171faf0/Installer/Images/DMS_Logo_150.png
--------------------------------------------------------------------------------
/Installer/Images/DMS_Logo_300.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DMS-Aus/MapManager/1ade260ae172c9f972dcfcc736b789f8c171faf0/Installer/Images/DMS_Logo_300.jpg
--------------------------------------------------------------------------------
/Installer/Images/bannrbmp.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DMS-Aus/MapManager/1ade260ae172c9f972dcfcc736b789f8c171faf0/Installer/Images/bannrbmp.bmp
--------------------------------------------------------------------------------
/Installer/Images/bannrbmp2.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DMS-Aus/MapManager/1ade260ae172c9f972dcfcc736b789f8c171faf0/Installer/Images/bannrbmp2.bmp
--------------------------------------------------------------------------------
/Installer/Images/dlgbmp.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DMS-Aus/MapManager/1ade260ae172c9f972dcfcc736b789f8c171faf0/Installer/Images/dlgbmp.bmp
--------------------------------------------------------------------------------
/Installer/Installer.wixproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Debug
5 | x86
6 | 3.0
7 | {9bb1ab92-cd17-4307-838a-4e192a364383}
8 | 2.0
9 | MapManager
10 | Package
11 | $(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.targets
12 |
13 |
14 | bin\$(Configuration)\
15 | obj\$(Configuration)\
16 | Debug
17 | False
18 |
19 | ICE03;ICE82;ICE83
20 |
21 |
22 | bin\$(Configuration)\
23 | obj\$(Configuration)\
24 | ICE82;ICE03;ICE83
25 | True
26 |
27 |
28 | Debug
29 | False
30 |
31 | ICE03;ICE82;ICE83
32 | bin\$(Configuration)\
33 | obj\$(Configuration)\
34 |
35 |
36 | ICE82;ICE03;ICE83
37 | True
38 | bin\$(Configuration)\
39 | obj\$(Configuration)\
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 | MapManager
48 | {bad5cefe-bb76-4028-84ac-349e78c634eb}
49 | True
50 |
51 |
52 |
53 |
54 | $(WixExtDir)\WixUtilExtension.dll
55 | WixUtilExtension
56 |
57 |
58 | $(WixExtDir)\WixNetFxExtension.dll
59 | WixNetFxExtension
60 |
61 |
62 | $(WixExtDir)\WixUIExtension.dll
63 | WixUIExtension
64 |
65 |
66 |
67 |
75 |
--------------------------------------------------------------------------------
/Installer/mmshell.bat:
--------------------------------------------------------------------------------
1 | @echo off
2 | @echo Setting environment for using the GDAL and MapServer tools.
3 |
4 | SET PATH=%CD%;%PATH%
5 | SET GDAL_DATA=%CD%
6 | SET GDAL_DRIVER_PATH=%CD%\gdalplugins
7 | SET PYTHONPATH=%CD%\python;%CD%\python\osgeo;%CD%\python\scripts
8 | SET PROJ_LIB=%CD%\ProjLib
9 | CD %USERPROFILE%
10 |
--------------------------------------------------------------------------------
/MapLibrary/AddFontForm.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace DMS.MapLibrary
2 | {
3 | partial class AddFontForm
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | this.label5 = new System.Windows.Forms.Label();
32 | this.textBoxFontName = new System.Windows.Forms.TextBox();
33 | this.label6 = new System.Windows.Forms.Label();
34 | this.buttonOK = new System.Windows.Forms.Button();
35 | this.buttonCancel = new System.Windows.Forms.Button();
36 | this.comboBoxFonts = new System.Windows.Forms.ComboBox();
37 | this.SuspendLayout();
38 | //
39 | // label5
40 | //
41 | this.label5.AutoSize = true;
42 | this.label5.Location = new System.Drawing.Point(45, 51);
43 | this.label5.Name = "label5";
44 | this.label5.Size = new System.Drawing.Size(28, 13);
45 | this.label5.TabIndex = 14;
46 | this.label5.Text = "Font";
47 | //
48 | // textBoxFontName
49 | //
50 | this.textBoxFontName.Location = new System.Drawing.Point(79, 14);
51 | this.textBoxFontName.Name = "textBoxFontName";
52 | this.textBoxFontName.Size = new System.Drawing.Size(176, 20);
53 | this.textBoxFontName.TabIndex = 17;
54 | //
55 | // label6
56 | //
57 | this.label6.AutoSize = true;
58 | this.label6.Location = new System.Drawing.Point(14, 17);
59 | this.label6.Name = "label6";
60 | this.label6.Size = new System.Drawing.Size(59, 13);
61 | this.label6.TabIndex = 16;
62 | this.label6.Text = "Font Name";
63 | //
64 | // buttonOK
65 | //
66 | this.buttonOK.Location = new System.Drawing.Point(64, 96);
67 | this.buttonOK.Name = "buttonOK";
68 | this.buttonOK.Size = new System.Drawing.Size(56, 23);
69 | this.buttonOK.TabIndex = 19;
70 | this.buttonOK.Text = "OK";
71 | this.buttonOK.UseVisualStyleBackColor = true;
72 | this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click);
73 | //
74 | // buttonCancel
75 | //
76 | this.buttonCancel.Location = new System.Drawing.Point(151, 96);
77 | this.buttonCancel.Name = "buttonCancel";
78 | this.buttonCancel.Size = new System.Drawing.Size(60, 23);
79 | this.buttonCancel.TabIndex = 20;
80 | this.buttonCancel.Text = "Cancel";
81 | this.buttonCancel.UseVisualStyleBackColor = true;
82 | this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click);
83 | //
84 | // comboBoxFonts
85 | //
86 | this.comboBoxFonts.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
87 | this.comboBoxFonts.FormattingEnabled = true;
88 | this.comboBoxFonts.Location = new System.Drawing.Point(79, 47);
89 | this.comboBoxFonts.Name = "comboBoxFonts";
90 | this.comboBoxFonts.Size = new System.Drawing.Size(176, 21);
91 | this.comboBoxFonts.TabIndex = 21;
92 | //
93 | // AddFontForm
94 | //
95 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
96 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
97 | this.ClientSize = new System.Drawing.Size(272, 131);
98 | this.Controls.Add(this.comboBoxFonts);
99 | this.Controls.Add(this.buttonCancel);
100 | this.Controls.Add(this.buttonOK);
101 | this.Controls.Add(this.textBoxFontName);
102 | this.Controls.Add(this.label6);
103 | this.Controls.Add(this.label5);
104 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
105 | this.Name = "AddFontForm";
106 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
107 | this.Text = "Add New Font";
108 | this.ResumeLayout(false);
109 | this.PerformLayout();
110 |
111 | }
112 |
113 | #endregion
114 |
115 | private System.Windows.Forms.Label label5;
116 | private System.Windows.Forms.TextBox textBoxFontName;
117 | private System.Windows.Forms.Label label6;
118 | private System.Windows.Forms.Button buttonOK;
119 | private System.Windows.Forms.Button buttonCancel;
120 | private System.Windows.Forms.ComboBox comboBoxFonts;
121 | }
122 | }
--------------------------------------------------------------------------------
/MapLibrary/AddFontForm.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.IO;
7 | using System.Text;
8 | using System.Windows.Forms;
9 | using Microsoft.Win32;
10 |
11 | namespace DMS.MapLibrary
12 | {
13 | public partial class AddFontForm : Form
14 | {
15 | RegistryKey fontsKey;
16 | string fontFile;
17 |
18 | public AddFontForm()
19 | {
20 | InitializeComponent();
21 | fontsKey = Registry.LocalMachine.OpenSubKey(@"Software\Microsoft\Windows NT\CurrentVersion\Fonts");
22 | foreach (string font in fontsKey.GetValueNames())
23 | if (font.EndsWith("(TrueType)"))
24 | comboBoxFonts.Items.Add(font);
25 |
26 | fontFile = "";
27 | }
28 |
29 | public string FontName
30 | {
31 | get
32 | {
33 | return textBoxFontName.Text;
34 | }
35 | }
36 |
37 | public string FontFile
38 | {
39 | get
40 | {
41 | return fontFile;
42 | }
43 | }
44 |
45 | private void buttonOK_Click(object sender, EventArgs e)
46 | {
47 | if (textBoxFontName.Text.Trim().Length == 0 || textBoxFontName.Text.Contains(" ") || textBoxFontName.Text.Contains("\t") || textBoxFontName.Text.Contains("#"))
48 | {
49 | MessageBox.Show("Invalid font name",
50 | "MapManager", MessageBoxButtons.OK, MessageBoxIcon.Error);
51 | return;
52 | }
53 |
54 | // get parent of System folder to have Windows folder
55 | DirectoryInfo dirWindowsFolder = Directory.GetParent(Environment.GetFolderPath(Environment.SpecialFolder.System));
56 |
57 | // Concatenate Fonts folder onto Windows folder.
58 | string strFontsFolder = Path.Combine(dirWindowsFolder.FullName, "Fonts");
59 |
60 | fontFile = strFontsFolder + "\\" + fontsKey.GetValue(comboBoxFonts.Text, string.Empty).ToString();
61 |
62 | if (!File.Exists(fontFile))
63 | {
64 | MessageBox.Show("Font file doesn't exist",
65 | "MapManager", MessageBoxButtons.OK, MessageBoxIcon.Error);
66 | return;
67 | }
68 |
69 | DialogResult = DialogResult.OK;
70 | fontsKey.Close();
71 | this.Close();
72 | }
73 |
74 | private void buttonCancel_Click(object sender, EventArgs e)
75 | {
76 | DialogResult = DialogResult.Cancel;
77 | fontsKey.Close();
78 | this.Close();
79 | }
80 | }
81 | }
82 |
--------------------------------------------------------------------------------
/MapLibrary/AddFontForm.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/MapLibrary/AddGraticuleLayerForm.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/MapLibrary/AddStyleCategoryForm.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Diagnostics;
6 | using System.Drawing;
7 | using System.Globalization;
8 | using System.IO;
9 | using System.Text;
10 | using System.Windows.Forms;
11 | using Microsoft.Win32;
12 |
13 | namespace DMS.MapLibrary
14 | {
15 | public partial class AddStyleCategoryForm : Form
16 | {
17 | int charCount;
18 |
19 | public AddStyleCategoryForm(string categoryName)
20 | {
21 | InitializeComponent();
22 |
23 | comboBoxFonts.Items.Add("(Empty Category)");
24 |
25 | textBoxFontCategoryName.Text = categoryName;
26 |
27 | // loading the fontset
28 | if (StyleLibrary.FontsetFileName != null)
29 | {
30 | using (StringReader r = new StringReader(File.ReadAllText(StyleLibrary.FontsetFileName)))
31 | {
32 | string line;
33 | while ((line = r.ReadLine()) != null)
34 | {
35 | string[] vals = line.Split(new char[] { ' ', '\t' }, StringSplitOptions.RemoveEmptyEntries);
36 | if (vals.Length >= 2)
37 | {
38 | comboBoxFonts.Items.Add(vals[0]);
39 | }
40 | }
41 | }
42 | }
43 | comboBoxFonts.SelectedIndex = 0;
44 |
45 | buttonCharMap.Visible = File.Exists(Environment.SystemDirectory + "\\charmap.exe");
46 | }
47 |
48 | public string CategoryName
49 | {
50 | get
51 | {
52 | return textBoxFontCategoryName.Text;
53 | }
54 | }
55 |
56 | public string CategoryType
57 | {
58 | get
59 | {
60 | return comboBoxFonts.Text;
61 | }
62 | }
63 |
64 | public int CharCount
65 | {
66 | get
67 | {
68 | return charCount;
69 | }
70 | }
71 |
72 | private void buttonOK_Click(object sender, EventArgs e)
73 | {
74 | if (comboBoxFonts.SelectedIndex > 0)
75 | {
76 | if (!int.TryParse(textBoxCharCount.Text, out charCount))
77 | {
78 | MessageBox.Show("Invalid number: " + textBoxCharCount.Text, "MapManager", MessageBoxButtons.OK, MessageBoxIcon.Error);
79 | return;
80 | }
81 | }
82 |
83 | DialogResult = DialogResult.OK;
84 | this.Close();
85 | }
86 |
87 | private void buttonCancel_Click(object sender, EventArgs e)
88 | {
89 | DialogResult = DialogResult.Cancel;
90 | this.Close();
91 | }
92 |
93 | private void comboBoxFonts_SelectedIndexChanged(object sender, EventArgs e)
94 | {
95 | if (comboBoxFonts.SelectedIndex > 0)
96 | {
97 | // font category selected
98 | textBoxCharCount.Enabled = true;
99 | buttonCharMap.Enabled = true;
100 |
101 | if (textBoxFontCategoryName.Text == "New Category")
102 | textBoxFontCategoryName.Text = comboBoxFonts.Text;
103 | }
104 | else
105 | {
106 | textBoxCharCount.Enabled = false;
107 | buttonCharMap.Enabled = false;
108 | }
109 | }
110 |
111 | private void buttonCharMap_Click(object sender, EventArgs e)
112 | {
113 | try
114 | {
115 | Process.Start("charmap.exe");
116 | }
117 | catch (Exception ex)
118 | {
119 | MessageBox.Show("Unable to start character map, " + ex.Message, "MapManager", MessageBoxButtons.OK, MessageBoxIcon.Error);
120 | }
121 | }
122 | }
123 | }
124 |
--------------------------------------------------------------------------------
/MapLibrary/AddStyleCategoryForm.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/MapLibrary/AddWMSLayerDetailsForm.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Text;
7 | using System.Windows.Forms;
8 | using OSGeo.MapServer;
9 | using System.Xml;
10 |
11 | namespace DMS.MapLibrary
12 | {
13 | ///
14 | /// Represents a Form for changing the map view.
15 | ///
16 | public partial class AddWMSLayerDetailsForm : Form
17 | {
18 | ///
19 | /// Constructs a new ChangeViewForm class.
20 | ///
21 | public AddWMSLayerDetailsForm(XmlDocument doc, string url, string version)
22 | {
23 | InitializeComponent();
24 |
25 | textBoxServerURL.Text = url;
26 | textBoxVersion.Text = version;
27 |
28 | XmlNode node = doc.SelectSingleNode("//Service");
29 | if (node != null)
30 | {
31 | XmlNode n2 = node.SelectSingleNode("Title");
32 | if (n2 != null)
33 | textBoxServerName.Text = n2.InnerText;
34 | n2 = node.SelectSingleNode("Abstract");
35 | if (n2 != null)
36 | textBoxAbstract.Text = n2.InnerText;
37 | }
38 |
39 | }
40 |
41 | ///
42 | /// Click event handler of the buttonOK control.
43 | ///
44 | /// The source object of this event.
45 | /// The event parameters.
46 | private void buttonOK_Click(object sender, EventArgs e)
47 | {
48 | this.Close();
49 | }
50 |
51 | ///
52 | /// KeyDown event handler of the AddWMSLayerDetailsForm control.
53 | ///
54 | /// The source object of this event.
55 | /// The event parameters.
56 | private void AddWMSLayerDetailsForm_KeyDown(object sender, KeyEventArgs e)
57 | {
58 | if (e.KeyCode == Keys.Escape)
59 | {
60 | this.Close();
61 | }
62 | }
63 | }
64 | }
--------------------------------------------------------------------------------
/MapLibrary/ChangeViewForm.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/MapLibrary/ColorPicker.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Drawing;
3 | using System.Text;
4 | using OSGeo.MapServer;
5 | using System.Windows.Forms;
6 | using System.Drawing.Design;
7 | using System.ComponentModel;
8 | using System.Globalization;
9 |
10 | namespace DMS.MapLibrary
11 | {
12 | ///
13 | /// Represents a Windows picker box that displays Color values.
14 | ///
15 | public class ColorPicker : PickerBase
16 | {
17 | ///
18 | /// Constructor
19 | ///
20 | public ColorPicker()
21 | : base(typeof(Color))
22 | {
23 | Value = Color.White;
24 | // setting up the modal dialog editor (#4430)
25 | Editor = new ColorDialogEditor();
26 | }
27 |
28 | ///
29 | /// Value
30 | ///
31 | public new Color Value
32 | {
33 | get
34 | {
35 | return (Color)base.Value;
36 | }
37 | set
38 | {
39 | base.Value = value;
40 | }
41 | }
42 |
43 | ///
44 | /// Applies the selected color to the given object
45 | ///
46 | /// The object should be updated.
47 | public void ApplyTo(colorObj color)
48 | {
49 | DrawingColor2MapColor(color, Value);
50 | }
51 |
52 | ///
53 | /// Sets the value of the control according to the given object
54 | ///
55 | /// The object representing the color values to be set.
56 | public void SetColor(colorObj color)
57 | {
58 | Value = MapColor2DrawingColor(color);
59 | }
60 |
61 | ///
62 | /// Converts from MapScript color to System.Drawing.Color
63 | ///
64 | /// The object representing the color values to be converted.
65 | /// The converted value
66 | public static Color MapColor2DrawingColor(colorObj color)
67 | {
68 | if (color.red >= 0 && color.green >= 0 && color.blue >= 0)
69 | {
70 | return Color.FromArgb(color.alpha, color.red, color.green, color.blue);
71 | }
72 | else return Color.Empty;
73 | }
74 |
75 | ///
76 | /// Converts from System.Drawing.Color to MapScript color.
77 | ///
78 | /// The object representing the destination object.
79 | /// The value to be converted from
80 | public static void DrawingColor2MapColor(colorObj color, Color source)
81 | {
82 | if (source == Color.Empty)
83 | {
84 | color.red = -1;
85 | color.green = -1;
86 | color.blue = -1;
87 | }
88 | else
89 | {
90 | color.red = source.R;
91 | color.green = source.G;
92 | color.blue = source.B;
93 | color.alpha = source.A;
94 | }
95 | }
96 | }
97 |
98 | ///
99 | /// The UITypeEditor of Color items (for showing the modal dialog box)
100 | ///
101 | internal class ColorDialogEditor : UITypeEditor
102 | {
103 | ///
104 | /// Constructor
105 | ///
106 | public ColorDialogEditor()
107 | {
108 | }
109 |
110 | ///
111 | /// Overloaded. Gets the editor style used by the EditValue method.
112 | ///
113 | /// An ITypeDescriptorContext that can be used to gain additional context information.
114 | /// A UITypeEditorEditStyle value that indicates the style of editor used by the EditValue method.
115 | public override UITypeEditorEditStyle GetEditStyle(ITypeDescriptorContext context)
116 | {
117 | return UITypeEditorEditStyle.Modal;
118 | }
119 |
120 | ///
121 | /// Indicates whether the specified context supports painting a representation of an object's value within the specified context.
122 | ///
123 | /// An ITypeDescriptorContext that can be used to gain additional context information.
124 | /// true if PaintValue is implemented; otherwise, false.
125 | public override bool GetPaintValueSupported(ITypeDescriptorContext context)
126 | {
127 | return true;
128 | }
129 |
130 | ///
131 | /// Paints a representation of the value of an object using the specified PaintValueEventArgs.
132 | ///
133 | /// A PaintValueEventArgs that indicates what to paint and where to paint it.
134 | public override void PaintValue(PaintValueEventArgs e)
135 | {
136 | if (e.Value != null)
137 | {
138 | using (Brush brush = new SolidBrush((Color)e.Value))
139 | {
140 | e.Graphics.FillRectangle(brush, e.Bounds);
141 | }
142 | }
143 | }
144 |
145 | ///
146 | /// Showing the modal color dialog box
147 | ///
148 | ///
149 | ///
150 | ///
151 | ///
152 | public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
153 | {
154 | ColorDialog dialog = new ColorDialog();
155 | dialog.Color = (Color)value;
156 | if (dialog.ShowDialog() == DialogResult.OK)
157 | {
158 | return dialog.Color;
159 | }
160 | return value;
161 | }
162 | }
163 | }
164 |
--------------------------------------------------------------------------------
/MapLibrary/ColorRampForm.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Text;
7 | using System.Windows.Forms;
8 | using OSGeo.MapServer;
9 |
10 | namespace DMS.MapLibrary
11 | {
12 | ///
13 | /// Represents a Form for creating a color ramp.
14 | ///
15 | internal partial class ColorRampForm : Form
16 | {
17 | ColorRampEditor editor;
18 | ColorRampValueList values;
19 | ///
20 | /// Constructs a new NewColorRampForm class.
21 | ///
22 | public ColorRampForm(ColorRampEditor editor, string key)
23 | {
24 | this.editor = editor;
25 |
26 | InitializeComponent();
27 | if (key != null && ColorRampConverter.ColorRampList.ContainsKey(key))
28 | {
29 | values = ColorRampConverter.ColorRampList[key];
30 | this.Text = "Edit Colour Ramp";
31 | textBoxName.Text = key;
32 | textBoxName.Enabled = false;
33 | if (values.ContainsKey(0))
34 | colorPickerStart.Value = values[0];
35 | if (values.ContainsKey(100))
36 | colorPickerEnd.Value = values[100];
37 | }
38 | else
39 | {
40 | values = new ColorRampValueList();
41 | values.Add(0, colorPickerStart.Value);
42 | values.Add(100, colorPickerEnd.Value);
43 | }
44 |
45 | comboBoxStyle.DataSource = Enum.GetValues(typeof(ColorRampStyle));
46 | comboBoxStyle.SelectedItem = ColorRampStyle.Gradient;
47 | UpdateState();
48 | UpdatePreview();
49 | }
50 |
51 | public ColorRampValueList Value
52 | {
53 | get
54 | {
55 | values.Text = textBoxName.Text;
56 | return values;
57 | }
58 | }
59 |
60 | private void UpdateState()
61 | {
62 | buttonRemove.Enabled = buttonEdit.Enabled = (listViewStops.SelectedItems.Count > 0);
63 | }
64 |
65 | private void UpdatePreview()
66 | {
67 | Bitmap image = new Bitmap(pictureBoxPreview.Size.Width, pictureBoxPreview.Size.Height);
68 | editor.PaintValue(values, Graphics.FromImage(image), pictureBoxPreview.ClientRectangle);
69 | pictureBoxPreview.Image = image;
70 |
71 | listViewStops.Items.Clear();
72 | imageListPreview.Images.Clear();
73 | for (int i = 1; i < values.Count - 1; i++)
74 | {
75 | Bitmap image2 = new Bitmap(16, 16);
76 | using (Graphics gfx = Graphics.FromImage(image2))
77 | using (SolidBrush brush = new SolidBrush(values.Values[i]))
78 | {
79 | gfx.FillRectangle(brush, 0, 0, 16, 16);
80 | }
81 | imageListPreview.Images.Add(image2);
82 | string colorName = new ColorConverter().ConvertToInvariantString(values.Values[i]);
83 | ListViewItem item = new ListViewItem(colorName, i - 1);
84 | item.SubItems.Add(values.Keys[i].ToString());
85 | item.Tag = values.Keys[i];
86 | listViewStops.Items.Add(item);
87 | }
88 |
89 | listViewStops.SmallImageList = imageListPreview;
90 | }
91 |
92 | private void colorPickerStart_ValueChanged(object sender, EventArgs e)
93 | {
94 | values.Remove(0);
95 | values.Add(0, colorPickerStart.Value);
96 | UpdatePreview();
97 | }
98 |
99 | private void colorPickerEnd_ValueChanged(object sender, EventArgs e)
100 | {
101 | values.Remove(100);
102 | values.Add(100, colorPickerEnd.Value);
103 | UpdatePreview();
104 | }
105 |
106 | private void comboBoxStyle_SelectedIndexChanged(object sender, EventArgs e)
107 | {
108 | values.Style = (ColorRampStyle)comboBoxStyle.SelectedItem;
109 | UpdatePreview();
110 | }
111 |
112 | private void buttonAdd_Click(object sender, EventArgs e)
113 | {
114 | ColorStopForm form = new ColorStopForm(values, -1);
115 | if (form.ShowDialog(this) == DialogResult.OK)
116 | {
117 | UpdatePreview();
118 | UpdateState();
119 | }
120 | }
121 |
122 | private void buttonEdit_Click(object sender, EventArgs e)
123 | {
124 | ColorStopForm form = new ColorStopForm(values, listViewStops.SelectedItems[0].Index + 1);
125 | if (form.ShowDialog(this) == DialogResult.OK)
126 | {
127 | UpdatePreview();
128 | UpdateState();
129 | }
130 | }
131 |
132 | private void buttonRemove_Click(object sender, EventArgs e)
133 | {
134 | foreach (ListViewItem item in listViewStops.SelectedItems)
135 | {
136 | values.Remove((double)item.Tag);
137 | }
138 | UpdatePreview();
139 | UpdateState();
140 | }
141 |
142 | private void listViewStops_SelectedIndexChanged(object sender, EventArgs e)
143 | {
144 | UpdateState();
145 | }
146 | }
147 | }
--------------------------------------------------------------------------------
/MapLibrary/ColorStopForm.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Text;
7 | using System.Windows.Forms;
8 |
9 | namespace DMS.MapLibrary
10 | {
11 | public partial class ColorStopForm : Form
12 | {
13 | ColorRampValueList values;
14 | int index;
15 |
16 | public ColorStopForm(ColorRampValueList values, int index)
17 | {
18 | this.values = values;
19 | this.index = index;
20 | InitializeComponent();
21 |
22 | if (index >= 0)
23 | {
24 | colorPickerStopColor.Value = values.Values[index];
25 | textBoxOffset.Text = values.Keys[index].ToString();
26 | }
27 | }
28 |
29 | private void buttonOK_Click(object sender, EventArgs e)
30 | {
31 | double value;
32 | if (!Double.TryParse(textBoxOffset.Text, out value) || value < 0 || value > 100)
33 | {
34 | MessageBox.Show("Invalid offset value",
35 | "MapManager", MessageBoxButtons.OK, MessageBoxIcon.Error);
36 | return;
37 | }
38 |
39 | if (index >=0)
40 | {
41 | double key = values.Keys[index];
42 | values.Remove(key);
43 | }
44 | else if (values.ContainsKey(value))
45 | values.Remove(value);
46 |
47 | values.Add(value, colorPickerStopColor.Value);
48 |
49 | DialogResult = DialogResult.OK;
50 | this.Close();
51 | }
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/MapLibrary/ColorStopForm.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/MapLibrary/CredentialsForm.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Text;
7 | using System.Windows.Forms;
8 | using System.Net;
9 |
10 | namespace DMS.MapLibrary
11 | {
12 | ///
13 | /// Represents a form to get the WMS authentication settings
14 | ///
15 | public partial class CredentialsForm : Form
16 | {
17 | XmlProxyUrlResolver resolver;
18 | public CredentialsForm(string message, XmlProxyUrlResolver resolver)
19 | {
20 | InitializeComponent();
21 | this.resolver = resolver;
22 | labelMessage.Text = message;
23 | NetworkCredential cred = (NetworkCredential)resolver.GetCredentials();
24 | if (cred != null)
25 | {
26 | textBoxUser.Text = cred.UserName;
27 | textBoxPassword.Text = cred.Password;
28 | checkBoxUseServer.Checked = true;
29 | }
30 | else
31 | checkBoxUseServer.Checked = false;
32 |
33 | comboBoxType.SelectedItem = resolver.ProxyType;
34 |
35 | WebProxy proxy = (WebProxy)resolver.Proxy;
36 | if (proxy != null)
37 | {
38 | textBoxServer.Text = proxy.Address.Host;
39 | textBoxPort.Text = proxy.Address.Port.ToString();
40 | NetworkCredential cred2 = (NetworkCredential)proxy.Credentials;
41 | if (cred2 != null)
42 | {
43 | textBoxProxyUser.Text = cred2.UserName;
44 | textBoxProxyPassword.Text = cred2.Password;
45 | }
46 | checkBoxUseProxy.Checked = true;
47 | }
48 | else
49 | checkBoxUseProxy.Checked = false;
50 |
51 | UpdateControls();
52 | }
53 |
54 | private void UpdateControls()
55 | {
56 | textBoxUser.Enabled = textBoxPassword.Enabled = checkBoxUseServer.Checked;
57 | textBoxProxyUser.Enabled = textBoxProxyPassword.Enabled =
58 | textBoxServer.Enabled = textBoxPort.Enabled = comboBoxType.Enabled = checkBoxUseProxy.Checked;
59 | }
60 |
61 | ///
62 | /// CheckedChanged event handler of the checkBoxUseServer control.
63 | ///
64 | /// The source object of this event.
65 | /// The event parameters.
66 | private void checkBoxUseServer_CheckedChanged(object sender, EventArgs e)
67 | {
68 | UpdateControls();
69 | }
70 |
71 | ///
72 | /// CheckedChanged event handler of the checkBoxUseProxy control.
73 | ///
74 | /// The source object of this event.
75 | /// The event parameters.
76 | private void checkBoxUseProxy_CheckedChanged(object sender, EventArgs e)
77 | {
78 | UpdateControls();
79 | }
80 |
81 | ///
82 | /// Common function to validate the integer values in the textBox controls. Called by the textBox event handlers.
83 | ///
84 | /// The source object of this event.
85 | /// The event parameters.
86 | private void ValidateInteger(object sender, CancelEventArgs e)
87 | {
88 | int result;
89 | if (!int.TryParse(((TextBoxBase)sender).Text, out result))
90 | {
91 | MessageBox.Show("Invalid integer number", "MapManager", MessageBoxButtons.OK, MessageBoxIcon.Error);
92 | e.Cancel = true;
93 | }
94 | }
95 |
96 | ///
97 | /// Click event handler of the buttonOK control.
98 | ///
99 | /// The source object of this event.
100 | /// The event parameters.
101 | private void buttonOK_Click(object sender, EventArgs e)
102 | {
103 | try
104 | {
105 | if (checkBoxUseServer.Checked)
106 | resolver.Credentials = new NetworkCredential(textBoxUser.Text, textBoxPassword.Text);
107 | else
108 | resolver.Credentials = null;
109 |
110 | resolver.ProxyType = comboBoxType.Text;
111 |
112 | if (checkBoxUseProxy.Checked)
113 | {
114 | WebProxy proxy = new WebProxy();
115 | UriBuilder uri = new UriBuilder(comboBoxType.Text, textBoxServer.Text, int.Parse(textBoxPort.Text));
116 | proxy.Address = uri.Uri;
117 | proxy.Credentials = resolver.ProxyCredentials =
118 | new NetworkCredential(textBoxProxyUser.Text, textBoxProxyPassword.Text);
119 | resolver.Proxy = proxy;
120 | }
121 | else
122 | {
123 | resolver.Proxy = null;
124 | resolver.ProxyCredentials = null;
125 | }
126 | }
127 | catch (Exception ex)
128 | {
129 | MessageBox.Show(ex.Message,
130 | "MapManager", MessageBoxButtons.OK, MessageBoxIcon.Error);
131 | return;
132 | }
133 | this.DialogResult = DialogResult.OK;
134 | this.Close();
135 | }
136 |
137 | ///
138 | /// KeyDown event handler of the CredentialsForm control.
139 | ///
140 | /// The source object of this event.
141 | /// The event parameters.
142 | private void CredentialsForm_KeyDown(object sender, KeyEventArgs e)
143 | {
144 | if (e.KeyCode == Keys.Escape)
145 | {
146 | this.Close();
147 | }
148 | }
149 | }
150 | }
151 |
--------------------------------------------------------------------------------
/MapLibrary/CredentialsForm.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/MapLibrary/Cursors/GrabberTool.cur:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DMS-Aus/MapManager/1ade260ae172c9f972dcfcc736b789f8c171faf0/MapLibrary/Cursors/GrabberTool.cur
--------------------------------------------------------------------------------
/MapLibrary/Cursors/SelectPolygonTool.cur:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DMS-Aus/MapManager/1ade260ae172c9f972dcfcc736b789f8c171faf0/MapLibrary/Cursors/SelectPolygonTool.cur
--------------------------------------------------------------------------------
/MapLibrary/Cursors/SelectRectTool.cur:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DMS-Aus/MapManager/1ade260ae172c9f972dcfcc736b789f8c171faf0/MapLibrary/Cursors/SelectRectTool.cur
--------------------------------------------------------------------------------
/MapLibrary/Cursors/SelectTool.cur:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DMS-Aus/MapManager/1ade260ae172c9f972dcfcc736b789f8c171faf0/MapLibrary/Cursors/SelectTool.cur
--------------------------------------------------------------------------------
/MapLibrary/Cursors/ZoomInTool.cur:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DMS-Aus/MapManager/1ade260ae172c9f972dcfcc736b789f8c171faf0/MapLibrary/Cursors/ZoomInTool.cur
--------------------------------------------------------------------------------
/MapLibrary/Cursors/ZoomOutTool.cur:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DMS-Aus/MapManager/1ade260ae172c9f972dcfcc736b789f8c171faf0/MapLibrary/Cursors/ZoomOutTool.cur
--------------------------------------------------------------------------------
/MapLibrary/EventProvider.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace DMS.MapLibrary
6 | {
7 | ///
8 | /// Common class to propagate the error messages for recording ang logging purposes.
9 | ///
10 | public static class EventProvider
11 | {
12 | ///
13 | /// Enum for The user editing modes (panning or zooming).
14 | ///
15 | public enum EventTypes
16 | {
17 | ///
18 | /// Error type
19 | ///
20 | Error,
21 | ///
22 | /// Warning type
23 | ///
24 | Warning,
25 | ///
26 | /// Information type
27 | ///
28 | Information
29 | }
30 | ///
31 | /// The signature of the EventMessage event handler. Raised when an event is happening within the application.
32 | ///
33 | public delegate void EventMessageEventHandler(object sender, string Message, EventTypes type);
34 |
35 | ///
36 | /// The EventMessage event handler. Raised when an event is happening within the application.
37 | ///
38 | public static event EventMessageEventHandler EventMessage;
39 |
40 | public static void RaiseEventMessage(object sender, string Message, EventTypes type)
41 | {
42 | if (EventMessage != null)
43 | {
44 | EventMessage(sender, Message, type);
45 | }
46 | }
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/MapLibrary/FieldSelectionForm.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace DMS.MapLibrary
2 | {
3 | partial class FieldSelectionForm
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | this.labelItem = new System.Windows.Forms.Label();
32 | this.buttonOK = new System.Windows.Forms.Button();
33 | this.buttonCancel = new System.Windows.Forms.Button();
34 | this.listBoxItems = new System.Windows.Forms.ListBox();
35 | this.SuspendLayout();
36 | //
37 | // labelItem
38 | //
39 | this.labelItem.AutoSize = true;
40 | this.labelItem.Location = new System.Drawing.Point(12, 16);
41 | this.labelItem.Name = "labelItem";
42 | this.labelItem.Size = new System.Drawing.Size(62, 13);
43 | this.labelItem.TabIndex = 14;
44 | this.labelItem.Text = "Select Field";
45 | //
46 | // buttonOK
47 | //
48 | this.buttonOK.Location = new System.Drawing.Point(40, 161);
49 | this.buttonOK.Name = "buttonOK";
50 | this.buttonOK.Size = new System.Drawing.Size(56, 23);
51 | this.buttonOK.TabIndex = 19;
52 | this.buttonOK.Text = "OK";
53 | this.buttonOK.UseVisualStyleBackColor = true;
54 | this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click);
55 | //
56 | // buttonCancel
57 | //
58 | this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
59 | this.buttonCancel.Location = new System.Drawing.Point(127, 161);
60 | this.buttonCancel.Name = "buttonCancel";
61 | this.buttonCancel.Size = new System.Drawing.Size(60, 23);
62 | this.buttonCancel.TabIndex = 20;
63 | this.buttonCancel.Text = "Cancel";
64 | this.buttonCancel.UseVisualStyleBackColor = true;
65 | //
66 | // listBoxItems
67 | //
68 | this.listBoxItems.FormattingEnabled = true;
69 | this.listBoxItems.Location = new System.Drawing.Point(15, 33);
70 | this.listBoxItems.Name = "listBoxItems";
71 | this.listBoxItems.Size = new System.Drawing.Size(197, 121);
72 | this.listBoxItems.TabIndex = 21;
73 | this.listBoxItems.SelectedIndexChanged += new System.EventHandler(this.listBoxItems_SelectedIndexChanged);
74 | //
75 | // FIeldSelectionForm
76 | //
77 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
78 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
79 | this.ClientSize = new System.Drawing.Size(224, 196);
80 | this.Controls.Add(this.listBoxItems);
81 | this.Controls.Add(this.buttonCancel);
82 | this.Controls.Add(this.buttonOK);
83 | this.Controls.Add(this.labelItem);
84 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
85 | this.Name = "FIeldSelectionForm";
86 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
87 | this.Text = "Field Selection";
88 | this.ResumeLayout(false);
89 | this.PerformLayout();
90 |
91 | }
92 |
93 | #endregion
94 |
95 | private System.Windows.Forms.Label labelItem;
96 | private System.Windows.Forms.Button buttonOK;
97 | private System.Windows.Forms.Button buttonCancel;
98 | private System.Windows.Forms.ListBox listBoxItems;
99 | }
100 | }
--------------------------------------------------------------------------------
/MapLibrary/FieldSelectionForm.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Text;
7 | using System.Windows.Forms;
8 | using OSGeo.MapServer;
9 |
10 | namespace DMS.MapLibrary
11 | {
12 | public partial class FieldSelectionForm : Form
13 | {
14 | public FieldSelectionForm(layerObj layer, string msg)
15 | {
16 | InitializeComponent();
17 | labelItem.Text = msg;
18 | layer.open();
19 | for (int i = 0; i < layer.numitems; i++)
20 | {
21 | listBoxItems.Items.Add(layer.getItem(i));
22 | }
23 | layer.close();
24 | buttonOK.Enabled = false;
25 | }
26 |
27 | public string SelectedItem
28 | {
29 | get
30 | {
31 | return listBoxItems.SelectedItem.ToString();
32 | }
33 | }
34 |
35 | private void buttonOK_Click(object sender, EventArgs e)
36 | {
37 | DialogResult = DialogResult.OK;
38 | this.Close();
39 | }
40 |
41 | private void listBoxItems_SelectedIndexChanged(object sender, EventArgs e)
42 | {
43 | buttonOK.Enabled = true;
44 | }
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/MapLibrary/FontsetPicker.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Drawing;
3 | using System.Text;
4 | using OSGeo.MapServer;
5 | using System.Drawing.Design;
6 | using System.ComponentModel;
7 |
8 | namespace DMS.MapLibrary
9 | {
10 | ///
11 | /// Represents a Windows picker box that displays Font values.
12 | ///
13 | public class FontsetPicker : PickerBase
14 | {
15 | ///
16 | /// Constructor
17 | ///
18 | public FontsetPicker()
19 | : base(typeof(string))
20 | {
21 | Value = "";
22 | TextEditable = false;
23 | PaintValueFrame = false;
24 | PaintValueWidth = 40;
25 | }
26 |
27 | ///
28 | /// Set the fontset based on a MapScript fontSetObj object.
29 | ///
30 | /// The MapScript fontSetObj object.
31 | public void SetFontset(fontSetObj fontset)
32 | {
33 | Editor = new FontsetEditor(fontset);
34 | }
35 |
36 | ///
37 | /// Value
38 | ///
39 | public new string Value
40 | {
41 | get
42 | {
43 | return (string)base.Value;
44 | }
45 | set
46 | {
47 | base.Value = value;
48 | }
49 | }
50 | }
51 |
52 | ///
53 | /// The UITypeEditor of Fontset items
54 | ///
55 | internal class FontsetEditor : UITypeEditor
56 | {
57 | fontSetObj fontset;
58 | ///
59 | /// Constructor
60 | ///
61 | public FontsetEditor(fontSetObj fontset)
62 | {
63 | this.fontset = fontset;
64 | }
65 |
66 | ///
67 | /// Overloaded. Gets the editor style used by the EditValue method.
68 | ///
69 | /// An ITypeDescriptorContext that can be used to gain additional context information.
70 | /// A UITypeEditorEditStyle value that indicates the style of editor used by the EditValue method.
71 | public override UITypeEditorEditStyle GetEditStyle(ITypeDescriptorContext context)
72 | {
73 | return UITypeEditorEditStyle.None;
74 | }
75 |
76 | ///
77 | /// Indicates whether the specified context supports painting a representation of an object's value within the specified context.
78 | ///
79 | /// An ITypeDescriptorContext that can be used to gain additional context information.
80 | /// true if PaintValue is implemented; otherwise, false.
81 | public override bool GetPaintValueSupported(ITypeDescriptorContext context)
82 | {
83 | return true;
84 | }
85 |
86 | ///
87 | /// Paints a representation of the value of an object using the specified PaintValueEventArgs.
88 | ///
89 | /// A PaintValueEventArgs that indicates what to paint and where to paint it.
90 | public override void PaintValue(PaintValueEventArgs e)
91 | {
92 | if (e.Value != null)
93 | {
94 | //DashStyle style = (DashStyle)e.Value;
95 | //Rectangle bounds = e.Bounds;
96 |
97 | //int y = bounds.Y + bounds.Height / 2;
98 | //Point start = new Point(bounds.Left, y);
99 | //Point end = new Point(bounds.Right, y);
100 |
101 | //Pen pen = new Pen(SystemColors.WindowText);
102 | //pen.DashStyle = style;
103 | //pen.Width = 2;
104 | //Brush brush = new SolidBrush(SystemColors.Window);
105 | //try
106 | //{
107 | // GraphicsState state = e.Graphics.Save();
108 | // e.Graphics.FillRectangle(brush, bounds);
109 | // e.Graphics.DrawLine(pen, start, end);
110 | // e.Graphics.Restore(state);
111 | //}
112 | //finally
113 | //{
114 | // pen.Dispose();
115 | // brush.Dispose();
116 | //}
117 | }
118 | }
119 | }
120 | }
121 |
--------------------------------------------------------------------------------
/MapLibrary/IMapControl.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace DMS.MapLibrary
6 | {
7 | ///
8 | /// The signature of the EditProperties event handler. Raised when a MapScript object should be edited by the corresponding editor UserControl.
9 | ///
10 | public delegate void EditPropertiesEventHandler(object sender, MapObjectHolder target);
11 |
12 | ///
13 | /// Common interface for the Controls to control the parameters of a MapScript target object.
14 | ///
15 | public interface IMapControl
16 | {
17 | ///
18 | /// Refresh the View of the Control according to the state of the target object.
19 | ///
20 | void RefreshView();
21 |
22 | ///
23 | /// Gets and sets the target object to be controlled
24 | ///
25 | MapObjectHolder Target
26 | {
27 | get;
28 | set;
29 | }
30 |
31 | ///
32 | /// The EditProperties event handler. Raised when a MapScript object should be edited by the corresponding editor UserControl.
33 | ///
34 | event EditPropertiesEventHandler EditProperties;
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/MapLibrary/IPropertyEditor.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace DMS.MapLibrary
6 | {
7 | ///
8 | /// Common interface for the Controls to edit the properties of a MapScript target object.
9 | ///
10 | public interface IPropertyEditor : IMapControl
11 | {
12 | ///
13 | /// Update the values of the target object according to the Editor controls state.
14 | ///
15 | void UpdateValues();
16 |
17 | ///
18 | /// Cancel the pending changes in the underlying object.
19 | ///
20 | void CancelEditing();
21 |
22 | ///
23 | /// Returns the modified state of the Editor.
24 | ///
25 | /// The current modified state.
26 | bool IsDirty();
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/MapLibrary/IWizard.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace DMS.MapLibrary
6 | {
7 | ///
8 | /// Common interface for the Wizard Controls.
9 | ///
10 | public interface IWizard
11 | {
12 | ///
13 | /// Selecting a new page of the Wizard.
14 | ///
15 | /// The page number to be selected.
16 | void SelectPage(int page);
17 |
18 | ///
19 | /// Invoke the finish action of the Wizard.
20 | ///
21 | void Finish();
22 |
23 | ///
24 | /// Returns the page count of the Wizard.
25 | ///
26 | /// The total number of the pages.
27 | int GetPageCount();
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/MapLibrary/Images/DataConnection.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DMS-Aus/MapManager/1ade260ae172c9f972dcfcc736b789f8c171faf0/MapLibrary/Images/DataConnection.png
--------------------------------------------------------------------------------
/MapLibrary/Images/Map.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DMS-Aus/MapManager/1ade260ae172c9f972dcfcc736b789f8c171faf0/MapLibrary/Images/Map.png
--------------------------------------------------------------------------------
/MapLibrary/Images/Map_Legend.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DMS-Aus/MapManager/1ade260ae172c9f972dcfcc736b789f8c171faf0/MapLibrary/Images/Map_Legend.png
--------------------------------------------------------------------------------
/MapLibrary/Images/Map_Legend_Big.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DMS-Aus/MapManager/1ade260ae172c9f972dcfcc736b789f8c171faf0/MapLibrary/Images/Map_Legend_Big.png
--------------------------------------------------------------------------------
/MapLibrary/Images/Refresh16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DMS-Aus/MapManager/1ade260ae172c9f972dcfcc736b789f8c171faf0/MapLibrary/Images/Refresh16.png
--------------------------------------------------------------------------------
/MapLibrary/Images/add.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DMS-Aus/MapManager/1ade260ae172c9f972dcfcc736b789f8c171faf0/MapLibrary/Images/add.png
--------------------------------------------------------------------------------
/MapLibrary/Images/down.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DMS-Aus/MapManager/1ade260ae172c9f972dcfcc736b789f8c171faf0/MapLibrary/Images/down.png
--------------------------------------------------------------------------------
/MapLibrary/Images/group.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DMS-Aus/MapManager/1ade260ae172c9f972dcfcc736b789f8c171faf0/MapLibrary/Images/group.PNG
--------------------------------------------------------------------------------
/MapLibrary/Images/raster.ICO:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DMS-Aus/MapManager/1ade260ae172c9f972dcfcc736b789f8c171faf0/MapLibrary/Images/raster.ICO
--------------------------------------------------------------------------------
/MapLibrary/Images/remove.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DMS-Aus/MapManager/1ade260ae172c9f972dcfcc736b789f8c171faf0/MapLibrary/Images/remove.png
--------------------------------------------------------------------------------
/MapLibrary/Images/up.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DMS-Aus/MapManager/1ade260ae172c9f972dcfcc736b789f8c171faf0/MapLibrary/Images/up.png
--------------------------------------------------------------------------------
/MapLibrary/ListViewColumnSorter.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Windows.Forms;
3 |
4 | namespace DMS.MapLibrary
5 | {
6 |
7 | ///
8 | /// This class is an implementation of the 'IComparer' interface.
9 | ///
10 | public class ListViewColumnSorter : IComparer
11 | {
12 | ///
13 | /// Specifies the column to be sorted
14 | ///
15 | private int ColumnToSort;
16 | ///
17 | /// Specifies the order in which to sort (i.e. 'Ascending').
18 | ///
19 | private SortOrder OrderOfSort;
20 | ///
21 | /// Case insensitive comparer object
22 | ///
23 | private CaseInsensitiveComparer ObjectCompare;
24 | ///
25 | /// The type of the column to be sorted
26 | ///
27 | private System.Type ColumnType;
28 |
29 | ///
30 | /// Class constructor. Initializes various elements
31 | ///
32 | public ListViewColumnSorter()
33 | {
34 | // Initialize the column to '0'
35 | ColumnToSort = 0;
36 |
37 | // Initialize the sort order to 'none'
38 | OrderOfSort = SortOrder.None;
39 |
40 | // Initialize the CaseInsensitiveComparer object
41 | ObjectCompare = new CaseInsensitiveComparer();
42 |
43 | // Initialize the column type (default to string)
44 | ColumnType = null;
45 | }
46 |
47 | ///
48 | /// This method is inherited from the IComparer interface. It compares the two objects passed using a case insensitive comparison.
49 | ///
50 | /// First object to be compared
51 | /// Second object to be compared
52 | /// The result of the comparison. "0" if equal, negative if 'x' is less than 'y' and positive if 'x' is greater than 'y'
53 | public int Compare(object x, object y)
54 | {
55 | int compareResult;
56 | ListViewItem listviewX, listviewY;
57 |
58 | // Cast the objects to be compared to ListViewItem objects
59 | listviewX = (ListViewItem)x;
60 | listviewY = (ListViewItem)y;
61 |
62 | // Compare the two items
63 | if (ColumnType == null)
64 | compareResult = ObjectCompare.Compare(listviewX.SubItems[ColumnToSort].Text, listviewY.SubItems[ColumnToSort].Text);
65 | else
66 | compareResult = ObjectCompare.Compare(
67 | System.Convert.ChangeType(listviewX.SubItems[ColumnToSort].Text, ColumnType),
68 | System.Convert.ChangeType(listviewY.SubItems[ColumnToSort].Text, ColumnType));
69 |
70 | // Calculate correct return value based on object comparison
71 | if (OrderOfSort == SortOrder.Ascending)
72 | {
73 | // Ascending sort is selected, return normal result of compare operation
74 | return compareResult;
75 | }
76 | else if (OrderOfSort == SortOrder.Descending)
77 | {
78 | // Descending sort is selected, return negative result of compare operation
79 | return (-compareResult);
80 | }
81 | else
82 | {
83 | // Return '0' to indicate they are equal
84 | return 0;
85 | }
86 | }
87 |
88 | ///
89 | /// Gets or sets the number of the column to which to apply the sorting operation (Defaults to '0').
90 | ///
91 | public int SortColumn
92 | {
93 | set
94 | {
95 | ColumnToSort = value;
96 | }
97 | get
98 | {
99 | return ColumnToSort;
100 | }
101 | }
102 |
103 | ///
104 | /// Gets or sets the number of the column to which to apply the sorting operation (Defaults to '0').
105 | ///
106 | public System.Type SortColumnType
107 | {
108 | set
109 | {
110 | ColumnType = value;
111 | }
112 | get
113 | {
114 | return ColumnType;
115 | }
116 | }
117 |
118 | ///
119 | /// Gets or sets the order of sorting to apply (for example, 'Ascending' or 'Descending').
120 | ///
121 | public SortOrder Order
122 | {
123 | set
124 | {
125 | OrderOfSort = value;
126 | }
127 | get
128 | {
129 | return OrderOfSort;
130 | }
131 | }
132 |
133 | }
134 | }
--------------------------------------------------------------------------------
/MapLibrary/MapControl.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace DMS.MapLibrary
2 | {
3 | partial class MapControl
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Component Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | this.components = new System.ComponentModel.Container();
32 | this.timerRefresh = new System.Windows.Forms.Timer(this.components);
33 | this.SuspendLayout();
34 | //
35 | // timerRefresh
36 | //
37 | this.timerRefresh.Interval = 1000;
38 | this.timerRefresh.Tick += new System.EventHandler(this.timerRefresh_Tick);
39 | //
40 | // MapControl
41 | //
42 | this.DoubleClick += new System.EventHandler(this.MapControl_DoubleClick);
43 | this.MouseMove += new System.Windows.Forms.MouseEventHandler(this.MapControl_MouseMove);
44 | this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.MapControl_MouseDown);
45 | this.MouseUp += new System.Windows.Forms.MouseEventHandler(this.MapControl_MouseUp);
46 | this.SizeChanged += new System.EventHandler(this.MapControl_SizeChanged);
47 | this.ResumeLayout(false);
48 |
49 | }
50 |
51 | #endregion
52 |
53 | private System.Windows.Forms.Timer timerRefresh;
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/MapLibrary/MapPropertyEditor.Designer.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DMS-Aus/MapManager/1ade260ae172c9f972dcfcc736b789f8c171faf0/MapLibrary/MapPropertyEditor.Designer.cs
--------------------------------------------------------------------------------
/MapLibrary/MapPropertyEditorForm.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace DMS.MapLibrary
2 | {
3 | partial class MapPropertyEditorForm
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | this.buttonOK = new System.Windows.Forms.Button();
32 | this.buttonCancel = new System.Windows.Forms.Button();
33 | this.buttonApply = new System.Windows.Forms.Button();
34 | this.SuspendLayout();
35 | //
36 | // buttonOK
37 | //
38 | this.buttonOK.Anchor = System.Windows.Forms.AnchorStyles.Top;
39 | this.buttonOK.DialogResult = System.Windows.Forms.DialogResult.OK;
40 | this.buttonOK.Location = new System.Drawing.Point(43, 197);
41 | this.buttonOK.Name = "buttonOK";
42 | this.buttonOK.Size = new System.Drawing.Size(75, 23);
43 | this.buttonOK.TabIndex = 1;
44 | this.buttonOK.Text = "OK";
45 | this.buttonOK.UseVisualStyleBackColor = true;
46 | this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click);
47 | //
48 | // buttonCancel
49 | //
50 | this.buttonCancel.Anchor = System.Windows.Forms.AnchorStyles.Top;
51 | this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
52 | this.buttonCancel.Location = new System.Drawing.Point(157, 197);
53 | this.buttonCancel.Name = "buttonCancel";
54 | this.buttonCancel.Size = new System.Drawing.Size(75, 23);
55 | this.buttonCancel.TabIndex = 2;
56 | this.buttonCancel.Text = "Cancel";
57 | this.buttonCancel.UseVisualStyleBackColor = true;
58 | this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click);
59 | //
60 | // buttonApply
61 | //
62 | this.buttonApply.Anchor = System.Windows.Forms.AnchorStyles.Top;
63 | this.buttonApply.Location = new System.Drawing.Point(268, 197);
64 | this.buttonApply.Name = "buttonApply";
65 | this.buttonApply.Size = new System.Drawing.Size(75, 23);
66 | this.buttonApply.TabIndex = 3;
67 | this.buttonApply.Text = "Apply";
68 | this.buttonApply.UseVisualStyleBackColor = true;
69 | this.buttonApply.Click += new System.EventHandler(this.buttonApply_Click);
70 | //
71 | // MapPropertyEditorForm
72 | //
73 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
74 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
75 | this.AutoSize = true;
76 | this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
77 | this.ClientSize = new System.Drawing.Size(388, 229);
78 | this.Controls.Add(this.buttonApply);
79 | this.Controls.Add(this.buttonCancel);
80 | this.Controls.Add(this.buttonOK);
81 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
82 | this.KeyPreview = true;
83 | this.MaximizeBox = false;
84 | this.MinimizeBox = false;
85 | this.Name = "MapPropertyEditorForm";
86 | this.ShowIcon = false;
87 | this.ShowInTaskbar = false;
88 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
89 | this.Text = "Map Properties";
90 | this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.MapPropertyEditorForm_KeyDown);
91 | this.ResumeLayout(false);
92 |
93 | }
94 |
95 | #endregion
96 |
97 | private System.Windows.Forms.Button buttonOK;
98 | private System.Windows.Forms.Button buttonCancel;
99 | private System.Windows.Forms.Button buttonApply;
100 | }
101 | }
--------------------------------------------------------------------------------
/MapLibrary/MapUtils.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DMS-Aus/MapManager/1ade260ae172c9f972dcfcc736b789f8c171faf0/MapLibrary/MapUtils.cs
--------------------------------------------------------------------------------
/MapLibrary/NavigationHistory.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace DMS.MapLibrary
7 | {
8 | public class NavigationHistory
9 | {
10 | int current;
11 | private List history;
12 | public NavigationHistory()
13 | {
14 | history = new List();
15 | current = -1;
16 | }
17 |
18 | public void Add(NavigationHistoryItem item)
19 | {
20 | if (++current < history.Count)
21 | history.RemoveRange(current, history.Count - current);
22 | history.Add(item);
23 | }
24 |
25 | public void First()
26 | {
27 | if (history.Count > 0)
28 | current = 0;
29 | }
30 |
31 | public bool HasNext()
32 | {
33 | return (history.Count > 0) && (current != history.Count - 1);
34 | }
35 |
36 | public void Next()
37 | {
38 | if (HasNext())
39 | {
40 | ++current;
41 | }
42 | }
43 |
44 | public bool HasPrevious()
45 | {
46 | return current > 0;
47 | }
48 |
49 | public void Previous()
50 | {
51 | if (HasPrevious())
52 | {
53 | --current;
54 | }
55 | }
56 |
57 | public NavigationHistoryItem Current
58 | {
59 | get
60 | {
61 | return history[current];
62 | }
63 | }
64 |
65 | public NavigationHistoryItem this[int number]
66 | {
67 | get
68 | {
69 | if (number >= 0 && number < history.Count)
70 | {
71 | return history[number];
72 | }
73 | else
74 | throw new ArgumentOutOfRangeException();
75 | }
76 | set
77 | {
78 | if (number >= 0 && number < history.Count)
79 | {
80 | history[number] = value;
81 | }
82 | else
83 | throw new ArgumentOutOfRangeException();
84 | }
85 | }
86 |
87 | public void Clear()
88 | {
89 | history.Clear();
90 | current = -1;
91 | }
92 | }
93 | }
94 |
--------------------------------------------------------------------------------
/MapLibrary/NavigationHistoryItem.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using OSGeo.MapServer;
6 |
7 | namespace DMS.MapLibrary
8 | {
9 | public class NavigationHistoryItem
10 | {
11 | private double minx;
12 | private double miny;
13 | private double maxx;
14 | private double maxy;
15 | public NavigationHistoryItem(rectObj extent)
16 | {
17 | minx = extent.minx;
18 | miny = extent.miny;
19 | maxx = extent.maxx;
20 | maxy = extent.maxy;
21 | }
22 |
23 | public void Apply(mapObj map)
24 | {
25 | map.setExtent(minx, miny, maxx, maxy);
26 | }
27 |
28 | public rectObj GetExtent()
29 | {
30 | return new rectObj(minx, miny, maxx, maxy, 0);
31 | }
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/MapLibrary/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("MapLibrary")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("Digital Mapping Solutions")]
12 | [assembly: AssemblyProduct("MapLibrary")]
13 | [assembly: AssemblyCopyright("Copyright © Digital Mapping Solutions 2018")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("76b7c072-ce82-473f-a224-a7d24152ba22")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Revision and Build Numbers
33 | // by using the '*' as shown below:
34 | [assembly: AssemblyVersion("1.3.0.0")]
35 | [assembly: AssemblyFileVersion("1.3.0.0")]
36 |
--------------------------------------------------------------------------------
/MapLibrary/QueryMapPropertyEditor.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace DMS.MapLibrary
2 | {
3 | partial class QueryMapPropertyEditor
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Component Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | this.colorDialog = new System.Windows.Forms.ColorDialog();
32 | this.label8 = new System.Windows.Forms.Label();
33 | this.comboBoxStatus = new System.Windows.Forms.ComboBox();
34 | this.label4 = new System.Windows.Forms.Label();
35 | this.comboBoxStyle = new System.Windows.Forms.ComboBox();
36 | this.label5 = new System.Windows.Forms.Label();
37 | this.colorPickerColor = new DMS.MapLibrary.ColorPicker();
38 | this.SuspendLayout();
39 | //
40 | // label8
41 | //
42 | this.label8.AutoSize = true;
43 | this.label8.Location = new System.Drawing.Point(33, 17);
44 | this.label8.Name = "label8";
45 | this.label8.Size = new System.Drawing.Size(40, 13);
46 | this.label8.TabIndex = 0;
47 | this.label8.Text = "Colour:";
48 | //
49 | // comboBoxStatus
50 | //
51 | this.comboBoxStatus.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
52 | this.comboBoxStatus.FormattingEnabled = true;
53 | this.comboBoxStatus.Location = new System.Drawing.Point(77, 40);
54 | this.comboBoxStatus.Name = "comboBoxStatus";
55 | this.comboBoxStatus.Size = new System.Drawing.Size(232, 21);
56 | this.comboBoxStatus.TabIndex = 3;
57 | this.comboBoxStatus.SelectedIndexChanged += new System.EventHandler(this.ValueChanged);
58 | //
59 | // label4
60 | //
61 | this.label4.AutoSize = true;
62 | this.label4.Location = new System.Drawing.Point(35, 43);
63 | this.label4.Name = "label4";
64 | this.label4.Size = new System.Drawing.Size(40, 13);
65 | this.label4.TabIndex = 2;
66 | this.label4.Text = "Status:";
67 | //
68 | // comboBoxStyle
69 | //
70 | this.comboBoxStyle.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
71 | this.comboBoxStyle.FormattingEnabled = true;
72 | this.comboBoxStyle.Location = new System.Drawing.Point(77, 67);
73 | this.comboBoxStyle.Name = "comboBoxStyle";
74 | this.comboBoxStyle.Size = new System.Drawing.Size(232, 21);
75 | this.comboBoxStyle.TabIndex = 5;
76 | this.comboBoxStyle.SelectedIndexChanged += new System.EventHandler(this.ValueChanged);
77 | //
78 | // label5
79 | //
80 | this.label5.AutoSize = true;
81 | this.label5.Location = new System.Drawing.Point(40, 70);
82 | this.label5.Name = "label5";
83 | this.label5.Size = new System.Drawing.Size(33, 13);
84 | this.label5.TabIndex = 4;
85 | this.label5.Text = "Style:";
86 | //
87 | // colorPickerColor
88 | //
89 | this.colorPickerColor.BackColor = System.Drawing.SystemColors.Window;
90 | this.colorPickerColor.Context = null;
91 | this.colorPickerColor.ForeColor = System.Drawing.SystemColors.WindowText;
92 | this.colorPickerColor.Location = new System.Drawing.Point(75, 14);
93 | this.colorPickerColor.Name = "colorPickerColor";
94 | this.colorPickerColor.ReadOnly = false;
95 | this.colorPickerColor.Size = new System.Drawing.Size(234, 20);
96 | this.colorPickerColor.TabIndex = 1;
97 | this.colorPickerColor.Text = "White";
98 | this.colorPickerColor.Value = System.Drawing.Color.White;
99 | this.colorPickerColor.ValueChanged += new System.EventHandler(this.ValueChanged);
100 | //
101 | // QueryMapPropertyEditor
102 | //
103 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
104 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
105 | this.Controls.Add(this.comboBoxStyle);
106 | this.Controls.Add(this.label5);
107 | this.Controls.Add(this.comboBoxStatus);
108 | this.Controls.Add(this.label4);
109 | this.Controls.Add(this.colorPickerColor);
110 | this.Controls.Add(this.label8);
111 | this.Name = "QueryMapPropertyEditor";
112 | this.Size = new System.Drawing.Size(350, 104);
113 | this.ResumeLayout(false);
114 | this.PerformLayout();
115 |
116 | }
117 |
118 | #endregion
119 |
120 | private System.Windows.Forms.ColorDialog colorDialog;
121 | private ColorPicker colorPickerColor;
122 | private System.Windows.Forms.Label label8;
123 | private System.Windows.Forms.ComboBox comboBoxStatus;
124 | private System.Windows.Forms.Label label4;
125 | private System.Windows.Forms.ComboBox comboBoxStyle;
126 | private System.Windows.Forms.Label label5;
127 | }
128 | }
129 |
--------------------------------------------------------------------------------
/MapLibrary/QueryMapPropertyEditor.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Drawing;
5 | using System.Data;
6 | using System.Text;
7 | using System.Windows.Forms;
8 | using System.IO;
9 | using OSGeo.MapServer;
10 |
11 | namespace DMS.MapLibrary
12 | {
13 | ///
14 | /// Represents a UserControl for editing the MapScript scalebarObj parameters.
15 | ///
16 | public partial class QueryMapPropertyEditor : UserControl, IPropertyEditor
17 | {
18 | private MapObjectHolder target;
19 | private queryMapObj queryMap;
20 | private bool dirtyFlag;
21 | private mapObj map;
22 |
23 | ///
24 | /// Constructs a new ScalebarPropertyEditor object.
25 | ///
26 | public QueryMapPropertyEditor()
27 | {
28 | InitializeComponent();
29 | }
30 |
31 | ///
32 | /// Sets the modify flag of the editor.
33 | ///
34 | /// The modify flag to be set.
35 | private void SetDirty(bool dirty)
36 | {
37 | dirtyFlag = dirty;
38 | if (dirty)
39 | {
40 | if (target != null)
41 | target.RaisePropertyChanging(this);
42 | }
43 | }
44 |
45 | ///
46 | /// Update the scalebar object according to the current Editor state.
47 | ///
48 | /// The object to be updated.
49 | private void Update(queryMapObj queryMap)
50 | {
51 | if (comboBoxStatus.SelectedItem.ToString() == "MS_ON")
52 | queryMap.status = mapscript.MS_ON;
53 | else
54 | queryMap.status = mapscript.MS_OFF;
55 |
56 | queryMap.style = (int)comboBoxStyle.SelectedItem;
57 |
58 | this.colorPickerColor.ApplyTo(queryMap.color);
59 | }
60 |
61 | #region IPropertyEditor Members
62 |
63 | ///
64 | /// Cancel the pending changes in the underlying object.
65 | ///
66 | public void CancelEditing()
67 | {
68 | }
69 |
70 | ///
71 | /// Update the preview according to the current Editor state.
72 | /// In case of the preview a temporary object will only be updated.
73 | ///
74 | public void UpdateValues()
75 | {
76 | if (queryMap == null)
77 | return;
78 | if (dirtyFlag)
79 | {
80 | Update(this.queryMap);
81 |
82 | if (target != null)
83 | target.RaisePropertyChanged(this);
84 | SetDirty(false);
85 | }
86 | }
87 |
88 | ///
89 | /// Returns the modified state of the Editor.
90 | ///
91 | /// The current modified state.
92 | public bool IsDirty()
93 | {
94 | return dirtyFlag;
95 | }
96 |
97 | #endregion
98 |
99 | #region IMapControl Members
100 |
101 | ///
102 | /// Refresh the controls according to the underlying object.
103 | ///
104 | public void RefreshView()
105 | {
106 | if (queryMap == null)
107 | return;
108 |
109 | comboBoxStatus.Items.AddRange(new object[] { "MS_ON", "MS_OFF"});
110 | if (queryMap.status == mapscript.MS_ON)
111 | comboBoxStatus.SelectedItem = "MS_ON";
112 | else
113 | comboBoxStatus.SelectedItem = "MS_OFF";
114 |
115 | comboBoxStyle.DataSource = Enum.GetValues(typeof(MS_QUERYMAP_STYLES));
116 | comboBoxStyle.SelectedItem = (MS_QUERYMAP_STYLES)queryMap.style;
117 |
118 |
119 | this.colorPickerColor.SetColor(queryMap.color);
120 |
121 | SetDirty(false);
122 | }
123 |
124 | ///
125 | /// Gets and sets the target object of the editor.
126 | ///
127 | public MapObjectHolder Target
128 | {
129 | get
130 | {
131 | return target;
132 | }
133 | set
134 | {
135 | if (value != null)
136 | {
137 | if (value.GetType() != typeof(queryMapObj))
138 | throw new ApplicationException("Invalid object type.");
139 | queryMap = value;
140 | target = value;
141 |
142 | // tracking down the root object
143 | map = target.GetParent();
144 |
145 | RefreshView();
146 | SetDirty(false);
147 | return;
148 | }
149 | queryMap = null;
150 | target = null;
151 | map = null;
152 | }
153 | }
154 |
155 | ///
156 | /// The EditProperties event handler. Called when a child object should be edited
157 | ///
158 | public event EditPropertiesEventHandler EditProperties = delegate { };
159 |
160 | #endregion
161 |
162 | ///
163 | /// Common function to sign that a value have been changed.
164 | ///
165 | /// The source object of this event.
166 | /// The event parameters.
167 | private void ValueChanged(object sender, EventArgs e)
168 | {
169 | SetDirty(true);
170 | }
171 | }
172 | }
173 |
--------------------------------------------------------------------------------
/MapLibrary/RangeTheme.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/MapLibrary/Resources/MapManager.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DMS-Aus/MapManager/1ade260ae172c9f972dcfcc736b789f8c171faf0/MapLibrary/Resources/MapManager.ico
--------------------------------------------------------------------------------
/MapLibrary/SymbolSelectorControl.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace DMS.MapLibrary
2 | {
3 | partial class SymbolSelectorControl
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Component Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | this.components = new System.ComponentModel.Container();
32 | this.listView = new System.Windows.Forms.ListView();
33 | this.imageList = new System.Windows.Forms.ImageList(this.components);
34 | this.listViewPreview = new System.Windows.Forms.ListView();
35 | this.SuspendLayout();
36 | //
37 | // listView
38 | //
39 | this.listView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
40 | | System.Windows.Forms.AnchorStyles.Left)
41 | | System.Windows.Forms.AnchorStyles.Right)));
42 | this.listView.Font = new System.Drawing.Font("Microsoft Sans Serif", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
43 | this.listView.GridLines = true;
44 | this.listView.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None;
45 | this.listView.HideSelection = false;
46 | this.listView.Location = new System.Drawing.Point(0, 0);
47 | this.listView.MultiSelect = false;
48 | this.listView.Name = "listView";
49 | this.listView.ShowGroups = false;
50 | this.listView.ShowItemToolTips = true;
51 | this.listView.Size = new System.Drawing.Size(205, 175);
52 | this.listView.TabIndex = 0;
53 | this.listView.TileSize = new System.Drawing.Size(36, 36);
54 | this.listView.UseCompatibleStateImageBehavior = false;
55 | this.listView.SelectedIndexChanged += new System.EventHandler(this.listView_SelectedIndexChanged);
56 | //
57 | // imageList
58 | //
59 | this.imageList.ColorDepth = System.Windows.Forms.ColorDepth.Depth32Bit;
60 | this.imageList.ImageSize = new System.Drawing.Size(16, 16);
61 | this.imageList.TransparentColor = System.Drawing.Color.Transparent;
62 | //
63 | // listViewPreview
64 | //
65 | this.listViewPreview.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
66 | this.listViewPreview.Font = new System.Drawing.Font("Microsoft Sans Serif", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
67 | this.listViewPreview.GridLines = true;
68 | this.listViewPreview.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None;
69 | this.listViewPreview.Location = new System.Drawing.Point(210, 0);
70 | this.listViewPreview.MultiSelect = false;
71 | this.listViewPreview.Name = "listViewPreview";
72 | this.listViewPreview.Scrollable = false;
73 | this.listViewPreview.ShowGroups = false;
74 | this.listViewPreview.ShowItemToolTips = true;
75 | this.listViewPreview.Size = new System.Drawing.Size(60, 60);
76 | this.listViewPreview.TabIndex = 1;
77 | this.listViewPreview.TabStop = false;
78 | this.listViewPreview.TileSize = new System.Drawing.Size(36, 36);
79 | this.listViewPreview.UseCompatibleStateImageBehavior = false;
80 | //
81 | // SymbolSelectorControl
82 | //
83 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
84 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
85 | this.Controls.Add(this.listViewPreview);
86 | this.Controls.Add(this.listView);
87 | this.Name = "SymbolSelectorControl";
88 | this.Size = new System.Drawing.Size(274, 175);
89 | this.ResumeLayout(false);
90 |
91 | }
92 |
93 | #endregion
94 |
95 | private System.Windows.Forms.ListView listView;
96 | private System.Windows.Forms.ImageList imageList;
97 | private System.Windows.Forms.ListView listViewPreview;
98 | }
99 | }
100 |
--------------------------------------------------------------------------------
/MapLibrary/ThemeWizardForm.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/MapLibrary/TreeViewNoImage.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 | using System.Windows.Forms;
5 | using System.Drawing;
6 | using System.Drawing.Drawing2D;
7 |
8 | namespace DMS.MapLibrary
9 | {
10 | public class TreeViewNoImage : TreeView
11 | {
12 | public const int NOIMAGE = -1;
13 |
14 | public TreeViewNoImage()
15 | : base()
16 | {
17 | // .NET Bug: Unless LineColor is set, Win32 treeview returns -1 (default), .NET returns Color.Black!
18 | base.LineColor = SystemColors.GrayText;
19 |
20 | base.DrawMode = TreeViewDrawMode.OwnerDrawAll;
21 | }
22 |
23 | protected override void OnDrawNode(DrawTreeNodeEventArgs e)
24 | {
25 | const int SPACE_IL = 3; // space between Image and Label
26 |
27 | // we only do additional drawing
28 | e.DrawDefault = true;
29 |
30 | base.OnDrawNode(e);
31 |
32 | if (base.ShowLines && base.ImageList != null && e.Node.ImageIndex == NOIMAGE
33 | // exclude root nodes, if root lines are disabled
34 | //&& (base.ShowRootLines || e.Node.Level > 0))
35 | )
36 | {
37 | // Using lines & images, but this node has none: fill up missing treelines
38 |
39 | // Image size
40 | int imgW = base.ImageList.ImageSize.Width;
41 | int imgH = base.ImageList.ImageSize.Height;
42 |
43 | // Image center
44 | int xPos = e.Node.Bounds.Left - SPACE_IL - imgW / 2;
45 | int yPos = (e.Node.Bounds.Top + e.Node.Bounds.Bottom) / 2;
46 |
47 | // Image rect
48 | Rectangle imgRect = new Rectangle(xPos, yPos, 0, 0);
49 | imgRect.Inflate(imgW / 2, imgH / 2);
50 |
51 | using (Pen p = new Pen(base.LineColor, 1))
52 | {
53 | p.DashStyle = DashStyle.Dot;
54 |
55 | // account uneven Indent for both lines
56 | p.DashOffset = base.Indent % 2;
57 |
58 | // Horizontal treeline across width of image
59 | // account uneven half of delta ItemHeight & ImageHeight
60 | int yHor = yPos + ((base.ItemHeight - imgRect.Height) / 2) % 2;
61 |
62 | //if (base.ShowRootLines || e.Node.Level > 0)
63 | //{
64 | // e.Graphics.DrawLine(p, imgRect.Left, yHor, imgRect.Right, yHor);
65 | //}
66 | //else
67 | //{
68 | // // for root nodes, if root lines are disabled, start at center
69 | // e.Graphics.DrawLine(p, xPos - (int)p.DashOffset, yHor, imgRect.Right, yHor);
70 | //}
71 |
72 | e.Graphics.DrawLine(p,
73 | (base.ShowRootLines || e.Node.Level > 0) ? imgRect.Left : xPos - (int)p.DashOffset,
74 | yHor, imgRect.Right, yHor);
75 |
76 |
77 | if (!base.CheckBoxes && e.Node.IsExpanded)
78 | {
79 | // Vertical treeline , offspring from NodeImage center to e.Node.Bounds.Bottom
80 | // yStartPos: account uneven Indent and uneven half of delta ItemHeight & ImageHeight
81 | int yVer = yHor + (int)p.DashOffset;
82 | e.Graphics.DrawLine(p, xPos, yVer, xPos, e.Node.Bounds.Bottom);
83 | }
84 | }
85 | }
86 | }
87 |
88 | protected override void OnAfterCollapse(TreeViewEventArgs e)
89 | {
90 | base.OnAfterCollapse(e);
91 |
92 | if (!base.CheckBoxes && base.ImageList != null && e.Node.ImageIndex == NOIMAGE)
93 | {
94 | // DrawNode event not raised: redraw node with collapsed treeline
95 | base.Invalidate(e.Node.Bounds);
96 | }
97 | }
98 |
99 | }
100 | }
101 |
--------------------------------------------------------------------------------
/MapLibrary/XmlProxyUrlResolver.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 | using System.Xml;
5 | using System.Net;
6 |
7 | namespace DMS.MapLibrary
8 | {
9 | ///
10 | /// XmlProxyUrlResolver Class
11 | ///
12 | public class XmlProxyUrlResolver : XmlResolver
13 | {
14 | ICredentials serverCredentials;
15 | ICredentials proxyCredentials;
16 | IWebProxy proxy;
17 | string proxyType = "http";
18 |
19 | public IWebProxy Proxy
20 | {
21 | get
22 | {
23 | return proxy;
24 | }
25 | set
26 | {
27 | proxy = value;
28 | }
29 | }
30 |
31 | public ICredentials GetCredentials()
32 | {
33 | return serverCredentials;
34 | }
35 |
36 | public ICredentials GetProxyCredentials()
37 | {
38 | return proxyCredentials;
39 | }
40 |
41 | public string ProxyType
42 | {
43 | get { return proxyType; }
44 | set { proxyType = value; }
45 | }
46 |
47 | public override object GetEntity(Uri absoluteUri, string role, Type ofObjectToReturn)
48 | {
49 | WebRequest req = WebRequest.Create(absoluteUri);
50 | req.Proxy = proxy;
51 | req.Credentials = serverCredentials;
52 | return req.GetResponse().GetResponseStream();
53 | }
54 |
55 |
56 | public override ICredentials Credentials
57 | {
58 | set { serverCredentials = value; }
59 | }
60 |
61 | public ICredentials ProxyCredentials
62 | {
63 | set { proxyCredentials = value; }
64 | }
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/MapManager/AboutBox.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/MapManager/Images/Add24.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DMS-Aus/MapManager/1ade260ae172c9f972dcfcc736b789f8c171faf0/MapManager/Images/Add24.png
--------------------------------------------------------------------------------
/MapManager/Images/Basemap.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DMS-Aus/MapManager/1ade260ae172c9f972dcfcc736b789f8c171faf0/MapManager/Images/Basemap.png
--------------------------------------------------------------------------------
/MapManager/Images/Delete24.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DMS-Aus/MapManager/1ade260ae172c9f972dcfcc736b789f8c171faf0/MapManager/Images/Delete24.png
--------------------------------------------------------------------------------
/MapManager/Images/Edit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DMS-Aus/MapManager/1ade260ae172c9f972dcfcc736b789f8c171faf0/MapManager/Images/Edit.png
--------------------------------------------------------------------------------
/MapManager/Images/Globe16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DMS-Aus/MapManager/1ade260ae172c9f972dcfcc736b789f8c171faf0/MapManager/Images/Globe16.png
--------------------------------------------------------------------------------
/MapManager/Images/Help16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DMS-Aus/MapManager/1ade260ae172c9f972dcfcc736b789f8c171faf0/MapManager/Images/Help16.png
--------------------------------------------------------------------------------
/MapManager/Images/Help24.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DMS-Aus/MapManager/1ade260ae172c9f972dcfcc736b789f8c171faf0/MapManager/Images/Help24.png
--------------------------------------------------------------------------------
/MapManager/Images/MapManager.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DMS-Aus/MapManager/1ade260ae172c9f972dcfcc736b789f8c171faf0/MapManager/Images/MapManager.ico
--------------------------------------------------------------------------------
/MapManager/Images/Pan16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DMS-Aus/MapManager/1ade260ae172c9f972dcfcc736b789f8c171faf0/MapManager/Images/Pan16.png
--------------------------------------------------------------------------------
/MapManager/Images/Pan24.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DMS-Aus/MapManager/1ade260ae172c9f972dcfcc736b789f8c171faf0/MapManager/Images/Pan24.png
--------------------------------------------------------------------------------
/MapManager/Images/Refresh16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DMS-Aus/MapManager/1ade260ae172c9f972dcfcc736b789f8c171faf0/MapManager/Images/Refresh16.png
--------------------------------------------------------------------------------
/MapManager/Images/Refresh24.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DMS-Aus/MapManager/1ade260ae172c9f972dcfcc736b789f8c171faf0/MapManager/Images/Refresh24.png
--------------------------------------------------------------------------------
/MapManager/Images/Save16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DMS-Aus/MapManager/1ade260ae172c9f972dcfcc736b789f8c171faf0/MapManager/Images/Save16.png
--------------------------------------------------------------------------------
/MapManager/Images/Save24.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DMS-Aus/MapManager/1ade260ae172c9f972dcfcc736b789f8c171faf0/MapManager/Images/Save24.png
--------------------------------------------------------------------------------
/MapManager/Images/Select.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DMS-Aus/MapManager/1ade260ae172c9f972dcfcc736b789f8c171faf0/MapManager/Images/Select.png
--------------------------------------------------------------------------------
/MapManager/Images/SelectLine.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DMS-Aus/MapManager/1ade260ae172c9f972dcfcc736b789f8c171faf0/MapManager/Images/SelectLine.png
--------------------------------------------------------------------------------
/MapManager/Images/SelectPoly.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DMS-Aus/MapManager/1ade260ae172c9f972dcfcc736b789f8c171faf0/MapManager/Images/SelectPoly.png
--------------------------------------------------------------------------------
/MapManager/Images/SelectRect.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DMS-Aus/MapManager/1ade260ae172c9f972dcfcc736b789f8c171faf0/MapManager/Images/SelectRect.png
--------------------------------------------------------------------------------
/MapManager/Images/Splash-white.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DMS-Aus/MapManager/1ade260ae172c9f972dcfcc736b789f8c171faf0/MapManager/Images/Splash-white.png
--------------------------------------------------------------------------------
/MapManager/Images/Splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DMS-Aus/MapManager/1ade260ae172c9f972dcfcc736b789f8c171faf0/MapManager/Images/Splash.png
--------------------------------------------------------------------------------
/MapManager/Images/Zoomin-16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DMS-Aus/MapManager/1ade260ae172c9f972dcfcc736b789f8c171faf0/MapManager/Images/Zoomin-16.png
--------------------------------------------------------------------------------
/MapManager/Images/Zoomin-24.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DMS-Aus/MapManager/1ade260ae172c9f972dcfcc736b789f8c171faf0/MapManager/Images/Zoomin-24.png
--------------------------------------------------------------------------------
/MapManager/Images/Zoomout-16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DMS-Aus/MapManager/1ade260ae172c9f972dcfcc736b789f8c171faf0/MapManager/Images/Zoomout-16.png
--------------------------------------------------------------------------------
/MapManager/Images/Zoomout-24.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DMS-Aus/MapManager/1ade260ae172c9f972dcfcc736b789f8c171faf0/MapManager/Images/Zoomout-24.png
--------------------------------------------------------------------------------
/MapManager/MapFileConvertForm.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace DMS.MapManager
2 | {
3 | partial class MapFileConvertForm
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | this.buttonOK = new System.Windows.Forms.Button();
32 | this.buttonCancel = new System.Windows.Forms.Button();
33 | this.textBoxMessage = new System.Windows.Forms.TextBox();
34 | this.label1 = new System.Windows.Forms.Label();
35 | this.label2 = new System.Windows.Forms.Label();
36 | this.SuspendLayout();
37 | //
38 | // buttonOK
39 | //
40 | this.buttonOK.DialogResult = System.Windows.Forms.DialogResult.Yes;
41 | this.buttonOK.Location = new System.Drawing.Point(119, 335);
42 | this.buttonOK.Name = "buttonOK";
43 | this.buttonOK.Size = new System.Drawing.Size(75, 23);
44 | this.buttonOK.TabIndex = 1;
45 | this.buttonOK.Text = "Yes";
46 | this.buttonOK.UseVisualStyleBackColor = true;
47 | //
48 | // buttonCancel
49 | //
50 | this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.No;
51 | this.buttonCancel.Location = new System.Drawing.Point(222, 335);
52 | this.buttonCancel.Name = "buttonCancel";
53 | this.buttonCancel.Size = new System.Drawing.Size(75, 23);
54 | this.buttonCancel.TabIndex = 2;
55 | this.buttonCancel.Text = "No";
56 | this.buttonCancel.UseVisualStyleBackColor = true;
57 | //
58 | // textBoxMessage
59 | //
60 | this.textBoxMessage.Location = new System.Drawing.Point(13, 63);
61 | this.textBoxMessage.Multiline = true;
62 | this.textBoxMessage.Name = "textBoxMessage";
63 | this.textBoxMessage.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
64 | this.textBoxMessage.Size = new System.Drawing.Size(396, 234);
65 | this.textBoxMessage.TabIndex = 3;
66 | //
67 | // label1
68 | //
69 | this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
70 | this.label1.Location = new System.Drawing.Point(13, 13);
71 | this.label1.Name = "label1";
72 | this.label1.Size = new System.Drawing.Size(396, 37);
73 | this.label1.TabIndex = 4;
74 | this.label1.Text = "This mapfile requires the following changes to make it compatible with this version of MapManager";
75 | this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
76 | //
77 | // label2
78 | //
79 | this.label2.AutoSize = true;
80 | this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
81 | this.label2.Location = new System.Drawing.Point(97, 305);
82 | this.label2.Name = "label2";
83 | this.label2.Size = new System.Drawing.Size(214, 16);
84 | this.label2.TabIndex = 5;
85 | this.label2.Text = "Do you wish to apply the changes?";
86 | //
87 | // MapFileConvertForm
88 | //
89 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
90 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
91 | this.ClientSize = new System.Drawing.Size(421, 370);
92 | this.Controls.Add(this.label2);
93 | this.Controls.Add(this.label1);
94 | this.Controls.Add(this.textBoxMessage);
95 | this.Controls.Add(this.buttonCancel);
96 | this.Controls.Add(this.buttonOK);
97 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
98 | this.KeyPreview = true;
99 | this.MaximizeBox = false;
100 | this.MinimizeBox = false;
101 | this.Name = "MapFileConvertForm";
102 | this.ShowIcon = false;
103 | this.ShowInTaskbar = false;
104 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
105 | this.Text = "Mapfile Conversion Tool";
106 | this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.MapFileConvertForm_KeyDown);
107 | this.ResumeLayout(false);
108 | this.PerformLayout();
109 |
110 | }
111 |
112 | #endregion
113 |
114 | private System.Windows.Forms.Button buttonOK;
115 | private System.Windows.Forms.Button buttonCancel;
116 | private System.Windows.Forms.TextBox textBoxMessage;
117 | private System.Windows.Forms.Label label1;
118 | private System.Windows.Forms.Label label2;
119 | }
120 | }
--------------------------------------------------------------------------------
/MapManager/MapFileConvertForm.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Text;
7 | using System.Windows.Forms;
8 | using System.IO;
9 |
10 | namespace DMS.MapManager
11 | {
12 | ///
13 | /// A form for displaying mapfile conversion information.
14 | ///
15 | public partial class MapFileConvertForm : Form
16 | {
17 | ///
18 | /// Constructs a new MapFileConvertForm object.
19 | ///
20 | /// The property bag for holding the settings.
21 | public MapFileConvertForm(string message)
22 | {
23 | InitializeComponent();
24 | textBoxMessage.Text = message;
25 | }
26 |
27 | ///
28 | /// KeyDown event handler for the MapFileConvertForm object.
29 | ///
30 | /// The source object of thi
31 | private void MapFileConvertForm_KeyDown(object sender, KeyEventArgs e)
32 | {
33 | if (e.KeyCode == Keys.Escape)
34 | {
35 | this.Close();
36 | }
37 | }
38 | }
39 | }
--------------------------------------------------------------------------------
/MapManager/MapManager.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DMS-Aus/MapManager/1ade260ae172c9f972dcfcc736b789f8c171faf0/MapManager/MapManager.ico
--------------------------------------------------------------------------------
/MapManager/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Windows.Forms;
4 | using System.IO;
5 |
6 | namespace DMS.MapManager
7 | {
8 | static class Program
9 | {
10 | public static MainForm frmMain = null;
11 |
12 | ///
13 | /// The main entry point for the application.
14 | ///
15 | [STAThread]
16 | static void Main(string[] args)
17 | {
18 | // setting the current directory equal to the executing directory
19 | if (Environment.CurrentDirectory != Application.StartupPath)
20 | {
21 | Environment.CurrentDirectory = Application.StartupPath;
22 | }
23 |
24 | // post setup install actions
25 | if (args.Length > 0)
26 | {
27 | if (args[0] == "/postinstall")
28 | {
29 | ReplaceFiles();
30 | return;
31 | }
32 | else if (args[0] == "/replace")
33 | {
34 | ReplaceFiles();
35 | }
36 | }
37 |
38 | Application.EnableVisualStyles();
39 | Application.SetCompatibleTextRenderingDefault(false);
40 |
41 | frmMain = new MainForm();
42 | Application.Run(frmMain);
43 | }
44 |
45 | static void ReplaceFiles()
46 | {
47 | String strFile = File.ReadAllText("templates\\new.map");
48 | strFile = strFile.Replace("FONTSET \"font.list\"", "FONTSET \"" + (Application.StartupPath + "\\templates\\font.list\"").Replace("\\", "\\\\"));
49 | strFile = strFile.Replace("SYMBOLSET \"symbols.sym\"", "SYMBOLSET \"" + (Application.StartupPath + "\\templates\\symbols.sym\"").Replace("\\", "\\\\"));
50 | File.WriteAllText("templates\\new.map", strFile);
51 |
52 | // set references in mmstyles.map
53 | strFile = File.ReadAllText("templates\\mmstyles.map");
54 | strFile = strFile.Replace("FONTSET \"font.list\"", "FONTSET \"" + (Application.StartupPath + "\\templates\\font.list\"").Replace("\\", "\\\\"));
55 | strFile = strFile.Replace("SYMBOLSET \"symbols.sym\"", "SYMBOLSET \"" + (Application.StartupPath + "\\templates\\symbols.sym\"").Replace("\\", "\\\\"));
56 | File.WriteAllText("templates\\mmstyles.map", strFile);
57 |
58 | // set references in annotation.map
59 | strFile = File.ReadAllText("templates\\annotation.map");
60 | strFile = strFile.Replace("FONTSET \"font.list\"", "FONTSET \"" + (Application.StartupPath + "\\templates\\font.list\"").Replace("\\", "\\\\"));
61 | strFile = strFile.Replace("SYMBOLSET \"symbols.sym\"", "SYMBOLSET \"" + (Application.StartupPath + "\\templates\\symbols.sym\"").Replace("\\", "\\\\"));
62 | File.WriteAllText("templates\\annotation.map", strFile);
63 | }
64 | }
65 | }
--------------------------------------------------------------------------------
/MapManager/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("MapServer MapManager")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("DMS")]
12 | [assembly: AssemblyProduct("MapServer MapManager")]
13 | [assembly: AssemblyCopyright("Copyright © DMS 2018")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("dc20908d-1d7b-465e-9a19-0492847457e7")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | [assembly: AssemblyVersion("1.3.0.0")]
33 | [assembly: AssemblyFileVersion("1.3.0.0")]
34 |
--------------------------------------------------------------------------------
/MapManager/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 MapManager.Properties {
12 |
13 |
14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.9.0.0")]
16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
17 |
18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
19 |
20 | public static Settings Default {
21 | get {
22 | return defaultInstance;
23 | }
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/MapManager/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/MapManager/ScriptConsoleForm.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Text;
7 | using System.Windows.Forms;
8 | using DMS.MapLibrary;
9 | using System.CodeDom.Compiler;
10 | using System.Reflection;
11 | using OSGeo.MapServer;
12 |
13 | namespace DMS.MapManager
14 | {
15 | public partial class ScriptConsoleForm : Form
16 | {
17 | private const string scriptPrefix =
18 | @"
19 | using System;
20 | using System.Text;
21 | using DMS.MapLibrary;
22 | using OSGeo.MapServer;
23 | using OSGeo.GDAL;
24 | using OSGeo.OGR;
25 |
26 | namespace DMS.Scripts
27 | {
28 | public class Script
29 | {
30 | private static StringBuilder msg;
31 | private static void Write(object message)
32 | {
33 | msg.Append(message.ToString());
34 | }
35 | private static void WriteLine(object message)
36 | {
37 | msg.AppendLine(message.ToString());
38 | }
39 | public static string Run(mapObj map)
40 | {
41 | msg = new StringBuilder();
42 | ";
43 |
44 | private const string scriptPostfix =
45 | @"
46 | return msg.ToString();
47 | }
48 | }
49 | }
50 | ";
51 |
52 | private MapObjectHolder mapH;
53 | private mapObj map;
54 |
55 | public ScriptConsoleForm(MapObjectHolder mapH)
56 | {
57 | InitializeComponent();
58 | this.mapH = mapH;
59 | this.map = mapH;
60 |
61 | ListSupportedLanguages();
62 | }
63 |
64 | private void ListSupportedLanguages()
65 | {
66 | // Loop through information about all compilers.
67 | CompilerInfo[] compiler_infos =
68 | CodeDomProvider.GetAllCompilerInfo();
69 | foreach (CompilerInfo info in compiler_infos)
70 | {
71 | if (info.IsCodeDomProviderTypeValid)
72 | {
73 | // Get information about this compiler.
74 | CodeDomProvider provider = info.CreateProvider();
75 |
76 | //string extensions = "";
77 | string default_extension = provider.FileExtension;
78 | if (default_extension[0] != '.')
79 | default_extension = '.' + default_extension;
80 |
81 | string default_language =
82 | CodeDomProvider.GetLanguageFromExtension(default_extension);
83 |
84 | toolStripComboBoxLang.Items.Add(default_language);
85 | }
86 | }
87 | if (toolStripComboBoxLang.Items.Count > 0)
88 | toolStripComboBoxLang.SelectedIndex = 0;
89 | }
90 |
91 |
92 | private void Print(string msg)
93 | {
94 | textBoxOutput.Text += msg + "\r\n" ;
95 | }
96 |
97 | private void Compile(string script)
98 | {
99 | try
100 | {
101 | textBoxOutput.Text = "";
102 |
103 | Assembly asm = null;
104 |
105 | CodeDomProvider provider = CodeDomProvider.CreateProvider(toolStripComboBoxLang.Text);
106 |
107 | CompilerParameters cp = new CompilerParameters
108 | {
109 | GenerateExecutable = false,
110 | GenerateInMemory = true
111 | };
112 |
113 | // Add references to all the assemblies we might need.
114 | Assembly executingAssembly = Assembly.GetExecutingAssembly();
115 | cp.ReferencedAssemblies.Add(executingAssembly.Location);
116 | foreach (AssemblyName assemblyName in executingAssembly.GetReferencedAssemblies())
117 | cp.ReferencedAssemblies.Add(Assembly.Load(assemblyName).Location);
118 |
119 | // Invoke compilation of the source file.
120 | CompilerResults cr = provider.CompileAssemblyFromSource(cp, scriptPrefix + script + scriptPostfix);
121 |
122 | if (cr.Errors.Count > 0)
123 | {
124 | // Display compilation errors.
125 | StringBuilder builder = new StringBuilder();
126 | foreach (CompilerError ce in cr.Errors)
127 | {
128 | builder.Append(ce.ToString());
129 | builder.Append("\n");
130 | }
131 | Print(builder.ToString());
132 | return;
133 | }
134 | else
135 | asm = cr.CompiledAssembly;
136 |
137 | Type t = asm.GetType("DMS.Scripts.Script");
138 |
139 | MethodInfo method = t.GetMethod("Run", BindingFlags.Static | BindingFlags.Public);
140 | string msg = method.Invoke(null, new object[] { map }).ToString();
141 | Print(msg);
142 | Print("\r\nScript completed successfully!");
143 | }
144 | catch (Exception ex)
145 | {
146 | Print(ex.Message);
147 | if (ex.InnerException != null)
148 | Print(ex.InnerException.Message);
149 | }
150 | }
151 |
152 | private void toolStripButton1_Click(object sender, EventArgs e)
153 | {
154 | Compile(textBoxScript.Text);
155 | mapH.RaisePropertyChanged(this);
156 | }
157 | }
158 | }
159 |
--------------------------------------------------------------------------------
/MapManager/SelectListForm.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace DMS.MapManager
2 | {
3 | partial class SelectListForm
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | this.selectList = new DMS.MapLibrary.SelectList();
32 | this.SuspendLayout();
33 | //
34 | // selectList
35 | //
36 | this.selectList.Dock = System.Windows.Forms.DockStyle.Fill;
37 | this.selectList.Location = new System.Drawing.Point(0, 0);
38 | this.selectList.Name = "selectList";
39 | this.selectList.Size = new System.Drawing.Size(372, 367);
40 | this.selectList.TabIndex = 0;
41 | this.selectList.Target = null;
42 | //
43 | // SelectListForm
44 | //
45 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
46 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
47 | this.ClientSize = new System.Drawing.Size(372, 367);
48 | this.Controls.Add(this.selectList);
49 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow;
50 | this.KeyPreview = true;
51 | this.Location = new System.Drawing.Point(500, 40);
52 | this.MaximizeBox = false;
53 | this.MinimizeBox = false;
54 | this.Name = "SelectListForm";
55 | this.ShowIcon = false;
56 | this.ShowInTaskbar = false;
57 | this.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
58 | this.Text = "Selected Features";
59 | this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.SelectListForm_FormClosing);
60 | this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.SelectListForm_KeyDown);
61 | this.ResumeLayout(false);
62 |
63 | }
64 |
65 | #endregion
66 |
67 | internal DMS.MapLibrary.SelectList selectList;
68 |
69 | }
70 | }
--------------------------------------------------------------------------------
/MapManager/SelectListForm.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Text;
7 | using System.Windows.Forms;
8 |
9 | namespace DMS.MapManager
10 | {
11 | ///
12 | /// ToolWindow to display the list of the selected features.
13 | ///
14 | public partial class SelectListForm : Form
15 | {
16 | ///
17 | /// Constructs the SelectListForm object.
18 | ///
19 | public SelectListForm()
20 | {
21 | InitializeComponent();
22 | }
23 |
24 | ///
25 | /// FormClosing Event handler for the SelectListForm object.
26 | ///
27 | /// The source object of this event.
28 | /// Event parameters.
29 | private void SelectListForm_FormClosing(object sender, FormClosingEventArgs e)
30 | {
31 | e.Cancel = false;
32 | if (e.CloseReason != CloseReason.FormOwnerClosing)
33 | {
34 | e.Cancel = true;
35 | this.Hide();
36 | }
37 | }
38 |
39 | ///
40 | /// KeyDown Event handler for the SelectListForm object.
41 | ///
42 | /// The source object of this event.
43 | /// Event parameters.
44 | private void SelectListForm_KeyDown(object sender, KeyEventArgs e)
45 | {
46 | if (e.KeyCode == Keys.Escape)
47 | {
48 | this.Close();
49 | }
50 | }
51 | }
52 | }
--------------------------------------------------------------------------------
/MapManager/SelectListForm.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/MapManager/SelectShapeForm.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace DMS.MapManager
2 | {
3 | partial class SelectShapeForm
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | this.textBoxShape = new System.Windows.Forms.TextBox();
32 | this.label1 = new System.Windows.Forms.Label();
33 | this.buttonSelect = new System.Windows.Forms.Button();
34 | this.checkBoxCenter = new System.Windows.Forms.CheckBox();
35 | this.SuspendLayout();
36 | //
37 | // textBoxShape
38 | //
39 | this.textBoxShape.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
40 | | System.Windows.Forms.AnchorStyles.Left)
41 | | System.Windows.Forms.AnchorStyles.Right)));
42 | this.textBoxShape.Location = new System.Drawing.Point(2, 26);
43 | this.textBoxShape.Multiline = true;
44 | this.textBoxShape.Name = "textBoxShape";
45 | this.textBoxShape.Size = new System.Drawing.Size(491, 278);
46 | this.textBoxShape.TabIndex = 0;
47 | //
48 | // label1
49 | //
50 | this.label1.AutoSize = true;
51 | this.label1.Location = new System.Drawing.Point(2, 3);
52 | this.label1.Name = "label1";
53 | this.label1.Size = new System.Drawing.Size(156, 17);
54 | this.label1.TabIndex = 1;
55 | this.label1.Text = "Selection Shape (WKT)";
56 | //
57 | // buttonSelect
58 | //
59 | this.buttonSelect.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
60 | this.buttonSelect.Location = new System.Drawing.Point(260, 310);
61 | this.buttonSelect.Name = "buttonSelect";
62 | this.buttonSelect.Size = new System.Drawing.Size(127, 32);
63 | this.buttonSelect.TabIndex = 2;
64 | this.buttonSelect.Text = "Execute Query";
65 | this.buttonSelect.UseVisualStyleBackColor = true;
66 | this.buttonSelect.Click += new System.EventHandler(this.buttonSelect_Click);
67 | //
68 | // checkBoxCenter
69 | //
70 | this.checkBoxCenter.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
71 | this.checkBoxCenter.AutoSize = true;
72 | this.checkBoxCenter.Checked = true;
73 | this.checkBoxCenter.CheckState = System.Windows.Forms.CheckState.Checked;
74 | this.checkBoxCenter.Location = new System.Drawing.Point(38, 317);
75 | this.checkBoxCenter.Name = "checkBoxCenter";
76 | this.checkBoxCenter.Size = new System.Drawing.Size(169, 21);
77 | this.checkBoxCenter.TabIndex = 3;
78 | this.checkBoxCenter.Text = "Center Map To Shape";
79 | this.checkBoxCenter.UseVisualStyleBackColor = true;
80 | //
81 | // SelectShapeForm
82 | //
83 | this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
84 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
85 | this.ClientSize = new System.Drawing.Size(496, 345);
86 | this.Controls.Add(this.checkBoxCenter);
87 | this.Controls.Add(this.buttonSelect);
88 | this.Controls.Add(this.label1);
89 | this.Controls.Add(this.textBoxShape);
90 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow;
91 | this.KeyPreview = true;
92 | this.MaximizeBox = false;
93 | this.MinimizeBox = false;
94 | this.Name = "SelectShapeForm";
95 | this.ShowIcon = false;
96 | this.ShowInTaskbar = false;
97 | this.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
98 | this.Text = "Select By Shape";
99 | this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.SelectShapeForm_FormClosing);
100 | this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.SelectShapeForm_KeyDown);
101 | this.ResumeLayout(false);
102 | this.PerformLayout();
103 |
104 | }
105 |
106 | #endregion
107 |
108 | private System.Windows.Forms.TextBox textBoxShape;
109 | private System.Windows.Forms.Label label1;
110 | private System.Windows.Forms.Button buttonSelect;
111 | private System.Windows.Forms.CheckBox checkBoxCenter;
112 | }
113 | }
--------------------------------------------------------------------------------
/MapManager/SelectShapeForm.cs:
--------------------------------------------------------------------------------
1 | using DMS.MapLibrary;
2 | using OSGeo.MapServer;
3 | using System;
4 | using System.Collections.Generic;
5 | using System.ComponentModel;
6 | using System.Data;
7 | using System.Drawing;
8 | using System.Linq;
9 | using System.Text;
10 | using System.Windows.Forms;
11 |
12 | namespace DMS.MapManager
13 | {
14 | public partial class SelectShapeForm : Form
15 | {
16 | private MapControl target;
17 | public SelectShapeForm()
18 | {
19 | InitializeComponent();
20 | }
21 |
22 | ///
23 | /// FormClosing Event handler for the SelectShapeForm object.
24 | ///
25 | /// The source object of this event.
26 | /// Event parameters.
27 | private void SelectShapeForm_FormClosing(object sender, FormClosingEventArgs e)
28 | {
29 | e.Cancel = false;
30 | if (e.CloseReason != CloseReason.FormOwnerClosing)
31 | {
32 | e.Cancel = true;
33 | this.Hide();
34 | }
35 | }
36 |
37 | ///
38 | /// KeyDown Event handler for the SelectShapeForm object.
39 | ///
40 | /// The source object of this event.
41 | /// Event parameters.
42 | private void SelectShapeForm_KeyDown(object sender, KeyEventArgs e)
43 | {
44 | if (e.KeyCode == Keys.Escape)
45 | {
46 | this.Close();
47 | }
48 | }
49 |
50 | ///
51 | /// Gets and sets the target object of the selector.
52 | ///
53 | public MapControl Target
54 | {
55 | get
56 | {
57 | return target;
58 | }
59 | set
60 | {
61 | target = value;
62 |
63 | }
64 | }
65 |
66 | private void buttonSelect_Click(object sender, EventArgs e)
67 | {
68 | target.QueryByShape(textBoxShape.Text, checkBoxCenter.Checked);
69 | }
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/MapManager/SelectShapeForm.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/MapManager/TileManager/BaseLayerTextDialog.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace DMS.MapManager.TileManager
2 | {
3 | partial class BaseLayerTextDialog
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | this.txtConfigManager = new System.Windows.Forms.RichTextBox();
32 | this.SuspendLayout();
33 | //
34 | // txtConfigManager
35 | //
36 | this.txtConfigManager.Location = new System.Drawing.Point(10, 13);
37 | this.txtConfigManager.Name = "txtConfigManager";
38 | this.txtConfigManager.Size = new System.Drawing.Size(454, 368);
39 | this.txtConfigManager.TabIndex = 21;
40 | this.txtConfigManager.Text = "";
41 | //
42 | // BaseLayerTextDialog
43 | //
44 | this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
45 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
46 | this.ClientSize = new System.Drawing.Size(476, 393);
47 | this.Controls.Add(this.txtConfigManager);
48 | this.Font = new System.Drawing.Font("Segoe UI", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
49 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
50 | this.Icon = global::MapManager.Properties.Resources.MapManager;
51 | this.MaximizeBox = false;
52 | this.MinimizeBox = false;
53 | this.Name = "BaseLayerTextDialog";
54 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
55 | this.Text = " Copy to ConfigManager";
56 | this.Load += new System.EventHandler(this.BaseLayerTextDialog_Load);
57 | this.ResumeLayout(false);
58 |
59 | }
60 |
61 | #endregion
62 |
63 | private System.Windows.Forms.RichTextBox txtConfigManager;
64 | }
65 | }
--------------------------------------------------------------------------------
/MapManager/TileManager/BaseLayerTextDialog.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Text;
7 | using System.Windows.Forms;
8 |
9 | namespace DMS.MapManager.TileManager
10 | {
11 | public partial class BaseLayerTextDialog : Form
12 | {
13 | // globals
14 | string mapfilepath;
15 |
16 | public BaseLayerTextDialog(string mapfile, string baseLayerText)
17 | {
18 | InitializeComponent();
19 | mapfilepath = mapfile;
20 | txtConfigManager.Text = baseLayerText;
21 | }
22 |
23 | private void BaseLayerTextDialog_Load(object sender, EventArgs e)
24 | {
25 | // highlight some text red which the user must replace themselves
26 | Font boldfont = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point);
27 | string boldstring;
28 |
29 | boldstring = "";
30 | if (txtConfigManager.Find(boldstring) > 0)
31 | {
32 | int start = txtConfigManager.Find(boldstring);
33 | txtConfigManager.SelectionStart = start;
34 | txtConfigManager.SelectionLength = boldstring.Length;
35 | txtConfigManager.SelectionFont = boldfont;
36 | txtConfigManager.SelectionColor = Color.DarkRed;
37 | }
38 |
39 | boldstring = mapfilepath.Substring(mapfilepath.LastIndexOf("\\") + 1);
40 | if (txtConfigManager.Find(boldstring) > 0)
41 | {
42 | int start = txtConfigManager.Find(boldstring);
43 | txtConfigManager.SelectionStart = start;
44 | txtConfigManager.SelectionLength = boldstring.Length;
45 | txtConfigManager.SelectionFont = boldfont;
46 | txtConfigManager.SelectionColor = Color.DarkRed;
47 | }
48 | txtConfigManager.SelectionLength = 0;
49 | }
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/MapManager/TileManager/NewPresetConfigDialog.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace DMS.MapManager.TileManager
2 | {
3 | partial class NewPresetConfigDialog
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | this.btnNewPreset = new System.Windows.Forms.Button();
32 | this.txtNewPreset = new System.Windows.Forms.TextBox();
33 | this.SuspendLayout();
34 | //
35 | // btnNewPreset
36 | //
37 | this.btnNewPreset.BackColor = System.Drawing.SystemColors.ControlLightLight;
38 | this.btnNewPreset.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
39 | this.btnNewPreset.Location = new System.Drawing.Point(369, 10);
40 | this.btnNewPreset.Name = "btnNewPreset";
41 | this.btnNewPreset.Size = new System.Drawing.Size(100, 30);
42 | this.btnNewPreset.TabIndex = 31;
43 | this.btnNewPreset.Text = "Accept";
44 | this.btnNewPreset.UseVisualStyleBackColor = false;
45 | this.btnNewPreset.Click += new System.EventHandler(this.btnNewPreset_Click);
46 | //
47 | // txtNewPreset
48 | //
49 | this.txtNewPreset.Location = new System.Drawing.Point(12, 12);
50 | this.txtNewPreset.Name = "txtNewPreset";
51 | this.txtNewPreset.Size = new System.Drawing.Size(351, 27);
52 | this.txtNewPreset.TabIndex = 32;
53 | //
54 | // NewPresetConfigDialog
55 | //
56 | this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F);
57 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
58 | this.ClientSize = new System.Drawing.Size(484, 49);
59 | this.Controls.Add(this.txtNewPreset);
60 | this.Controls.Add(this.btnNewPreset);
61 | this.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
62 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
63 | this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
64 | this.MaximizeBox = false;
65 | this.MinimizeBox = false;
66 | this.Name = "NewPresetConfigDialog";
67 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
68 | this.Text = "Enter name for new preset";
69 | this.Load += new System.EventHandler(this.NewPresetConfigDialog_Load);
70 | this.ResumeLayout(false);
71 | this.PerformLayout();
72 |
73 | }
74 |
75 | #endregion
76 |
77 | private System.Windows.Forms.Button btnNewPreset;
78 | public System.Windows.Forms.TextBox txtNewPreset;
79 | }
80 | }
--------------------------------------------------------------------------------
/MapManager/TileManager/NewPresetConfigDialog.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Text;
7 | using System.Windows.Forms;
8 |
9 | namespace DMS.MapManager.TileManager
10 | {
11 | public partial class NewPresetConfigDialog : Form
12 | {
13 | public NewPresetConfigDialog()
14 | {
15 | InitializeComponent();
16 | }
17 |
18 | private void btnNewPreset_Click(object sender, EventArgs e)
19 | {
20 | this.DialogResult = DialogResult.OK;
21 | }
22 |
23 | private void NewPresetConfigDialog_Load(object sender, EventArgs e)
24 | {
25 |
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/MapManager/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DMS-Aus/MapManager/1ade260ae172c9f972dcfcc736b789f8c171faf0/README.md
--------------------------------------------------------------------------------
/Templates/flaeche1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DMS-Aus/MapManager/1ade260ae172c9f972dcfcc736b789f8c171faf0/Templates/flaeche1.png
--------------------------------------------------------------------------------
/Templates/flaeche1_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DMS-Aus/MapManager/1ade260ae172c9f972dcfcc736b789f8c171faf0/Templates/flaeche1_1.png
--------------------------------------------------------------------------------
/Templates/flaeche2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DMS-Aus/MapManager/1ade260ae172c9f972dcfcc736b789f8c171faf0/Templates/flaeche2.png
--------------------------------------------------------------------------------
/Templates/flaeche2_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DMS-Aus/MapManager/1ade260ae172c9f972dcfcc736b789f8c171faf0/Templates/flaeche2_1.png
--------------------------------------------------------------------------------
/Templates/flaeche3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DMS-Aus/MapManager/1ade260ae172c9f972dcfcc736b789f8c171faf0/Templates/flaeche3.png
--------------------------------------------------------------------------------
/Templates/font.list:
--------------------------------------------------------------------------------
1 | arial C:\Windows\Fonts\arial.ttf
2 | arial-bold C:\Windows\Fonts\arialbd.ttf
3 | arial-italic C:\Windows\Fonts\ariali.ttf
4 | arial-bold-italic C:\Windows\Fonts\arialbi.ttf
5 | arial-black C:\Windows\Fonts\ariblk.ttf
6 | comic-sans-ms C:\Windows\Fonts\comic.ttf
7 | comic-sans-ms-bold C:\Windows\Fonts\comicbd.ttf
8 | courier C:\Windows\Fonts\cour.ttf
9 | courier-bold C:\Windows\Fonts\courbd.ttf
10 | courier-italic C:\Windows\Fonts\couri.ttf
11 | courier-bold-italic C:\Windows\Fonts\courbi.ttf
12 | georgia C:\Windows\Fonts\georgia.ttf
13 | georgia-bold C:\Windows\Fonts\georgiab.ttf
14 | georgia-italic C:\Windows\Fonts\georgiai.ttf
15 | georgia-bold-italic C:\Windows\Fonts\georgiaz.ttf
16 | impact C:\Windows\Fonts\impact.ttf
17 | monotype-corsiva C:\Windows\Fonts\mtcorsva.ttf
18 | times-new-roman C:\Windows\Fonts\times.ttf
19 | times-new-roman-bold C:\Windows\Fonts\timesbd.ttf
20 | times-new-roman-italic C:\Windows\Fonts\timesi.ttf
21 | times-new-roman-bold-italic C:\Windows\Fonts\timesbi.ttf
22 | trebuchet-ms C:\Windows\Fonts\trebuc.ttf
23 | trebuchet-ms-bold C:\Windows\Fonts\trebucbd.ttf
24 | trebuchet-ms-italic C:\Windows\Fonts\trebucit.ttf
25 | trebuchet-ms-bold-italic C:\Windows\Fonts\trebucbi.ttf
26 | verdana C:\Windows\Fonts\verdana.ttf
27 | verdana-bold C:\Windows\Fonts\verdanab.ttf
28 | verdana-italic C:\Windows\Fonts\verdanai.ttf
29 | verdana-bold-italic C:\Windows\Fonts\verdanaz.ttf
30 | MapServerAnimals C:\Windows\Fonts\MapServerAnimals.ttf
31 | MapServerCarto C:\Windows\Fonts\MapServerCarto.ttf
32 | MapServerNaturalResources C:\Windows\Fonts\MapServerNaturalResources.ttf
33 | MapServerParks C:\Windows\Fonts\MapServerParks.ttf
34 | MapServerRecreation C:\Windows\Fonts\MapServerRecreation.ttf
35 | MapServerSigns C:\Windows\Fonts\MapServerSigns.ttf
36 | MapServerSports C:\Windows\Fonts\MapServerSports.ttf
37 | Wingdings C:\Windows\Fonts\wingding.ttf
38 |
39 |
40 |
--------------------------------------------------------------------------------
/Templates/fonts/MapServerAnimals.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DMS-Aus/MapManager/1ade260ae172c9f972dcfcc736b789f8c171faf0/Templates/fonts/MapServerAnimals.ttf
--------------------------------------------------------------------------------
/Templates/fonts/MapServerCarto.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DMS-Aus/MapManager/1ade260ae172c9f972dcfcc736b789f8c171faf0/Templates/fonts/MapServerCarto.ttf
--------------------------------------------------------------------------------
/Templates/fonts/MapServerNaturalResources.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DMS-Aus/MapManager/1ade260ae172c9f972dcfcc736b789f8c171faf0/Templates/fonts/MapServerNaturalResources.ttf
--------------------------------------------------------------------------------
/Templates/fonts/MapServerParks.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DMS-Aus/MapManager/1ade260ae172c9f972dcfcc736b789f8c171faf0/Templates/fonts/MapServerParks.ttf
--------------------------------------------------------------------------------
/Templates/fonts/MapServerRecreation.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DMS-Aus/MapManager/1ade260ae172c9f972dcfcc736b789f8c171faf0/Templates/fonts/MapServerRecreation.ttf
--------------------------------------------------------------------------------
/Templates/fonts/MapServerSigns.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DMS-Aus/MapManager/1ade260ae172c9f972dcfcc736b789f8c171faf0/Templates/fonts/MapServerSigns.ttf
--------------------------------------------------------------------------------
/Templates/fonts/MapServerSports.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DMS-Aus/MapManager/1ade260ae172c9f972dcfcc736b789f8c171faf0/Templates/fonts/MapServerSports.ttf
--------------------------------------------------------------------------------
/Templates/new.map:
--------------------------------------------------------------------------------
1 | MAP
2 | FONTSET "font.list"
3 | IMAGECOLOR 255 255 255
4 | IMAGETYPE png24
5 | SYMBOLSET "symbols.sym"
6 | SHAPEPATH ""
7 | SIZE 1122 923
8 | STATUS ON
9 | UNITS METERS
10 | NAME "MS"
11 | DEFRESOLUTION 96
12 | RESOLUTION 96
13 |
14 | OUTPUTFORMAT
15 | NAME "print"
16 | MIMETYPE "image/png"
17 | DRIVER "AGG/PNG"
18 | EXTENSION "png"
19 | IMAGEMODE "RGB"
20 | TRANSPARENT FALSE
21 | END
22 | WEB
23 | METADATA
24 | "distance_units" "MS_METERS"
25 | "mapmanager_version" "1.0.0.0"
26 | END # METADATA
27 | END # WEB
28 | END
29 |
--------------------------------------------------------------------------------
/Templates/schraffur.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DMS-Aus/MapManager/1ade260ae172c9f972dcfcc736b789f8c171faf0/Templates/schraffur.png
--------------------------------------------------------------------------------
/Templates/stern.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DMS-Aus/MapManager/1ade260ae172c9f972dcfcc736b789f8c171faf0/Templates/stern.png
--------------------------------------------------------------------------------
/Templates/welle.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DMS-Aus/MapManager/1ade260ae172c9f972dcfcc736b789f8c171faf0/Templates/welle.png
--------------------------------------------------------------------------------
/TileManager/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 |
5 | namespace DMS.TileGenerator
6 | {
7 | static class Program
8 | {
9 | ///
10 | /// The main entry point for the application.
11 | ///
12 | [STAThread]
13 | static void Main(string[] args)
14 | {
15 | // post setup install actions
16 | if (args.Length > 0)
17 | {
18 | if (args[0] == "/tile")
19 | {
20 | new DMS.MapManager.TileGenerator(args[1], args[2], args[3]);
21 | }
22 | }
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/TileManager/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/help/HelpNDoc/mapmanager.hnd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DMS-Aus/MapManager/1ade260ae172c9f972dcfcc736b789f8c171faf0/help/HelpNDoc/mapmanager.hnd
--------------------------------------------------------------------------------
/help/MapManager.chm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DMS-Aus/MapManager/1ade260ae172c9f972dcfcc736b789f8c171faf0/help/MapManager.chm
--------------------------------------------------------------------------------