Example #1
0
        /// <summary>
        /// Creates a new MapViewInfo object
        /// </summary>
        /// <param name="map">The map currently displayed</param>
        /// <param name="controlSize">The size of the control</param>
        /// <param name="center">The location of the center of the control</param>
        /// <param name="zoomLevel">The current zoom level</param>
        /// <param name="viewer">The MapViewer owner of this view</param>
        public MapViewInfo( Maps map, Size controlSize, Point center, int zoomLevel, MapViewer viewer )
        {
            m_Map = map;
            m_ControlSize = controlSize;
            m_Center = center;
            m_ZoomLevel = zoomLevel;
            m_Viewer = viewer;

            Calculate();
        }
Example #2
0
        /// <summary>
        /// Creates a new MapViewInfo object with default values
        /// </summary>
        /// <param name="viewer">The MapViewer owner of this view</param>
        public MapViewInfo( MapViewer viewer )
        {
            m_Map = Maps.Sosaria;
            m_ControlSize = new Size( 20, 20 );
            m_Center = new Point(7212, 3108);
            m_ZoomLevel = 0;
            m_Viewer = viewer;

            Calculate();
        }
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(LocationEditor));
     this.TreeCat = new System.Windows.Forms.TreeView();
     this.Input = new System.Windows.Forms.TextBox();
     this.ButtonAdd = new System.Windows.Forms.Button();
     this.label1 = new System.Windows.Forms.Label();
     this.label2 = new System.Windows.Forms.Label();
     this.label3 = new System.Windows.Forms.Label();
     this.InX = new System.Windows.Forms.TextBox();
     this.InY = new System.Windows.Forms.TextBox();
     this.InZ = new System.Windows.Forms.TextBox();
     this.ButtonSet = new System.Windows.Forms.Button();
     this.ButtonZoomIn = new System.Windows.Forms.Button();
     this.ButtonZoomOut = new System.Windows.Forms.Button();
     this.ButtonDel = new System.Windows.Forms.Button();
     this.mainMenu1 = new System.Windows.Forms.MainMenu();
     this.MenuFile = new System.Windows.Forms.MenuItem();
     this.FileNew = new System.Windows.Forms.MenuItem();
     this.FileOpen = new System.Windows.Forms.MenuItem();
     this.FileSave = new System.Windows.Forms.MenuItem();
     this.FileSaveAs = new System.Windows.Forms.MenuItem();
     this.menuItem6 = new System.Windows.Forms.MenuItem();
     this.FileExit = new System.Windows.Forms.MenuItem();
     this.MenuOptions = new System.Windows.Forms.MenuItem();
     this.OptionsTopmost = new System.Windows.Forms.MenuItem();
     this.OptionsMap = new System.Windows.Forms.MenuItem();
     this.Map0 = new System.Windows.Forms.MenuItem();
     this.Map1 = new System.Windows.Forms.MenuItem();
     this.Map2 = new System.Windows.Forms.MenuItem();
     this.Map3 = new System.Windows.Forms.MenuItem();
     this.OptionsDrawStatics = new System.Windows.Forms.MenuItem();
     this.menuItem1 = new System.Windows.Forms.MenuItem();
     this.OptionsGoCommand = new System.Windows.Forms.MenuItem();
     this.menuItem2 = new System.Windows.Forms.MenuItem();
     this.HelpHelp = new System.Windows.Forms.MenuItem();
     this.HelpSite = new System.Windows.Forms.MenuItem();
     this.menuItem7 = new System.Windows.Forms.MenuItem();
     this.HelpAbout = new System.Windows.Forms.MenuItem();
     this.OpenFile = new System.Windows.Forms.OpenFileDialog();
     this.SaveFile = new System.Windows.Forms.SaveFileDialog();
     this.Status = new System.Windows.Forms.Label();
     this.FolderBrowse = new System.Windows.Forms.FolderBrowserDialog();
     this.Map = new FiddlerControls.RegionEditor.MapViewer.MapViewer();
     this.ButtonGo = new System.Windows.Forms.Button();
     this.Map4 = new System.Windows.Forms.MenuItem();
     this.SuspendLayout();
     //
     // TreeCat
     //
     this.TreeCat.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
     this.TreeCat.ImageIndex = -1;
     this.TreeCat.LabelEdit = true;
     this.TreeCat.Location = new System.Drawing.Point(8, 8);
     this.TreeCat.Name = "TreeCat";
     this.TreeCat.SelectedImageIndex = -1;
     this.TreeCat.Size = new System.Drawing.Size(184, 248);
     this.TreeCat.Sorted = true;
     this.TreeCat.TabIndex = 0;
     this.TreeCat.KeyDown += new System.Windows.Forms.KeyEventHandler(this.TreeCat_KeyDown);
     this.TreeCat.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.TreeCat_AfterSelect);
     this.TreeCat.BeforeSelect += new System.Windows.Forms.TreeViewCancelEventHandler(this.TreeCat_BeforeCheck);
     this.TreeCat.AfterLabelEdit += new System.Windows.Forms.NodeLabelEditEventHandler(this.TreeCat_AfterLabelEdit);
     //
     // Input
     //
     this.Input.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
     this.Input.Location = new System.Drawing.Point(200, 56);
     this.Input.Name = "Input";
     this.Input.Size = new System.Drawing.Size(152, 20);
     this.Input.TabIndex = 3;
     this.Input.Text = "";
     //
     // ButtonAdd
     //
     this.ButtonAdd.FlatStyle = System.Windows.Forms.FlatStyle.System;
     this.ButtonAdd.Location = new System.Drawing.Point(304, 80);
     this.ButtonAdd.Name = "ButtonAdd";
     this.ButtonAdd.Size = new System.Drawing.Size(48, 20);
     this.ButtonAdd.TabIndex = 4;
     this.ButtonAdd.Text = "Add";
     this.ButtonAdd.Click += new System.EventHandler(this.ButtonAdd_Click);
     //
     // label1
     //
     this.label1.Location = new System.Drawing.Point(200, 8);
     this.label1.Name = "label1";
     this.label1.Size = new System.Drawing.Size(8, 23);
     this.label1.TabIndex = 7;
     this.label1.Text = "X";
     this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
     //
     // label2
     //
     this.label2.Location = new System.Drawing.Point(256, 8);
     this.label2.Name = "label2";
     this.label2.Size = new System.Drawing.Size(8, 23);
     this.label2.TabIndex = 8;
     this.label2.Text = "Y";
     this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
     //
     // label3
     //
     this.label3.Location = new System.Drawing.Point(312, 8);
     this.label3.Name = "label3";
     this.label3.Size = new System.Drawing.Size(8, 23);
     this.label3.TabIndex = 9;
     this.label3.Text = "Z";
     this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
     //
     // InX
     //
     this.InX.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
     this.InX.Enabled = false;
     this.InX.Location = new System.Drawing.Point(216, 8);
     this.InX.Name = "InX";
     this.InX.Size = new System.Drawing.Size(32, 20);
     this.InX.TabIndex = 10;
     this.InX.Text = "";
     //
     // InY
     //
     this.InY.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
     this.InY.Enabled = false;
     this.InY.Location = new System.Drawing.Point(272, 8);
     this.InY.Name = "InY";
     this.InY.Size = new System.Drawing.Size(32, 20);
     this.InY.TabIndex = 11;
     this.InY.Text = "";
     //
     // InZ
     //
     this.InZ.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
     this.InZ.Enabled = false;
     this.InZ.Location = new System.Drawing.Point(328, 8);
     this.InZ.Name = "InZ";
     this.InZ.Size = new System.Drawing.Size(24, 20);
     this.InZ.TabIndex = 12;
     this.InZ.Text = "";
     //
     // ButtonSet
     //
     this.ButtonSet.Enabled = false;
     this.ButtonSet.FlatStyle = System.Windows.Forms.FlatStyle.System;
     this.ButtonSet.Location = new System.Drawing.Point(200, 32);
     this.ButtonSet.Name = "ButtonSet";
     this.ButtonSet.Size = new System.Drawing.Size(152, 20);
     this.ButtonSet.TabIndex = 13;
     this.ButtonSet.Text = "Set new point";
     this.ButtonSet.Click += new System.EventHandler(this.ButtonSet_Click);
     //
     // ButtonZoomIn
     //
     this.ButtonZoomIn.FlatStyle = System.Windows.Forms.FlatStyle.System;
     this.ButtonZoomIn.Location = new System.Drawing.Point(328, 104);
     this.ButtonZoomIn.Name = "ButtonZoomIn";
     this.ButtonZoomIn.Size = new System.Drawing.Size(24, 20);
     this.ButtonZoomIn.TabIndex = 15;
     this.ButtonZoomIn.Text = "+";
     this.ButtonZoomIn.Click += new System.EventHandler(this.ButtonZoomIn_Click);
     //
     // ButtonZoomOut
     //
     this.ButtonZoomOut.FlatStyle = System.Windows.Forms.FlatStyle.System;
     this.ButtonZoomOut.Location = new System.Drawing.Point(328, 128);
     this.ButtonZoomOut.Name = "ButtonZoomOut";
     this.ButtonZoomOut.Size = new System.Drawing.Size(24, 20);
     this.ButtonZoomOut.TabIndex = 16;
     this.ButtonZoomOut.Text = "-";
     this.ButtonZoomOut.Click += new System.EventHandler(this.ButtonZoomOut_Click);
     //
     // ButtonDel
     //
     this.ButtonDel.FlatStyle = System.Windows.Forms.FlatStyle.System;
     this.ButtonDel.Location = new System.Drawing.Point(200, 80);
     this.ButtonDel.Name = "ButtonDel";
     this.ButtonDel.Size = new System.Drawing.Size(48, 20);
     this.ButtonDel.TabIndex = 18;
     this.ButtonDel.Text = "Delete";
     this.ButtonDel.Click += new System.EventHandler(this.ButtonDel_Click);
     //
     // mainMenu1
     //
     this.mainMenu1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
                                                                               this.MenuFile,
                                                                               this.MenuOptions,
                                                                               this.menuItem2});
     //
     // MenuFile
     //
     this.MenuFile.Index = 0;
     this.MenuFile.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
                                                                              this.FileNew,
                                                                              this.FileOpen,
                                                                              this.FileSave,
                                                                              this.FileSaveAs,
                                                                              this.menuItem6,
                                                                              this.FileExit});
     this.MenuFile.Text = "File";
     //
     // FileNew
     //
     this.FileNew.Index = 0;
     this.FileNew.Text = "New";
     this.FileNew.Click += new System.EventHandler(this.FileNew_Click);
     //
     // FileOpen
     //
     this.FileOpen.Index = 1;
     this.FileOpen.Text = "Open";
     this.FileOpen.Click += new System.EventHandler(this.FileOpen_Click);
     //
     // FileSave
     //
     this.FileSave.Index = 2;
     this.FileSave.Text = "Save";
     this.FileSave.Click += new System.EventHandler(this.FileSave_Click);
     //
     // FileSaveAs
     //
     this.FileSaveAs.Index = 3;
     this.FileSaveAs.Text = "Save as...";
     this.FileSaveAs.Click += new System.EventHandler(this.FileSaveAs_Click);
     //
     // menuItem6
     //
     this.menuItem6.Index = 4;
     this.menuItem6.Text = "-";
     //
     // FileExit
     //
     this.FileExit.Index = 5;
     this.FileExit.Text = "Exit";
     this.FileExit.Click += new System.EventHandler(this.FileExit_Click);
     //
     // MenuOptions
     //
     this.MenuOptions.Index = 1;
     this.MenuOptions.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
                                                                                 this.OptionsTopmost,
                                                                                 this.OptionsMap,
                                                                                 this.OptionsDrawStatics,
                                                                                 this.menuItem1,
                                                                                 this.OptionsGoCommand});
     this.MenuOptions.Text = "Options";
     this.MenuOptions.Popup += new System.EventHandler(this.MenuOptions_Popup);
     //
     // OptionsTopmost
     //
     this.OptionsTopmost.Index = 0;
     this.OptionsTopmost.Text = "Always On Top";
     this.OptionsTopmost.Click += new System.EventHandler(this.OptionsTopmost_Click);
     //
     // OptionsMap
     //
     this.OptionsMap.Index = 1;
     this.OptionsMap.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
                                                                                this.Map0,
                                                                                this.Map1,
                                                                                this.Map2,
                                                                                this.Map3,
                                                                                this.Map4});
     this.OptionsMap.Text = "Map";
     //
     // Map0
     //
     this.Map0.Index = 0;
     this.Map0.Text = "Map 0";
     this.Map0.Click += new System.EventHandler(this.Map0_Click);
     //
     // Map1
     //
     this.Map1.Index = 1;
     this.Map1.Text = "Map 1 (Trammel)";
     this.Map1.Click += new System.EventHandler(this.Map1_Click);
     //
     // Map2
     //
     this.Map2.Index = 2;
     this.Map2.Text = "Map 2";
     this.Map2.Click += new System.EventHandler(this.Map2_Click);
     //
     // Map3
     //
     this.Map3.Index = 3;
     this.Map3.Text = "Map 3";
     this.Map3.Click += new System.EventHandler(this.Map3_Click);
     //
     // OptionsDrawStatics
     //
     this.OptionsDrawStatics.Index = 2;
     this.OptionsDrawStatics.Text = "Draw statics";
     this.OptionsDrawStatics.Click += new System.EventHandler(this.OptionsDrawStatics_Click);
     //
     // menuItem1
     //
     this.menuItem1.Index = 3;
     this.menuItem1.Text = "Map File Folder";
     this.menuItem1.Click += new System.EventHandler(this.menuItem1_Click);
     //
     // OptionsGoCommand
     //
     this.OptionsGoCommand.Index = 4;
     this.OptionsGoCommand.Text = "Change Go Command";
     this.OptionsGoCommand.Click += new System.EventHandler(this.OptionsGoCommand_Click);
     //
     // menuItem2
     //
     this.menuItem2.Index = 2;
     this.menuItem2.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
                                                                               this.HelpHelp,
                                                                               this.HelpSite,
                                                                               this.menuItem7,
                                                                               this.HelpAbout});
     this.menuItem2.Text = "Help";
     //
     // HelpHelp
     //
     this.HelpHelp.Index = 0;
     this.HelpHelp.Text = "Help";
     this.HelpHelp.Click += new System.EventHandler(this.HelpHelp_Click);
     //
     // HelpSite
     //
     this.HelpSite.Index = 1;
     this.HelpSite.Text = "Visit The Box";
     this.HelpSite.Click += new System.EventHandler(this.HelpSite_Click);
     //
     // menuItem7
     //
     this.menuItem7.Index = 2;
     this.menuItem7.Text = "-";
     //
     // HelpAbout
     //
     this.HelpAbout.Index = 3;
     this.HelpAbout.Text = "About";
     this.HelpAbout.Click += new System.EventHandler(this.HelpAbout_Click);
     //
     // OpenFile
     //
     this.OpenFile.Filter = "Xml Files (*.xml)|*.xml";
     //
     // SaveFile
     //
     this.SaveFile.Filter = "Xml Files (*.xml)|*.xml";
     //
     // Status
     //
     this.Status.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
     this.Status.Location = new System.Drawing.Point(200, 152);
     this.Status.Name = "Status";
     this.Status.Size = new System.Drawing.Size(152, 104);
     this.Status.TabIndex = 19;
     this.Status.DoubleClick += new System.EventHandler(this.Status_DoubleClick);
     //
     // Map
     //
     this.Map.Center = new System.Drawing.Point(0, 0);
     this.Map.DisplayErrors = true;
     this.Map.DrawStatics = true;
     this.Map.Location = new System.Drawing.Point(360, 8);
     this.Map.Map = FiddlerControls.RegionEditor.MapViewer.Maps.Sosaria;
     this.Map.Name = "Map";
     this.Map.Navigation = FiddlerControls.RegionEditor.MapViewer.MapNavigation.None;
     this.Map.RotateView = false;
     this.Map.ShowCross = false;
     this.Map.Size = new System.Drawing.Size(296, 248);
     this.Map.TabIndex = 20;
     this.Map.Text = "mapViewer1";
     this.Map.WheelZoom = false;
     this.Map.XRayView = false;
     this.Map.ZoomLevel = 0;
     this.Map.MouseDown += new System.Windows.Forms.MouseEventHandler(this.Map_MouseDown);
     //
     // ButtonGo
     //
     this.ButtonGo.FlatStyle = System.Windows.Forms.FlatStyle.System;
     this.ButtonGo.Location = new System.Drawing.Point(200, 120);
     this.ButtonGo.Name = "ButtonGo";
     this.ButtonGo.Size = new System.Drawing.Size(48, 24);
     this.ButtonGo.TabIndex = 21;
     this.ButtonGo.Text = "Go";
     this.ButtonGo.Click += new System.EventHandler(this.ButtonGo_Click);
     //
     // Map4
     //
     this.Map4.Index = 4;
     this.Map4.Text = "Map 4";
     this.Map4.Click += new System.EventHandler(this.Map4_Click);
     //
     // LocationEditor
     //
     this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
     this.ClientSize = new System.Drawing.Size(664, 259);
     this.Controls.Add(this.ButtonGo);
     this.Controls.Add(this.Map);
     this.Controls.Add(this.Status);
     this.Controls.Add(this.ButtonDel);
     this.Controls.Add(this.ButtonZoomOut);
     this.Controls.Add(this.ButtonZoomIn);
     this.Controls.Add(this.ButtonSet);
     this.Controls.Add(this.InZ);
     this.Controls.Add(this.InY);
     this.Controls.Add(this.InX);
     this.Controls.Add(this.Input);
     this.Controls.Add(this.label3);
     this.Controls.Add(this.label2);
     this.Controls.Add(this.label1);
     this.Controls.Add(this.ButtonAdd);
     this.Controls.Add(this.TreeCat);
     this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
     this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
     this.MaximizeBox = false;
     this.Menu = this.mainMenu1;
     this.Name = "LocationEditor";
     this.Closing += new System.ComponentModel.CancelEventHandler(this.LocationEditor_Closing);
     this.ResumeLayout(false);
 }