public PageConfig() { InitializeComponent(); FM = new MyWinForm(this); FM.SetDefaultStyle("分页设置"); numericUpDown1.Value = (decimal)INI.GetPerPage(); MyTip.Set(label1, "设为 0 则不进行分页。"); }
public Notes(Form LoginForm = null) { this.LoginForm = LoginForm; M = MyModel.GetInstance(Global.con); InitializeComponent(); FM = new MyWinForm(this); FM.SetDefaultStyle("笔记本"); if (LoginForm == null) { button6.Enabled = false; } MyTip.Set(label1, "点击清空筛选"); DefineView(); }
/// <summary> /// 获得当前坐标 /// </summary> /// <param name="feature"></param> /// <param name="axMap"></param> /// <param name="mainForm"></param> /// <returns></returns> public static System.Drawing.Point getCurrentCoord(IFeature feature, AxMapControl axMap, Form mainForm, MyTip tip) { //获得经纬度坐标 IPoint point = feature.Shape as IPoint; System.Drawing.Point tipLocation = new System.Drawing.Point(); try { if (point != null) { //获得屏幕坐标 System.Drawing.Point screenPoint = getScreenCoord(axMap, point.X, point.Y); System.Drawing.Point formLocation = mainForm.Location; System.Drawing.Point axMapLocation = axMap.Location; tipLocation = new System.Drawing.Point(); tipLocation.X = formLocation.X + axMapLocation.X + screenPoint.X + 10; tipLocation.Y = formLocation.Y + axMapLocation.Y + screenPoint.Y; return(tipLocation); } } catch { System.Drawing.Point p = new System.Drawing.Point(); p.X = mainForm.Location.X + axMap.Width / 2 + axMap.Location.X; p.Y = mainForm.Location.Y + axMap.Height / 2 + axMap.Location.Y; return(p); } return(tipLocation); }