Created
June 9, 2022 10:24
-
-
Save chuongmep/ecc5a3c1dc11d68b6b02591a8b788359 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public override void Action() | |
{ | |
Application.ActiveDocument.CurrentSelection.Changed += CurrentSelection_Changed; | |
} | |
public void CurrentSelection_Changed(object sender, EventArgs e) | |
{ | |
var selection = Application.ActiveDocument.CurrentSelection; | |
MessageBox.Show(selection.SelectedItems.First.ClassDisplayName.ToString()); | |
Application.ActiveDocument.CurrentSelection.Changed -= CurrentSelection_Changed; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment