static void Main(string[] args)
        {
            SystemListener listener = new SystemListener();

            listener.SystemEvent += new EventHandler <SystemListenerEventArgs>(listener_SystemEvent);

            Application.Run();
        }
Exemplo n.º 2
0
    // Use this for initialization
    void Start()
    {
        StartActivator();

        if (SystemInfo.graphicsDeviceVersion.StartsWith("Direct3D 11") || SystemInfo.operatingSystem.Contains("Mac"))
        {
            DeviceSupportsSharedTextures = true;
        }

        if (m_UISystem == null)
        {
            m_SystemListener = (SystemListenerFactoryFunc != null)? SystemListenerFactoryFunc(this.OnSystemReady) : new SystemListener(this.OnSystemReady);
            m_LogHandler     = new UnityLogHandler();
            if (FileHandlerFactoryFunc != null)
            {
                m_FileHandler = FileHandlerFactoryFunc();
            }
                        #if !UNITY_ANDROID || UNITY_EDITOR
            if (m_FileHandler == null)
            {
                Debug.LogWarning("Unable to create file handler using factory function! Falling back to default handler.");
                m_FileHandler = new UnityFileHandler();
            }
                        #endif

                        #if UNITY_EDITOR || COHERENT_UNITY_STANDALONE || COHERENT_UNITY_UNSUPPORTED_PLATFORM
            SystemSettings settings = new SystemSettings()
            {
                HostDirectory                = Path.Combine(Application.dataPath, this.HostDirectory),
                EnableProxy                  = this.EnableProxy,
                AllowCookies                 = this.AllowCookies,
                CookiesResource              = "file:///" + Application.persistentDataPath + '/' + this.CookiesResource,
                CachePath                    = Path.Combine(Application.temporaryCachePath, this.CachePath),
                HTML5LocalStoragePath        = Path.Combine(Application.temporaryCachePath, this.HTML5LocalStoragePath),
                ForceDisablePluginFullscreen = this.ForceDisablePluginFullscreen,
                DisableWebSecurity           = this.DisableWebSecutiry,
                DebuggerPort                 = this.DebuggerPort,
            };
                        #elif UNITY_IPHONE || UNITY_ANDROID
            SystemSettings settings = new SystemSettings()
            {
            };
                        #endif
            if (string.IsNullOrEmpty(Coherent.UI.License.COHERENT_KEY))
            {
                throw new System.ApplicationException("You must supply a license key to start Coherent UI! Follow the instructions in the manual for editing the License.cs file.");
            }
            m_UISystem = CoherentUI_Native.InitializeUISystem(Coherent.UI.License.COHERENT_KEY, settings, m_SystemListener, Severity.Warning, m_LogHandler, m_FileHandler);
            if (m_UISystem == null)
            {
                throw new System.ApplicationException("UI System initialization failed!");
            }
            Debug.Log("Coherent UI system initialized..");
        }

        DontDestroyOnLoad(this.gameObject);
    }
Exemplo n.º 3
0
        public MainWindow()
        {
            InitializeComponent();
            Closing += OnWindowClosing;
            var settings = HighlightSettings.LoadSettings();

            HighlighterWidthSelector.Text = settings.HighlighterWidth.ToString();
            HighlighterColorSelector.Text = settings.HighlighterColor.ToString();
            HighlighterColor.Fill         = new SolidColorBrush(settings.HighlighterColor);
            _settings = settings;
            InterestingWindowListPanel.DataContext = _settings;
            UpdateInterestingWindowListView();
            _highlightFrames             = new Dictionary <IntPtr, HighlightFrame>();
            _systemListener              = new SystemListener();
            _systemListener.SystemEvent += OnSystemEvent;
        }
