<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Attach to events on version Manager dialog with Arcobjects in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/attach-to-events-on-version-manager-dialog-with/m-p/332774#M8656</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is there anybody out there that have been able to hook up or wire up event delegates on the VersionManager Dialog in ArcMap?&lt;/P&gt;&lt;P&gt;The only sample I have found is this, but SetupVersionmanagerEvets reqiures an instance of IVersionManager, and that's logical. The question is how to get this instance when user clicks that button in the GUI?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="" style="background-color: #ffffff; font-size: 11.52px; margin: 15px;"&gt;&lt;SPAN class="" style="color: #0000ff;"&gt;class&lt;/SPAN&gt; EventList {   &lt;SPAN class="" style="color: #0000ff;"&gt;public&lt;/SPAN&gt; IVersionManagerEvents_OnVersionCreatedEventHandler dOnVersionCreatedE;   &lt;SPAN class="" style="color: #0000ff;"&gt;public&lt;/SPAN&gt; &lt;SPAN class="" style="color: #0000ff;"&gt;void&lt;/SPAN&gt; SetupVersionManagerEvents(IVersionManager versionManager)   {     IVersionManagerEvents_Event versionManagerEvent =        (IVersionManagerEvents_Event)versionManager;      &lt;SPAN class="" style="color: #008000;"&gt;//Wire OnReconcile event.&lt;/SPAN&gt;    dOnVersionCreatedE = &lt;SPAN class="" style="color: #0000ff;"&gt;new&lt;/SPAN&gt; IVersionManagerEvents_OnVersionCreatedEventHandler       (versionManagerEvents_OnVersionCreated);     versionManagerEvent.OnVersionCreated += dOnVersionCreatedE;   }    &lt;SPAN class="" style="color: #008000;"&gt;//Event handler method.&lt;/SPAN&gt;  &lt;SPAN class="" style="color: #0000ff;"&gt;private&lt;/SPAN&gt; &lt;SPAN class="" style="color: #0000ff;"&gt;void&lt;/SPAN&gt; versionManagerEvents_OnVersionCreated(IVersion version)   {     &lt;SPAN class="" style="color: #0000ff;"&gt;string&lt;/SPAN&gt; versionName = version.VersionName;     MessageBox.Show(&lt;SPAN class="" style="color: maroon;"&gt;"Created "&lt;/SPAN&gt; + versionName);   } }&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 09 Dec 2019 13:55:26 GMT</pubDate>
    <dc:creator>Harald_ØysteinLund1</dc:creator>
    <dc:date>2019-12-09T13:55:26Z</dc:date>
    <item>
      <title>Attach to events on version Manager dialog with Arcobjects</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/attach-to-events-on-version-manager-dialog-with/m-p/332774#M8656</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is there anybody out there that have been able to hook up or wire up event delegates on the VersionManager Dialog in ArcMap?&lt;/P&gt;&lt;P&gt;The only sample I have found is this, but SetupVersionmanagerEvets reqiures an instance of IVersionManager, and that's logical. The question is how to get this instance when user clicks that button in the GUI?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="" style="background-color: #ffffff; font-size: 11.52px; margin: 15px;"&gt;&lt;SPAN class="" style="color: #0000ff;"&gt;class&lt;/SPAN&gt; EventList {   &lt;SPAN class="" style="color: #0000ff;"&gt;public&lt;/SPAN&gt; IVersionManagerEvents_OnVersionCreatedEventHandler dOnVersionCreatedE;   &lt;SPAN class="" style="color: #0000ff;"&gt;public&lt;/SPAN&gt; &lt;SPAN class="" style="color: #0000ff;"&gt;void&lt;/SPAN&gt; SetupVersionManagerEvents(IVersionManager versionManager)   {     IVersionManagerEvents_Event versionManagerEvent =        (IVersionManagerEvents_Event)versionManager;      &lt;SPAN class="" style="color: #008000;"&gt;//Wire OnReconcile event.&lt;/SPAN&gt;    dOnVersionCreatedE = &lt;SPAN class="" style="color: #0000ff;"&gt;new&lt;/SPAN&gt; IVersionManagerEvents_OnVersionCreatedEventHandler       (versionManagerEvents_OnVersionCreated);     versionManagerEvent.OnVersionCreated += dOnVersionCreatedE;   }    &lt;SPAN class="" style="color: #008000;"&gt;//Event handler method.&lt;/SPAN&gt;  &lt;SPAN class="" style="color: #0000ff;"&gt;private&lt;/SPAN&gt; &lt;SPAN class="" style="color: #0000ff;"&gt;void&lt;/SPAN&gt; versionManagerEvents_OnVersionCreated(IVersion version)   {     &lt;SPAN class="" style="color: #0000ff;"&gt;string&lt;/SPAN&gt; versionName = version.VersionName;     MessageBox.Show(&lt;SPAN class="" style="color: maroon;"&gt;"Created "&lt;/SPAN&gt; + versionName);   } }&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Dec 2019 13:55:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/attach-to-events-on-version-manager-dialog-with/m-p/332774#M8656</guid>
      <dc:creator>Harald_ØysteinLund1</dc:creator>
      <dc:date>2019-12-09T13:55:26Z</dc:date>
    </item>
  </channel>
</rss>

