private void Control_Click(object sender, EventArgs e) { DevDNB.LabelX label = sender as DevDNB.LabelX; switch (label.Name) { case "labelPreviewFore": m_EditObject = label; Form.frmSymbolEdit symbolEdit = new GeoSymbology.Form.frmSymbolEdit(this, label.Tag as ISymbol, ""); symbolEdit.ShowDialog(); break; } }
private void labelPreviewBack_Click(object sender, EventArgs e) { if (flag == true) { return; } m_EditObject = sender as System.Windows.Forms.Control; Control control = sender as System.Windows.Forms.Control; Form.frmSymbolEdit backEdit = new GeoSymbology.Form.frmSymbolEdit(this, control.Tag as ISymbol, ""); backEdit.ShowDialog(); //RefreshValue(control.Name);//yjl20110826 add }
public override void DoButtonClick(DevComponents.DotNetBar.ButtonX button) { switch (button.Name) { case "SimpleSymbol": { m_EditObject = button; Form.frmSymbolEdit frm = new GeoSymbology.Form.frmSymbolEdit(this, m_ForeSymbol.DataValue, ""); frm.ShowDialog(); } break; } }
private void Control_Click(object sender, EventArgs e) { if (flag == true) { return; } System.Windows.Forms.Control control = sender as System.Windows.Forms.Control; switch (control.Name) { case "labelPreviewFore": m_EditObject = control; Form.frmSymbolEdit foreEdit = new GeoSymbology.Form.frmSymbolEdit(this, control.Tag as ISymbol, ""); foreEdit.ShowDialog(); break; } }
private void listAddField_MouseDoubleClick(object sender, MouseEventArgs e) { System.Windows.Forms.ListViewItem item = listAddField.GetItemAt(e.X, e.Y); if (item == null) { return; } System.Drawing.Rectangle rec = item.GetBounds(System.Windows.Forms.ItemBoundsPortion.Entire); if (e.X <= listAddField.Columns[0].Width) { //·ûºÅ±à¼ m_EditObject = item; Form.frmSymbolEdit frm = new GeoSymbology.Form.frmSymbolEdit(this, item.Tag as ISymbol, ""); frm.ShowDialog(); } }
public override void DoListValueItemMouseDoubleClick(int x, int y) { System.Windows.Forms.ListViewItem item = m_ListValueItem.GetItemAt(x, y); if (item == null) { return; } System.Drawing.Rectangle rec = item.GetBounds(System.Windows.Forms.ItemBoundsPortion.Entire); if (x <= m_ListValueItem.Columns[0].Width) { //·ûºÅ±à¼ m_EditObject = item; Form.frmSymbolEdit frm = new GeoSymbology.Form.frmSymbolEdit(this, item.Tag as ISymbol, ""); frm.ShowDialog(); } else if (x > m_ListValueItem.Columns[0].Width && x <= (m_ListValueItem.Columns[1].Width + m_ListValueItem.Columns[0].Width)) { m_EditObject = item.SubItems[1]; //·¶Î§±à¼ System.Drawing.Point point = new System.Drawing.Point(); point.X = m_ListValueItem.Columns[0].Width; point.Y = rec.Top + (rec.Height - Form.frmDoubleEdit.FormWidth) / 2; point = m_ListValueItem.PointToScreen(point); Form.frmDoubleEdit doubleEdit = new GeoSymbology.Form.frmDoubleEdit(this, (double)item.SubItems[1].Tag, point, m_ListValueItem.Columns[1].Width, ""); doubleEdit.Show(); } else if (x > (m_ListValueItem.Columns[1].Width + m_ListValueItem.Columns[0].Width) && x <= (m_ListValueItem.Columns[0].Width + m_ListValueItem.Columns[1].Width + m_ListValueItem.Columns[2].Width)) { m_EditObject = item.SubItems[2]; //±êÇ©±à¼ System.Drawing.Point point = new System.Drawing.Point(); point.X = m_ListValueItem.Columns[0].Width + m_ListValueItem.Columns[1].Width; point.Y = rec.Top + (rec.Height - Form.frmStringEdit.FormWidth) / 2; point = m_ListValueItem.PointToScreen(point); Form.frmStringEdit stringEdit = new GeoSymbology.Form.frmStringEdit(this, item.SubItems[2].Text, point, m_ListValueItem.Columns[2].Width, ""); stringEdit.Show(); stringEdit.Location = point; } }
private void DoListValueItemMouseDoubleClick(object sender, System.Windows.Forms.MouseEventArgs e) { System.Windows.Forms.ListViewItem item = listValueItem.GetItemAt(e.X, e.Y); if (item == null) { return; } System.Drawing.Rectangle rec = item.GetBounds(System.Windows.Forms.ItemBoundsPortion.Entire); if (e.X <= listValueItem.Columns[0].Width) { //符号编辑 m_EditObject = item; Form.frmSymbolEdit frm = new GeoSymbology.Form.frmSymbolEdit(this, item.Tag as ISymbol, ""); frm.ShowDialog(); } else if (e.X > listValueItem.Columns[0].Width && e.X <= (listValueItem.Columns[1].Width + listValueItem.Columns[0].Width)) { m_EditObject = item.SubItems[1]; //范围编辑 System.Drawing.Point point = new System.Drawing.Point(); point.X = listValueItem.Columns[0].Width; point.Y = rec.Top + (rec.Height - Form.frmDoubleEdit.FormWidth) / 2; point = listValueItem.PointToScreen(point); Form.frmDoubleEdit doubleEdit = new GeoSymbology.Form.frmDoubleEdit(this, (double)item.SubItems[1].Tag, point, listValueItem.Columns[1].Width, ""); doubleEdit.Show(); } else if (e.X > (listValueItem.Columns[1].Width + listValueItem.Columns[0].Width) && e.X <= (listValueItem.Columns[0].Width + listValueItem.Columns[1].Width + listValueItem.Columns[2].Width)) { m_EditObject = item.SubItems[2]; //标签编辑 System.Drawing.Point point = new System.Drawing.Point(); point.X = listValueItem.Columns[0].Width + listValueItem.Columns[1].Width; point.Y = rec.Top + (rec.Height - Form.frmStringEdit.FormWidth) / 2; point = listValueItem.PointToScreen(point); Form.frmStringEdit stringEdit = new GeoSymbology.Form.frmStringEdit(this, item.SubItems[2].Text, point, listValueItem.Columns[2].Width, ""); stringEdit.Show(); } }
private void DoListViewMouseDoubleClick(object sender, System.Windows.Forms.MouseEventArgs e) { DevComponents.DotNetBar.Controls.ListViewEx listView = sender as DevComponents.DotNetBar.Controls.ListViewEx; System.Windows.Forms.ListViewItem item = null; if (item == null) { return; } switch (listView.Name) { case "listAddField": { item = listAddField.GetItemAt(e.X, e.Y); System.Drawing.Rectangle rec = item.GetBounds(System.Windows.Forms.ItemBoundsPortion.Entire); if (e.X <= listAddField.Columns[0].Width) { m_EditObject = item; Form.frmSymbolEdit frm = new GeoSymbology.Form.frmSymbolEdit(this, item.Tag as ISymbol, ""); frm.ShowDialog(); } else if (e.X > listAddField.Columns[0].Width && e.X <= listAddField.Columns[0].Width + listAddField.Columns[1].Width) { listAddField.Items.Remove(item); item.ImageKey = ""; listAllField.Items.Add(item); } } break; case "listAllField": { item = listAllField.GetItemAt(e.X, e.Y); listAllField.Items.Remove(item); listAddField.Items.Add(item); listAddField.SmallImageList.Images.Add(item.Name.Replace("Item", "Symbol"), ModuleCommon.Symbol2Picture(item.Tag as ISymbol, ModuleCommon.ImageWidth, ModuleCommon.ImageHeight)); item.ImageKey = item.Name.Replace("Item", "Symbol"); } break; } }
private void Button_Click(object sender, EventArgs e) { System.Windows.Forms.Control control = sender as System.Windows.Forms.Control; switch (control.Name) { case "buttonAdd": break; case "buttonDel": break; case "buttonUp": break; case "buttonDown": break; case "labelPreviewFore": m_EditObject = control; Form.frmSymbolEdit foreEdit = new GeoSymbology.Form.frmSymbolEdit(this, control.Tag as ISymbol, ""); foreEdit.ShowDialog(); break; } }