Beispiel #1
0
        //--------------------------------------------------------------------------------
        /// <summary>
        /// Constructor
        /// </summary>
        public FormMainSetup()
        {
            InitializeComponent();
            m_settings.Load();
            foreach (SyncItem item in m_settings.SyncItems)
            {
                item.FileInfoEvent += new FileInfoHandler(item_FileInfoEvent);
            }

            m_updateThread = new Thread(new ThreadStart(UpdateThread));
            m_updateThread.IsBackground = true;

            Globals.StarterProcess.Exited += new EventHandler(StarterProcess_Exited);

            try
            {
                if (SvcGlobals.CreateServiceHost())
                {
                    this.labelListening.Text = "Listening";
                    (SvcGlobals.SvcHost.SingletonInstance as SynchroService).SynchroHostEvent += new SynchroHostEventHandler(Form1_SynchroHostEvent);
                }
            }
            catch (Exception ex)
            {
                if (ex != null)
                {
                }
            }
        }
Beispiel #2
0
        //--------------------------------------------------------------------------------
        public FormMain()
        {
            InitializeComponent();

            try
            {
                if (SvcGlobals.CreateServiceHost())
                {
                    //SvcGlobals.SynchroHostEvent += new SynchroHostEventHandler(SvcGlobals_SynchroHostEvent);
                    //SynchroService host = SvcGlobals.SvcHost.SingletonInstance as SynchroService;
                    (SvcGlobals.SvcHost.SingletonInstance as SynchroService).SynchroHostEvent += new SynchroHostEventHandler(Form1_SynchroHostEvent);
                }
            }
            catch (Exception ex)
            {
                if (ex != null)
                {
                }
            }
        }