Example #1
0
        private void LightNewsContainer_EditNewsClicked(object sender, int NewsID)
        {
            PhantomForm PhantomForm = new PhantomForm();

            PhantomForm.Show();

            AddZOVNewsForm AddNewsForm = new AddZOVNewsForm(ref ZOVNews, ZOVNews.GetThisNewsSenderTypeID(NewsID),
                                                            ZOVNews.GetThisNewsHeaderText(NewsID),
                                                            ZOVNews.GetThisNewsBodyText(NewsID),
                                                            NewsID, ZOVNews.GetThisNewsDateTime(NewsID), ref TopForm);

            TopForm = AddNewsForm;

            AddNewsForm.ShowDialog();

            PhantomForm.Close();
            PhantomForm.Dispose();

            TopForm = null;

            if (AddNewsForm.Canceled)
            {
                return;
            }

            Thread T = new Thread(delegate()
            {
                SplashWindow.CreateCoverSplash(LightNewsContainer.Top, LightNewsContainer.Left,
                                               LightNewsContainer.Height, LightNewsContainer.Width);
            });

            T.Start();

            while (!SplashWindow.bSmallCreated)
            {
                ;
            }


            ZOVNews.ReloadNews(LightNewsContainer.NewsCount);
            ZOVNews.ReloadComments();
            ZOVNews.ReloadAttachments();
            LightNewsContainer.NewsDataTable = ZOVNews.NewsDataTable.Copy();
            LightNewsContainer.CommentsDT    = ZOVNews.CommentsDataTable.Copy();
            LightNewsContainer.AttachsDT     = ZOVNews.AttachmentsDataTable.Copy();
            LightNewsContainer.CreateNews();

            bC = true;
        }