예제 #1
0
                public void CheckForAnnouncement()
                {
                    try
                    {
                        uT = new Thread(new System.Threading.ThreadStart(CheckForAnnouncementBG));
                        uT.SetApartmentState(ApartmentState.STA);
                        uT.IsBackground = true;

                        if (this.IsAnnouncementCheckHandlerDeclared == false)
                        {
                            AnnouncementCheckCompleted +=
                                new Announcement.AnnouncementCheckCompletedEventHandler(AnnouncementCheckComplete);
                            this.IsAnnouncementCheckHandlerDeclared = true;
                        }

                        uT.Start();
                    }
                    catch (Exception ex)
                    {
                        Runtime.MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg,
                                                            (string)
                                                            ("CheckForAnnouncement (UI.Window.Announcement) failed" +
                                                             Constants.vbNewLine + ex.Message), true);
                    }
                }
예제 #2
0
                public void CheckForAnnouncement()
                {
                    try
                    {
                        uT = new Thread(new System.Threading.ThreadStart(CheckForAnnouncementBG));
                        uT.SetApartmentState(ApartmentState.STA);
                        uT.IsBackground = true;

                        if (this.IsAnnouncementCheckHandlerDeclared == false)
                        {
                            AnnouncementCheckCompleted +=
                                new Announcement.AnnouncementCheckCompletedEventHandler(AnnouncementCheckComplete);
                            this.IsAnnouncementCheckHandlerDeclared = true;
                        }

                        uT.Start();
                    }
                    catch (Exception ex)
                    {
                        Runtime.MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg,
                                                            (string)
                                                            ("CheckForAnnouncement (UI.Window.Announcement) failed" +
                                                             Constants.vbNewLine + ex.Message), true);
                    }
                }