Exemplo n.º 1
0
        private void Initialize()
        {
            if (uoInstallationComboBox1.SelectedInstallation == null)
            {
                return;
            }

            if (_artFactory != null)
            {
                _artFactory.Dispose();
                _artFactory = null;
            }

            if (_gumpFactory != null)
            {
                _gumpFactory.Dispose();
                _gumpFactory = null;
            }

            if (_soundFactory != null)
            {
                _soundFactory.Dispose();
                _soundFactory = null;
            }

            _gumpFactory  = new GumpFactory(uoInstallationComboBox1.SelectedInstallation, _container);
            _artFactory   = new ArtworkFactory(uoInstallationComboBox1.SelectedInstallation, _container);
            _soundFactory = new SoundFactory(uoInstallationComboBox1.SelectedInstallation, _container);

            artworkControl1.Factory = _artFactory;
            //artworkControl2.Factory = _artFactory;
            //gumpControl.Factory = _gumpFactory;
            //soundControl.Factory = _soundFactory;
        }
Exemplo n.º 2
0
 private void MainForm_FormClosing(object sender, FormClosingEventArgs e)
 {
     Logger.Log("Closing application");
     FSUIPCConnection.Close();
     SoundFactory.Dispose();
     notifyIcon.Dispose();
 }