{"action":"created","comment":{"url":"https://api.github.com/repos/DynamoDS/DynamoRevit/pulls/comments/27185637","id":27185637,"diff_hunk":"@@ -126,6 +149,15 @@ private SplitButton AddSplitButtonGroup(RibbonPanel panel)\n             var versionData = new SplitButtonData(\"versions\", Resources.DynamoVersions);\n             var button = panel.AddItem(versionData) as SplitButton;\n \n+            Bitmap dynamoIcon = Resources.dynamo_32x32;\n+\n+            BitmapSource bitmapSource =\n+                Imaging.CreateBitmapSourceFromHBitmap(\n+                    dynamoIcon.GetHbitmap(),","path":"src/Legacy/DynamoRevitVersionSelector/VersionSelectorApp.cs","position":97,"original_position":97,"commit_id":"79752b25d0e2aff4e4f2795b1316f58cea3a0ef3","original_commit_id":"79752b25d0e2aff4e4f2795b1316f58cea3a0ef3","user":{"login":"aparajit-pratap","id":5710686,"avatar_url":"https://avatars.githubusercontent.com/u/5710686?v=3","gravatar_id":"","url":"https://api.github.com/users/aparajit-pratap","html_url":"https://github.com/aparajit-pratap","followers_url":"https://api.github.com/users/aparajit-pratap/followers","following_url":"https://api.github.com/users/aparajit-pratap/following{/other_user}","gists_url":"https://api.github.com/users/aparajit-pratap/gists{/gist_id}","starred_url":"https://api.github.com/users/aparajit-pratap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aparajit-pratap/subscriptions","organizations_url":"https://api.github.com/users/aparajit-pratap/orgs","repos_url":"https://api.github.com/users/aparajit-pratap/repos","events_url":"https://api.github.com/users/aparajit-pratap/events{/privacy}","received_events_url":"https://api.github.com/users/aparajit-pratap/received_events","type":"User","site_admin":false},"body":"You need to delete this object using `GDI DeleteObject` method to free the memory used by the bitmap object. You should use something like:\r\n```\r\n// at class level\r\n[System.Runtime.InteropServices.DllImport(\"gdi32.dll\")]\r\npublic static extern bool DeleteObject(IntPtr hObject);\r\n\r\n// your code\r\nusing (Bitmap dynamoIcon = Resources.dynamo_32x32) \r\n{\r\n    IntPtr hBitmap = bmp.GetHbitmap(); \r\n\r\n    try \r\n    {\r\n        var bitmapSource = Imaging.CreateBitmapSourceFromHBitmap(hBitmap, IntPtr.Zero, Int32Rect.Empty, BitmapSizeOptions.FromEmptyOptions());\r\n    }\r\n    finally \r\n    {\r\n        DeleteObject(hBitmap)\r\n    }\r\n}\r\n```","created_at":"2015-03-26T03:06:48Z","updated_at":"2015-03-26T03:06:48Z","html_url":"https://github.com/DynamoDS/DynamoRevit/pull/289#discussion_r27185637","pull_request_url":"https://api.github.com/repos/DynamoDS/DynamoRevit/pulls/289","_links":{"self":{"href":"https://api.github.com/repos/DynamoDS/DynamoRevit/pulls/comments/27185637"},"html":{"href":"https://github.com/DynamoDS/DynamoRevit/pull/289#discussion_r27185637"},"pull_request":{"href":"https://api.github.com/repos/DynamoDS/DynamoRevit/pulls/289"}}},"pull_request":{"url":"https://api.github.com/repos/DynamoDS/DynamoRevit/pulls/289","id":31839744,"html_url":"https://github.com/DynamoDS/DynamoRevit/pull/289","diff_url":"https://github.com/DynamoDS/DynamoRevit/pull/289.diff","patch_url":"https://github.com/DynamoDS/DynamoRevit/pull/289.patch","issue_url":"https://api.github.com/repos/DynamoDS/DynamoRevit/issues/289","number":289,"state":"open","locked":false,"title":"Version selector enhancements","user":{"login":"sharadkjaiswal","id":1754137,"avatar_url":"https://avatars.githubusercontent.com/u/1754137?v=3","gravatar_id":"","url":"https://api.github.com/users/sharadkjaiswal","html_url":"https://github.com/sharadkjaiswal","followers_url":"https://api.github.com/users/sharadkjaiswal/followers","following_url":"https://api.github.com/users/sharadkjaiswal/following{/other_user}","gists_url":"https://api.github.com/users/sharadkjaiswal/gists{/gist_id}","starred_url":"https://api.github.com/users/sharadkjaiswal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sharadkjaiswal/subscriptions","organizations_url":"https://api.github.com/users/sharadkjaiswal/orgs","repos_url":"https://api.github.com/users/sharadkjaiswal/repos","events_url":"https://api.github.com/users/sharadkjaiswal/events{/privacy}","received_events_url":"https://api.github.com/users/sharadkjaiswal/received_events","type":"User","site_admin":false},"body":"- Dynamo icon and tooltip is provided for SplitButton,\r\n- When multiple version of Dynamo is available, it allows the user to\r\nselect and launch any version of Dynamo through split button selection.\r\n- Once a version is selected, Dynamo is launched and the split button is\r\ndisabled and can no longer be used to change the version unless Revit is\r\nre-started.\r\n- When Dynamo is launched, a new button to invoke a specific version of\r\nDynamo is added to the Ribbon panel.\r\n- Tooltip on Split button says, \"Launches Dynamo 0.7.5, to launch a\r\ndifferent version of Dynamo you may need to restart Revit\".\r\n\r\n**Stage 1: When Revit is launched**\r\n![image](https://cloud.githubusercontent.com/assets/1754137/6805972/e8749d9e-d280-11e4-9613-a93a1f2114af.png)\r\n\r\n\r\n\r\n**Stage 2: When a version is selected and Dynamo is launched**\r\n![image](https://cloud.githubusercontent.com/assets/1754137/6805993/146349e6-d281-11e4-8590-b7926e655465.png)\r\n\r\n\r\n\r\n**Stage 3: When Dynamo is closed, Dynamo version can't be changed**\r\n![image](https://cloud.githubusercontent.com/assets/1754137/6806028/488e1016-d281-11e4-941b-fa8aa3876a66.png)\r\n\r\n\r\nPTAL:\r\n- [ ] @ikeough  (because you know it best)\r\n- [ ] @kronz (because you are the product owner)\r\n- [x] @elayabharath \r\n\r\nRequires Merge:\r\n- [ ] Revit2015\r\n- [ ] Revit2016\r\n- [x] RC0.8.0_Revit2014\r\n- [x] RC0.8.0_Revit2015\r\n- [x] RC0.8.0_Revit2016","created_at":"2015-03-24T15:49:59Z","updated_at":"2015-03-26T03:06:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8adff417489b340fc7251d85ebd4891d829d4b38","assignee":{"login":"ikeough","id":1139788,"avatar_url":"https://avatars.githubusercontent.com/u/1139788?v=3","gravatar_id":"","url":"https://api.github.com/users/ikeough","html_url":"https://github.com/ikeough","followers_url":"https://api.github.com/users/ikeough/followers","following_url":"https://api.github.com/users/ikeough/following{/other_user}","gists_url":"https://api.github.com/users/ikeough/gists{/gist_id}","starred_url":"https://api.github.com/users/ikeough/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ikeough/subscriptions","organizations_url":"https://api.github.com/users/ikeough/orgs","repos_url":"https://api.github.com/users/ikeough/repos","events_url":"https://api.github.com/users/ikeough/events{/privacy}","received_events_url":"https://api.github.com/users/ikeough/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/DynamoDS/DynamoRevit/pulls/289/commits","review_comments_url":"https://api.github.com/repos/DynamoDS/DynamoRevit/pulls/289/comments","review_comment_url":"https://api.github.com/repos/DynamoDS/DynamoRevit/pulls/comments{/number}","comments_url":"https://api.github.com/repos/DynamoDS/DynamoRevit/issues/289/comments","statuses_url":"https://api.github.com/repos/DynamoDS/DynamoRevit/statuses/79752b25d0e2aff4e4f2795b1316f58cea3a0ef3","head":{"label":"Conceptual-Design:RC0.8.0_Revit2014","ref":"RC0.8.0_Revit2014","sha":"79752b25d0e2aff4e4f2795b1316f58cea3a0ef3","user":{"login":"Conceptual-Design","id":1738955,"avatar_url":"https://avatars.githubusercontent.com/u/1738955?v=3","gravatar_id":"","url":"https://api.github.com/users/Conceptual-Design","html_url":"https://github.com/Conceptual-Design","followers_url":"https://api.github.com/users/Conceptual-Design/followers","following_url":"https://api.github.com/users/Conceptual-Design/following{/other_user}","gists_url":"https://api.github.com/users/Conceptual-Design/gists{/gist_id}","starred_url":"https://api.github.com/users/Conceptual-Design/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Conceptual-Design/subscriptions","organizations_url":"https://api.github.com/users/Conceptual-Design/orgs","repos_url":"https://api.github.com/users/Conceptual-Design/repos","events_url":"https://api.github.com/users/Conceptual-Design/events{/privacy}","received_events_url":"https://api.github.com/users/Conceptual-Design/received_events","type":"Organization","site_admin":false},"repo":{"id":25964048,"name":"DynamoRevit","full_name":"Conceptual-Design/DynamoRevit","owner":{"login":"Conceptual-Design","id":1738955,"avatar_url":"https://avatars.githubusercontent.com/u/1738955?v=3","gravatar_id":"","url":"https://api.github.com/users/Conceptual-Design","html_url":"https://github.com/Conceptual-Design","followers_url":"https://api.github.com/users/Conceptual-Design/followers","following_url":"https://api.github.com/users/Conceptual-Design/following{/other_user}","gists_url":"https://api.github.com/users/Conceptual-Design/gists{/gist_id}","starred_url":"https://api.github.com/users/Conceptual-Design/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Conceptual-Design/subscriptions","organizations_url":"https://api.github.com/users/Conceptual-Design/orgs","repos_url":"https://api.github.com/users/Conceptual-Design/repos","events_url":"https://api.github.com/users/Conceptual-Design/events{/privacy}","received_events_url":"https://api.github.com/users/Conceptual-Design/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Conceptual-Design/DynamoRevit","description":"Dynamo libaries and ExternalApplication implementation for Revit.","fork":true,"url":"https://api.github.com/repos/Conceptual-Design/DynamoRevit","forks_url":"https://api.github.com/repos/Conceptual-Design/DynamoRevit/forks","keys_url":"https://api.github.com/repos/Conceptual-Design/DynamoRevit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Conceptual-Design/DynamoRevit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Conceptual-Design/DynamoRevit/teams","hooks_url":"https://api.github.com/repos/Conceptual-Design/DynamoRevit/hooks","issue_events_url":"https://api.github.com/repos/Conceptual-Design/DynamoRevit/issues/events{/number}","events_url":"https://api.github.com/repos/Conceptual-Design/DynamoRevit/events","assignees_url":"https://api.github.com/repos/Conceptual-Design/DynamoRevit/assignees{/user}","branches_url":"https://api.github.com/repos/Conceptual-Design/DynamoRevit/branches{/branch}","tags_url":"https://api.github.com/repos/Conceptual-Design/DynamoRevit/tags","blobs_url":"https://api.github.com/repos/Conceptual-Design/DynamoRevit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Conceptual-Design/DynamoRevit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Conceptual-Design/DynamoRevit/git/refs{/sha}","trees_url":"https://api.github.com/repos/Conceptual-Design/DynamoRevit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Conceptual-Design/DynamoRevit/statuses/{sha}","languages_url":"https://api.github.com/repos/Conceptual-Design/DynamoRevit/languages","stargazers_url":"https://api.github.com/repos/Conceptual-Design/DynamoRevit/stargazers","contributors_url":"https://api.github.com/repos/Conceptual-Design/DynamoRevit/contributors","subscribers_url":"https://api.github.com/repos/Conceptual-Design/DynamoRevit/subscribers","subscription_url":"https://api.github.com/repos/Conceptual-Design/DynamoRevit/subscription","commits_url":"https://api.github.com/repos/Conceptual-Design/DynamoRevit/commits{/sha}","git_commits_url":"https://api.github.com/repos/Conceptual-Design/DynamoRevit/git/commits{/sha}","comments_url":"https://api.github.com/repos/Conceptual-Design/DynamoRevit/comments{/number}","issue_comment_url":"https://api.github.com/repos/Conceptual-Design/DynamoRevit/issues/comments{/number}","contents_url":"https://api.github.com/repos/Conceptual-Design/DynamoRevit/contents/{+path}","compare_url":"https://api.github.com/repos/Conceptual-Design/DynamoRevit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Conceptual-Design/DynamoRevit/merges","archive_url":"https://api.github.com/repos/Conceptual-Design/DynamoRevit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Conceptual-Design/DynamoRevit/downloads","issues_url":"https://api.github.com/repos/Conceptual-Design/DynamoRevit/issues{/number}","pulls_url":"https://api.github.com/repos/Conceptual-Design/DynamoRevit/pulls{/number}","milestones_url":"https://api.github.com/repos/Conceptual-Design/DynamoRevit/milestones{/number}","notifications_url":"https://api.github.com/repos/Conceptual-Design/DynamoRevit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Conceptual-Design/DynamoRevit/labels{/name}","releases_url":"https://api.github.com/repos/Conceptual-Design/DynamoRevit/releases{/id}","created_at":"2014-10-30T09:38:55Z","updated_at":"2014-11-03T05:53:27Z","pushed_at":"2015-03-24T16:20:40Z","git_url":"git://github.com/Conceptual-Design/DynamoRevit.git","ssh_url":"git@github.com:Conceptual-Design/DynamoRevit.git","clone_url":"https://github.com/Conceptual-Design/DynamoRevit.git","svn_url":"https://github.com/Conceptual-Design/DynamoRevit","homepage":null,"size":184339,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"DynamoDS:Revit2014","ref":"Revit2014","sha":"d8c2f1cfcac82c4939793ce82e1a3fe7b93e599c","user":{"login":"DynamoDS","id":6528209,"avatar_url":"https://avatars.githubusercontent.com/u/6528209?v=3","gravatar_id":"","url":"https://api.github.com/users/DynamoDS","html_url":"https://github.com/DynamoDS","followers_url":"https://api.github.com/users/DynamoDS/followers","following_url":"https://api.github.com/users/DynamoDS/following{/other_user}","gists_url":"https://api.github.com/users/DynamoDS/gists{/gist_id}","starred_url":"https://api.github.com/users/DynamoDS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DynamoDS/subscriptions","organizations_url":"https://api.github.com/users/DynamoDS/orgs","repos_url":"https://api.github.com/users/DynamoDS/repos","events_url":"https://api.github.com/users/DynamoDS/events{/privacy}","received_events_url":"https://api.github.com/users/DynamoDS/received_events","type":"Organization","site_admin":false},"repo":{"id":22768182,"name":"DynamoRevit","full_name":"DynamoDS/DynamoRevit","owner":{"login":"DynamoDS","id":6528209,"avatar_url":"https://avatars.githubusercontent.com/u/6528209?v=3","gravatar_id":"","url":"https://api.github.com/users/DynamoDS","html_url":"https://github.com/DynamoDS","followers_url":"https://api.github.com/users/DynamoDS/followers","following_url":"https://api.github.com/users/DynamoDS/following{/other_user}","gists_url":"https://api.github.com/users/DynamoDS/gists{/gist_id}","starred_url":"https://api.github.com/users/DynamoDS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DynamoDS/subscriptions","organizations_url":"https://api.github.com/users/DynamoDS/orgs","repos_url":"https://api.github.com/users/DynamoDS/repos","events_url":"https://api.github.com/users/DynamoDS/events{/privacy}","received_events_url":"https://api.github.com/users/DynamoDS/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/DynamoDS/DynamoRevit","description":"Dynamo Libraries for Revit","fork":false,"url":"https://api.github.com/repos/DynamoDS/DynamoRevit","forks_url":"https://api.github.com/repos/DynamoDS/DynamoRevit/forks","keys_url":"https://api.github.com/repos/DynamoDS/DynamoRevit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DynamoDS/DynamoRevit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DynamoDS/DynamoRevit/teams","hooks_url":"https://api.github.com/repos/DynamoDS/DynamoRevit/hooks","issue_events_url":"https://api.github.com/repos/DynamoDS/DynamoRevit/issues/events{/number}","events_url":"https://api.github.com/repos/DynamoDS/DynamoRevit/events","assignees_url":"https://api.github.com/repos/DynamoDS/DynamoRevit/assignees{/user}","branches_url":"https://api.github.com/repos/DynamoDS/DynamoRevit/branches{/branch}","tags_url":"https://api.github.com/repos/DynamoDS/DynamoRevit/tags","blobs_url":"https://api.github.com/repos/DynamoDS/DynamoRevit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DynamoDS/DynamoRevit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DynamoDS/DynamoRevit/git/refs{/sha}","trees_url":"https://api.github.com/repos/DynamoDS/DynamoRevit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DynamoDS/DynamoRevit/statuses/{sha}","languages_url":"https://api.github.com/repos/DynamoDS/DynamoRevit/languages","stargazers_url":"https://api.github.com/repos/DynamoDS/DynamoRevit/stargazers","contributors_url":"https://api.github.com/repos/DynamoDS/DynamoRevit/contributors","subscribers_url":"https://api.github.com/repos/DynamoDS/DynamoRevit/subscribers","subscription_url":"https://api.github.com/repos/DynamoDS/DynamoRevit/subscription","commits_url":"https://api.github.com/repos/DynamoDS/DynamoRevit/commits{/sha}","git_commits_url":"https://api.github.com/repos/DynamoDS/DynamoRevit/git/commits{/sha}","comments_url":"https://api.github.com/repos/DynamoDS/DynamoRevit/comments{/number}","issue_comment_url":"https://api.github.com/repos/DynamoDS/DynamoRevit/issues/comments{/number}","contents_url":"https://api.github.com/repos/DynamoDS/DynamoRevit/contents/{+path}","compare_url":"https://api.github.com/repos/DynamoDS/DynamoRevit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DynamoDS/DynamoRevit/merges","archive_url":"https://api.github.com/repos/DynamoDS/DynamoRevit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DynamoDS/DynamoRevit/downloads","issues_url":"https://api.github.com/repos/DynamoDS/DynamoRevit/issues{/number}","pulls_url":"https://api.github.com/repos/DynamoDS/DynamoRevit/pulls{/number}","milestones_url":"https://api.github.com/repos/DynamoDS/DynamoRevit/milestones{/number}","notifications_url":"https://api.github.com/repos/DynamoDS/DynamoRevit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DynamoDS/DynamoRevit/labels{/name}","releases_url":"https://api.github.com/repos/DynamoDS/DynamoRevit/releases{/id}","created_at":"2014-08-08T18:52:34Z","updated_at":"2015-03-25T17:21:31Z","pushed_at":"2015-03-25T23:28:03Z","git_url":"git://github.com/DynamoDS/DynamoRevit.git","ssh_url":"git@github.com:DynamoDS/DynamoRevit.git","clone_url":"https://github.com/DynamoDS/DynamoRevit.git","svn_url":"https://github.com/DynamoDS/DynamoRevit","homepage":"http://www.dynamobim.org","size":188041,"stargazers_count":7,"watchers_count":7,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":31,"mirror_url":null,"open_issues_count":9,"forks":31,"open_issues":9,"watchers":7,"default_branch":"Revit2015"}},"_links":{"self":{"href":"https://api.github.com/repos/DynamoDS/DynamoRevit/pulls/289"},"html":{"href":"https://github.com/DynamoDS/DynamoRevit/pull/289"},"issue":{"href":"https://api.github.com/repos/DynamoDS/DynamoRevit/issues/289"},"comments":{"href":"https://api.github.com/repos/DynamoDS/DynamoRevit/issues/289/comments"},"review_comments":{"href":"https://api.github.com/repos/DynamoDS/DynamoRevit/pulls/289/comments"},"review_comment":{"href":"https://api.github.com/repos/DynamoDS/DynamoRevit/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/DynamoDS/DynamoRevit/pulls/289/commits"},"statuses":{"href":"https://api.github.com/repos/DynamoDS/DynamoRevit/statuses/79752b25d0e2aff4e4f2795b1316f58cea3a0ef3"}}}}