All Downloads are FREE. Search and download functionalities are using the official Maven repository.

system.windows.Application Maven / Gradle / Ivy

/*
 *  MIT License
 *
 *  Copyright (c) 2022 MASES s.r.l.
 *
 *  Permission is hereby granted, free of charge, to any person obtaining a copy
 *  of this software and associated documentation files (the "Software"), to deal
 *  in the Software without restriction, including without limitation the rights
 *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 *  copies of the Software, and to permit persons to whom the Software is
 *  furnished to do so, subject to the following conditions:
 *
 *  The above copyright notice and this permission notice shall be included in all
 *  copies or substantial portions of the Software.
 *
 *  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 *  SOFTWARE.
 */

/**************************************************************************************
 * 
 *      This code was generated from a template using JCOReflector
 * 
 *      Manual changes to this file may cause unexpected behavior in your application.
 *      Manual changes to this file will be overwritten if the code is regenerated.
 * 
 *************************************************************************************/

package system.windows;

import org.mases.jcobridge.*;
import org.mases.jcobridge.netreflection.*;
import java.util.ArrayList;

// Import section
import system.windows.threading.DispatcherObject;
import system.windows.Window;
import system.Uri;
import system.windows.resources.StreamResourceInfo;
import system.collections.IDictionary;
import system.collections.IDictionaryImplementation;
import system.reflection.Assembly;
import system.windows.Application;
import system.windows.ResourceDictionary;
import system.windows.ShutdownMode;
import system.windows.WindowCollection;
import system.EventHandler;
import system.windows.ExitEventHandler;
import system.windows.navigation.FragmentNavigationEventHandler;
import system.windows.navigation.LoadCompletedEventHandler;
import system.windows.navigation.NavigatedEventHandler;
import system.windows.navigation.NavigatingCancelEventHandler;
import system.windows.navigation.NavigationFailedEventHandler;
import system.windows.navigation.NavigationProgressEventHandler;
import system.windows.navigation.NavigationStoppedEventHandler;
import system.windows.SessionEndingCancelEventHandler;
import system.windows.StartupEventHandler;
import system.windows.threading.DispatcherUnhandledExceptionEventHandler;
import system.windows.markup.IQueryAmbient;
import system.windows.markup.IQueryAmbientImplementation;


