示例#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;
        }
示例#2
0
        private void AddNewsButton_Click(object sender, EventArgs e)
        {
            PhantomForm PhantomForm = new PhantomForm();

            PhantomForm.Show();

            AddZOVNewsForm AddNewsForm = new AddZOVNewsForm(ref ZOVNews, 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(20);//default
            ZOVNews.ReloadComments();
            ZOVNews.ReloadAttachments();
            LightNewsContainer.NewsDataTable = ZOVNews.NewsDataTable.Copy();
            LightNewsContainer.CommentsDT    = ZOVNews.CommentsDataTable.Copy();
            LightNewsContainer.AttachsDT     = ZOVNews.AttachmentsDataTable.Copy();
            LightNewsContainer.CreateNews();
            LightNewsContainer.ScrollToTop();
            LightNewsContainer.Focus();

            bC = true;
        }