static private GetExtension ( ) : |
||
Résultat |
/// <summary> /// Occurs when this command is created /// </summary> /// <param name="hook">Instance of the application</param> public override void OnCreate(object hook) { if (hook == null) { return; } m_application = hook as IApplication; //Disable if it is not ArcMap if (hook is IMxApplication) { base.m_enabled = true; } else { base.m_enabled = false; } m_mainExtension = SelectionExtension.GetExtension(); if (m_mainExtension != null) { m_dockWindow = m_mainExtension.GetSelectionCountWindow; } }
public SelectByLineTool() { base.m_category = "Developer Samples"; base.m_caption = "Select ByLine Tool C#."; base.m_message = "Select by line tool C#."; base.m_toolTip = "Select by line tool C#.\r\nSelection Sample Extension needs to be turned on in Extensions dialog."; base.m_name = "ESRI_SelectionCOMSample_SelectByLineTool"; try { base.m_bitmap = new Bitmap(GetType().Assembly.GetManifestResourceStream("SelectionCOMSample.Images.SelectByLine.png")); base.m_cursor = new System.Windows.Forms.Cursor(GetType().Assembly.GetManifestResourceStream("SelectionCOMSample.Images.SelectByLine.cur")); } catch (Exception ex) { System.Diagnostics.Trace.WriteLine(ex.Message, "Invalid Bitmap"); } m_mainExtension = SelectionExtension.GetExtension(); }