Exemplo n.º 4
0
        public DataFromSystem(string r1, string r2, SystemListener sl, IWin32Window owner, bool autoMode, bool isQualy, bool needToExchange = false)
        {
            InitializeComponent();
            AllowClose            = true;
            tEnableClose.Elapsed += new System.Timers.ElapsedEventHandler(tEnableClose_Elapsed);
            CLOSE_TIMER           = appSettings.Default.AutoCloseTimer;
            autoCloseRemaining    = CLOSE_TIMER;
            Route1  = r1;
            Route2  = r2;
            this.sl = sl;
            //this.sl.SystemListenerEvent += new SystemListener.SystemListenerEventHandler(sl_SystemListenerEvent);
            this.sl.SubscribeEvent(sl_SystemListenerEvent);

            this.owner             = owner;
            this.autoMode          = autoMode;
            lblTimer.Text          = "";
            autoCloseTimer.Enabled = false;
            btnStopAuto.Visible    = this.autoMode;
            btnSetNext2.Visible    = btnEnterAndSetNext.Visible = isQualy;
            if (this.autoMode && (CLOSE_TIMER > 0))
            {
                btnSaveRes.Enabled = false;
            }


            if (sl is IvanovoListener)
            {
                this.needToExchange = needToExchange;
            }
            else
            {
                btnExchange.Visible = btnExchange.Enabled = false;
                this.needToExchange = false;
                rbS1.Visible        = rbS2.Visible = false;
            }
        }
    // Use this for initialization
    void Start()
    {
        if (SystemInfo.graphicsDeviceVersion.StartsWith("Direct3D 11") ||
            SystemInfo.operatingSystem.Contains("Mac"))
        {
            DeviceSupportsSharedTextures = true;
        }

        if (m_UISystem == null)
        {
            m_SystemListener = (SystemListenerFactoryFunc != null)? SystemListenerFactoryFunc(this.OnSystemReady) : new SystemListener(this.OnSystemReady);
            m_LogHandler     = new UnityLogHandler();
            if (FileHandlerFactoryFunc != null)
            {
                m_FileHandler = FileHandlerFactoryFunc();
            }
                        #if !UNITY_ANDROID || UNITY_EDITOR
            if (m_FileHandler == null)
            {
                Debug.LogWarning("Unable to create file handler using factory function! Falling back to default handler.");
                m_FileHandler = new UnityFileHandler();
            }
                        #endif

                        #if COHERENT_UNITY_STANDALONE || COHERENT_UNITY_UNSUPPORTED_PLATFORM
            SystemSettings settings = new SystemSettings()
            {
                HostDirectory                = Path.Combine(Application.dataPath, this.HostDirectory),
                EnableProxy                  = this.EnableProxy,
                AllowCookies                 = this.AllowCookies,
                CookiesResource              = "file:///" + Application.persistentDataPath + '/' + this.CookiesResource,
                CachePath                    = Path.Combine(Application.temporaryCachePath, this.CachePath),
                HTML5LocalStoragePath        = Path.Combine(Application.temporaryCachePath, this.HTML5LocalStoragePath),
                ForceDisablePluginFullscreen = this.ForceDisablePluginFullscreen,
                DisableWebSecurity           = this.DisableWebSecutiry,
                DebuggerPort                 = this.DebuggerPort,
            };
            int sdkVersion = Coherent.UI.Versioning.SDKVersion;
                        #elif UNITY_IPHONE || UNITY_ANDROID
            SystemSettings settings = new SystemSettings()
            {
                iOS_UseURLCache        = m_UseURLCache,
                iOS_URLMemoryCacheSize = (uint)m_MemoryCacheSize,
                iOS_URLDiskCacheSize   = (uint)m_DiskCacheSize,
            };
            int sdkVersion = Coherent.UI.Mobile.Versioning.SDKVersion;
                        #endif

            m_UISystem = CoherentUI_Native.InitializeUISystem(sdkVersion, Coherent.UI.License.COHERENT_KEY, settings, m_SystemListener, Severity.Info, m_LogHandler, m_FileHandler);
            if (m_UISystem == null)
            {
                throw new System.ApplicationException("UI System initialization failed!");
            }
            Debug.Log("Coherent UI system initialized..");
                        #if COHERENT_UNITY_STANDALONE
            CoherentUIViewRenderer.WakeRenderer();
                        #endif
        }
        m_StartTime = Time.realtimeSinceStartup;

        DontDestroyOnLoad(this.gameObject);
    }
Exemplo n.º 6
0
 public SystemManager(SystemListener listener)
 {
     this.listener    = listener;
     immutableSystems = new ImmutableArray <EntitySystem> (systems);
 }