/**
 * The base .NET class managing System.Windows.Application, PresentationFramework, Version=5.0.14.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35.
 * 

* * See: https://docs.microsoft.com/en-us/dotnet/api/System.Windows.Application */ public class Application extends DispatcherObject implements system.windows.markup.IQueryAmbient { /** * Fully assembly qualified name: PresentationFramework, Version=5.0.14.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 */ public static final String assemblyFullName = "PresentationFramework, Version=5.0.14.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"; /** * Assembly name: PresentationFramework */ public static final String assemblyShortName = "PresentationFramework"; /** * Qualified class name: System.Windows.Application */ public static final String className = "System.Windows.Application"; static JCOBridge bridge = JCOBridgeInstance.getInstance(assemblyFullName); /** * The type managed from JCOBridge. See {@link JCType} */ public static JCType classType = createType(); static JCEnum enumInstance = null; JCObject classInstance = null; static JCType createType() { try { String classToCreate = className + ", " + (JCOReflector.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName); if (JCOReflector.getDebug()) JCOReflector.writeLog("Creating %s", classToCreate); JCType typeCreated = bridge.GetType(classToCreate); if (JCOReflector.getDebug()) JCOReflector.writeLog("Created: %s", (typeCreated != null) ? typeCreated.toString() : "Returned null value"); return typeCreated; } catch (JCException e) { JCOReflector.writeLog(e); return null; } } void addReference(String ref) throws Throwable { try { bridge.AddReference(ref); } catch (JCNativeException jcne) { throw translateException(jcne); } } /** * Internal constructor. Use with caution */ public Application(java.lang.Object instance) throws Throwable { super(instance); if (instance instanceof JCObject) { classInstance = (JCObject) instance; } else throw new Exception("Cannot manage object, it is not a JCObject"); } public String getJCOAssemblyName() { return assemblyFullName; } public String getJCOClassName() { return className; } public String getJCOObjectName() { return className + ", " + (JCOReflector.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName); } public java.lang.Object getJCOInstance() { return classInstance; } public void setJCOInstance(JCObject instance) { classInstance = instance; super.setJCOInstance(classInstance); } public JCType getJCOType() { return classType; } /** * Try to cast the {@link IJCOBridgeReflected} instance into {@link Application}, a cast assert is made to check if types are compatible. * @param from {@link IJCOBridgeReflected} instance to be casted * @return {@link Application} instance * @throws java.lang.Throwable in case of error during cast operation */ public static Application cast(IJCOBridgeReflected from) throws Throwable { NetType.AssertCast(classType, from); return new Application(from.getJCOInstance()); } // Constructors section public Application() throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException, system.PlatformNotSupportedException, system.InvalidOperationException, system.ArgumentNullException, system.RankException, system.IndexOutOfRangeException, system.ArrayTypeMismatchException, system.componentmodel.InvalidEnumArgumentException, system.componentmodel.Win32Exception, system.TimeoutException, system.globalization.CultureNotFoundException, system.NotSupportedException, system.UriFormatException, system.OutOfMemoryException, system.ObjectDisposedException, system.security.SecurityException, system.io.IOException, system.collections.generic.KeyNotFoundException, system.reflection.AmbiguousMatchException, system.xaml.XamlException, system.NotImplementedException, system.windows.markup.XamlParseException, system.MulticastNotSupportedException, system.SystemException, system.net.WebException { try { // add reference to assemblyName.dll file addReference(JCOReflector.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName); setJCOInstance((JCObject)classType.NewObject()); } catch (JCNativeException jcne) { throw translateException(jcne); } } // Methods section public int Run() throws Throwable, system.ArgumentNullException, system.ArgumentException, system.InvalidCastException, system.ObjectDisposedException, system.InvalidOperationException, system.globalization.CultureNotFoundException, system.PlatformNotSupportedException, system.IndexOutOfRangeException, system.ArgumentOutOfRangeException, system.FormatException, system.RankException, system.ArrayTypeMismatchException, system.componentmodel.Win32Exception, system.NullReferenceException, system.OverflowException, system.TimeoutException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (int)classInstance.Invoke("Run"); } catch (JCNativeException jcne) { throw translateException(jcne); } } public int Run(Window window) throws Throwable, system.ArgumentNullException, system.ArgumentException, system.ObjectDisposedException, system.InvalidOperationException, system.PlatformNotSupportedException, system.InvalidCastException, system.ArgumentOutOfRangeException, system.IndexOutOfRangeException, system.FormatException, system.RankException, system.ArrayTypeMismatchException, system.componentmodel.InvalidEnumArgumentException, system.componentmodel.Win32Exception, system.NullReferenceException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (int)classInstance.Invoke("Run", window == null ? null : window.getJCOInstance()); } catch (JCNativeException jcne) { throw translateException(jcne); } } public NetObject FindResource(NetObject resourceKey) throws Throwable, system.NotSupportedException, system.ArgumentNullException, system.ArgumentException, system.InvalidOperationException, system.ArgumentOutOfRangeException, system.PlatformNotSupportedException, system.OutOfMemoryException, system.xaml.XamlParseException, system.collections.generic.KeyNotFoundException, system.xaml.XamlException, system.NotImplementedException, system.windows.markup.XamlParseException, system.MulticastNotSupportedException, system.IndexOutOfRangeException, system.componentmodel.Win32Exception, system.componentmodel.InvalidEnumArgumentException, system.TimeoutException, system.net.WebException, system.InvalidCastException, system.OverflowException, system.reflection.AmbiguousMatchException, system.io.FileLoadException, system.globalization.CultureNotFoundException, system.ObjectDisposedException, system.windows.ResourceReferenceKeyNotFoundException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject objFindResource = (JCObject)classInstance.Invoke("FindResource", resourceKey == null ? null : resourceKey.getJCOInstance()); return new NetObject(objFindResource); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static NetObject LoadComponent(Uri resourceLocator) throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException, system.ArgumentNullException, system.InvalidOperationException, system.PlatformNotSupportedException, system.IndexOutOfRangeException, system.NotSupportedException, system.ObjectDisposedException, system.RankException, system.ArrayTypeMismatchException, system.globalization.CultureNotFoundException, system.OutOfMemoryException, system.runtime.interopservices.ExternalException, system.FormatException, system.UriFormatException, system.security.SecurityException, system.io.IOException, system.collections.generic.KeyNotFoundException, system.InvalidCastException, system.reflection.AmbiguousMatchException, system.xaml.XamlException, system.NotImplementedException, system.windows.markup.XamlParseException, system.xml.XmlException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { JCObject objLoadComponent = (JCObject)classType.Invoke("LoadComponent", resourceLocator == null ? null : resourceLocator.getJCOInstance()); return new NetObject(objLoadComponent); } catch (JCNativeException jcne) { throw translateException(jcne); } } public NetObject TryFindResource(NetObject resourceKey) throws Throwable, system.NotSupportedException, system.ArgumentNullException, system.ArgumentException, system.InvalidOperationException, system.ArgumentOutOfRangeException, system.PlatformNotSupportedException, system.OutOfMemoryException, system.xaml.XamlParseException, system.collections.generic.KeyNotFoundException, system.xaml.XamlException, system.NotImplementedException, system.windows.markup.XamlParseException, system.MulticastNotSupportedException, system.IndexOutOfRangeException, system.componentmodel.Win32Exception, system.componentmodel.InvalidEnumArgumentException, system.TimeoutException, system.net.WebException, system.InvalidCastException, system.OverflowException, system.reflection.AmbiguousMatchException, system.io.FileLoadException, system.globalization.CultureNotFoundException, system.ObjectDisposedException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject objTryFindResource = (JCObject)classInstance.Invoke("TryFindResource", resourceKey == null ? null : resourceKey.getJCOInstance()); return new NetObject(objTryFindResource); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static java.lang.String GetCookie(Uri uri) throws Throwable, system.ArgumentException, system.IndexOutOfRangeException, system.NotSupportedException, system.ArgumentNullException, system.InvalidOperationException, system.ArgumentOutOfRangeException, system.PlatformNotSupportedException, system.UriFormatException, system.componentmodel.Win32Exception { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { return (java.lang.String)classType.Invoke("GetCookie", uri == null ? null : uri.getJCOInstance()); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static StreamResourceInfo GetContentStream(Uri uriContent) throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException, system.ArgumentNullException, system.InvalidOperationException, system.PlatformNotSupportedException, system.IndexOutOfRangeException, system.NotSupportedException, system.ObjectDisposedException, system.RankException, system.ArrayTypeMismatchException, system.globalization.CultureNotFoundException, system.OutOfMemoryException, system.runtime.interopservices.ExternalException, system.FormatException, system.UriFormatException, system.security.SecurityException, system.UnauthorizedAccessException, system.io.IOException, system.collections.generic.KeyNotFoundException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { JCObject objGetContentStream = (JCObject)classType.Invoke("GetContentStream", uriContent == null ? null : uriContent.getJCOInstance()); return new StreamResourceInfo(objGetContentStream); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static StreamResourceInfo GetRemoteStream(Uri uriRemote) throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException, system.ArgumentNullException, system.InvalidOperationException, system.PlatformNotSupportedException, system.IndexOutOfRangeException, system.NotSupportedException, system.ObjectDisposedException, system.RankException, system.ArrayTypeMismatchException, system.globalization.CultureNotFoundException, system.OutOfMemoryException, system.runtime.interopservices.ExternalException, system.FormatException, system.UriFormatException, system.security.SecurityException, system.UnauthorizedAccessException, system.io.IOException, system.collections.generic.KeyNotFoundException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { JCObject objGetRemoteStream = (JCObject)classType.Invoke("GetRemoteStream", uriRemote == null ? null : uriRemote.getJCOInstance()); return new StreamResourceInfo(objGetRemoteStream); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static StreamResourceInfo GetResourceStream(Uri uriResource) throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException, system.ArgumentNullException, system.InvalidOperationException, system.PlatformNotSupportedException, system.IndexOutOfRangeException, system.NotSupportedException, system.ObjectDisposedException, system.RankException, system.ArrayTypeMismatchException, system.globalization.CultureNotFoundException, system.OutOfMemoryException, system.runtime.interopservices.ExternalException, system.FormatException, system.UriFormatException, system.security.SecurityException, system.UnauthorizedAccessException, system.io.IOException, system.collections.generic.KeyNotFoundException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { JCObject objGetResourceStream = (JCObject)classType.Invoke("GetResourceStream", uriResource == null ? null : uriResource.getJCOInstance()); return new StreamResourceInfo(objGetResourceStream); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static void LoadComponent(NetObject component, Uri resourceLocator) throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException, system.ArgumentNullException, system.InvalidOperationException, system.PlatformNotSupportedException, system.IndexOutOfRangeException, system.NotSupportedException, system.ObjectDisposedException, system.RankException, system.ArrayTypeMismatchException, system.globalization.CultureNotFoundException, system.OutOfMemoryException, system.runtime.interopservices.ExternalException, system.FormatException, system.UriFormatException, system.security.SecurityException, system.UnauthorizedAccessException, system.io.IOException, system.OverflowException, system.collections.generic.KeyNotFoundException, system.InvalidCastException, system.MissingMemberException, system.reflection.AmbiguousMatchException, system.NotImplementedException, system.xaml.XamlException, system.windows.markup.XamlParseException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { classType.Invoke("LoadComponent", component == null ? null : component.getJCOInstance(), resourceLocator == null ? null : resourceLocator.getJCOInstance()); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static void SetCookie(Uri uri, java.lang.String value) throws Throwable, system.NotSupportedException, system.ArgumentNullException, system.ArgumentOutOfRangeException, system.InvalidOperationException, system.ArgumentException, system.PlatformNotSupportedException, system.IndexOutOfRangeException, system.UriFormatException, system.ArrayTypeMismatchException, system.componentmodel.Win32Exception { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { classType.Invoke("SetCookie", uri == null ? null : uri.getJCOInstance(), value); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void Shutdown() throws Throwable, system.ArgumentNullException, system.ArgumentException, system.InvalidOperationException, system.globalization.CultureNotFoundException, system.PlatformNotSupportedException, system.ArgumentOutOfRangeException, system.NotSupportedException, system.diagnostics.tracing.EventSourceException, system.OutOfMemoryException, system.componentmodel.Win32Exception, system.OverflowException, system.TimeoutException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Invoke("Shutdown"); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void Shutdown(int exitCode) throws Throwable, system.ArgumentNullException, system.ArgumentException, system.ObjectDisposedException, system.InvalidOperationException, system.globalization.CultureNotFoundException, system.PlatformNotSupportedException, system.IndexOutOfRangeException, system.ArgumentOutOfRangeException, system.NotSupportedException, system.RankException, system.ArrayTypeMismatchException, system.diagnostics.tracing.EventSourceException, system.NullReferenceException, system.componentmodel.Win32Exception, system.componentmodel.InvalidEnumArgumentException, system.OverflowException, system.TimeoutException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Invoke("Shutdown", exitCode); } catch (JCNativeException jcne) { throw translateException(jcne); } } /** * @deprecated Not for public use because the method is implemented in .NET with an explicit interface. * Use the static ToIQueryAmbient method available in IQueryAmbient to obtain an object with an invocable method */ @Deprecated public boolean IsAmbientPropertyAvailable(java.lang.String propertyName) throws Throwable { throw new UnsupportedOperationException("Not for public use because the method is implemented with an explicit interface. Use ToIQueryAmbient to obtain the full interface."); } // Properties section public IDictionary getProperties() throws Throwable, system.ArgumentOutOfRangeException, system.IndexOutOfRangeException, system.NotSupportedException, system.ArgumentNullException, system.ArgumentException, system.ObjectDisposedException, system.InvalidOperationException, system.RankException, system.ArrayTypeMismatchException, system.PlatformNotSupportedException, system.FormatException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject val = (JCObject)classInstance.Get("Properties"); return new IDictionaryImplementation(val); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static Assembly getResourceAssembly() throws Throwable, system.ArgumentOutOfRangeException, system.IndexOutOfRangeException, system.NotSupportedException, system.ArgumentNullException, system.ArgumentException, system.ObjectDisposedException, system.InvalidOperationException, system.RankException, system.ArrayTypeMismatchException, system.PlatformNotSupportedException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { JCObject val = (JCObject)classType.Get("ResourceAssembly"); return new Assembly(val); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static void setResourceAssembly(Assembly ResourceAssembly) throws Throwable, system.ArgumentOutOfRangeException, system.IndexOutOfRangeException, system.NotSupportedException, system.ArgumentNullException, system.ArgumentException, system.ObjectDisposedException, system.InvalidOperationException, system.RankException, system.ArrayTypeMismatchException, system.PlatformNotSupportedException, system.globalization.CultureNotFoundException, system.OutOfMemoryException, system.runtime.interopservices.ExternalException, system.FormatException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { classType.Set("ResourceAssembly", ResourceAssembly == null ? null : ResourceAssembly.getJCOInstance()); } catch (JCNativeException jcne) { throw translateException(jcne); } } public Uri getStartupUri() throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject val = (JCObject)classInstance.Get("StartupUri"); return new Uri(val); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void setStartupUri(Uri StartupUri) throws Throwable, system.ArgumentNullException, system.ArgumentException, system.ObjectDisposedException, system.InvalidOperationException, system.PlatformNotSupportedException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Set("StartupUri", StartupUri == null ? null : StartupUri.getJCOInstance()); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static Application getCurrent() throws Throwable { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { JCObject val = (JCObject)classType.Get("Current"); return new Application(val); } catch (JCNativeException jcne) { throw translateException(jcne); } } public ResourceDictionary getResources() throws Throwable, system.ArgumentOutOfRangeException, system.IndexOutOfRangeException, system.NotSupportedException, system.ArgumentNullException, system.ArgumentException, system.ObjectDisposedException, system.InvalidOperationException, system.RankException, system.ArrayTypeMismatchException, system.PlatformNotSupportedException, system.FormatException, system.MulticastNotSupportedException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject val = (JCObject)classInstance.Get("Resources"); return new ResourceDictionary(val); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void setResources(ResourceDictionary Resources) throws Throwable, system.ArgumentOutOfRangeException, system.IndexOutOfRangeException, system.NotSupportedException, system.ArgumentNullException, system.ArgumentException, system.ObjectDisposedException, system.InvalidOperationException, system.RankException, system.ArrayTypeMismatchException, system.PlatformNotSupportedException, system.MulticastNotSupportedException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Set("Resources", Resources == null ? null : Resources.getJCOInstance()); } catch (JCNativeException jcne) { throw translateException(jcne); } } public ShutdownMode getShutdownMode() throws Throwable, system.ArgumentNullException, system.ArgumentException, system.ObjectDisposedException, system.InvalidOperationException, system.PlatformNotSupportedException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject val = (JCObject)classInstance.Get("ShutdownMode"); return new ShutdownMode(val); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void setShutdownMode(ShutdownMode ShutdownMode) throws Throwable, system.ArgumentNullException, system.ArgumentException, system.ObjectDisposedException, system.InvalidOperationException, system.PlatformNotSupportedException, system.ArgumentOutOfRangeException, system.IndexOutOfRangeException, system.FormatException, system.componentmodel.InvalidEnumArgumentException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Set("ShutdownMode", ShutdownMode == null ? null : ShutdownMode.getJCOInstance()); } catch (JCNativeException jcne) { throw translateException(jcne); } } public Window getMainWindow() throws Throwable, system.ArgumentNullException, system.ArgumentException, system.ObjectDisposedException, system.InvalidOperationException, system.PlatformNotSupportedException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject val = (JCObject)classInstance.Get("MainWindow"); return new Window(val); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void setMainWindow(Window MainWindow) throws Throwable, system.ArgumentNullException, system.ArgumentException, system.ObjectDisposedException, system.InvalidOperationException, system.PlatformNotSupportedException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Set("MainWindow", MainWindow == null ? null : MainWindow.getJCOInstance()); } catch (JCNativeException jcne) { throw translateException(jcne); } } public WindowCollection getWindows() throws Throwable, system.ArgumentNullException, system.ArgumentException, system.ObjectDisposedException, system.InvalidOperationException, system.PlatformNotSupportedException, system.ArgumentOutOfRangeException, system.IndexOutOfRangeException, system.RankException, system.ArrayTypeMismatchException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject val = (JCObject)classInstance.Get("Windows"); return new WindowCollection(val); } catch (JCNativeException jcne) { throw translateException(jcne); } } // Instance Events section public void addActivated(EventHandler handler) throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.RegisterEventListener("Activated", handler); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void removeActivated(EventHandler handler) throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.UnregisterEventListener("Activated", handler); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void addDeactivated(EventHandler handler) throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.RegisterEventListener("Deactivated", handler); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void removeDeactivated(EventHandler handler) throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.UnregisterEventListener("Deactivated", handler); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void addExit(ExitEventHandler handler) throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.RegisterEventListener("Exit", handler); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void removeExit(ExitEventHandler handler) throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.UnregisterEventListener("Exit", handler); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void addFragmentNavigation(FragmentNavigationEventHandler handler) throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.RegisterEventListener("FragmentNavigation", handler); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void removeFragmentNavigation(FragmentNavigationEventHandler handler) throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.UnregisterEventListener("FragmentNavigation", handler); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void addLoadCompleted(LoadCompletedEventHandler handler) throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.RegisterEventListener("LoadCompleted", handler); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void removeLoadCompleted(LoadCompletedEventHandler handler) throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.UnregisterEventListener("LoadCompleted", handler); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void addNavigated(NavigatedEventHandler handler) throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.RegisterEventListener("Navigated", handler); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void removeNavigated(NavigatedEventHandler handler) throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.UnregisterEventListener("Navigated", handler); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void addNavigating(NavigatingCancelEventHandler handler) throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.RegisterEventListener("Navigating", handler); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void removeNavigating(NavigatingCancelEventHandler handler) throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.UnregisterEventListener("Navigating", handler); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void addNavigationFailed(NavigationFailedEventHandler handler) throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.RegisterEventListener("NavigationFailed", handler); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void removeNavigationFailed(NavigationFailedEventHandler handler) throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.UnregisterEventListener("NavigationFailed", handler); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void addNavigationProgress(NavigationProgressEventHandler handler) throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.RegisterEventListener("NavigationProgress", handler); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void removeNavigationProgress(NavigationProgressEventHandler handler) throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.UnregisterEventListener("NavigationProgress", handler); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void addNavigationStopped(NavigationStoppedEventHandler handler) throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.RegisterEventListener("NavigationStopped", handler); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void removeNavigationStopped(NavigationStoppedEventHandler handler) throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.UnregisterEventListener("NavigationStopped", handler); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void addSessionEnding(SessionEndingCancelEventHandler handler) throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.RegisterEventListener("SessionEnding", handler); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void removeSessionEnding(SessionEndingCancelEventHandler handler) throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.UnregisterEventListener("SessionEnding", handler); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void addStartup(StartupEventHandler handler) throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.RegisterEventListener("Startup", handler); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void removeStartup(StartupEventHandler handler) throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.UnregisterEventListener("Startup", handler); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void addDispatcherUnhandledException(DispatcherUnhandledExceptionEventHandler handler) throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.RegisterEventListener("DispatcherUnhandledException", handler); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void removeDispatcherUnhandledException(DispatcherUnhandledExceptionEventHandler handler) throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.UnregisterEventListener("DispatcherUnhandledException", handler); } catch (JCNativeException jcne) { throw translateException(jcne); } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy