public Icon GetFileIcon(string fileName, IconSize size) { var ws = new NSWorkspace(); var image = ws.IconForFileType(Path.GetExtension(fileName)); return(new Icon(new IconHandler(image))); }
partial void ContactEmail(NSObject sender) { NSWorkspace workSpace = NSWorkspace.SharedWorkspace; String mailtoAddress = String.Format("mailto:{0}?Subject={1}&body={2}", "*****@*****.**", "Expired", "Support"); workSpace.OpenUrl(NSUrl.FromString(mailtoAddress)); }
public static NSWorkspace GetWorkspace() { if (_ws == null) { _ws = new NSWorkspace(); } return(_ws); }
public Icon GetStaticIcon (StaticIconType type, IconSize size) { var ws = new NSWorkspace(); string code; switch (type) { case StaticIconType.OpenDirectory: code = "ofld"; break; default: case StaticIconType.CloseDirectory: code = "ofld"; break; } var image = ws.IconForFileType(code); return new Icon(new IconHandler(image)); }
public Icon GetStaticIcon(StaticIconType type, IconSize size) { var ws = new NSWorkspace(); string code; switch (type) { case StaticIconType.OpenDirectory: code = "ofld"; break; default: case StaticIconType.CloseDirectory: code = "ofld"; break; } var image = ws.IconForFileType(code); return(new Icon(Widget.Generator, new IconHandler(image))); }
public static bool IsIVPNAppIsRunning(out NSRunningApplication runningApplication) { runningApplication = null; NSWorkspace workspace = new NSWorkspace(); foreach (var application in workspace.RunningApplications) { if (application.LocalizedName == "IVPN" && application.ProcessIdentifier != NSProcessInfo.ProcessInfo.ProcessIdentifier) { runningApplication = application; return(true); } } return(false); }
public Icon GetStaticIcon(StaticIconType type, IconSize size) { var ws = new NSWorkspace(); string code; switch (type) { case StaticIconType.OpenDirectory: code = "ofld"; break; case StaticIconType.CloseDirectory: code = "ofld"; break; default: throw new NotSupportedException(); } var image = ws.IconForFileType(code); return(new Icon(new IconHandler(image))); }
public void OpenContainingFolder(string fileName) { NSUrl[] fileUrls = { NSUrl.FromFilename(fileName) }; var ws = new NSWorkspace(); ws.ActivateFileViewer(fileUrls); }
public Icon GetFileIcon (string fileName, IconSize size) { var ws = new NSWorkspace(); var image = ws.IconForFileType(Path.GetExtension(fileName)); return new Icon(new IconHandler(image)); }