예제 #1
0
        public static async Task <NativeImage> CreateFromBuffer(byte[] buffer)
        {
            var proxy = new NativeImage();

            if (scriptProxy != null)
            {
                proxy.ScriptObjectProxy = scriptProxy;
            }

            scriptProxy = await proxy.Initialize("createFromBuffer", buffer);

            return(proxy);
        }
예제 #2
0
        public static async Task <NativeImage> CreateFromDataURL(string dataURL)
        {
            var proxy = new NativeImage();

            if (scriptProxy != null)
            {
                proxy.ScriptObjectProxy = scriptProxy;
            }

            scriptProxy = await proxy.Initialize("createFromDataURL", dataURL);

            return(proxy);
        }
예제 #3
0
        public static async Task <NativeImage> CreateEmpty()
        {
            var proxy = new NativeImage();

            if (scriptProxy != null)
            {
                proxy.ScriptObjectProxy = scriptProxy;
            }

            scriptProxy = await proxy.Initialize("createEmpty");

            return(proxy);
        }
예제 #4
0
        public static async Task <NativeImage> CreateFromPath(string path)
        {
            var proxy = new NativeImage();

            if (scriptProxy != null)
            {
                proxy.ScriptObjectProxy = scriptProxy;
            }

            scriptProxy = await proxy.Initialize(new object[] { "createFromPath", path });

            return(proxy);
        }
예제 #5
0
        public static async Task <Tray> Create(NativeImage icon)
        {
            var proxy = new Tray();

            if (scriptProxy != null)
            {
                proxy.ScriptObjectProxy = scriptProxy;
            }

            scriptProxy = await proxy.Initialize(icon);

            return(proxy);
        }
예제 #6
0
 public async Task SetIcon(NativeImage icon)
 {
     await Invoke <object>("setIcon", icon);
 }
예제 #7
0
 public async Task SetOverlayIcon(NativeImage overlay, string description)
 {
     await Invoke <object>("setOverlayIcon", overlay, description ?? string.Empty);
 }
예제 #8
0
 public async Task <object> SetIcon(NativeImage icon)
 {
     return(await Invoke <object>("setIcon", icon));
 }
예제 #9
0
 public async Task <object> SetOverlayIcon(NativeImage overlay, string description)
 {
     return(await Invoke <object>("setOverlayIcon", overlay, description));
 }
예제 #10
0
 public async Task <object> WriteImage(NativeImage image, ClipboardType type = ClipboardType.None)
 {
     return(await Invoke <object>("writeImage", image, type == ClipboardType.Selection? "selection" : string.Empty));
 }
예제 #11
0
 public async Task SetPressedImage(NativeImage image)
 {
     await Invoke <object>("setPressedImage", image);
 }