├── .gitignore ├── .vs └── slnx.sqlite ├── Backup ├── CheckBoxComboBox.Designer.cs ├── CheckBoxComboBox.cs ├── CheckBoxComboBox.csproj ├── CheckBoxComboBox.csproj.user ├── GripBounds.cs ├── NativeMethods.cs ├── Popup.Designer.cs ├── Popup.cs ├── PopupComboBox.Designer.cs ├── PopupComboBox.cs ├── PopupComboBox.resx ├── Properties │ └── AssemblyInfo.cs ├── Selection Wrappers │ ├── ListSelectionWrapper.cs │ └── ObjectSelectionWrapper.cs └── obj │ ├── Debug │ └── CheckBoxComboBox.csproj.AssemblyReference.cache │ └── Release │ └── CheckBoxComboBox.csproj.AssemblyReference.cache ├── Components ├── SlimDX.dll ├── SlimDX.pdb └── SlimDX.xml ├── Map Editor.sln ├── Map Editor.v12.suo └── Map Editor ├── CellInfoControl.Designer.cs ├── CellInfoControl.cs ├── CellInfoControl.resx ├── CellInfoData.cs ├── DXManager.cs ├── Editor.cs ├── FilesNameComparer.cs ├── FrmAbout.Designer.cs ├── FrmAbout.cs ├── FrmAbout.resx ├── FrmJump.Designer.cs ├── FrmJump.cs ├── FrmJump.resx ├── FrmSetAnimation.Designer.cs ├── FrmSetAnimation.cs ├── FrmSetAnimation.resx ├── FrmSetDoor.Designer.cs ├── FrmSetDoor.cs ├── FrmSetDoor.resx ├── FrmSetLight.Designer.cs ├── FrmSetLight.cs ├── FrmSetLight.resx ├── ListItem.cs ├── MLibrary.cs ├── Main.Designer.cs ├── Main.cs ├── Main.resx ├── Map Editor.csproj ├── Map Editor.csproj.user ├── MapCode.cs ├── NewFileFrm.Designer.cs ├── NewFileFrm.cs ├── NewFileFrm.resx ├── Program.cs ├── Properties ├── Resources.Designer.cs ├── Resources.resx ├── Settings.Designer.cs └── Settings.settings ├── Resources ├── 100.jpg ├── 110.jpg ├── 1100.jpg ├── 1110.jpg ├── 1120.jpg ├── 1130.jpg ├── 1140.jpg ├── 1150.jpg ├── 120.jpg ├── 130.jpg ├── 140.jpg ├── 150.jpg ├── 160.jpg ├── 170.jpg ├── 180.jpg ├── 190.jpg ├── Camera.png ├── Minus.png ├── Navigator.png ├── Off.png ├── On.png ├── Plus.png ├── Radar.png ├── Square.png └── System folder.png ├── SetrProperty.resx ├── Utility.cs ├── ico.ico └── obj └── Debug ├── DesignTimeResolveAssemblyReferences.cache ├── DesignTimeResolveAssemblyReferencesInput.cache └── Map Editor.csproj.AssemblyReference.cache /.gitignore: -------------------------------------------------------------------------------- 1 | /Map Editor/obj/Debug 2 | /.vs/Map Editor/v16 3 | /Map Editor/bin/Release 4 | /Map Editor/obj/Release 5 | /.vs/Map Editor 6 | -------------------------------------------------------------------------------- /.vs/slnx.sqlite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Suprcode/Crystal.MapEditor/dcb5d3049e2980055fda3093fa89baa5168937b9/.vs/slnx.sqlite -------------------------------------------------------------------------------- /Backup/CheckBoxComboBox.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace PresentationControls 2 | { 3 | partial class CheckBoxComboBox 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 | components = new System.ComponentModel.Container(); 32 | } 33 | 34 | #endregion 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /Backup/CheckBoxComboBox.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | Debug 4 | AnyCPU 5 | 9.0.20404 6 | 2.0 7 | {70A25201-8EA4-48F8-A4A6-ED13ADF8823C} 8 | Library 9 | Properties 10 | CheckBoxComboBox 11 | CheckBoxComboBox 12 | v3.5 13 | 512 14 | 15 | 16 | true 17 | full 18 | false 19 | bin\Debug\ 20 | DEBUG;TRACE 21 | prompt 22 | 4 23 | 24 | 25 | pdbonly 26 | true 27 | bin\Release\ 28 | TRACE 29 | prompt 30 | 4 31 | 32 | 33 | 34 | 35 | 3.5 36 | 37 | 38 | 39 | 40 | 3.5 41 | 42 | 43 | 44 | 45 | 46 | 47 | Component 48 | 49 | 50 | CheckBoxComboBox.cs 51 | 52 | 53 | 54 | 55 | 56 | 57 | Component 58 | 59 | 60 | Popup.cs 61 | 62 | 63 | Component 64 | 65 | 66 | PopupComboBox.cs 67 | 68 | 69 | 70 | 71 | 72 | PopupComboBox.cs 73 | Designer 74 | 75 | 76 | 77 | 84 | -------------------------------------------------------------------------------- /Backup/CheckBoxComboBox.csproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | ShowAllFiles 4 | 5 | -------------------------------------------------------------------------------- /Backup/GripBounds.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Drawing; 3 | 4 | namespace PresentationControls 5 | { 6 | /// 7 | /// CodeProject.com "Simple pop-up control" "http://www.codeproject.com/cs/miscctrl/simplepopup.asp". 8 | /// 9 | internal struct GripBounds 10 | { 11 | private const int GripSize = 6; 12 | private const int CornerGripSize = GripSize << 1; 13 | 14 | public GripBounds(Rectangle clientRectangle) 15 | { 16 | this.clientRectangle = clientRectangle; 17 | } 18 | 19 | private Rectangle clientRectangle; 20 | public Rectangle ClientRectangle 21 | { 22 | get { return clientRectangle; } 23 | //set { clientRectangle = value; } 24 | } 25 | 26 | public Rectangle Bottom 27 | { 28 | get 29 | { 30 | Rectangle rect = ClientRectangle; 31 | rect.Y = rect.Bottom - GripSize + 1; 32 | rect.Height = GripSize; 33 | return rect; 34 | } 35 | } 36 | 37 | public Rectangle BottomRight 38 | { 39 | get 40 | { 41 | Rectangle rect = ClientRectangle; 42 | rect.Y = rect.Bottom - CornerGripSize + 1; 43 | rect.Height = CornerGripSize; 44 | rect.X = rect.Width - CornerGripSize + 1; 45 | rect.Width = CornerGripSize; 46 | return rect; 47 | } 48 | } 49 | 50 | public Rectangle Top 51 | { 52 | get 53 | { 54 | Rectangle rect = ClientRectangle; 55 | rect.Height = GripSize; 56 | return rect; 57 | } 58 | } 59 | 60 | public Rectangle TopRight 61 | { 62 | get 63 | { 64 | Rectangle rect = ClientRectangle; 65 | rect.Height = CornerGripSize; 66 | rect.X = rect.Width - CornerGripSize + 1; 67 | rect.Width = CornerGripSize; 68 | return rect; 69 | } 70 | } 71 | 72 | public Rectangle Left 73 | { 74 | get 75 | { 76 | Rectangle rect = ClientRectangle; 77 | rect.Width = GripSize; 78 | return rect; 79 | } 80 | } 81 | 82 | public Rectangle BottomLeft 83 | { 84 | get 85 | { 86 | Rectangle rect = ClientRectangle; 87 | rect.Width = CornerGripSize; 88 | rect.Y = rect.Height - CornerGripSize + 1; 89 | rect.Height = CornerGripSize; 90 | return rect; 91 | } 92 | } 93 | 94 | public Rectangle Right 95 | { 96 | get 97 | { 98 | Rectangle rect = ClientRectangle; 99 | rect.X = rect.Right - GripSize + 1; 100 | rect.Width = GripSize; 101 | return rect; 102 | } 103 | } 104 | 105 | public Rectangle TopLeft 106 | { 107 | get 108 | { 109 | Rectangle rect = ClientRectangle; 110 | rect.Width = CornerGripSize; 111 | rect.Height = CornerGripSize; 112 | return rect; 113 | } 114 | } 115 | } 116 | } 117 | -------------------------------------------------------------------------------- /Backup/NativeMethods.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Drawing; 3 | using System.Runtime.InteropServices; 4 | 5 | namespace PresentationControls 6 | { 7 | /// 8 | /// CodeProject.com "Simple pop-up control" "http://www.codeproject.com/cs/miscctrl/simplepopup.asp". 9 | /// 10 | internal static class NativeMethods 11 | { 12 | internal const int WM_NCHITTEST = 0x0084, 13 | WM_NCACTIVATE = 0x0086, 14 | WS_EX_NOACTIVATE = 0x08000000, 15 | HTTRANSPARENT = -1, 16 | HTLEFT = 10, 17 | HTRIGHT = 11, 18 | HTTOP = 12, 19 | HTTOPLEFT = 13, 20 | HTTOPRIGHT = 14, 21 | HTBOTTOM = 15, 22 | HTBOTTOMLEFT = 16, 23 | HTBOTTOMRIGHT = 17, 24 | WM_USER = 0x0400, 25 | WM_REFLECT = WM_USER + 0x1C00, 26 | WM_COMMAND = 0x0111, 27 | CBN_DROPDOWN = 7, 28 | WM_GETMINMAXINFO = 0x0024; 29 | 30 | internal static int HIWORD(int n) 31 | { 32 | return (n >> 16) & 0xffff; 33 | } 34 | 35 | internal static int HIWORD(IntPtr n) 36 | { 37 | return HIWORD(unchecked((int)(long)n)); 38 | } 39 | 40 | internal static int LOWORD(int n) 41 | { 42 | return n & 0xffff; 43 | } 44 | 45 | internal static int LOWORD(IntPtr n) 46 | { 47 | return LOWORD(unchecked((int)(long)n)); 48 | } 49 | 50 | [StructLayout(LayoutKind.Sequential)] 51 | internal struct MINMAXINFO 52 | { 53 | public Point reserved; 54 | public Size maxSize; 55 | public Point maxPosition; 56 | public Size minTrackSize; 57 | public Size maxTrackSize; 58 | } 59 | } 60 | } -------------------------------------------------------------------------------- /Backup/Popup.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace PresentationControls 2 | { 3 | partial class Popup 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) 17 | { 18 | if (components != null) 19 | { 20 | components.Dispose(); 21 | } 22 | if (content != null) 23 | { 24 | System.Windows.Forms.Control _content = content; 25 | content = null; 26 | _content.Dispose(); 27 | } 28 | } 29 | base.Dispose(disposing); 30 | } 31 | 32 | #region Component Designer generated code 33 | 34 | /// 35 | /// Required method for Designer support - do not modify 36 | /// the contents of this method with the code editor. 37 | /// 38 | private void InitializeComponent() 39 | { 40 | components = new System.ComponentModel.Container(); 41 | } 42 | 43 | #endregion 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /Backup/Popup.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.Security.Permissions; 9 | using System.Runtime.InteropServices; 10 | using VS = System.Windows.Forms.VisualStyles; 11 | 12 | /* 13 |
  • Base class for custom tooltips.
  • 14 |
  • Office-2007-like tooltip class.
  • 15 | */ 16 | namespace PresentationControls 17 | { 18 | /// 19 | /// CodeProject.com "Simple pop-up control" "http://www.codeproject.com/cs/miscctrl/simplepopup.asp". 20 | /// Represents a pop-up window. 21 | /// 22 | [CLSCompliant(true), ToolboxItem(false)] 23 | public partial class Popup : ToolStripDropDown 24 | { 25 | #region " Fields & Properties " 26 | 27 | private Control content; 28 | /// 29 | /// Gets the content of the pop-up. 30 | /// 31 | public Control Content 32 | { 33 | get { return content; } 34 | } 35 | 36 | private bool fade; 37 | /// 38 | /// Gets a value indicating whether the uses the fade effect. 39 | /// 40 | /// true if pop-up uses the fade effect; otherwise, false. 41 | /// To use the fade effect, the FocusOnOpen property also has to be set to true. 42 | public bool UseFadeEffect 43 | { 44 | get { return fade; } 45 | set 46 | { 47 | if (fade == value) return; 48 | fade = value; 49 | } 50 | } 51 | 52 | private bool focusOnOpen = true; 53 | /// 54 | /// Gets or sets a value indicating whether to focus the content after the pop-up has been opened. 55 | /// 56 | /// true if the content should be focused after the pop-up has been opened; otherwise, false. 57 | /// If the FocusOnOpen property is set to false, then pop-up cannot use the fade effect. 58 | public bool FocusOnOpen 59 | { 60 | get { return focusOnOpen; } 61 | set { focusOnOpen = value; } 62 | } 63 | 64 | private bool acceptAlt = true; 65 | /// 66 | /// Gets or sets a value indicating whether presing the alt key should close the pop-up. 67 | /// 68 | /// true if presing the alt key does not close the pop-up; otherwise, false. 69 | public bool AcceptAlt 70 | { 71 | get { return acceptAlt; } 72 | set { acceptAlt = value; } 73 | } 74 | 75 | private Popup ownerPopup; 76 | private Popup childPopup; 77 | 78 | private bool _resizable; 79 | private bool resizable; 80 | /// 81 | /// Gets or sets a value indicating whether this is resizable. 82 | /// 83 | /// true if resizable; otherwise, false. 84 | public bool Resizable 85 | { 86 | get { return resizable && _resizable; } 87 | set { resizable = value; } 88 | } 89 | 90 | private ToolStripControlHost host; 91 | 92 | private Size minSize; 93 | /// 94 | /// Gets or sets the size that is the lower limit that can specify. 95 | /// 96 | /// An ordered pair of type representing the width and height of a rectangle. 97 | public new Size MinimumSize 98 | { 99 | get { return minSize; } 100 | set { minSize = value; } 101 | } 102 | 103 | private Size maxSize; 104 | /// 105 | /// Gets or sets the size that is the upper limit that can specify. 106 | /// 107 | /// An ordered pair of type representing the width and height of a rectangle. 108 | public new Size MaximumSize 109 | { 110 | get { return maxSize; } 111 | set { maxSize = value; } 112 | } 113 | 114 | /// 115 | /// Gets parameters of a new window. 116 | /// 117 | /// An object of type used when creating a new window. 118 | protected override CreateParams CreateParams 119 | { 120 | [SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.UnmanagedCode)] 121 | get 122 | { 123 | CreateParams cp = base.CreateParams; 124 | cp.ExStyle |= NativeMethods.WS_EX_NOACTIVATE; 125 | return cp; 126 | } 127 | } 128 | 129 | #endregion 130 | 131 | #region " Constructors " 132 | 133 | /// 134 | /// Initializes a new instance of the class. 135 | /// 136 | /// The content of the pop-up. 137 | /// 138 | /// Pop-up will be disposed immediately after disposion of the content control. 139 | /// 140 | /// is null. 141 | public Popup(Control content) 142 | { 143 | if (content == null) 144 | { 145 | throw new ArgumentNullException("content"); 146 | } 147 | this.content = content; 148 | this.fade = SystemInformation.IsMenuAnimationEnabled && SystemInformation.IsMenuFadeEnabled; 149 | this._resizable = true; 150 | InitializeComponent(); 151 | AutoSize = false; 152 | DoubleBuffered = true; 153 | ResizeRedraw = true; 154 | host = new ToolStripControlHost(content); 155 | Padding = Margin = host.Padding = host.Margin = Padding.Empty; 156 | MinimumSize = content.MinimumSize; 157 | content.MinimumSize = content.Size; 158 | MaximumSize = content.MaximumSize; 159 | content.MaximumSize = content.Size; 160 | Size = content.Size; 161 | content.Location = Point.Empty; 162 | Items.Add(host); 163 | content.Disposed += delegate(object sender, EventArgs e) 164 | { 165 | content = null; 166 | Dispose(true); 167 | }; 168 | content.RegionChanged += delegate(object sender, EventArgs e) 169 | { 170 | UpdateRegion(); 171 | }; 172 | content.Paint += delegate(object sender, PaintEventArgs e) 173 | { 174 | PaintSizeGrip(e); 175 | }; 176 | UpdateRegion(); 177 | } 178 | 179 | #endregion 180 | 181 | #region " Methods " 182 | 183 | /// 184 | /// Processes a dialog box key. 185 | /// 186 | /// One of the values that represents the key to process. 187 | /// 188 | /// true if the key was processed by the control; otherwise, false. 189 | /// 190 | protected override bool ProcessDialogKey(Keys keyData) 191 | { 192 | if (acceptAlt && ((keyData & Keys.Alt) == Keys.Alt)) return false; 193 | return base.ProcessDialogKey(keyData); 194 | } 195 | 196 | /// 197 | /// Updates the pop-up region. 198 | /// 199 | protected void UpdateRegion() 200 | { 201 | if (this.Region != null) 202 | { 203 | this.Region.Dispose(); 204 | this.Region = null; 205 | } 206 | if (content.Region != null) 207 | { 208 | this.Region = content.Region.Clone(); 209 | } 210 | } 211 | 212 | /// 213 | /// Shows pop-up window below the specified control. 214 | /// 215 | /// The control below which the pop-up will be shown. 216 | /// 217 | /// When there is no space below the specified control, the pop-up control is shown above it. 218 | /// 219 | /// is null. 220 | public void Show(Control control) 221 | { 222 | if (control == null) 223 | { 224 | throw new ArgumentNullException("control"); 225 | } 226 | SetOwnerItem(control); 227 | Show(control, control.ClientRectangle); 228 | } 229 | 230 | /// 231 | /// Shows pop-up window below the specified area of specified control. 232 | /// 233 | /// The control used to compute screen location of specified area. 234 | /// The area of control below which the pop-up will be shown. 235 | /// 236 | /// When there is no space below specified area, the pop-up control is shown above it. 237 | /// 238 | /// is null. 239 | public void Show(Control control, Rectangle area) 240 | { 241 | if (control == null) 242 | { 243 | throw new ArgumentNullException("control"); 244 | } 245 | SetOwnerItem(control); 246 | resizableTop = resizableRight = false; 247 | Point location = control.PointToScreen(new Point(area.Left, area.Top + area.Height)); 248 | Rectangle screen = Screen.FromControl(control).WorkingArea; 249 | if (location.X + Size.Width > (screen.Left + screen.Width)) 250 | { 251 | resizableRight = true; 252 | location.X = (screen.Left + screen.Width) - Size.Width; 253 | } 254 | if (location.Y + Size.Height > (screen.Top + screen.Height)) 255 | { 256 | resizableTop = true; 257 | location.Y -= Size.Height + area.Height; 258 | } 259 | location = control.PointToClient(location); 260 | Show(control, location, ToolStripDropDownDirection.BelowRight); 261 | } 262 | 263 | private const int frames = 1; 264 | private const int totalduration = 0; // ML : 2007-11-05 : was 100 but caused a flicker. 265 | private const int frameduration = totalduration / frames; 266 | /// 267 | /// Adjusts the size of the owner to accommodate the if the owner is currently displayed, or clears and resets active child controls of the if the is not currently displayed. 268 | /// 269 | /// true if the owner is currently displayed; otherwise, false. 270 | protected override void SetVisibleCore(bool visible) 271 | { 272 | double opacity = Opacity; 273 | if (visible && fade && focusOnOpen) Opacity = 0; 274 | base.SetVisibleCore(visible); 275 | if (!visible || !fade || !focusOnOpen) return; 276 | for (int i = 1; i <= frames; i++) 277 | { 278 | if (i > 1) 279 | { 280 | System.Threading.Thread.Sleep(frameduration); 281 | } 282 | Opacity = opacity * (double)i / (double)frames; 283 | } 284 | Opacity = opacity; 285 | } 286 | 287 | private bool resizableTop; 288 | private bool resizableRight; 289 | 290 | private void SetOwnerItem(Control control) 291 | { 292 | if (control == null) 293 | { 294 | return; 295 | } 296 | if (control is Popup) 297 | { 298 | Popup popupControl = control as Popup; 299 | ownerPopup = popupControl; 300 | ownerPopup.childPopup = this; 301 | OwnerItem = popupControl.Items[0]; 302 | return; 303 | } 304 | if (control.Parent != null) 305 | { 306 | SetOwnerItem(control.Parent); 307 | } 308 | } 309 | 310 | /// 311 | /// Raises the event. 312 | /// 313 | /// An that contains the event data. 314 | protected override void OnSizeChanged(EventArgs e) 315 | { 316 | content.MinimumSize = Size; 317 | content.MaximumSize = Size; 318 | content.Size = Size; 319 | content.Location = Point.Empty; 320 | base.OnSizeChanged(e); 321 | } 322 | 323 | /// 324 | /// Raises the event. 325 | /// 326 | /// A that contains the event data. 327 | protected override void OnOpening(CancelEventArgs e) 328 | { 329 | if (content.IsDisposed || content.Disposing) 330 | { 331 | e.Cancel = true; 332 | return; 333 | } 334 | UpdateRegion(); 335 | base.OnOpening(e); 336 | } 337 | 338 | /// 339 | /// Raises the event. 340 | /// 341 | /// An that contains the event data. 342 | protected override void OnOpened(EventArgs e) 343 | { 344 | if (ownerPopup != null) 345 | { 346 | ownerPopup._resizable = false; 347 | } 348 | if (focusOnOpen) 349 | { 350 | content.Focus(); 351 | } 352 | base.OnOpened(e); 353 | } 354 | 355 | protected override void OnClosed(ToolStripDropDownClosedEventArgs e) 356 | { 357 | if (ownerPopup != null) 358 | { 359 | ownerPopup._resizable = true; 360 | } 361 | base.OnClosed(e); 362 | } 363 | 364 | public DateTime LastClosedTimeStamp = DateTime.Now; 365 | 366 | protected override void OnVisibleChanged(EventArgs e) 367 | { 368 | if (Visible == false) 369 | LastClosedTimeStamp = DateTime.Now; 370 | base.OnVisibleChanged(e); 371 | } 372 | 373 | #endregion 374 | 375 | #region " Resizing Support " 376 | 377 | /// 378 | /// Processes Windows messages. 379 | /// 380 | /// The Windows to process. 381 | [SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.UnmanagedCode)] 382 | protected override void WndProc(ref Message m) 383 | { 384 | if (InternalProcessResizing(ref m, false)) 385 | { 386 | return; 387 | } 388 | base.WndProc(ref m); 389 | } 390 | 391 | /// 392 | /// Processes the resizing messages. 393 | /// 394 | /// The message. 395 | /// true, if the WndProc method from the base class shouldn't be invoked. 396 | [SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.UnmanagedCode)] 397 | public bool ProcessResizing(ref Message m) 398 | { 399 | return InternalProcessResizing(ref m, true); 400 | } 401 | 402 | [SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.UnmanagedCode)] 403 | private bool InternalProcessResizing(ref Message m, bool contentControl) 404 | { 405 | if (m.Msg == NativeMethods.WM_NCACTIVATE && m.WParam != IntPtr.Zero && childPopup != null && childPopup.Visible) 406 | { 407 | childPopup.Hide(); 408 | } 409 | if (!Resizable) 410 | { 411 | return false; 412 | } 413 | if (m.Msg == NativeMethods.WM_NCHITTEST) 414 | { 415 | return OnNcHitTest(ref m, contentControl); 416 | } 417 | else if (m.Msg == NativeMethods.WM_GETMINMAXINFO) 418 | { 419 | return OnGetMinMaxInfo(ref m); 420 | } 421 | return false; 422 | } 423 | 424 | [SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.UnmanagedCode)] 425 | private bool OnGetMinMaxInfo(ref Message m) 426 | { 427 | NativeMethods.MINMAXINFO minmax = (NativeMethods.MINMAXINFO)Marshal.PtrToStructure(m.LParam, typeof(NativeMethods.MINMAXINFO)); 428 | minmax.maxTrackSize = this.MaximumSize; 429 | minmax.minTrackSize = this.MinimumSize; 430 | Marshal.StructureToPtr(minmax, m.LParam, false); 431 | return true; 432 | } 433 | 434 | private bool OnNcHitTest(ref Message m, bool contentControl) 435 | { 436 | int x = NativeMethods.LOWORD(m.LParam); 437 | int y = NativeMethods.HIWORD(m.LParam); 438 | Point clientLocation = PointToClient(new Point(x, y)); 439 | 440 | GripBounds gripBouns = new GripBounds(contentControl ? content.ClientRectangle : ClientRectangle); 441 | IntPtr transparent = new IntPtr(NativeMethods.HTTRANSPARENT); 442 | 443 | if (resizableTop) 444 | { 445 | if (resizableRight && gripBouns.TopLeft.Contains(clientLocation)) 446 | { 447 | m.Result = contentControl ? transparent : (IntPtr)NativeMethods.HTTOPLEFT; 448 | return true; 449 | } 450 | if (!resizableRight && gripBouns.TopRight.Contains(clientLocation)) 451 | { 452 | m.Result = contentControl ? transparent : (IntPtr)NativeMethods.HTTOPRIGHT; 453 | return true; 454 | } 455 | if (gripBouns.Top.Contains(clientLocation)) 456 | { 457 | m.Result = contentControl ? transparent : (IntPtr)NativeMethods.HTTOP; 458 | return true; 459 | } 460 | } 461 | else 462 | { 463 | if (resizableRight && gripBouns.BottomLeft.Contains(clientLocation)) 464 | { 465 | m.Result = contentControl ? transparent : (IntPtr)NativeMethods.HTBOTTOMLEFT; 466 | return true; 467 | } 468 | if (!resizableRight && gripBouns.BottomRight.Contains(clientLocation)) 469 | { 470 | m.Result = contentControl ? transparent : (IntPtr)NativeMethods.HTBOTTOMRIGHT; 471 | return true; 472 | } 473 | if (gripBouns.Bottom.Contains(clientLocation)) 474 | { 475 | m.Result = contentControl ? transparent : (IntPtr)NativeMethods.HTBOTTOM; 476 | return true; 477 | } 478 | } 479 | if (resizableRight && gripBouns.Left.Contains(clientLocation)) 480 | { 481 | m.Result = contentControl ? transparent : (IntPtr)NativeMethods.HTLEFT; 482 | return true; 483 | } 484 | if (!resizableRight && gripBouns.Right.Contains(clientLocation)) 485 | { 486 | m.Result = contentControl ? transparent : (IntPtr)NativeMethods.HTRIGHT; 487 | return true; 488 | } 489 | return false; 490 | } 491 | 492 | private VS.VisualStyleRenderer sizeGripRenderer; 493 | /// 494 | /// Paints the size grip. 495 | /// 496 | /// The instance containing the event data. 497 | public void PaintSizeGrip(PaintEventArgs e) 498 | { 499 | if (e == null || e.Graphics == null || !resizable) 500 | { 501 | return; 502 | } 503 | Size clientSize = content.ClientSize; 504 | if (Application.RenderWithVisualStyles) 505 | { 506 | if (this.sizeGripRenderer == null) 507 | { 508 | this.sizeGripRenderer = new VS.VisualStyleRenderer(VS.VisualStyleElement.Status.Gripper.Normal); 509 | } 510 | this.sizeGripRenderer.DrawBackground(e.Graphics, new Rectangle(clientSize.Width - 0x10, clientSize.Height - 0x10, 0x10, 0x10)); 511 | } 512 | else 513 | { 514 | ControlPaint.DrawSizeGrip(e.Graphics, content.BackColor, clientSize.Width - 0x10, clientSize.Height - 0x10, 0x10, 0x10); 515 | } 516 | } 517 | 518 | #endregion 519 | } 520 | } 521 | -------------------------------------------------------------------------------- /Backup/PopupComboBox.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace PresentationControls 2 | { 3 | partial class PopupComboBox 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) 17 | { 18 | if (components != null) 19 | { 20 | components.Dispose(); 21 | } 22 | if (dropDown != null) 23 | { 24 | dropDown.Dispose(); 25 | } 26 | } 27 | base.Dispose(disposing); 28 | } 29 | 30 | #region Component Designer generated code 31 | 32 | /// 33 | /// Required method for Designer support - do not modify 34 | /// the contents of this method with the code editor. 35 | /// 36 | private void InitializeComponent() 37 | { 38 | this.SuspendLayout(); 39 | // 40 | // PopupComboBox 41 | // 42 | this.ResumeLayout(false); 43 | 44 | } 45 | 46 | #endregion 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /Backup/PopupComboBox.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.Security.Permissions; 9 | 10 | namespace PresentationControls 11 | { 12 | /// 13 | /// CodeProject.com "Simple pop-up control" "http://www.codeproject.com/cs/miscctrl/simplepopup.asp". 14 | /// Represents a Windows combo box control with a custom popup control attached. 15 | /// 16 | [ToolboxBitmap(typeof(System.Windows.Forms.ComboBox)), ToolboxItem(true), ToolboxItemFilter("System.Windows.Forms"), Description("Displays an editable text box with a drop-down list of permitted values.")] 17 | public partial class PopupComboBox : ComboBox 18 | { 19 | /// 20 | /// Initializes a new instance of the class. 21 | /// 22 | public PopupComboBox() 23 | { 24 | InitializeComponent(); 25 | base.DropDownHeight = base.DropDownWidth = 1; 26 | base.IntegralHeight = false; 27 | } 28 | 29 | /// 30 | /// The pop-up wrapper for the dropDownControl. 31 | /// Made PROTECTED instead of PRIVATE so descendent classes can set its Resizable property. 32 | /// Note however the pop-up properties must be set after the dropDownControl is assigned, since this 33 | /// popup wrapper is recreated when the dropDownControl is assigned. 34 | /// 35 | protected Popup dropDown; 36 | 37 | private Control dropDownControl; 38 | /// 39 | /// Gets or sets the drop down control. 40 | /// 41 | /// The drop down control. 42 | public Control DropDownControl 43 | { 44 | get 45 | { 46 | return dropDownControl; 47 | } 48 | set 49 | { 50 | if (dropDownControl == value) 51 | return; 52 | dropDownControl = value; 53 | dropDown = new Popup(value); 54 | } 55 | } 56 | 57 | /// 58 | /// Shows the drop down. 59 | /// 60 | public void ShowDropDown() 61 | { 62 | if (dropDown != null) 63 | { 64 | dropDown.Show(this); 65 | } 66 | } 67 | 68 | /// 69 | /// Hides the drop down. 70 | /// 71 | public void HideDropDown() 72 | { 73 | if (dropDown != null) 74 | { 75 | dropDown.Hide(); 76 | } 77 | } 78 | 79 | /// 80 | /// Processes Windows messages. 81 | /// 82 | /// The Windows to process. 83 | [SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.UnmanagedCode)] 84 | protected override void WndProc(ref Message m) 85 | { 86 | if (m.Msg == (NativeMethods.WM_REFLECT + NativeMethods.WM_COMMAND)) 87 | { 88 | if (NativeMethods.HIWORD(m.WParam) == NativeMethods.CBN_DROPDOWN) 89 | { 90 | // Blocks a redisplay when the user closes the control by clicking 91 | // on the combobox. 92 | TimeSpan TimeSpan = DateTime.Now.Subtract(dropDown.LastClosedTimeStamp); 93 | if (TimeSpan.TotalMilliseconds > 500) 94 | ShowDropDown(); 95 | return; 96 | } 97 | } 98 | base.WndProc(ref m); 99 | } 100 | 101 | #region " Unused Properties " 102 | 103 | /// This property is not relevant for this class. 104 | /// This property is not relevant for this class. 105 | [Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), EditorBrowsable(EditorBrowsableState.Never)] 106 | public new int DropDownWidth 107 | { 108 | get { return base.DropDownWidth; } 109 | set { base.DropDownWidth = value; } 110 | } 111 | 112 | /// This property is not relevant for this class. 113 | /// This property is not relevant for this class. 114 | [Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), EditorBrowsable(EditorBrowsableState.Never)] 115 | public new int DropDownHeight 116 | { 117 | get { return base.DropDownHeight; } 118 | set 119 | { 120 | dropDown.Height = value; 121 | base.DropDownHeight = value; 122 | } 123 | } 124 | 125 | /// This property is not relevant for this class. 126 | /// This property is not relevant for this class. 127 | [Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), EditorBrowsable(EditorBrowsableState.Never)] 128 | public new bool IntegralHeight 129 | { 130 | get { return base.IntegralHeight; } 131 | set { base.IntegralHeight = value; } 132 | } 133 | 134 | /// This property is not relevant for this class. 135 | /// This property is not relevant for this class. 136 | [Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), EditorBrowsable(EditorBrowsableState.Never)] 137 | public new ObjectCollection Items 138 | { 139 | get { return base.Items; } 140 | } 141 | 142 | /// This property is not relevant for this class. 143 | /// This property is not relevant for this class. 144 | [Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), EditorBrowsable(EditorBrowsableState.Never)] 145 | public new int ItemHeight 146 | { 147 | get { return base.ItemHeight; } 148 | set { base.ItemHeight = value; } 149 | } 150 | 151 | #endregion 152 | } 153 | } 154 | -------------------------------------------------------------------------------- /Backup/PopupComboBox.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 | 121 | False 122 | 123 | -------------------------------------------------------------------------------- /Backup/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("CheckBoxComboBox")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("IT")] 12 | [assembly: AssemblyProduct("CheckBoxComboBox")] 13 | [assembly: AssemblyCopyright("Copyright © IT 2007")] 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("0b11e2be-4211-4d2a-9102-6847a56d6fd8")] 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 Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Backup/Selection Wrappers/ListSelectionWrapper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Reflection; 7 | using System.ComponentModel; 8 | 9 | namespace PresentationControls 10 | { 11 | /// 12 | /// Maintains an additional "Selected" & "Count" value for each item in a List. 13 | /// Useful in the CheckBoxComboBox. It holds a reference to the List[Index] Item and 14 | /// whether it is selected or not. 15 | /// It also caters for a Count, if needed. 16 | /// 17 | /// 18 | public class ListSelectionWrapper : List> 19 | { 20 | #region CONSTRUCTOR 21 | 22 | /// 23 | /// No property on the object is specified for display purposes, so simple ToString() operation 24 | /// will be performed. And no Counts will be displayed 25 | /// 26 | public ListSelectionWrapper(IEnumerable source) : this(source, false) { } 27 | /// 28 | /// No property on the object is specified for display purposes, so simple ToString() operation 29 | /// will be performed. 30 | /// 31 | public ListSelectionWrapper(IEnumerable source, bool showCounts) 32 | : base() 33 | { 34 | _Source = source; 35 | _ShowCounts = showCounts; 36 | if (_Source is IBindingList) 37 | ((IBindingList)_Source).ListChanged += new ListChangedEventHandler(ListSelectionWrapper_ListChanged); 38 | Populate(); 39 | } 40 | /// 41 | /// A Display "Name" property is specified. ToString() will not be performed on items. 42 | /// This is specifically useful on DataTable implementations, or where PropertyDescriptors are used to read the values. 43 | /// If a PropertyDescriptor is not found, a Property will be used. 44 | /// 45 | public ListSelectionWrapper(IEnumerable source, string usePropertyAsDisplayName) : this(source, false, usePropertyAsDisplayName) { } 46 | /// 47 | /// A Display "Name" property is specified. ToString() will not be performed on items. 48 | /// This is specifically useful on DataTable implementations, or where PropertyDescriptors are used to read the values. 49 | /// If a PropertyDescriptor is not found, a Property will be used. 50 | /// 51 | public ListSelectionWrapper(IEnumerable source, bool showCounts, string usePropertyAsDisplayName) 52 | : this(source, showCounts) 53 | { 54 | _DisplayNameProperty = usePropertyAsDisplayName; 55 | } 56 | 57 | #endregion 58 | 59 | #region PRIVATE PROPERTIES 60 | 61 | /// 62 | /// Is a Count indicator used. 63 | /// 64 | private bool _ShowCounts; 65 | /// 66 | /// The original List of values wrapped. A "Selected" and possibly "Count" functionality is added. 67 | /// 68 | private IEnumerable _Source; 69 | /// 70 | /// Used to indicate NOT to use ToString(), but read this property instead as a display value. 71 | /// 72 | private string _DisplayNameProperty = null; 73 | 74 | #endregion 75 | 76 | #region PUBLIC PROPERTIES 77 | 78 | /// 79 | /// When specified, indicates that ToString() should not be performed on the items. 80 | /// This property will be read instead. 81 | /// This is specifically useful on DataTable implementations, where PropertyDescriptors are used to read the values. 82 | /// 83 | public string DisplayNameProperty 84 | { 85 | get { return _DisplayNameProperty; } 86 | set { _DisplayNameProperty = value; } 87 | } 88 | /// 89 | /// Builds a concatenation list of selected items in the list. 90 | /// 91 | public string SelectedNames 92 | { 93 | get 94 | { 95 | string Text = ""; 96 | foreach (ObjectSelectionWrapper Item in this) 97 | if (Item.Selected) 98 | Text += ( 99 | string.IsNullOrEmpty(Text) 100 | ? String.Format("\"{0}\"", Item.Name) 101 | : String.Format(" & \"{0}\"", Item.Name)); 102 | return Text; 103 | } 104 | } 105 | /// 106 | /// Indicates whether the Item display value (Name) should include a count. 107 | /// 108 | public bool ShowCounts 109 | { 110 | get { return _ShowCounts; } 111 | set { _ShowCounts = value; } 112 | } 113 | 114 | #endregion 115 | 116 | #region HELPER MEMBERS 117 | 118 | /// 119 | /// Reset all counts to zero. 120 | /// 121 | public void ClearCounts() 122 | { 123 | foreach (ObjectSelectionWrapper Item in this) 124 | Item.Count = 0; 125 | } 126 | /// 127 | /// Creates a ObjectSelectionWrapper item. 128 | /// Note that the constructor signature of sub classes classes are important. 129 | /// 130 | /// 131 | /// 132 | private ObjectSelectionWrapper CreateSelectionWrapper(IEnumerator Object) 133 | { 134 | Type[] Types = new Type[] { typeof(T), this.GetType() }; 135 | ConstructorInfo CI = typeof(ObjectSelectionWrapper).GetConstructor(Types); 136 | if (CI == null) 137 | throw new Exception(String.Format( 138 | "The selection wrapper class {0} must have a constructor with ({1} Item, {2} Container) parameters.", 139 | typeof(ObjectSelectionWrapper), 140 | typeof(T), 141 | this.GetType())); 142 | object[] parameters = new object[] { Object.Current, this }; 143 | object result = CI.Invoke(parameters); 144 | return (ObjectSelectionWrapper)result; 145 | } 146 | 147 | public ObjectSelectionWrapper FindObjectWithItem(T Object) 148 | { 149 | return Find(new Predicate>( 150 | delegate(ObjectSelectionWrapper target) 151 | { 152 | return target.Item.Equals(Object); 153 | })); 154 | } 155 | 156 | /* 157 | public TSelectionWrapper FindObjectWithKey(object key) 158 | { 159 | return FindObjectWithKey(new object[] { key }); 160 | } 161 | 162 | public TSelectionWrapper FindObjectWithKey(object[] keys) 163 | { 164 | return Find(new Predicate( 165 | delegate(TSelectionWrapper target) 166 | { 167 | return 168 | ReflectionHelper.CompareKeyValues( 169 | ReflectionHelper.GetKeyValuesFromObject(target.Item, target.Item.TableInfo), 170 | keys); 171 | })); 172 | } 173 | 174 | public object[] GetArrayOfSelectedKeys() 175 | { 176 | List List = new List(); 177 | foreach (TSelectionWrapper Item in this) 178 | if (Item.Selected) 179 | { 180 | if (Item.Item.TableInfo.KeyProperties.Length == 1) 181 | List.Add(ReflectionHelper.GetKeyValueFromObject(Item.Item, Item.Item.TableInfo)); 182 | else 183 | List.Add(ReflectionHelper.GetKeyValuesFromObject(Item.Item, Item.Item.TableInfo)); 184 | } 185 | return List.ToArray(); 186 | } 187 | 188 | public T[] GetArrayOfSelectedKeys() 189 | { 190 | List List = new List(); 191 | foreach (TSelectionWrapper Item in this) 192 | if (Item.Selected) 193 | { 194 | if (Item.Item.TableInfo.KeyProperties.Length == 1) 195 | List.Add((T)ReflectionHelper.GetKeyValueFromObject(Item.Item, Item.Item.TableInfo)); 196 | else 197 | throw new LibraryException("This generator only supports single value keys."); 198 | // List.Add((T)ReflectionHelper.GetKeyValuesFromObject(Item.Item, Item.Item.TableInfo)); 199 | } 200 | return List.ToArray(); 201 | } 202 | */ 203 | private void Populate() 204 | { 205 | Clear(); 206 | /* 207 | for(int Index = 0; Index <= _Source.Count -1; Index++) 208 | Add(CreateSelectionWrapper(_Source[Index])); 209 | */ 210 | IEnumerator Enumerator = _Source.GetEnumerator(); 211 | if (Enumerator != null) 212 | while (Enumerator.MoveNext()) 213 | Add(CreateSelectionWrapper(Enumerator)); 214 | } 215 | 216 | #endregion 217 | 218 | #region EVENT HANDLERS 219 | 220 | private void ListSelectionWrapper_ListChanged(object sender, ListChangedEventArgs e) 221 | { 222 | switch (e.ListChangedType) 223 | { 224 | case ListChangedType.ItemAdded: 225 | Add(CreateSelectionWrapper((IEnumerator)((IBindingList)_Source)[e.NewIndex])); 226 | break; 227 | case ListChangedType.ItemDeleted: 228 | Remove(FindObjectWithItem((T)((IBindingList)_Source)[e.OldIndex])); 229 | break; 230 | case ListChangedType.Reset: 231 | Populate(); 232 | break; 233 | } 234 | } 235 | 236 | #endregion 237 | } 238 | } 239 | -------------------------------------------------------------------------------- /Backup/Selection Wrappers/ObjectSelectionWrapper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.ComponentModel; 7 | using System.Reflection; 8 | using System.Data; 9 | 10 | namespace PresentationControls 11 | { 12 | /// 13 | /// Used together with the ListSelectionWrapper in order to wrap data sources for a CheckBoxComboBox. 14 | /// It helps to ensure you don't add an extra "Selected" property to a class that don't really need or want that information. 15 | /// 16 | public class ObjectSelectionWrapper : INotifyPropertyChanged 17 | { 18 | public ObjectSelectionWrapper(T item, ListSelectionWrapper container) 19 | : base() 20 | { 21 | _Container = container; 22 | _Item = item; 23 | } 24 | 25 | 26 | #region PRIVATE PROPERTIES 27 | 28 | /// 29 | /// Used as a count indicator for the item. Not necessarily displayed. 30 | /// 31 | private int _Count = 0; 32 | /// 33 | /// Is this item selected. 34 | /// 35 | private bool _Selected = false; 36 | /// 37 | /// A reference to the wrapped item. 38 | /// 39 | private T _Item; 40 | /// 41 | /// The containing list for these selections. 42 | /// 43 | private ListSelectionWrapper _Container; 44 | 45 | #endregion 46 | 47 | #region PUBLIC PROPERTIES 48 | 49 | /// 50 | /// An indicator of how many items with the specified status is available for the current filter level. 51 | /// Thaught this would make the app a bit more user-friendly and help not to miss items in Statusses 52 | /// that are not often used. 53 | /// 54 | public int Count 55 | { 56 | get { return _Count; } 57 | set { _Count = value; } 58 | } 59 | /// 60 | /// A reference to the item wrapped. 61 | /// 62 | public T Item 63 | { 64 | get { return _Item; } 65 | set { _Item = value; } 66 | } 67 | /// 68 | /// The item display value. If ShowCount is true, it displays the "Name [Count]". 69 | /// 70 | public string Name 71 | { 72 | get 73 | { 74 | string Name = null; 75 | if (string.IsNullOrEmpty(_Container.DisplayNameProperty)) 76 | Name = Item.ToString(); 77 | else if (Item is DataRow) // A specific implementation for DataRow 78 | Name = ((DataRow)((Object)Item))[_Container.DisplayNameProperty].ToString(); 79 | else 80 | { 81 | PropertyDescriptorCollection PDs = TypeDescriptor.GetProperties(Item); 82 | foreach (PropertyDescriptor PD in PDs) 83 | if (PD.Name.CompareTo(_Container.DisplayNameProperty) == 0) 84 | { 85 | Name = (string)PD.GetValue(Item).ToString(); 86 | break; 87 | } 88 | if (string.IsNullOrEmpty(Name)) 89 | { 90 | PropertyInfo PI = Item.GetType().GetProperty(_Container.DisplayNameProperty); 91 | if (PI == null) 92 | throw new Exception(String.Format( 93 | "Property {0} cannot be found on {1}.", 94 | _Container.DisplayNameProperty, 95 | Item.GetType())); 96 | Name = PI.GetValue(Item, null).ToString(); 97 | } 98 | } 99 | return _Container.ShowCounts ? String.Format("{0} [{1}]", Name, Count) : Name; 100 | } 101 | } 102 | /// 103 | /// The textbox display value. The names concatenated. 104 | /// 105 | public string NameConcatenated 106 | { 107 | get { return _Container.SelectedNames; } 108 | } 109 | /// 110 | /// Indicates whether the item is selected. 111 | /// 112 | public bool Selected 113 | { 114 | get { return _Selected; } 115 | set 116 | { 117 | if (_Selected != value) 118 | { 119 | _Selected = value; 120 | OnPropertyChanged("Selected"); 121 | OnPropertyChanged("NameConcatenated"); 122 | } 123 | } 124 | } 125 | 126 | #endregion 127 | 128 | #region INotifyPropertyChanged 129 | 130 | public event PropertyChangedEventHandler PropertyChanged; 131 | 132 | protected virtual void OnPropertyChanged(string propertyName) 133 | { 134 | PropertyChangedEventHandler handler = PropertyChanged; 135 | if (handler != null) 136 | handler(this, new PropertyChangedEventArgs(propertyName)); 137 | } 138 | 139 | #endregion 140 | } 141 | } 142 | -------------------------------------------------------------------------------- /Backup/obj/Debug/CheckBoxComboBox.csproj.AssemblyReference.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Suprcode/Crystal.MapEditor/dcb5d3049e2980055fda3093fa89baa5168937b9/Backup/obj/Debug/CheckBoxComboBox.csproj.AssemblyReference.cache -------------------------------------------------------------------------------- /Backup/obj/Release/CheckBoxComboBox.csproj.AssemblyReference.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Suprcode/Crystal.MapEditor/dcb5d3049e2980055fda3093fa89baa5168937b9/Backup/obj/Release/CheckBoxComboBox.csproj.AssemblyReference.cache -------------------------------------------------------------------------------- /Components/SlimDX.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Suprcode/Crystal.MapEditor/dcb5d3049e2980055fda3093fa89baa5168937b9/Components/SlimDX.dll -------------------------------------------------------------------------------- /Components/SlimDX.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Suprcode/Crystal.MapEditor/dcb5d3049e2980055fda3093fa89baa5168937b9/Components/SlimDX.pdb -------------------------------------------------------------------------------- /Map Editor.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2013 4 | VisualStudioVersion = 12.0.40629.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Map Editor", "Map Editor\Map Editor.csproj", "{667362DB-5C56-4B9F-9FD5-0797D13C8766}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {667362DB-5C56-4B9F-9FD5-0797D13C8766}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {667362DB-5C56-4B9F-9FD5-0797D13C8766}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {667362DB-5C56-4B9F-9FD5-0797D13C8766}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {667362DB-5C56-4B9F-9FD5-0797D13C8766}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | EndGlobal 23 | -------------------------------------------------------------------------------- /Map Editor.v12.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Suprcode/Crystal.MapEditor/dcb5d3049e2980055fda3093fa89baa5168937b9/Map Editor.v12.suo -------------------------------------------------------------------------------- /Map Editor/CellInfoControl.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Drawing; 5 | using System.Data; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Windows.Forms; 9 | 10 | namespace Map_Editor 11 | { 12 | public partial class CellInfoControl : UserControl 13 | { 14 | public CellInfoControl() 15 | { 16 | InitializeComponent(); 17 | } 18 | 19 | public void SetText(int x, int y, int backImageIndex, int middleImageIndex, int frontImageIndex,int bLibIndex,int mLibIndex,int fLibIndex,string bLibName,string mLibName,string fLibName,int backLimit,int frontLimit, 20 | byte fFrame, byte ftick, bool fblend, byte mFrame, byte mTick, bool mBlend,byte doorOffSet,byte doorIndex,bool entityDoor,byte light,bool fishing) 21 | { 22 | LabX.Text = x.ToString(); 23 | labY.Text = y.ToString(); 24 | labBackImageIndex.Text = backImageIndex.ToString(); 25 | labMiddleImageIndex.Text = middleImageIndex.ToString(); 26 | labFrontImageIndex.Text = frontImageIndex.ToString(); 27 | if ((bLibIndex >= 0) && (bLibIndex <= 99)) 28 | { 29 | labBVersion.Text = "WemadeMir2"; 30 | } 31 | else if (bLibIndex >= 100 && (bLibIndex <= 199)) 32 | { 33 | labBVersion.Text = "ShandaMir2"; 34 | } 35 | else if (bLibIndex >= 200 && (bLibIndex <= 299)) 36 | { 37 | labBVersion.Text = "WemadeMir3"; 38 | } 39 | else if (bLibIndex >= 300 && (bLibIndex <= 399)) 40 | { 41 | labBVersion.Text = "ShandaMir3"; 42 | } 43 | else 44 | { 45 | labBVersion.Text = ""; 46 | } 47 | 48 | if ((mLibIndex >= 0) && (mLibIndex <= 99)) 49 | { 50 | labMVersion.Text = "WemadeMir2"; 51 | } 52 | else if (mLibIndex >= 100 && (mLibIndex <= 199)) 53 | { 54 | labMVersion.Text = "ShandaMir2"; 55 | } 56 | else if (mLibIndex >= 200 && (mLibIndex <= 299)) 57 | { 58 | labMVersion.Text = "WemadeMir3"; 59 | } 60 | else if (mLibIndex >= 300 && (mLibIndex <= 399)) 61 | { 62 | labMVersion.Text = "ShandaMir3"; 63 | } 64 | else 65 | { 66 | labMVersion.Text = ""; 67 | } 68 | 69 | if ((fLibIndex >= 0) && (fLibIndex <= 99)) 70 | { 71 | labFVersion.Text = "WemadeMir2"; 72 | } 73 | else if (fLibIndex >= 100 && (fLibIndex <= 199)) 74 | { 75 | labFVersion.Text = "ShandaMir2"; 76 | } 77 | else if (fLibIndex >= 200 && (fLibIndex <= 299)) 78 | { 79 | labFVersion.Text = "WemadeMir3"; 80 | } 81 | else if (fLibIndex >= 300 && (fLibIndex <= 399)) 82 | { 83 | labFVersion.Text = "ShandaMir3"; 84 | } 85 | else 86 | { 87 | labFVersion.Text = ""; 88 | } 89 | 90 | labBLibIndex.Text = bLibIndex.ToString(); 91 | labMLibIndex.Text = mLibIndex.ToString(); 92 | labFLibIndex.Text = fLibIndex.ToString(); 93 | 94 | labBLibName.Text = bLibName; 95 | labMLibName.Text = mLibName; 96 | labFLibName.Text = fLibName; 97 | 98 | if (backLimit!=0) 99 | { 100 | LabBackLimit.Text = "True"; 101 | } 102 | else 103 | { 104 | LabBackLimit.Text = "False"; 105 | } 106 | if (frontLimit != 0) 107 | { 108 | labFrontLimit.Text = "True"; 109 | } 110 | else 111 | { 112 | labFrontLimit.Text = "False"; 113 | } 114 | 115 | 116 | if (fFrame>0) 117 | { 118 | labFFrame.Text = fFrame.ToString(); 119 | labFTick.Text = ftick.ToString(); 120 | labFBlend.Text = fblend.ToString(); 121 | } 122 | else 123 | { 124 | labFFrame.Text = String.Empty; 125 | labFTick.Text = String.Empty; 126 | labFBlend.Text = String.Empty; 127 | } 128 | if ((mFrame>0)&&(mFrame<255)) 129 | { 130 | labMFrame.Text = (mFrame&0x0F).ToString(); 131 | labMTick.Text = mTick.ToString(); 132 | labMBlend.Text = Convert.ToBoolean(mFrame & 0x0F).ToString(); 133 | } 134 | else 135 | { 136 | labMFrame.Text = String.Empty; 137 | labMTick.Text = String.Empty; 138 | labMBlend.Text = String.Empty; 139 | } 140 | 141 | labDoorOffSet.Text = doorOffSet.ToString(); 142 | labDoorIndex.Text = doorIndex.ToString(); 143 | labEntityDoor.Text = entityDoor.ToString(); 144 | 145 | labLight.Text = light.ToString(); 146 | labfishing.Text = fishing.ToString(); 147 | } 148 | } 149 | } 150 | -------------------------------------------------------------------------------- /Map Editor/CellInfoControl.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 | -------------------------------------------------------------------------------- /Map Editor/CellInfoData.cs: -------------------------------------------------------------------------------- 1 | namespace Map_Editor 2 | { 3 | public class CellInfoData 4 | { 5 | public int X; 6 | public int Y; 7 | public CellInfo CellInfo; 8 | 9 | public CellInfoData() 10 | { 11 | 12 | } 13 | 14 | public CellInfoData(int x, int y, CellInfo cellInfo) 15 | { 16 | X = x; 17 | Y = y; 18 | this.CellInfo = new CellInfo 19 | { 20 | FrontImage = cellInfo.FrontImage, 21 | BackImage = cellInfo.BackImage, 22 | BackIndex = cellInfo.BackIndex, 23 | DoorIndex = cellInfo.DoorIndex, 24 | DoorOffset = cellInfo.DoorOffset, 25 | FishingCell = cellInfo.FishingCell, 26 | FrontAnimationFrame = cellInfo.FrontAnimationFrame, 27 | FrontAnimationTick = cellInfo.FrontAnimationTick, 28 | FrontIndex = cellInfo.FrontIndex, 29 | Light = cellInfo.Light, 30 | MiddleAnimationFrame = cellInfo.MiddleAnimationFrame, 31 | MiddleAnimationTick = cellInfo.MiddleAnimationTick, 32 | MiddleImage = cellInfo.MiddleImage, 33 | MiddleIndex = cellInfo.MiddleIndex, 34 | TileAnimationFrames = cellInfo.TileAnimationFrames, 35 | TileAnimationImage = cellInfo.TileAnimationImage, 36 | TileAnimationOffset = cellInfo.TileAnimationOffset, 37 | Unknown = cellInfo.Unknown 38 | }; 39 | } 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /Map Editor/Editor.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace Map_Editor 4 | { 5 | public class Editor 6 | { 7 | private Stack _unDo, _reDo; 8 | 9 | public Editor( ) 10 | { 11 | _unDo = new Stack(); 12 | _reDo = new Stack(); 13 | } 14 | 15 | public CellInfoData[] UnDo 16 | { 17 | get 18 | { 19 | if (_unDo.Count > 0) 20 | { 21 | return _unDo.Pop(); 22 | } 23 | else 24 | { 25 | return null; 26 | } 27 | } 28 | set 29 | { 30 | _unDo.Push((CellInfoData[])value.Clone()); 31 | } 32 | } 33 | 34 | public CellInfoData[] ReDo 35 | { 36 | get 37 | { 38 | if (_reDo.Count > 0) 39 | { 40 | return _reDo.Pop(); 41 | } 42 | else 43 | { 44 | return null; 45 | } 46 | } 47 | set 48 | { 49 | _reDo.Push((CellInfoData[])value.Clone()); 50 | } 51 | } 52 | 53 | public int UnDoCount() 54 | { 55 | return _unDo.Count; 56 | } 57 | 58 | public int ReDoCount() 59 | { 60 | return _reDo.Count; 61 | } 62 | 63 | public void UndoClear() 64 | { 65 | _unDo.Clear(); 66 | } 67 | 68 | public void ReDoClear() 69 | { 70 | _reDo.Clear(); 71 | } 72 | } 73 | 74 | } 75 | -------------------------------------------------------------------------------- /Map Editor/FilesNameComparer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | 4 | namespace Map_Editor 5 | { 6 | /// 7 | ///Mainly used for file name comparison. 8 | /// 9 | public class FilesNameComparerClass : IComparer 10 | { 11 | // Calls CaseInsensitiveComparer.Compare with the parameters reversed. 12 | /// 13 | ///Compare two strings. If they contain numbers, the numbers are compared based on their size. 14 | /// 15 | /// 16 | /// 17 | /// 18 | int IComparer.Compare(Object x, Object y) 19 | { 20 | if (x == null || y == null) 21 | throw new ArgumentException("Parameters can't be null"); 22 | string fileA = x as string; 23 | string fileB = y as string; 24 | char[] arr1 = fileA.ToCharArray(); 25 | char[] arr2 = fileB.ToCharArray(); 26 | int i = 0, j = 0; 27 | while (i < arr1.Length && j < arr2.Length) 28 | { 29 | if (char.IsDigit(arr1[i]) && char.IsDigit(arr2[j])) 30 | { 31 | string s1 = "", s2 = ""; 32 | while (i < arr1.Length && char.IsDigit(arr1[i])) 33 | { 34 | s1 += arr1[i]; 35 | i++; 36 | } 37 | while (j < arr2.Length && char.IsDigit(arr2[j])) 38 | { 39 | s2 += arr2[j]; 40 | j++; 41 | } 42 | if (int.Parse(s1) > int.Parse(s2)) 43 | { 44 | return 1; 45 | } 46 | if (int.Parse(s1) < int.Parse(s2)) 47 | { 48 | return -1; 49 | } 50 | } 51 | else 52 | { 53 | if (arr1[i] > arr2[j]) 54 | { 55 | return 1; 56 | } 57 | if (arr1[i] < arr2[j]) 58 | { 59 | return -1; 60 | } 61 | i++; 62 | j++; 63 | } 64 | } 65 | if (arr1.Length == arr2.Length) 66 | { 67 | return 0; 68 | } 69 | else 70 | { 71 | return arr1.Length > arr2.Length ? 1 : -1; 72 | } 73 | // return string.Compare( fileA, fileB ); 74 | // return( (new CaseInsensitiveComparer()).Compare( y, x ) ); 75 | } 76 | } 77 | // The calling code is as follows: 78 | //IComparer fileNameComparer = new FilesNameComparerClass(); 79 | //List.Sort( fileNameComparer ); 80 | //The sorted strings are sorted by the values ​​in the strings, as follows: 81 | //aa1,aa2,aa10,aa100 82 | } 83 | -------------------------------------------------------------------------------- /Map Editor/FrmAbout.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace Map_Editor 2 | { 3 | partial class FrmAbout 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 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmAbout)); 32 | this.label1 = new System.Windows.Forms.Label(); 33 | this.label2 = new System.Windows.Forms.Label(); 34 | this.label3 = new System.Windows.Forms.Label(); 35 | this.btnclose = new System.Windows.Forms.Button(); 36 | this.SuspendLayout(); 37 | // 38 | // label1 39 | // 40 | this.label1.AutoSize = true; 41 | this.label1.BackColor = System.Drawing.Color.White; 42 | this.label1.Font = new System.Drawing.Font("Comic Sans MS", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 43 | this.label1.ForeColor = System.Drawing.Color.Black; 44 | this.label1.Location = new System.Drawing.Point(6, 252); 45 | this.label1.Name = "label1"; 46 | this.label1.Size = new System.Drawing.Size(237, 19); 47 | this.label1.TabIndex = 0; 48 | this.label1.Text = "Author : xiyue; mod by Akaras, M2P"; 49 | // 50 | // label2 51 | // 52 | this.label2.AutoSize = true; 53 | this.label2.BackColor = System.Drawing.Color.White; 54 | this.label2.Font = new System.Drawing.Font("Comic Sans MS", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 55 | this.label2.ForeColor = System.Drawing.Color.Black; 56 | this.label2.Location = new System.Drawing.Point(6, 288); 57 | this.label2.Name = "label2"; 58 | this.label2.Size = new System.Drawing.Size(175, 19); 59 | this.label2.TabIndex = 1; 60 | this.label2.Text = "Email:xiyue173@163.com"; 61 | // 62 | // label3 63 | // 64 | this.label3.AutoSize = true; 65 | this.label3.BackColor = System.Drawing.Color.White; 66 | this.label3.Font = new System.Drawing.Font("Comic Sans MS", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 67 | this.label3.ForeColor = System.Drawing.Color.Black; 68 | this.label3.Location = new System.Drawing.Point(6, 216); 69 | this.label3.Name = "label3"; 70 | this.label3.Size = new System.Drawing.Size(146, 19); 71 | this.label3.TabIndex = 2; 72 | this.label3.Text = "Version: 1.1 Suprcode"; 73 | // 74 | // btnclose 75 | // 76 | this.btnclose.Font = new System.Drawing.Font("Comic Sans MS", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 77 | this.btnclose.Location = new System.Drawing.Point(346, 288); 78 | this.btnclose.Name = "btnclose"; 79 | this.btnclose.Size = new System.Drawing.Size(75, 25); 80 | this.btnclose.TabIndex = 3; 81 | this.btnclose.Text = "Close"; 82 | this.btnclose.UseVisualStyleBackColor = true; 83 | this.btnclose.Click += new System.EventHandler(this.btnclose_Click); 84 | // 85 | // FrmAbout 86 | // 87 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 88 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 89 | this.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage"))); 90 | this.ClientSize = new System.Drawing.Size(423, 317); 91 | this.Controls.Add(this.btnclose); 92 | this.Controls.Add(this.label3); 93 | this.Controls.Add(this.label2); 94 | this.Controls.Add(this.label1); 95 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; 96 | this.Name = "FrmAbout"; 97 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; 98 | this.Text = "FrmAbout"; 99 | this.ResumeLayout(false); 100 | this.PerformLayout(); 101 | 102 | } 103 | 104 | #endregion 105 | 106 | private System.Windows.Forms.Label label1; 107 | private System.Windows.Forms.Label label2; 108 | private System.Windows.Forms.Label label3; 109 | private System.Windows.Forms.Button btnclose; 110 | } 111 | } -------------------------------------------------------------------------------- /Map Editor/FrmAbout.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Windows.Forms; 9 | 10 | namespace Map_Editor 11 | { 12 | public partial class FrmAbout : Form 13 | { 14 | public FrmAbout() 15 | { 16 | InitializeComponent(); 17 | } 18 | 19 | private void btnclose_Click(object sender, EventArgs e) 20 | { 21 | Close(); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Map Editor/FrmJump.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace Map_Editor 2 | { 3 | partial class FrmJump 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.label1 = new System.Windows.Forms.Label(); 32 | this.txtX = new System.Windows.Forms.TextBox(); 33 | this.txtY = new System.Windows.Forms.TextBox(); 34 | this.label2 = new System.Windows.Forms.Label(); 35 | this.btnJump = new System.Windows.Forms.Button(); 36 | this.SuspendLayout(); 37 | // 38 | // label1 39 | // 40 | this.label1.AutoSize = true; 41 | this.label1.Location = new System.Drawing.Point(36, 33); 42 | this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); 43 | this.label1.Name = "label1"; 44 | this.label1.Size = new System.Drawing.Size(17, 17); 45 | this.label1.TabIndex = 0; 46 | this.label1.Text = "X"; 47 | // 48 | // txtX 49 | // 50 | this.txtX.Location = new System.Drawing.Point(59, 29); 51 | this.txtX.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); 52 | this.txtX.Name = "txtX"; 53 | this.txtX.Size = new System.Drawing.Size(63, 22); 54 | this.txtX.TabIndex = 1; 55 | this.txtX.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtX_KeyDown); 56 | // 57 | // txtY 58 | // 59 | this.txtY.Location = new System.Drawing.Point(59, 65); 60 | this.txtY.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); 61 | this.txtY.Name = "txtY"; 62 | this.txtY.Size = new System.Drawing.Size(63, 22); 63 | this.txtY.TabIndex = 3; 64 | this.txtY.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtY_KeyDown); 65 | // 66 | // label2 67 | // 68 | this.label2.AutoSize = true; 69 | this.label2.Location = new System.Drawing.Point(36, 69); 70 | this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); 71 | this.label2.Name = "label2"; 72 | this.label2.Size = new System.Drawing.Size(17, 17); 73 | this.label2.TabIndex = 2; 74 | this.label2.Text = "Y"; 75 | // 76 | // btnJump 77 | // 78 | this.btnJump.DialogResult = System.Windows.Forms.DialogResult.OK; 79 | this.btnJump.Location = new System.Drawing.Point(144, 47); 80 | this.btnJump.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); 81 | this.btnJump.Name = "btnJump"; 82 | this.btnJump.Size = new System.Drawing.Size(100, 31); 83 | this.btnJump.TabIndex = 4; 84 | this.btnJump.Text = "Jump"; 85 | this.btnJump.UseVisualStyleBackColor = true; 86 | this.btnJump.Click += new System.EventHandler(this.btnJump_Click); 87 | // 88 | // FrmJump 89 | // 90 | this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); 91 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 92 | this.ClientSize = new System.Drawing.Size(281, 113); 93 | this.Controls.Add(this.btnJump); 94 | this.Controls.Add(this.txtY); 95 | this.Controls.Add(this.label2); 96 | this.Controls.Add(this.txtX); 97 | this.Controls.Add(this.label1); 98 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; 99 | this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); 100 | this.MaximizeBox = false; 101 | this.MinimizeBox = false; 102 | this.Name = "FrmJump"; 103 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; 104 | this.Text = "FrmJump"; 105 | this.ResumeLayout(false); 106 | this.PerformLayout(); 107 | 108 | } 109 | 110 | #endregion 111 | 112 | private System.Windows.Forms.Label label1; 113 | private System.Windows.Forms.TextBox txtX; 114 | private System.Windows.Forms.TextBox txtY; 115 | private System.Windows.Forms.Label label2; 116 | private System.Windows.Forms.Button btnJump; 117 | } 118 | } -------------------------------------------------------------------------------- /Map Editor/FrmJump.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Windows.Forms; 9 | 10 | namespace Map_Editor 11 | { 12 | public partial class FrmJump : Form 13 | { 14 | private Main.DelJump _delJump; 15 | public FrmJump() 16 | { 17 | InitializeComponent(); 18 | } 19 | 20 | public FrmJump(Main.DelJump delJump) 21 | { 22 | InitializeComponent(); 23 | _delJump = delJump; 24 | } 25 | 26 | private void btnJump_Click(object sender, EventArgs e) 27 | { 28 | if (txtX.Text.Trim() != String.Empty) 29 | { 30 | if (txtY.Text.Trim() != String.Empty) 31 | { 32 | int x = Convert.ToInt32(txtX.Text.Trim()); 33 | int y = Convert.ToInt32(txtY.Text.Trim()); 34 | _delJump(x, y); 35 | Dispose(); 36 | //this.Close(); 37 | } 38 | } 39 | } 40 | 41 | private void txtX_KeyDown(object sender, KeyEventArgs e) 42 | { 43 | switch (e.KeyCode) 44 | { 45 | case Keys.Enter: 46 | KeyPressEventArgs arg = new KeyPressEventArgs(Convert.ToChar(Keys.Enter)); 47 | btnJump_Click(sender, arg); 48 | break; 49 | } 50 | } 51 | 52 | private void txtY_KeyDown(object sender, KeyEventArgs e) 53 | { 54 | switch (e.KeyCode) 55 | { 56 | case Keys.Enter: 57 | KeyPressEventArgs arg = new KeyPressEventArgs(Convert.ToChar(Keys.Enter)); 58 | btnJump_Click(sender, arg); 59 | break; 60 | } 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /Map Editor/FrmJump.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 | -------------------------------------------------------------------------------- /Map Editor/FrmSetAnimation.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace Map_Editor 2 | { 3 | partial class FrmSetAnimation 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.btnSetAnimation = new System.Windows.Forms.Button(); 32 | this.txtAnimationTick = new System.Windows.Forms.TextBox(); 33 | this.label2 = new System.Windows.Forms.Label(); 34 | this.txtAnimationFrame = new System.Windows.Forms.TextBox(); 35 | this.label1 = new System.Windows.Forms.Label(); 36 | this.chkBlend = new System.Windows.Forms.CheckBox(); 37 | this.SuspendLayout(); 38 | // 39 | // btnSetAnimation 40 | // 41 | this.btnSetAnimation.DialogResult = System.Windows.Forms.DialogResult.OK; 42 | this.btnSetAnimation.Location = new System.Drawing.Point(99, 86); 43 | this.btnSetAnimation.Name = "btnSetAnimation"; 44 | this.btnSetAnimation.Size = new System.Drawing.Size(75, 23); 45 | this.btnSetAnimation.TabIndex = 11; 46 | this.btnSetAnimation.Text = "确定 ok"; 47 | this.btnSetAnimation.UseVisualStyleBackColor = true; 48 | this.btnSetAnimation.Click += new System.EventHandler(this.btnSetAnimation_Click); 49 | // 50 | // txtAnimationTick 51 | // 52 | this.txtAnimationTick.Location = new System.Drawing.Point(264, 49); 53 | this.txtAnimationTick.Name = "txtAnimationTick"; 54 | this.txtAnimationTick.Size = new System.Drawing.Size(50, 21); 55 | this.txtAnimationTick.TabIndex = 10; 56 | // 57 | // label2 58 | // 59 | this.label2.AutoSize = true; 60 | this.label2.Location = new System.Drawing.Point(97, 52); 61 | this.label2.Name = "label2"; 62 | this.label2.Size = new System.Drawing.Size(173, 12); 63 | this.label2.TabIndex = 9; 64 | this.label2.Text = "动画间隔 Animation interval "; 65 | // 66 | // txtAnimationFrame 67 | // 68 | this.txtAnimationFrame.Location = new System.Drawing.Point(264, 22); 69 | this.txtAnimationFrame.Name = "txtAnimationFrame"; 70 | this.txtAnimationFrame.Size = new System.Drawing.Size(50, 21); 71 | this.txtAnimationFrame.TabIndex = 8; 72 | // 73 | // label1 74 | // 75 | this.label1.AutoSize = true; 76 | this.label1.Location = new System.Drawing.Point(97, 25); 77 | this.label1.Name = "label1"; 78 | this.label1.Size = new System.Drawing.Size(161, 12); 79 | this.label1.TabIndex = 7; 80 | this.label1.Text = "动画帧数 Animation frames "; 81 | // 82 | // chkBlend 83 | // 84 | this.chkBlend.AutoSize = true; 85 | this.chkBlend.Location = new System.Drawing.Point(12, 37); 86 | this.chkBlend.Name = "chkBlend"; 87 | this.chkBlend.Size = new System.Drawing.Size(84, 16); 88 | this.chkBlend.TabIndex = 6; 89 | this.chkBlend.Text = "混合 blend"; 90 | this.chkBlend.UseVisualStyleBackColor = true; 91 | // 92 | // FrmSetAnimation 93 | // 94 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); 95 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 96 | this.ClientSize = new System.Drawing.Size(351, 135); 97 | this.Controls.Add(this.btnSetAnimation); 98 | this.Controls.Add(this.txtAnimationTick); 99 | this.Controls.Add(this.label2); 100 | this.Controls.Add(this.txtAnimationFrame); 101 | this.Controls.Add(this.label1); 102 | this.Controls.Add(this.chkBlend); 103 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; 104 | this.MaximizeBox = false; 105 | this.MinimizeBox = false; 106 | this.Name = "FrmSetAnimation"; 107 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; 108 | this.Text = "FrmSetAnimation"; 109 | this.ResumeLayout(false); 110 | this.PerformLayout(); 111 | 112 | } 113 | 114 | #endregion 115 | 116 | private System.Windows.Forms.Button btnSetAnimation; 117 | private System.Windows.Forms.TextBox txtAnimationTick; 118 | private System.Windows.Forms.Label label2; 119 | private System.Windows.Forms.TextBox txtAnimationFrame; 120 | private System.Windows.Forms.Label label1; 121 | private System.Windows.Forms.CheckBox chkBlend; 122 | } 123 | } -------------------------------------------------------------------------------- /Map Editor/FrmSetAnimation.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Windows.Forms; 3 | 4 | namespace Map_Editor 5 | { 6 | public partial class FrmSetAnimation : Form 7 | { 8 | private Main.DelSetAnimationProperty _delSetAnimationProperty; 9 | public FrmSetAnimation() 10 | { 11 | InitializeComponent(); 12 | } 13 | 14 | public FrmSetAnimation(Main.DelSetAnimationProperty delSetAnimationProperty) 15 | { 16 | InitializeComponent(); 17 | _delSetAnimationProperty = delSetAnimationProperty; 18 | } 19 | 20 | private void btnSetAnimation_Click(object sender, System.EventArgs e) 21 | { 22 | bool blend; 23 | byte frame; 24 | byte tick; 25 | if (txtAnimationFrame.Text.Trim() != String.Empty) 26 | { 27 | if (txtAnimationTick.Text.Trim() != String.Empty) 28 | { 29 | blend = chkBlend.Checked; 30 | frame = Convert.ToByte(txtAnimationFrame.Text.Trim()); 31 | tick = Convert.ToByte(txtAnimationTick.Text.Trim()); 32 | _delSetAnimationProperty(blend, frame, tick); 33 | } 34 | } 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /Map Editor/FrmSetAnimation.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 | -------------------------------------------------------------------------------- /Map Editor/FrmSetDoor.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace Map_Editor 2 | { 3 | partial class FrmSetDoor 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.chkCoreDoor = new System.Windows.Forms.CheckBox(); 32 | this.label1 = new System.Windows.Forms.Label(); 33 | this.txtDoorIndex = new System.Windows.Forms.TextBox(); 34 | this.txtDoorOffSet = new System.Windows.Forms.TextBox(); 35 | this.label2 = new System.Windows.Forms.Label(); 36 | this.btnSetDoor = new System.Windows.Forms.Button(); 37 | this.SuspendLayout(); 38 | // 39 | // chkCoreDoor 40 | // 41 | this.chkCoreDoor.AutoSize = true; 42 | this.chkCoreDoor.Location = new System.Drawing.Point(24, 43); 43 | this.chkCoreDoor.Name = "chkCoreDoor"; 44 | this.chkCoreDoor.Size = new System.Drawing.Size(132, 16); 45 | this.chkCoreDoor.TabIndex = 0; 46 | this.chkCoreDoor.Text = "实体门 entity door"; 47 | this.chkCoreDoor.UseVisualStyleBackColor = true; 48 | // 49 | // label1 50 | // 51 | this.label1.AutoSize = true; 52 | this.label1.Location = new System.Drawing.Point(162, 28); 53 | this.label1.Name = "label1"; 54 | this.label1.Size = new System.Drawing.Size(107, 12); 55 | this.label1.TabIndex = 1; 56 | this.label1.Text = "门索引 door index"; 57 | // 58 | // txtDoorIndex 59 | // 60 | this.txtDoorIndex.Location = new System.Drawing.Point(284, 25); 61 | this.txtDoorIndex.Name = "txtDoorIndex"; 62 | this.txtDoorIndex.Size = new System.Drawing.Size(50, 21); 63 | this.txtDoorIndex.TabIndex = 2; 64 | // 65 | // txtDoorOffSet 66 | // 67 | this.txtDoorOffSet.Location = new System.Drawing.Point(284, 52); 68 | this.txtDoorOffSet.Name = "txtDoorOffSet"; 69 | this.txtDoorOffSet.Size = new System.Drawing.Size(50, 21); 70 | this.txtDoorOffSet.TabIndex = 4; 71 | // 72 | // label2 73 | // 74 | this.label2.AutoSize = true; 75 | this.label2.Location = new System.Drawing.Point(162, 58); 76 | this.label2.Name = "label2"; 77 | this.label2.Size = new System.Drawing.Size(113, 12); 78 | this.label2.TabIndex = 3; 79 | this.label2.Text = "门偏移 door offSet"; 80 | // 81 | // btnSetDoor 82 | // 83 | this.btnSetDoor.DialogResult = System.Windows.Forms.DialogResult.OK; 84 | this.btnSetDoor.Location = new System.Drawing.Point(140, 94); 85 | this.btnSetDoor.Name = "btnSetDoor"; 86 | this.btnSetDoor.Size = new System.Drawing.Size(75, 23); 87 | this.btnSetDoor.TabIndex = 5; 88 | this.btnSetDoor.Text = "确定 ok"; 89 | this.btnSetDoor.UseVisualStyleBackColor = true; 90 | this.btnSetDoor.Click += new System.EventHandler(this.btnSetDoor_Click); 91 | // 92 | // FrmSetDoor 93 | // 94 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); 95 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 96 | this.ClientSize = new System.Drawing.Size(400, 145); 97 | this.Controls.Add(this.btnSetDoor); 98 | this.Controls.Add(this.txtDoorOffSet); 99 | this.Controls.Add(this.label2); 100 | this.Controls.Add(this.txtDoorIndex); 101 | this.Controls.Add(this.label1); 102 | this.Controls.Add(this.chkCoreDoor); 103 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; 104 | this.MaximizeBox = false; 105 | this.MinimizeBox = false; 106 | this.Name = "FrmSetDoor"; 107 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; 108 | this.Text = "SetDoor"; 109 | this.ResumeLayout(false); 110 | this.PerformLayout(); 111 | 112 | } 113 | 114 | #endregion 115 | 116 | private System.Windows.Forms.CheckBox chkCoreDoor; 117 | private System.Windows.Forms.Label label1; 118 | private System.Windows.Forms.TextBox txtDoorIndex; 119 | private System.Windows.Forms.TextBox txtDoorOffSet; 120 | private System.Windows.Forms.Label label2; 121 | private System.Windows.Forms.Button btnSetDoor; 122 | } 123 | } -------------------------------------------------------------------------------- /Map Editor/FrmSetDoor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Windows.Forms; 3 | 4 | namespace Map_Editor 5 | { 6 | public partial class FrmSetDoor : Form 7 | { 8 | private Main.DelSetDoorProperty _delSetDoorProperty; 9 | public FrmSetDoor() 10 | { 11 | InitializeComponent(); 12 | } 13 | 14 | public FrmSetDoor(Main.DelSetDoorProperty delSetDoorProperty) 15 | { 16 | InitializeComponent(); 17 | _delSetDoorProperty = delSetDoorProperty; 18 | } 19 | 20 | private void btnSetDoor_Click(object sender, EventArgs e) 21 | { 22 | bool blCoreDoor; 23 | byte index; 24 | byte offSet; 25 | if (txtDoorIndex.Text.Trim() != String.Empty) 26 | { 27 | if (txtDoorOffSet.Text.Trim()!=String.Empty) 28 | { 29 | blCoreDoor = chkCoreDoor.Checked; 30 | index = Convert.ToByte(txtDoorIndex.Text.Trim()); 31 | offSet = Convert.ToByte(txtDoorOffSet.Text.Trim()); 32 | _delSetDoorProperty(blCoreDoor, index, offSet); 33 | } 34 | } 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /Map Editor/FrmSetDoor.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 | -------------------------------------------------------------------------------- /Map Editor/FrmSetLight.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace Map_Editor 2 | { 3 | partial class FrmSetLight 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.label1 = new System.Windows.Forms.Label(); 32 | this.txtLight = new System.Windows.Forms.TextBox(); 33 | this.btnSetLight = new System.Windows.Forms.Button(); 34 | this.SuspendLayout(); 35 | // 36 | // label1 37 | // 38 | this.label1.AutoSize = true; 39 | this.label1.Location = new System.Drawing.Point(12, 27); 40 | this.label1.Name = "label1"; 41 | this.label1.Size = new System.Drawing.Size(65, 12); 42 | this.label1.TabIndex = 0; 43 | this.label1.Text = "亮度 light"; 44 | // 45 | // txtLight 46 | // 47 | this.txtLight.Location = new System.Drawing.Point(79, 24); 48 | this.txtLight.Name = "txtLight"; 49 | this.txtLight.Size = new System.Drawing.Size(63, 21); 50 | this.txtLight.TabIndex = 1; 51 | // 52 | // btnSetLight 53 | // 54 | this.btnSetLight.DialogResult = System.Windows.Forms.DialogResult.OK; 55 | this.btnSetLight.Location = new System.Drawing.Point(79, 60); 56 | this.btnSetLight.Name = "btnSetLight"; 57 | this.btnSetLight.Size = new System.Drawing.Size(63, 23); 58 | this.btnSetLight.TabIndex = 2; 59 | this.btnSetLight.Text = "确定 ok"; 60 | this.btnSetLight.UseVisualStyleBackColor = true; 61 | this.btnSetLight.Click += new System.EventHandler(this.btnSetLight_Click); 62 | // 63 | // FrmSetLight 64 | // 65 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); 66 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 67 | this.ClientSize = new System.Drawing.Size(196, 103); 68 | this.Controls.Add(this.btnSetLight); 69 | this.Controls.Add(this.txtLight); 70 | this.Controls.Add(this.label1); 71 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; 72 | this.MaximizeBox = false; 73 | this.MinimizeBox = false; 74 | this.Name = "FrmSetLight"; 75 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; 76 | this.Text = "SetLight"; 77 | this.ResumeLayout(false); 78 | this.PerformLayout(); 79 | 80 | } 81 | 82 | #endregion 83 | 84 | private System.Windows.Forms.Label label1; 85 | private System.Windows.Forms.TextBox txtLight; 86 | private System.Windows.Forms.Button btnSetLight; 87 | } 88 | } -------------------------------------------------------------------------------- /Map Editor/FrmSetLight.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Windows.Forms; 9 | 10 | namespace Map_Editor 11 | { 12 | public partial class FrmSetLight : Form 13 | { 14 | private readonly Main.DelSetLightProperty _delSetLightProperty; 15 | public FrmSetLight() 16 | { 17 | InitializeComponent(); 18 | } 19 | 20 | public FrmSetLight(Main.DelSetLightProperty delSetLightProperty) 21 | { 22 | InitializeComponent(); 23 | _delSetLightProperty = delSetLightProperty; 24 | } 25 | 26 | private void btnSetLight_Click(object sender, EventArgs e) 27 | { 28 | byte light; 29 | if (txtLight.Text.Trim()!=String.Empty) 30 | { 31 | light = Convert.ToByte(txtLight.Text.Trim()); 32 | _delSetLightProperty(light); 33 | } 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /Map Editor/FrmSetLight.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 | -------------------------------------------------------------------------------- /Map Editor/ListItem.cs: -------------------------------------------------------------------------------- 1 | namespace Map_Editor 2 | { 3 | public class ListItem 4 | { 5 | public string Text { get; set; } 6 | public byte Version { get; set; } 7 | public int Value { get; set; } 8 | public ListItem(string text, int value) 9 | { 10 | Text = text; 11 | Value = value; 12 | } 13 | 14 | 15 | public override string ToString() 16 | { 17 | return Text; 18 | } 19 | 20 | 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Map Editor/Map Editor.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | WinExe 5 | net8.0-windows 6 | disable 7 | true 8 | disable 9 | ico.ICO 10 | True 11 | x64 12 | AnyCPU;x64;x86 13 | Map_Editor.Program 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | ..\Components\SlimDX.dll 79 | 80 | 81 | 82 | 83 | 84 | False 85 | Mir2 Map Editor v1.1 86 | 1 87 | ico.ico 88 | 89 | 90 | 91 | 92 | 93 | ResXFileCodeGenerator 94 | Images.Designer.cs 95 | 96 | 97 | -------------------------------------------------------------------------------- /Map Editor/Map Editor.csproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | publish\ 5 | 6 | 7 | 8 | 9 | 10 | en-US 11 | false 12 | 13 | 14 | false 15 | 16 | -------------------------------------------------------------------------------- /Map Editor/NewFileFrm.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace Map_Editor 2 | { 3 | partial class NewFileFrm 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.label1 = new System.Windows.Forms.Label(); 32 | this.txtWidth = new System.Windows.Forms.TextBox(); 33 | this.txtHeight = new System.Windows.Forms.TextBox(); 34 | this.label2 = new System.Windows.Forms.Label(); 35 | this.btnOk = new System.Windows.Forms.Button(); 36 | this.SuspendLayout(); 37 | // 38 | // label1 39 | // 40 | this.label1.AutoSize = true; 41 | this.label1.Font = new System.Drawing.Font("Microsoft YaHei", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); 42 | this.label1.Location = new System.Drawing.Point(98, 27); 43 | this.label1.Name = "label1"; 44 | this.label1.Size = new System.Drawing.Size(96, 21); 45 | this.label1.TabIndex = 0; 46 | this.label1.Text = "Map Width"; 47 | this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight; 48 | this.label1.Click += new System.EventHandler(this.label1_Click); 49 | // 50 | // txtWidth 51 | // 52 | this.txtWidth.Font = new System.Drawing.Font("Microsoft YaHei", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); 53 | this.txtWidth.Location = new System.Drawing.Point(196, 24); 54 | this.txtWidth.Name = "txtWidth"; 55 | this.txtWidth.Size = new System.Drawing.Size(100, 29); 56 | this.txtWidth.TabIndex = 1; 57 | this.txtWidth.Text = "200"; 58 | this.txtWidth.TextChanged += new System.EventHandler(this.txtWidth_TextChanged); 59 | this.txtWidth.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtWidth_KeyDown); 60 | // 61 | // txtHeight 62 | // 63 | this.txtHeight.Font = new System.Drawing.Font("Microsoft YaHei", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); 64 | this.txtHeight.Location = new System.Drawing.Point(196, 76); 65 | this.txtHeight.Name = "txtHeight"; 66 | this.txtHeight.Size = new System.Drawing.Size(100, 29); 67 | this.txtHeight.TabIndex = 3; 68 | this.txtHeight.Text = "200"; 69 | this.txtHeight.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtHeight_KeyDown); 70 | // 71 | // label2 72 | // 73 | this.label2.AutoSize = true; 74 | this.label2.Font = new System.Drawing.Font("Microsoft YaHei", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); 75 | this.label2.Location = new System.Drawing.Point(92, 79); 76 | this.label2.Name = "label2"; 77 | this.label2.Size = new System.Drawing.Size(101, 21); 78 | this.label2.TabIndex = 2; 79 | this.label2.Text = "Map Height"; 80 | // 81 | // btnOk 82 | // 83 | this.btnOk.DialogResult = System.Windows.Forms.DialogResult.OK; 84 | this.btnOk.Font = new System.Drawing.Font("Microsoft YaHei", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); 85 | this.btnOk.Location = new System.Drawing.Point(119, 136); 86 | this.btnOk.Name = "btnOk"; 87 | this.btnOk.Size = new System.Drawing.Size(96, 45); 88 | this.btnOk.TabIndex = 4; 89 | this.btnOk.Text = "OK"; 90 | this.btnOk.UseVisualStyleBackColor = true; 91 | this.btnOk.Click += new System.EventHandler(this.btnOk_Click); 92 | // 93 | // NewFileFrm 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(351, 194); 98 | this.Controls.Add(this.btnOk); 99 | this.Controls.Add(this.txtHeight); 100 | this.Controls.Add(this.label2); 101 | this.Controls.Add(this.txtWidth); 102 | this.Controls.Add(this.label1); 103 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; 104 | this.MaximizeBox = false; 105 | this.MinimizeBox = false; 106 | this.Name = "NewFileFrm"; 107 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; 108 | this.Text = "NewFileFrm"; 109 | this.ResumeLayout(false); 110 | this.PerformLayout(); 111 | 112 | } 113 | 114 | #endregion 115 | 116 | private System.Windows.Forms.Label label1; 117 | private System.Windows.Forms.TextBox txtWidth; 118 | private System.Windows.Forms.TextBox txtHeight; 119 | private System.Windows.Forms.Label label2; 120 | private System.Windows.Forms.Button btnOk; 121 | } 122 | } -------------------------------------------------------------------------------- /Map Editor/NewFileFrm.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Windows.Forms; 3 | 4 | namespace Map_Editor 5 | { 6 | public partial class NewFileFrm : Form 7 | { 8 | private readonly Main.DelSetMapSize _delSetMapSize; 9 | public NewFileFrm() 10 | { 11 | InitializeComponent(); 12 | } 13 | 14 | public NewFileFrm(Main.DelSetMapSize delSetMapSize) 15 | { 16 | InitializeComponent(); 17 | _delSetMapSize = delSetMapSize; 18 | } 19 | 20 | private void btnOk_Click(object sender, EventArgs e) 21 | { 22 | int w = Convert.ToInt32(txtWidth.Text.Trim()); 23 | int h = Convert.ToInt32(txtHeight.Text.Trim()); 24 | if (w<=0||h<=0||w>=1000||h>=1000) 25 | { 26 | MessageBox.Show("Map Size Max 1000*1000"); 27 | } 28 | else 29 | { 30 | _delSetMapSize(w, h); 31 | DialogResult = DialogResult.OK; 32 | Close(); 33 | } 34 | } 35 | 36 | private void txtWidth_KeyDown(object sender, KeyEventArgs e) 37 | { 38 | switch (e.KeyCode) 39 | { 40 | case Keys.Enter: 41 | KeyPressEventArgs arg = new KeyPressEventArgs(Convert.ToChar(Keys.Enter)); 42 | btnOk_Click(sender, arg); 43 | break; 44 | } 45 | } 46 | 47 | private void txtHeight_KeyDown(object sender, KeyEventArgs e) 48 | { 49 | switch (e.KeyCode) 50 | { 51 | case Keys.Enter: 52 | KeyPressEventArgs arg = new KeyPressEventArgs(Convert.ToChar(Keys.Enter)); 53 | btnOk_Click(sender, arg); 54 | break; 55 | } 56 | } 57 | 58 | private void txtWidth_TextChanged(object sender, EventArgs e) 59 | { 60 | 61 | } 62 | 63 | private void label1_Click(object sender, EventArgs e) 64 | { 65 | 66 | } 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /Map Editor/NewFileFrm.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 | -------------------------------------------------------------------------------- /Map Editor/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Windows.Forms; 3 | 4 | namespace Map_Editor 5 | { 6 | static class Program 7 | { 8 | /// 9 | /// 应用程序的主入口点。 10 | /// 11 | [STAThread] 12 | static void Main() 13 | { 14 | Application.EnableVisualStyles(); 15 | Application.SetCompatibleTextRenderingDefault(false); 16 | Application.Run(new Main()); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Map Editor/Properties/Resources.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 Map_Editor.Properties { 12 | using System; 13 | 14 | 15 | /// 16 | /// A strongly-typed resource class, for looking up localized strings, etc. 17 | /// 18 | // This class was auto-generated by the StronglyTypedResourceBuilder 19 | // class via a tool like ResGen or Visual Studio. 20 | // To add or remove a member, edit your .ResX file then rerun ResGen 21 | // with the /str option, or rebuild your VS project. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources { 26 | 27 | private static global::System.Resources.ResourceManager resourceMan; 28 | 29 | private static global::System.Globalization.CultureInfo resourceCulture; 30 | 31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 | internal Resources() { 33 | } 34 | 35 | /// 36 | /// Returns the cached ResourceManager instance used by this class. 37 | /// 38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 | internal static global::System.Resources.ResourceManager ResourceManager { 40 | get { 41 | if (object.ReferenceEquals(resourceMan, null)) { 42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Map_Editor.Properties.Resources", typeof(Resources).Assembly); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// Overrides the current thread's CurrentUICulture property for all 51 | /// resource lookups using this strongly typed resource class. 52 | /// 53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 | internal static global::System.Globalization.CultureInfo Culture { 55 | get { 56 | return resourceCulture; 57 | } 58 | set { 59 | resourceCulture = value; 60 | } 61 | } 62 | 63 | /// 64 | /// Looks up a localized resource of type System.Drawing.Bitmap. 65 | /// 66 | internal static System.Drawing.Bitmap _100 { 67 | get { 68 | object obj = ResourceManager.GetObject("100", resourceCulture); 69 | return ((System.Drawing.Bitmap)(obj)); 70 | } 71 | } 72 | 73 | /// 74 | /// Looks up a localized resource of type System.Drawing.Bitmap. 75 | /// 76 | internal static System.Drawing.Bitmap _110 { 77 | get { 78 | object obj = ResourceManager.GetObject("110", resourceCulture); 79 | return ((System.Drawing.Bitmap)(obj)); 80 | } 81 | } 82 | 83 | /// 84 | /// Looks up a localized resource of type System.Drawing.Bitmap. 85 | /// 86 | internal static System.Drawing.Bitmap _1100 { 87 | get { 88 | object obj = ResourceManager.GetObject("1100", resourceCulture); 89 | return ((System.Drawing.Bitmap)(obj)); 90 | } 91 | } 92 | 93 | /// 94 | /// Looks up a localized resource of type System.Drawing.Bitmap. 95 | /// 96 | internal static System.Drawing.Bitmap _1110 { 97 | get { 98 | object obj = ResourceManager.GetObject("1110", resourceCulture); 99 | return ((System.Drawing.Bitmap)(obj)); 100 | } 101 | } 102 | 103 | /// 104 | /// Looks up a localized resource of type System.Drawing.Bitmap. 105 | /// 106 | internal static System.Drawing.Bitmap _1120 { 107 | get { 108 | object obj = ResourceManager.GetObject("1120", resourceCulture); 109 | return ((System.Drawing.Bitmap)(obj)); 110 | } 111 | } 112 | 113 | /// 114 | /// Looks up a localized resource of type System.Drawing.Bitmap. 115 | /// 116 | internal static System.Drawing.Bitmap _1130 { 117 | get { 118 | object obj = ResourceManager.GetObject("1130", resourceCulture); 119 | return ((System.Drawing.Bitmap)(obj)); 120 | } 121 | } 122 | 123 | /// 124 | /// Looks up a localized resource of type System.Drawing.Bitmap. 125 | /// 126 | internal static System.Drawing.Bitmap _1140 { 127 | get { 128 | object obj = ResourceManager.GetObject("1140", resourceCulture); 129 | return ((System.Drawing.Bitmap)(obj)); 130 | } 131 | } 132 | 133 | /// 134 | /// Looks up a localized resource of type System.Drawing.Bitmap. 135 | /// 136 | internal static System.Drawing.Bitmap _1150 { 137 | get { 138 | object obj = ResourceManager.GetObject("1150", resourceCulture); 139 | return ((System.Drawing.Bitmap)(obj)); 140 | } 141 | } 142 | 143 | /// 144 | /// Looks up a localized resource of type System.Drawing.Bitmap. 145 | /// 146 | internal static System.Drawing.Bitmap _120 { 147 | get { 148 | object obj = ResourceManager.GetObject("120", resourceCulture); 149 | return ((System.Drawing.Bitmap)(obj)); 150 | } 151 | } 152 | 153 | /// 154 | /// Looks up a localized resource of type System.Drawing.Bitmap. 155 | /// 156 | internal static System.Drawing.Bitmap _130 { 157 | get { 158 | object obj = ResourceManager.GetObject("130", resourceCulture); 159 | return ((System.Drawing.Bitmap)(obj)); 160 | } 161 | } 162 | 163 | /// 164 | /// Looks up a localized resource of type System.Drawing.Bitmap. 165 | /// 166 | internal static System.Drawing.Bitmap _140 { 167 | get { 168 | object obj = ResourceManager.GetObject("140", resourceCulture); 169 | return ((System.Drawing.Bitmap)(obj)); 170 | } 171 | } 172 | 173 | /// 174 | /// Looks up a localized resource of type System.Drawing.Bitmap. 175 | /// 176 | internal static System.Drawing.Bitmap _150 { 177 | get { 178 | object obj = ResourceManager.GetObject("150", resourceCulture); 179 | return ((System.Drawing.Bitmap)(obj)); 180 | } 181 | } 182 | 183 | /// 184 | /// Looks up a localized resource of type System.Drawing.Bitmap. 185 | /// 186 | internal static System.Drawing.Bitmap _160 { 187 | get { 188 | object obj = ResourceManager.GetObject("160", resourceCulture); 189 | return ((System.Drawing.Bitmap)(obj)); 190 | } 191 | } 192 | 193 | /// 194 | /// Looks up a localized resource of type System.Drawing.Bitmap. 195 | /// 196 | internal static System.Drawing.Bitmap _170 { 197 | get { 198 | object obj = ResourceManager.GetObject("170", resourceCulture); 199 | return ((System.Drawing.Bitmap)(obj)); 200 | } 201 | } 202 | 203 | /// 204 | /// Looks up a localized resource of type System.Drawing.Bitmap. 205 | /// 206 | internal static System.Drawing.Bitmap _180 { 207 | get { 208 | object obj = ResourceManager.GetObject("180", resourceCulture); 209 | return ((System.Drawing.Bitmap)(obj)); 210 | } 211 | } 212 | 213 | /// 214 | /// Looks up a localized resource of type System.Drawing.Bitmap. 215 | /// 216 | internal static System.Drawing.Bitmap _190 { 217 | get { 218 | object obj = ResourceManager.GetObject("190", resourceCulture); 219 | return ((System.Drawing.Bitmap)(obj)); 220 | } 221 | } 222 | 223 | /// 224 | /// Looks up a localized resource of type System.Drawing.Bitmap. 225 | /// 226 | internal static System.Drawing.Bitmap Camera { 227 | get { 228 | object obj = ResourceManager.GetObject("Camera", resourceCulture); 229 | return ((System.Drawing.Bitmap)(obj)); 230 | } 231 | } 232 | 233 | /// 234 | /// Looks up a localized resource of type System.Drawing.Bitmap. 235 | /// 236 | internal static System.Drawing.Bitmap Minus { 237 | get { 238 | object obj = ResourceManager.GetObject("Minus", resourceCulture); 239 | return ((System.Drawing.Bitmap)(obj)); 240 | } 241 | } 242 | 243 | /// 244 | /// Looks up a localized resource of type System.Drawing.Bitmap. 245 | /// 246 | internal static System.Drawing.Bitmap Navigator { 247 | get { 248 | object obj = ResourceManager.GetObject("Navigator", resourceCulture); 249 | return ((System.Drawing.Bitmap)(obj)); 250 | } 251 | } 252 | 253 | /// 254 | /// Looks up a localized resource of type System.Drawing.Bitmap. 255 | /// 256 | internal static System.Drawing.Bitmap Off { 257 | get { 258 | object obj = ResourceManager.GetObject("Off", resourceCulture); 259 | return ((System.Drawing.Bitmap)(obj)); 260 | } 261 | } 262 | 263 | /// 264 | /// Looks up a localized resource of type System.Drawing.Bitmap. 265 | /// 266 | internal static System.Drawing.Bitmap On { 267 | get { 268 | object obj = ResourceManager.GetObject("On", resourceCulture); 269 | return ((System.Drawing.Bitmap)(obj)); 270 | } 271 | } 272 | 273 | /// 274 | /// Looks up a localized resource of type System.Drawing.Bitmap. 275 | /// 276 | internal static System.Drawing.Bitmap Plus { 277 | get { 278 | object obj = ResourceManager.GetObject("Plus", resourceCulture); 279 | return ((System.Drawing.Bitmap)(obj)); 280 | } 281 | } 282 | 283 | /// 284 | /// Looks up a localized resource of type System.Drawing.Bitmap. 285 | /// 286 | internal static System.Drawing.Bitmap Radar { 287 | get { 288 | object obj = ResourceManager.GetObject("Radar", resourceCulture); 289 | return ((System.Drawing.Bitmap)(obj)); 290 | } 291 | } 292 | 293 | /// 294 | /// Looks up a localized resource of type System.Drawing.Bitmap. 295 | /// 296 | internal static System.Drawing.Bitmap System_folder { 297 | get { 298 | object obj = ResourceManager.GetObject("System folder", resourceCulture); 299 | return ((System.Drawing.Bitmap)(obj)); 300 | } 301 | } 302 | } 303 | } 304 | -------------------------------------------------------------------------------- /Map Editor/Properties/Resources.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 | 121 | 122 | ..\Resources\180.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 123 | 124 | 125 | ..\Resources\120.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 126 | 127 | 128 | ..\Resources\1100.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 129 | 130 | 131 | ..\Resources\1140.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 132 | 133 | 134 | ..\Resources\Off.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 135 | 136 | 137 | ..\Resources\110.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 138 | 139 | 140 | ..\Resources\100.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 141 | 142 | 143 | ..\Resources\On.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 144 | 145 | 146 | ..\Resources\1130.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 147 | 148 | 149 | ..\Resources\1120.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 150 | 151 | 152 | ..\Resources\160.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 153 | 154 | 155 | ..\Resources\System folder.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 156 | 157 | 158 | ..\Resources\Radar.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 159 | 160 | 161 | ..\Resources\Plus.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 162 | 163 | 164 | ..\Resources\Minus.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 165 | 166 | 167 | ..\Resources\1110.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 168 | 169 | 170 | ..\Resources\170.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 171 | 172 | 173 | ..\Resources\1150.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 174 | 175 | 176 | ..\Resources\130.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 177 | 178 | 179 | ..\Resources\140.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 180 | 181 | 182 | ..\Resources\150.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 183 | 184 | 185 | ..\Resources\190.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 186 | 187 | 188 | ..\Resources\Camera.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 189 | 190 | 191 | ..\Resources\Navigator.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 192 | 193 | -------------------------------------------------------------------------------- /Map Editor/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 Map_Editor.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.12.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 | -------------------------------------------------------------------------------- /Map Editor/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Map Editor/Resources/100.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Suprcode/Crystal.MapEditor/dcb5d3049e2980055fda3093fa89baa5168937b9/Map Editor/Resources/100.jpg -------------------------------------------------------------------------------- /Map Editor/Resources/110.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Suprcode/Crystal.MapEditor/dcb5d3049e2980055fda3093fa89baa5168937b9/Map Editor/Resources/110.jpg -------------------------------------------------------------------------------- /Map Editor/Resources/1100.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Suprcode/Crystal.MapEditor/dcb5d3049e2980055fda3093fa89baa5168937b9/Map Editor/Resources/1100.jpg -------------------------------------------------------------------------------- /Map Editor/Resources/1110.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Suprcode/Crystal.MapEditor/dcb5d3049e2980055fda3093fa89baa5168937b9/Map Editor/Resources/1110.jpg -------------------------------------------------------------------------------- /Map Editor/Resources/1120.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Suprcode/Crystal.MapEditor/dcb5d3049e2980055fda3093fa89baa5168937b9/Map Editor/Resources/1120.jpg -------------------------------------------------------------------------------- /Map Editor/Resources/1130.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Suprcode/Crystal.MapEditor/dcb5d3049e2980055fda3093fa89baa5168937b9/Map Editor/Resources/1130.jpg -------------------------------------------------------------------------------- /Map Editor/Resources/1140.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Suprcode/Crystal.MapEditor/dcb5d3049e2980055fda3093fa89baa5168937b9/Map Editor/Resources/1140.jpg -------------------------------------------------------------------------------- /Map Editor/Resources/1150.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Suprcode/Crystal.MapEditor/dcb5d3049e2980055fda3093fa89baa5168937b9/Map Editor/Resources/1150.jpg -------------------------------------------------------------------------------- /Map Editor/Resources/120.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Suprcode/Crystal.MapEditor/dcb5d3049e2980055fda3093fa89baa5168937b9/Map Editor/Resources/120.jpg -------------------------------------------------------------------------------- /Map Editor/Resources/130.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Suprcode/Crystal.MapEditor/dcb5d3049e2980055fda3093fa89baa5168937b9/Map Editor/Resources/130.jpg -------------------------------------------------------------------------------- /Map Editor/Resources/140.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Suprcode/Crystal.MapEditor/dcb5d3049e2980055fda3093fa89baa5168937b9/Map Editor/Resources/140.jpg -------------------------------------------------------------------------------- /Map Editor/Resources/150.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Suprcode/Crystal.MapEditor/dcb5d3049e2980055fda3093fa89baa5168937b9/Map Editor/Resources/150.jpg -------------------------------------------------------------------------------- /Map Editor/Resources/160.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Suprcode/Crystal.MapEditor/dcb5d3049e2980055fda3093fa89baa5168937b9/Map Editor/Resources/160.jpg -------------------------------------------------------------------------------- /Map Editor/Resources/170.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Suprcode/Crystal.MapEditor/dcb5d3049e2980055fda3093fa89baa5168937b9/Map Editor/Resources/170.jpg -------------------------------------------------------------------------------- /Map Editor/Resources/180.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Suprcode/Crystal.MapEditor/dcb5d3049e2980055fda3093fa89baa5168937b9/Map Editor/Resources/180.jpg -------------------------------------------------------------------------------- /Map Editor/Resources/190.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Suprcode/Crystal.MapEditor/dcb5d3049e2980055fda3093fa89baa5168937b9/Map Editor/Resources/190.jpg -------------------------------------------------------------------------------- /Map Editor/Resources/Camera.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Suprcode/Crystal.MapEditor/dcb5d3049e2980055fda3093fa89baa5168937b9/Map Editor/Resources/Camera.png -------------------------------------------------------------------------------- /Map Editor/Resources/Minus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Suprcode/Crystal.MapEditor/dcb5d3049e2980055fda3093fa89baa5168937b9/Map Editor/Resources/Minus.png -------------------------------------------------------------------------------- /Map Editor/Resources/Navigator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Suprcode/Crystal.MapEditor/dcb5d3049e2980055fda3093fa89baa5168937b9/Map Editor/Resources/Navigator.png -------------------------------------------------------------------------------- /Map Editor/Resources/Off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Suprcode/Crystal.MapEditor/dcb5d3049e2980055fda3093fa89baa5168937b9/Map Editor/Resources/Off.png -------------------------------------------------------------------------------- /Map Editor/Resources/On.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Suprcode/Crystal.MapEditor/dcb5d3049e2980055fda3093fa89baa5168937b9/Map Editor/Resources/On.png -------------------------------------------------------------------------------- /Map Editor/Resources/Plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Suprcode/Crystal.MapEditor/dcb5d3049e2980055fda3093fa89baa5168937b9/Map Editor/Resources/Plus.png -------------------------------------------------------------------------------- /Map Editor/Resources/Radar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Suprcode/Crystal.MapEditor/dcb5d3049e2980055fda3093fa89baa5168937b9/Map Editor/Resources/Radar.png -------------------------------------------------------------------------------- /Map Editor/Resources/Square.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Suprcode/Crystal.MapEditor/dcb5d3049e2980055fda3093fa89baa5168937b9/Map Editor/Resources/Square.png -------------------------------------------------------------------------------- /Map Editor/Resources/System folder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Suprcode/Crystal.MapEditor/dcb5d3049e2980055fda3093fa89baa5168937b9/Map Editor/Resources/System folder.png -------------------------------------------------------------------------------- /Map Editor/SetrProperty.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 | -------------------------------------------------------------------------------- /Map Editor/Utility.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | 7 | namespace Map_Editor 8 | { 9 | class Utility 10 | { 11 | } 12 | 13 | public class AlphanumComparatorFast : IComparer 14 | { 15 | public int Compare(object x, object y) 16 | { 17 | string s1 = x as string; 18 | if (s1 == null) 19 | { 20 | return 0; 21 | } 22 | string s2 = y as string; 23 | if (s2 == null) 24 | { 25 | return 0; 26 | } 27 | 28 | int len1 = s1.Length; 29 | int len2 = s2.Length; 30 | int marker1 = 0; 31 | int marker2 = 0; 32 | 33 | // Walk through two the strings with two markers. 34 | while (marker1 < len1 && marker2 < len2) 35 | { 36 | char ch1 = s1[marker1]; 37 | char ch2 = s2[marker2]; 38 | 39 | // Some buffers we can build up characters in for each chunk. 40 | char[] space1 = new char[len1]; 41 | int loc1 = 0; 42 | char[] space2 = new char[len2]; 43 | int loc2 = 0; 44 | 45 | // Walk through all following characters that are digits or 46 | // characters in BOTH strings starting at the appropriate marker. 47 | // Collect char arrays. 48 | do 49 | { 50 | space1[loc1++] = ch1; 51 | marker1++; 52 | 53 | if (marker1 < len1) 54 | { 55 | ch1 = s1[marker1]; 56 | } 57 | else 58 | { 59 | break; 60 | } 61 | } while (char.IsDigit(ch1) == char.IsDigit(space1[0])); 62 | 63 | do 64 | { 65 | space2[loc2++] = ch2; 66 | marker2++; 67 | 68 | if (marker2 < len2) 69 | { 70 | ch2 = s2[marker2]; 71 | } 72 | else 73 | { 74 | break; 75 | } 76 | } while (char.IsDigit(ch2) == char.IsDigit(space2[0])); 77 | 78 | // If we have collected numbers, compare them numerically. 79 | // Otherwise, if we have strings, compare them alphabetically. 80 | string str1 = new string(space1); 81 | string str2 = new string(space2); 82 | 83 | int result; 84 | 85 | if (char.IsDigit(space1[0]) && char.IsDigit(space2[0])) 86 | { 87 | int thisNumericChunk = int.Parse(str1); 88 | int thatNumericChunk = int.Parse(str2); 89 | result = thisNumericChunk.CompareTo(thatNumericChunk); 90 | } 91 | else 92 | { 93 | result = str1.CompareTo(str2); 94 | } 95 | 96 | if (result != 0) 97 | { 98 | return result; 99 | } 100 | } 101 | return len1 - len2; 102 | } 103 | } 104 | } 105 | -------------------------------------------------------------------------------- /Map Editor/ico.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Suprcode/Crystal.MapEditor/dcb5d3049e2980055fda3093fa89baa5168937b9/Map Editor/ico.ico -------------------------------------------------------------------------------- /Map Editor/obj/Debug/DesignTimeResolveAssemblyReferences.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Suprcode/Crystal.MapEditor/dcb5d3049e2980055fda3093fa89baa5168937b9/Map Editor/obj/Debug/DesignTimeResolveAssemblyReferences.cache -------------------------------------------------------------------------------- /Map Editor/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache: -------------------------------------------------------------------------------- 1 | .winmd.dll.exe%