📄 mapdisplay.cs
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
namespace CallCenter.BusinessInterfaces.MainForms
{
/// <summary>
/// MapDisplay 的摘要说明。
/// </summary>
public class MapDisplay : System.Windows.Forms.Form
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.Container components = null;
public MapDisplay()
{
//
// Windows 窗体设计器支持所必需的
//
InitializeComponent();
//
// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
//
}
public MapDisplay(int x,int y)
{
InitializeComponent();
}
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
[System.Runtime.InteropServices.DllImport("user32")]
private static extern bool AnimateWindow(IntPtr hwnd,int dwTime, int dwFlags);
const int AW_HOR_POSITIVE = 0x0001;
const int AW_HOR_NEGATIVE = 0x0002;
const int AW_VER_POSITIVE = 0x0004;
const int AW_VER_NEGATIVE = 0x0008;
const int AW_CENTER = 0x0010;
const int AW_HIDE = 0x10000;
const int AW_ACTIVATE = 0x20000;
const int AW_SLIDE = 0x40000;
private AxMapXLib.AxMap axMap1;
const int AW_BLEND = 0x80000;
#region Windows 窗体设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// </summary>
private void InitializeComponent()
{
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(MapDisplay));
this.axMap1 = new AxMapXLib.AxMap();
((System.ComponentModel.ISupportInitialize)(this.axMap1)).BeginInit();
this.SuspendLayout();
//
// axMap1
//
this.axMap1.Enabled = true;
this.axMap1.Location = new System.Drawing.Point(0, 0);
this.axMap1.Name = "axMap1";
this.axMap1.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("axMap1.OcxState")));
this.axMap1.Size = new System.Drawing.Size(400, 300);
this.axMap1.TabIndex = 0;
//
// MapDisplay
//
this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
this.ClientSize = new System.Drawing.Size(400, 301);
this.Controls.Add(this.axMap1);
this.Location = new System.Drawing.Point(450, 170);
this.Name = "MapDisplay";
this.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
this.Text = "地图";
this.TopMost = true;
this.Closing += new System.ComponentModel.CancelEventHandler(this.MapDisplay_Closing);
this.Load += new System.EventHandler(this.MapDisplay_Load);
((System.ComponentModel.ISupportInitialize)(this.axMap1)).EndInit();
this.ResumeLayout(false);
}
#endregion
private void MapDisplay_Load(object sender, System.EventArgs e)
{
AnimateWindow(this.Handle,1000, AW_CENTER | AW_ACTIVATE);
}
private void MapDisplay_Closing(object sender, System.ComponentModel.CancelEventArgs e)
{
AnimateWindow(this.Handle, 1000, AW_SLIDE | AW_HIDE | AW_VER_NEGATIVE);
}
private void button1_Click(object sender, System.EventArgs e)
{
this.Close();
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -