private void Button_Click(object sender, EventArgs e) { DevComponents.DotNetBar.ButtonX button = sender as DevComponents.DotNetBar.ButtonX; switch (button.Name) { case "buttonOK": m_SymbolObject.ReGenerateSymbol(labelPreview.Tag as ESRI.ArcGIS.Display.ISymbol); m_EditItem.DoAfterEdit(labelPreview.Tag, System.Windows.Forms.DialogResult.OK, m_EditType); axSymbologyControl1.Clear(); this.Close(); break; case "buttonCancel": //m_EditItem.DoAfterEdit(null, System.Windows.Forms.DialogResult.Cancel, m_EditType); axSymbologyControl1.Clear(); this.Close(); break; case "buttonBrowse": System.Windows.Forms.OpenFileDialog openDialog = new System.Windows.Forms.OpenFileDialog(); openDialog.RestoreDirectory = true; openDialog.Filter = "Engine·ûºÅ¿âÎļþ (*.ServerStyle)|*.ServerStyle|ArcGIS·ûºÅ¿âÎļþ (*.Style)|*.Style"; openDialog.Title = "Ñ¡Ôñ·ûºÅ¿â"; openDialog.ShowReadOnly = true; openDialog.Multiselect = false; if (openDialog.ShowDialog() == System.Windows.Forms.DialogResult.OK) { cmbStyleFiles.Items.Add(openDialog.FileName); cmbStyleFiles.Text = openDialog.FileName; } break; } }
private void doubleInput_KeyUp(object sender, KeyEventArgs e) { switch (e.KeyCode) { case Keys.Enter: doubleInput.LostFocus -= new EventHandler(DoubleEdit_LostFocus); m_EditItem.DoAfterEdit(doubleInput.Value, DialogResult.OK, m_EditType); this.Close(); break; case Keys.Escape: m_EditItem.DoAfterEdit(null, DialogResult.Cancel, m_EditType); this.Close(); break; } }
private void textbox_KeyUp(object sender, KeyEventArgs e) { switch (e.KeyCode) { case Keys.Enter: txtValue.LostFocus -= new EventHandler(StringEdit_LostFocus); m_EditItem.DoAfterEdit(txtValue.Text.Replace("\r\n", ""), DialogResult.OK, m_EditType); this.Close(); break; case Keys.Escape: m_EditItem.DoAfterEdit(null, DialogResult.Cancel, m_EditType); this.Close(); break; } }