private void UsersList_ItemClicked(object sender, string Name, int UserID) { if (bNeedSplash) { Thread T = new Thread(delegate() { SplashWindow.CreateCoverSplash(true, this.Top + MessagesContainer.Top, this.Left + MessagesContainer.Left, MessagesContainer.Height, MessagesContainer.Width); }); T.Start(); while (!SplashWindow.bSmallCreated) { ; } } UserImageBox.Image = UsersList.Items[UsersList.Selected].Image; InfiniumMessages.FillMessages(UserID); MessagesContainer.InitializeItems(); InfiniumMessages.ClearSubscribes(UserID); SelectedUsersList.Selected = -1; if (bNeedSplash) { bC = true; } }
private void InfiniumFileList_RootDoubleClick(object sender, int FolderID, int FileID) { if (FolderID != -1) { Thread T = new Thread(delegate() { SplashWindow.CreateCoverSplash(InfiniumFileList.Top + UpdatePanel.Top, InfiniumFileList.Left + UpdatePanel.Left, InfiniumFileList.Height, InfiniumFileList.Width); }); T.Start(); while (!SplashWindow.bSmallCreated) { ; } InfiniumFiles.EnterFolder(FolderID); InfiniumFileList.ItemsDataTable = InfiniumFiles.CurrentItemsDataTable.Copy(); InfiniumFileList.RootOutFolder(FolderID); InfiniumFileList.Entered = FolderID; bC = true; } }
private void PicturesAlbums_ItemClicked(object sender, int AlbumID) { Thread T = new Thread(delegate() { SplashWindow.CreateCoverSplash(PicturesContainer.Top, PicturesContainer.Left, PicturesContainer.Height, PicturesContainer.Width); }); T.Start(); while (!SplashWindow.bSmallCreated) { ; } bShow = true; InfiniumPictures.FillPictures(AlbumID); PicturesContainer.ItemsDataTable = InfiniumPictures.PicturesItemsDataTable; PicturesContainer.BringToFront(); PicturesContainer.Focus(); iAlbumID = AlbumID; BackButton.Visible = true; bC = true; }
private void NewClientsManagersMenu_ItemClicked(object sender, string Name, int ManagerID) { ClientsManagersMenu.Selected = -1; if (bNeedSplash) { Thread T = new Thread(delegate() { SplashWindow.CreateCoverSplash(LightNewsContainer.Top, LightNewsContainer.Left, LightNewsContainer.Height, LightNewsContainer.Width); }); T.Start(); while (!SplashWindow.bSmallCreated) { ; } } MarketingNews.ReloadManagersNews(20, ManagerID);//default MarketingNews.ReloadComments(); MarketingNews.ReloadAttachments(); LightNewsContainer.NewsDataTable = MarketingNews.NewsDataTable.Copy(); LightNewsContainer.CommentsDT = MarketingNews.CommentsDataTable.Copy(); LightNewsContainer.AttachsDT = MarketingNews.AttachmentsDataTable.Copy(); LightNewsContainer.CreateNews(); LightNewsContainer.ScrollToTop(); LightNewsContainer.Focus(); if (bNeedSplash) { bC = true; } }
private void BackButton_Click(object sender, EventArgs e) { Thread T = new Thread(delegate() { SplashWindow.CreateCoverSplash(PicturesContainer.Top, PicturesContainer.Left, PicturesContainer.Height, PicturesContainer.Width); }); T.Start(); while (!SplashWindow.bSmallCreated) { ; } bShow = false; PicturesAlbums.BringToFront(); PicturesAlbums.Focus(); PicturesAlbums.AlbumItems[PicturesAlbums.ItemsDT.Rows.IndexOf(PicturesAlbums.ItemsDT.Select("AlbumID = " + iAlbumID)[0])].LikesCount = InfiniumPictures.RefreshLikes(iAlbumID); BackButton.Visible = false; bC = true; }
private void LightNewsContainer_CommentSendButtonClicked(object sender, string Text, int NewsID, int SenderID, bool bEdit, int NewsCommentID) { Thread T = new Thread(delegate() { SplashWindow.CreateCoverSplash(LightNewsContainer.Top, LightNewsContainer.Left, LightNewsContainer.Height, LightNewsContainer.Width); }); T.Start(); while (!SplashWindow.bSmallCreated) { ; } if (bEdit) { LightNews.EditComments(SenderID, NewsCommentID, Text); } else { LightNews.AddComments(SenderID, NewsID, Text); } LightNews.ReloadNews(LightNewsContainer.NewsCount); LightNews.ReloadComments(); LightNewsContainer.NewsDataTable = LightNews.NewsDataTable.Copy(); LightNewsContainer.CommentsDT = LightNews.CommentsDataTable.Copy(); LightNewsContainer.CreateNews(); LightNewsContainer.ScrollToTop(); LightNewsContainer.ReloadNewsItem(NewsID, true); bC = true; }
public void LoadPic() { Thread T = new Thread(delegate() { SplashWindow.CreateCoverSplash(panel1.Top, panel1.Left, panel1.Height, panel1.Width, Color.FromArgb(60, 60, 60)); }); T.Start(); while (!SplashWindow.bSmallCreated) { ; } pictureBox1.Image = InfiniumPictures.GetPicture(iPictureID); int Count = PicturesContainer.PicItems[PicturesContainer.ItemsDataTable.Rows.IndexOf( PicturesContainer.ItemsDataTable.Select("PictureID = " + iPictureID)[0])].LikesCount; if (Count > 0) { PictureLikeButton.Image = Properties.Resources.LikePicBigActive; PictureLikeButton.Caption = Count.ToString(); } else { PictureLikeButton.Image = Properties.Resources.LikePicBigInactive; PictureLikeButton.Caption = ""; } GC.Collect(); bC = true; }
private void SendMessagesButton_Click(object sender, EventArgs e) { if (TextBox.Text.Length == 0) { return; } if (bNeedSplash) { Thread T = new Thread(delegate() { SplashWindow.CreateCoverSplash(true, this.Top + MessagesContainer.Top, this.Left + MessagesContainer.Left, MessagesContainer.Height, MessagesContainer.Width); }); T.Start(); while (!SplashWindow.bSmallCreated) { ; } } if (SelectedUsersList.Selected == -1) { int iRes = InfiniumMessages.AddUserToSelected(UsersList.Items[UsersList.Selected].UserID); SelectedUsersList.InitializeItems(); if (iRes == -1)//ok { SelectedUsersList.Selected = SelectedUsersList.Items.Count() - 1; SelectedUsersList.ScrollDown(); } else//in the list already { SelectedUsersList.SelectOnly(iRes); } } InfiniumMessages.SendMessage(TextBox.Text, SelectedUsersList.Items[SelectedUsersList.Selected].UserID); InfiniumMessages.FillMessages(SelectedUsersList.Items[SelectedUsersList.Selected].UserID); MessagesContainer.InitializeItems(); TextBox.Clear(); if (UsersList.Top != 159) { UsersList.Top = 159; UsersList.Height = UsersList.Parent.Height - UsersList.Top; } if (bNeedSplash) { bC = true; } }
public MessagesForm(ref Form tTopForm) { InitializeComponent(); Thread T = new Thread(delegate() { SplashWindow.CreateCoverSplash(true, (Screen.PrimaryScreen.WorkingArea.Height - this.Height) / 2, (Screen.PrimaryScreen.WorkingArea.Width - this.Width) / 2, 503, 1014); }); T.Start(); while (!SplashWindow.bSmallCreated) { ; } TopForm = tTopForm; InfiniumMessages = new InfiniumMessages(); UsersList.ItemsDataTable = InfiniumMessages.UsersDataTable; UsersList.InitializeItems(); InfiniumMessages.FillSelectedUsers(-1); SelectedUsersList.ItemsDataTable = InfiniumMessages.SelectedUsersDataTable; SelectedUsersList.InitializeItems(); MessagesContainer.UsersDataTable = InfiniumMessages.FullUsersDataTable; MessagesContainer.CurrentUserID = Security.CurrentUserID; if (InfiniumMessages.SelectedUsersDataTable.Rows.Count > 0) { UsersList.Top = 159; UsersList.Height = UsersList.Parent.Height - UsersList.Top; SelectedUsersList.Selected = 0; InfiniumMessages.FillMessages(SelectedUsersList.Items[0].UserID); MessagesContainer.ItemsDataTable = InfiniumMessages.MessagesDataTable; MessagesContainer.InitializeItems(); } else { UsersList.Top = 0; UsersList.Height = UsersList.Parent.Height; UsersList.Selected = 0; InfiniumMessages.FillMessages(UsersList.Items[0].UserID); MessagesContainer.ItemsDataTable = InfiniumMessages.MessagesDataTable; MessagesContainer.InitializeItems(); } bC = true; }
private void MenuFileReplaceFile_Click(object sender, EventArgs e) { if (InfiniumFiles.CheckFileVersion(InfiniumFileList.FileItems[InfiniumFileList.Selected].FileID, Security.CurrentUserID) == false) { InfiniumTips.ShowTip(this, 50, 85, "Файл был кем-то изменен. Замена файла не возможна. Скачайте файл заново, \n" + "примените свои изменения, а затем попытайтесь заменить еще раз", 7600); return; } if (InfiniumFiles.CheckUploadPending(InfiniumFileList.FileItems[InfiniumFileList.Selected].FileID))//someone uploads { InfiniumTips.ShowTip(this, 50, 85, "В настоящее время указанный файл уже обновляется кем-то. Замена файла не возможна. \n" + "Скачайте файл заново, примените свои изменения, а затем попытайтесь заменить еще раз", 7600); return; } if (UploadFileDialog.ShowDialog() == System.Windows.Forms.DialogResult.OK) { PhantomForm PhantomForm = new PhantomForm(); PhantomForm.Show(); UploadFileForm UploadFileForm = new UploadFileForm(ref InfiniumFiles.FM, ref InfiniumFiles, InfiniumFileList.FileItems[InfiniumFileList.Selected].FileID, UploadFileDialog.FileName, ref TopForm); TopForm = UploadFileForm; UploadFileForm.ShowDialog(); PhantomForm.Close(); PhantomForm.Dispose(); TopForm = null; UploadFileDialog.Dispose(); } Thread T = new Thread(delegate() { SplashWindow.CreateCoverSplash(InfiniumFileList.Top + UpdatePanel.Top, InfiniumFileList.Left + UpdatePanel.Left, InfiniumFileList.Height, InfiniumFileList.Width); }); T.Start(); while (!SplashWindow.bSmallCreated) { ; } InfiniumFiles.EnterFolder(InfiniumFileList.Entered); InfiniumFileList.ItemsDataTable = InfiniumFiles.CurrentItemsDataTable; bC = true; }
private void InfiniumFileList_ItemDoubleClick(object sender, int FolderID, int FileID) { if (FileID > -1)//open file { PhantomForm PhantomForm = new PhantomForm(); PhantomForm.Show(); UploadFileForm UploadFileForm = new UploadFileForm(ref InfiniumFiles.FM, ref InfiniumFiles, InfiniumFileList.FileItems[InfiniumFileList.Selected].Caption, InfiniumFileList.FileItems[InfiniumFileList.Selected].FolderID, InfiniumFileList.FileItems[InfiniumFileList.Selected].FileID, false, "", ref TopForm); TopForm = UploadFileForm; UploadFileForm.ShowDialog(); if (UploadFileForm.bOk == 0) { InfiniumTips.ShowTip(this, 50, 85, "Отсутствует файл либо нет доступа к интернет", 5000); } PhantomForm.Close(); PhantomForm.Dispose(); TopForm = null; UploadFileDialog.Dispose(); return; } if (FolderID != -1) { Thread T = new Thread(delegate() { SplashWindow.CreateCoverSplash(InfiniumFileList.Top + UpdatePanel.Top, InfiniumFileList.Left + UpdatePanel.Left, InfiniumFileList.Height, InfiniumFileList.Width); }); T.Start(); while (!SplashWindow.bSmallCreated) { ; } InfiniumFiles.EnterFolder(FolderID); InfiniumFileList.ItemsDataTable = InfiniumFiles.CurrentItemsDataTable.Copy(); InfiniumFileList.EnterInFolder(FolderID); InfiniumFileList.Entered = FolderID; bC = true; } }
private void SelectedUsersList_CloseClicked(object sender, int UserID) { if (bNeedSplash) { Thread T = new Thread(delegate() { SplashWindow.CreateCoverSplash(true, this.Top + panel1.Top, this.Left + panel1.Left, panel1.Height, panel1.Width); }); T.Start(); while (!SplashWindow.bSmallCreated) { ; } } int iSel = SelectedUsersList.Selected; InfiniumMessages.ClearSubscribes(UserID); InfiniumMessages.RemoveUserFromSelected(UserID); SelectedUsersList.InitializeItems(); if (SelectedUsersList.Items.Count() > 0) { if (iSel > SelectedUsersList.Items.Count() - 1) { SelectedUsersList.Selected = SelectedUsersList.Items.Count() - 1; } else { SelectedUsersList.Selected = iSel; } UsersList.Top = 159; UsersList.Height = UsersList.Parent.Height - UsersList.Top; } else { if (UsersList.Selected == -1) { UsersList.Selected = 0; } UsersList.Top = 0; UsersList.Height = UsersList.Parent.Height; } if (bNeedSplash) { bC = true; } }
private void LightNewsContainer_CommentSendButtonClicked(object sender, string Text, int NewsID, int SenderID, bool bEdit, int NewsCommentID) { Thread T = new Thread(delegate() { SplashWindow.CreateCoverSplash(LightNewsContainer.Top, LightNewsContainer.Left, LightNewsContainer.Height, LightNewsContainer.Width); }); T.Start(); while (!SplashWindow.bSmallCreated) { ; } if (bEdit) { MarketingNews.EditComments(SenderID, NewsCommentID, Text); } else { MarketingNews.AddComments(SenderID, 0, NewsID, Text); } if (cbtnClients.Checked) { if (ClientsMenu.Selected == -1) { MarketingNews.ReloadClientsNews(LightNewsContainer.NewsCount, NewClientsMenu.Items[NewClientsMenu.Selected].ClientID); } else { MarketingNews.ReloadClientsNews(LightNewsContainer.NewsCount, ClientsMenu.Items[ClientsMenu.Selected].ClientID); } } if (cbtnManagers.Checked) { if (ClientsManagersMenu.Selected == -1) { MarketingNews.ReloadManagersNews(LightNewsContainer.NewsCount, NewClientsManagersMenu.Items[NewClientsManagersMenu.Selected].ClientID); } else { MarketingNews.ReloadManagersNews(LightNewsContainer.NewsCount, ClientsManagersMenu.Items[ClientsManagersMenu.Selected].ClientID); } } MarketingNews.ReloadComments(); LightNewsContainer.NewsDataTable = MarketingNews.NewsDataTable.Copy(); LightNewsContainer.CommentsDT = MarketingNews.CommentsDataTable.Copy(); LightNewsContainer.CreateNews(); LightNewsContainer.ScrollToTop(); LightNewsContainer.ReloadNewsItem(NewsID, true); bC = true; }
private void LightNewsContainer_EditNewsClicked(object sender, int NewsID) { PhantomForm PhantomForm = new PhantomForm(); PhantomForm.Show(); AddNewsForm AddNewsForm = new AddNewsForm(ref LightNews, LightNews.GetThisNewsSenderTypeID(NewsID), LightNews.GetThisNewsHeaderText(NewsID), LightNews.GetThisNewsBodyText(NewsID), NewsID, LightNews.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) { ; } LightNews.ReloadNews(LightNewsContainer.NewsCount); LightNews.ReloadComments(); LightNews.ReloadAttachments(); LightNewsContainer.NewsDataTable = LightNews.NewsDataTable.Copy(); LightNewsContainer.CommentsDT = LightNews.CommentsDataTable.Copy(); LightNewsContainer.AttachsDT = LightNews.AttachmentsDataTable.Copy(); LightNewsContainer.CreateNews(); bC = true; }
private void AddNewsButton_Click(object sender, EventArgs e) { PhantomForm PhantomForm = new PhantomForm(); PhantomForm.Show(); AddNewsForm AddNewsForm = new AddNewsForm(ref LightNews, 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) { ; } LightNews.ReloadNews(20);//default LightNews.ReloadComments(); LightNews.ReloadAttachments(); LightNewsContainer.NewsDataTable = LightNews.NewsDataTable.Copy(); LightNewsContainer.CommentsDT = LightNews.CommentsDataTable.Copy(); LightNewsContainer.AttachsDT = LightNews.AttachmentsDataTable.Copy(); LightNewsContainer.CreateNews(); LightNewsContainer.ScrollToTop(); LightNewsContainer.Focus(); bC = true; }
private void Cover() { if (bNeedSplash) { Thread T = new Thread(delegate() { SplashWindow.CreateCoverSplash(this.Top, this.Left, this.Height, this.Width); }); T.Start(); while (!SplashWindow.bSmallCreated) { ; } } }
private void LightNewsContainer_RemoveNewsClicked(object sender, int NewsID) { PhantomForm PhantomForm = new Infinium.PhantomForm(); PhantomForm.Show(); LightMessageBoxForm LightMessageBoxForm = new Infinium.LightMessageBoxForm(true, "Сообщение будет удалено безвозвратно.\nПродолжить?", "Удаление сообщения"); TopForm = LightMessageBoxForm; LightMessageBoxForm.ShowDialog(); TopForm = null; PhantomForm.Close(); PhantomForm.Dispose(); if (LightMessageBoxForm.OKCancel) { Thread T = new Thread(delegate() { SplashWindow.CreateCoverSplash(LightNewsContainer.Top, LightNewsContainer.Left, LightNewsContainer.Height, LightNewsContainer.Width); }); T.Start(); while (!SplashWindow.bSmallCreated) { ; } LightNews.RemoveNews(NewsID); LightNews.ReloadNews(LightNewsContainer.NewsCount); LightNews.ReloadComments(); LightNewsContainer.NewsDataTable = LightNews.NewsDataTable.Copy(); LightNewsContainer.CommentsDT = LightNews.CommentsDataTable.Copy(); LightNewsContainer.CreateNews(); } LightMessageBoxForm.Dispose(); bC = true; }
private void CoverDocumentsList() { if (bNeedSplash) { Thread T = new Thread(delegate() { SplashWindow.CreateCoverSplash(InnerDocumentsList.Top + UpdatePanel.Top, UpdatePanel.Left, InnerDocumentsList.Height - InnerDocumentsList.Top, UpdatePanel.Width); }); T.Start(); while (!SplashWindow.bSmallCreated) { ; } } }
private void CoverUpdatePanel() { if (bNeedSplash) { Thread T = new Thread(delegate() { SplashWindow.CreateCoverSplash(UpdatePanel.Top, UpdatePanel.Left, UpdatePanel.Height, UpdatePanel.Width); }); T.Start(); while (!SplashWindow.bSmallCreated) { ; } } }
private void CoderBlogContainer_RemoveCommentClicked(object sender, int NewsID, int NewsCommentID) { PhantomForm PhantomForm = new Infinium.PhantomForm(); PhantomForm.Show(); LightMessageBoxForm LightMessageBoxForm = new Infinium.LightMessageBoxForm(true, "Комментарий будет удален.\nПродолжить?", "Удаление комментария"); TopForm = LightMessageBoxForm; LightMessageBoxForm.ShowDialog(); TopForm = null; PhantomForm.Close(); PhantomForm.Dispose(); if (LightMessageBoxForm.OKCancel) { Thread T = new Thread(delegate() { SplashWindow.CreateCoverSplash(CoderBlogContainer.Top, CoderBlogContainer.Left, CoderBlogContainer.Height, CoderBlogContainer.Width); }); T.Start(); while (!SplashWindow.bSmallCreated) { ; } CoderBlog.RemoveComment(NewsCommentID); CoderBlog.ReloadNews(CoderBlogContainer.NewsCount); CoderBlog.ReloadComments(); CoderBlogContainer.NewsDataTable = CoderBlog.BlogNewsDataTable.Copy(); CoderBlogContainer.CommentsDT = CoderBlog.CommentsDataTable.Copy(); CoderBlogContainer.CreateNews(); CoderBlogContainer.ReloadNewsItem(NewsID, true); bC = true; } }
private void MenuFilterButton_Click(object sender, EventArgs e) { if (bNeedSplash) { Thread T = new Thread(delegate() { SplashWindow.CreateCoverSplash(InnerDocumentsList.Top + UpdatePanel.Top, InnerDocumentsList.Left + UpdatePanel.Left, InnerDocumentsList.Height, InnerDocumentsList.Width); }); T.Start(); while (!SplashWindow.bSmallCreated) { ; } } if (CategoriesComboBox.GetItemText(CategoriesComboBox.SelectedItem) == "Внутренний документ") { InfiniumDocuments.FillInnerDocuments(GetFilter()); InnerDocumentsList.InitializeItems(); InnerDocumentsList.BringToFront(); } if (CategoriesComboBox.GetItemText(CategoriesComboBox.SelectedItem) == "Входящий документ") { InfiniumDocuments.FillIncomeDocuments(GetFilter()); IncomeDocumentsList.InitializeItems(); IncomeDocumentsList.BringToFront(); } if (CategoriesComboBox.GetItemText(CategoriesComboBox.SelectedItem) == "Исходящий документ") { InfiniumDocuments.FillOuterDocuments(GetFilter()); OuterDocumentsList.InitializeItems(); OuterDocumentsList.BringToFront(); } if (bNeedSplash) { bC = true; } }
private void InfiniumStartMenu_ItemClicked(object sender, string MenuItemName, int MenuItemID) { if (bNeedSplash) { Thread T = new Thread(delegate() { SplashWindow.CreateCoverSplash(InfiniumTilesContainer.Top + MainPanel.Top, InfiniumTilesContainer.Left, InfiniumTilesContainer.Height, InfiniumTilesContainer.Width); }); T.Start(); while (!SplashWindow.bSmallCreated) { ; } } InfiniumTilesContainer.MenuItemID = MenuItemID; InfiniumTilesContainer.InitializeItems(); bC = true; }
private void UpdateNewsButton_Click(object sender, EventArgs e) { Thread T = new Thread(delegate() { SplashWindow.CreateCoverSplash(LightNewsContainer.Top, LightNewsContainer.Left, LightNewsContainer.Height, LightNewsContainer.Width); }); T.Start(); while (!SplashWindow.bSmallCreated) { ; } LightNews.ReloadSubscribes(); LightNews.ReloadNews(20);//default count LightNews.ReloadComments(); LightNews.ReloadAttachments(); LightNews.FillLikes(); LightNewsContainer.NewsDataTable = LightNews.NewsDataTable.Copy(); LightNewsContainer.CommentsDT = LightNews.CommentsDataTable.Copy(); LightNewsContainer.AttachsDT = LightNews.AttachmentsDataTable.Copy(); LightNewsContainer.NewsLikesDT = LightNews.NewsLikesDataTable; LightNewsContainer.CommentsLikesDT = LightNews.CommentsLikesDataTable; LightNewsContainer.CreateNews(); LightNewsContainer.ScrollToTop(); LightNewsContainer.Focus(); ActiveNotifySystem.ClearSubscribesRecords(Security.CurrentUserID, this.Name); //ActiveNotifySystem.ClearModuleUpdates(LightTile.Name); //ActiveNotifySystem.ClearCurrentOpenModuleUpdates(this.Name); //LightNews.ClearCommentsSubs(Security.CurrentUserID); UpdateNewsButton.Visible = false; bC = true; }
private void MenuRemoveFromFavorite_Click(object sender, EventArgs e) { InfiniumStart.RemoveModuleFromFavorite(CurFormName); if (bNeedSplash) { Thread T = new Thread(delegate() { SplashWindow.CreateCoverSplash(InfiniumTilesContainer.Top + MainPanel.Top, InfiniumTilesContainer.Left, InfiniumTilesContainer.Height, InfiniumTilesContainer.Width); }); T.Start(); while (!SplashWindow.bSmallCreated) { ; } } InfiniumTilesContainer.MenuItemID = 0; InfiniumTilesContainer.InitializeItems(); bC = true; }
private void kryptonCheckSet1_CheckedButtonChanged(object sender, EventArgs e) { if (MarketingNews == null) { return; } Thread T = new Thread(delegate() { SplashWindow.CreateCoverSplash(LightNewsContainer.Top, LightNewsContainer.Left, LightNewsContainer.Height, LightNewsContainer.Width); }); T.Start(); while (!SplashWindow.bSmallCreated) { ; } MarketingNews.FillLikes(); if (cbtnClients.Checked) { ClientsMenu.ClientsDataTable = MarketingNews.ClientsDataTable; ClientsMenu.InitializeItems(); ClientsMenu.Selected = 0; MarketingNews.FillNews(ClientsMenu.Items[ClientsMenu.Selected].ClientID); MarketingNews.FillNewClientsNews(); NewClientsMenu.ClientsDataTable = MarketingNews.ClientsNewsDataTable; NewClientsMenu.InitializeItems(); if (ClientsMenu.Selected == -1) { MarketingNews.ReloadClientsNews(20, NewClientsMenu.Items[NewClientsMenu.Selected].ClientID); } else { MarketingNews.ReloadClientsNews(20, ClientsMenu.Items[ClientsMenu.Selected].ClientID); } if (MarketingNews.ClientsNewsDataTable.Rows.Count == 0) { ClientsMenu.Top = 0; ClientsMenu.Height = panel1.Height; } else { ClientsMenu.Top = 239; ClientsMenu.Height = panel1.Height - ClientsMenu.Top; NewClientsMenu.Selected = 0; ActiveNotifySystem.ClearSubscribesRecords(Security.CurrentUserID, this.Name); } panel1.BringToFront(); } else { ClientsManagersMenu.ClientsManagersDataTable = MarketingNews.ClientsManagersDataTable; ClientsManagersMenu.InitializeItems(); ClientsManagersMenu.Selected = 0; MarketingNews.FillMNews(ClientsManagersMenu.Items[ClientsManagersMenu.Selected].ClientID); MarketingNews.FillNewManagersNews(); NewClientsManagersMenu.ClientsManagersDataTable = MarketingNews.ClientsManagersNewsDataTable; NewClientsManagersMenu.InitializeItems(); if (ClientsManagersMenu.Selected == -1) { MarketingNews.ReloadManagersNews(20, NewClientsManagersMenu.Items[NewClientsManagersMenu.Selected].ClientID); } else { MarketingNews.ReloadManagersNews(20, ClientsManagersMenu.Items[ClientsManagersMenu.Selected].ClientID); } if (MarketingNews.ClientsManagersNewsDataTable.Rows.Count == 0) { ClientsManagersMenu.Top = 0; ClientsManagersMenu.Height = panel4.Height; } else { ClientsManagersMenu.Top = 239; ClientsManagersMenu.Height = panel4.Height - ClientsManagersMenu.Top; NewClientsManagersMenu.Selected = 0; ActiveNotifySystem.ClearSubscribesRecords(Security.CurrentUserID, this.Name); } panel4.BringToFront(); } MarketingNews.ReloadComments(); MarketingNews.ReloadAttachments(); LightNewsContainer.NewsDataTable = MarketingNews.NewsDataTable.Copy(); LightNewsContainer.CommentsDT = MarketingNews.CommentsDataTable.Copy(); LightNewsContainer.AttachsDT = MarketingNews.AttachmentsDataTable.Copy(); LightNewsContainer.CreateNews(); LightNewsContainer.ScrollToTop(); LightNewsContainer.Focus(); bC = true; }
private void LoadWithSampleButton_Click(object sender, EventArgs e) { if (InfiniumFileList.Selected == -1) { return; } if (InfiniumFiles.CheckInheritedPermission(Security.CurrentUserID, InfiniumFileList.Entered) == false) { InfiniumTips.ShowTip(this, 50, 85, "Недостаточно прав", 3600); return; } if (InfiniumFileList.CheckVisible) { InfiniumFileList.CheckVisible = false; CheckMultipleButton.BringToFront(); } UploadFileDialog.Multiselect = false; if (UploadFileDialog.ShowDialog() == System.Windows.Forms.DialogResult.OK) { if (InfiniumFiles.CheckFileExist(UploadFileDialog.FileNames, InfiniumFileList.Entered) == true)//file exist { InfiniumTips.ShowTip(this, 50, 85, "Один или несколько файлов уже существуют в папке", 2600); return; } PhantomForm PhantomForm = new PhantomForm(); PhantomForm.Show(); //set attributes DocumentAttributesForm DocumentAttributesForm = new DocumentAttributesForm(ref InfiniumFiles, ref TopForm); TopForm = DocumentAttributesForm; DocumentAttributesForm.ShowDialog(); bool bFirstSign = DocumentAttributesForm.bFirstSign; if (DocumentAttributesForm.bCanceled) { PhantomForm.Close(); PhantomForm.Dispose(); TopForm = null; return; } //upload UploadFileForm UploadFileForm = new UploadFileForm(ref InfiniumFiles.FM, ref InfiniumFiles, UploadFileDialog.FileNames, InfiniumFileList.Entered, ref TopForm); TopForm = UploadFileForm; UploadFileForm.ShowDialog(); PhantomForm.Close(); PhantomForm.Dispose(); TopForm = null; UploadFileDialog.Dispose(); InfiniumFiles.SetAttributes(Path.GetFileName(UploadFileDialog.FileNames[0]), InfiniumFileList.Entered, bFirstSign); Thread T = new Thread(delegate() { SplashWindow.CreateCoverSplash(InfiniumFileList.Top + UpdatePanel.Top, InfiniumFileList.Left + UpdatePanel.Left, InfiniumFileList.Height, InfiniumFileList.Width); }); T.Start(); while (!SplashWindow.bSmallCreated) { ; } InfiniumFiles.EnterFolder(InfiniumFileList.Entered); InfiniumFileList.ItemsDataTable = InfiniumFiles.CurrentItemsDataTable; bC = true; } }
private void UploadFileIButton_Click(object sender, EventArgs e) { if (InfiniumFileList.Selected == -1) { return; } if (InfiniumFiles.CheckInheritedPermission(Security.CurrentUserID, InfiniumFileList.Entered) == false) { InfiniumTips.ShowTip(this, 50, 85, "Недостаточно прав", 3600); return; } if (InfiniumFileList.CheckVisible) { InfiniumFileList.CheckVisible = false; CheckMultipleButton.BringToFront(); } UploadFileDialog.Multiselect = true; if (UploadFileDialog.ShowDialog() == System.Windows.Forms.DialogResult.OK) { if (InfiniumFiles.CheckFileExist(UploadFileDialog.FileNames, InfiniumFileList.Entered) == true)//file exist { InfiniumTips.ShowTip(this, 50, 85, "Один или несколько файлов уже существуют в папке", 2600); return; } PhantomForm PhantomForm = new PhantomForm(); PhantomForm.Show(); UploadFileForm UploadFileForm = new UploadFileForm(ref InfiniumFiles.FM, ref InfiniumFiles, UploadFileDialog.FileNames, InfiniumFileList.Entered, ref TopForm); TopForm = UploadFileForm; UploadFileForm.ShowDialog(); if (UploadFileForm.bOk == 0) { InfiniumTips.ShowTip(this, 50, 85, "Отсутствует файл либо нет доступа к интернет", 5000); } PhantomForm.Close(); PhantomForm.Dispose(); TopForm = null; UploadFileDialog.Dispose(); Thread T = new Thread(delegate() { SplashWindow.CreateCoverSplash(InfiniumFileList.Top + UpdatePanel.Top, InfiniumFileList.Left + UpdatePanel.Left, InfiniumFileList.Height, InfiniumFileList.Width); }); T.Start(); while (!SplashWindow.bSmallCreated) { ; } InfiniumFiles.EnterFolder(InfiniumFileList.Entered); InfiniumFileList.ItemsDataTable = InfiniumFiles.CurrentItemsDataTable; bC = true; } }
private void RemoveButton_Click(object sender, EventArgs e) { if (InfiniumFileList.Selected == -1) { return; } if (InfiniumFileList.FileItems[InfiniumFileList.Selected].Caption == "[...]") { return; } if (InfiniumFiles.CurrentItemsDataTable.Select("FolderID = " + InfiniumFileList.FileItems[InfiniumFileList.Selected].FolderID)[0]["Extension"].ToString() == "folder") { if (InfiniumFiles.CheckFolderPermission(Security.CurrentUserID, InfiniumFileList.FileItems[InfiniumFileList.Selected].FolderID) == false) { InfiniumTips.ShowTip(this, 50, 85, "Недостаточно прав", 3600); return; } } else { if (InfiniumFiles.CanEditFile(Security.CurrentUserID, InfiniumFileList.FileItems[InfiniumFileList.Selected].FileID) == false) { InfiniumTips.ShowTip(this, 50, 85, "Недостаточно прав", 3600); return; } } if (InfiniumFileList.CheckVisible) { int r = InfiniumFiles.CheckCheckedItems(InfiniumFileList.ItemsDataTable); if (r == 0) { InfiniumTips.ShowTip(this, 50, 85, "Выберите один или несколько файлов", 5600); return; } bool OK = LightMessageBox.Show(ref TopForm, true, "Удалить выбранные файлы\\папки?", "Удаление"); if (!OK) { return; } InfiniumFiles.RemoveFolder(InfiniumFileList.ItemsDataTable); InfiniumFiles.RemoveFile(InfiniumFileList.ItemsDataTable); } else { if (InfiniumFileList.Selected > -1) { bool OK = LightMessageBox.Show(ref TopForm, true, "Удалить?", "Удаление"); if (!OK) { return; } if (InfiniumFiles.CurrentItemsDataTable.Select("FolderID = " + InfiniumFileList.FileItems[InfiniumFileList.Selected].FolderID)[0]["Extension"].ToString() == "folder") { if (InfiniumFiles.RemoveFolder(InfiniumFileList.FileItems[InfiniumFileList.Selected].FolderID) == false) { InfiniumTips.ShowTip(this, 50, 85, "Ошибка удаления папки с хостинга", 4000); } } else { InfiniumFiles.RemoveFile(InfiniumFileList.FileItems[InfiniumFileList.Selected].FileID, InfiniumFileList.FileItems[InfiniumFileList.Selected].FolderID, InfiniumFileList.FileItems[InfiniumFileList.Selected].Caption); } } } Thread T = new Thread(delegate() { SplashWindow.CreateCoverSplash(InfiniumFileList.Top + UpdatePanel.Top, InfiniumFileList.Left + UpdatePanel.Left, InfiniumFileList.Height, InfiniumFileList.Width); }); T.Start(); while (!SplashWindow.bSmallCreated) { ; } InfiniumFiles.EnterFolder(InfiniumFileList.Entered); InfiniumFileList.ItemsDataTable = InfiniumFiles.CurrentItemsDataTable; InfiniumFileList.EnterInFolder(InfiniumFileList.Entered); if (InfiniumFileList.CheckVisible) { InfiniumFileList.CheckVisible = false; CheckMultipleButton.BringToFront(); } bC = true; }
private void AddFolderButton_Click(object sender, EventArgs e) { if (InfiniumFileList.Entered > -1) { if (InfiniumFileList.CheckVisible) { InfiniumFileList.CheckVisible = false; CheckMultipleButton.BringToFront(); } if (InfiniumFiles.CheckInheritedPermission(Security.CurrentUserID, InfiniumFileList.Entered) == false) { InfiniumTips.ShowTip(this, 50, 85, "Недостаточно прав", 3600); return; } PhantomForm PhantomForm = new PhantomForm(); PhantomForm.Show(); CreateFolderForm CreateFolderForm = new CreateFolderForm(ref InfiniumFiles, ref TopForm); TopForm = CreateFolderForm; CreateFolderForm.ShowDialog(); PhantomForm.Close(); PhantomForm.Dispose(); TopForm = null; if (CreateFolderForm.Canceled) { return; } Thread T = new Thread(delegate() { SplashWindow.CreateCoverSplash(InfiniumFileList.Top + UpdatePanel.Top, InfiniumFileList.Left + UpdatePanel.Left, InfiniumFileList.Height, InfiniumFileList.Width); }); T.Start(); while (!SplashWindow.bSmallCreated) { ; } InfiniumFiles.CreateFolder(InfiniumFileList.Entered, CreateFolderForm.FolderName); InfiniumFiles.EnterFolder(InfiniumFileList.Entered); InfiniumFileList.ItemsDataTable = InfiniumFiles.CurrentItemsDataTable; InfiniumFileList.EnterInFolder(InfiniumFileList.Entered); CreateFolderForm.Dispose(); bC = true; } }
private void InfiniumDocumentsMenu_ItemClicked(object sender, int FolderID, string Caption) { if (bNeedSplash) { Thread T = new Thread(delegate() { SplashWindow.CreateCoverSplash(InfiniumFileList.Top + UpdatePanel.Top, InfiniumFileList.Left + UpdatePanel.Left, InfiniumFileList.Height, InfiniumFileList.Width); }); T.Start(); while (!SplashWindow.bSmallCreated) { ; } } if (FolderID == -3) { int iP = InfiniumFiles.CheckPersonalFolder(Security.CurrentUserID); if (iP == -1) { InfiniumFiles.CreatePersonalFolder(Security.CurrentUserID); iP = InfiniumFiles.CheckPersonalFolder(Security.CurrentUserID); } InfiniumFiles.EnterFolder(iP); InfiniumFileList.ItemsDataTable = InfiniumFiles.CurrentItemsDataTable; InfiniumFileList.Entered = iP; } if (FolderID > 0) { InfiniumFiles.EnterFolder(FolderID); InfiniumFileList.ItemsDataTable = InfiniumFiles.CurrentItemsDataTable; InfiniumFileList.Entered = FolderID; } if (FolderID == 4)//клиенты { if (InfiniumFiles.CheckInheritedPermission(Security.CurrentUserID, 4)) { SendMailButton.Visible = true; } } else { SendMailButton.Visible = false; } if (FolderID == -1)//на подпись { InfiniumFiles.FillSignsFiles(Security.CurrentUserID); InfiniumFileList.ItemsDataTable = InfiniumFiles.CurrentItemsDataTable; InfiniumFileList.Entered = -1; } if (FolderID == -2)//на ознакомление { InfiniumFiles.FillReadFiles(Security.CurrentUserID); InfiniumFileList.ItemsDataTable = InfiniumFiles.CurrentItemsDataTable; InfiniumFileList.Entered = -1; } if (bNeedSplash) { bC = true; } }