public static IsFileSupported ( string file ) : bool | ||
file | string | |
return | bool |
private void BeforeQueryStatus(object sender, EventArgs e) { OleMenuCommand button = (OleMenuCommand)sender; button.Enabled = button.Visible = false; var item = ProjectHelpers.GetSelectedItems().FirstOrDefault(); if (item == null || item.FileCount == 0) { return; } string file = item.FileNames[1]; button.Enabled = button.Visible = CommandHelpers.IsFileSupported(file); }
public bool IsDropEnabled(DragDropInfo dragDropInfo) { _fileName = GetImageFilename(dragDropInfo); if (string.IsNullOrEmpty(_fileName) || !CommandHelpers.IsFileSupported(_fileName) || VSPackage._dte.ActiveDocument == null) { return(false); } string activeFile = Path.GetFileName(VSPackage._dte.ActiveDocument.FullName); if (Constants.FILENAME.Equals(activeFile, StringComparison.OrdinalIgnoreCase)) { return(true); } return(false); }