protected override void gotoParentCtxMenuItem_Click(object sender, RoutedEventArgs e) { FoxeTreeViewNotifications.OnGotoParent(new FoxeGotoParentEventArgs() { TreeViewItem = this }); }
static Global() { DbTreeViewNotifications = new DbTreeViewNotifications(); FoxeTreeViewNotifications = new FoxeTreeViewNotifications(); JobNotifications = new JobNotifications(); LogNotifications = new LogNotifications(); SchedulerStopHandle = new ManualResetEvent(false); }
protected override void downloadProductsCtxMenuItem_Click(object sender, RoutedEventArgs e) { FoxeTreeViewNotifications.OnDownloadFoxeProductsUnderPage(new FoxeDownloadProductsUnderPageEventArgs() { FoxePage = this.FoxePage }); JobQueue.Enqueue(new Job(this.FoxePage)); }
protected override void downloadProductsCtxMenuItem_Click(object sender, RoutedEventArgs e) { FoxeTreeViewNotifications.OnDownloadFoxeProductsUnderCategory(new FoxeDownloadProductsUnderCategoryEventArgs() { FoxeCategory = this.FoxeCategory }); foreach (FoxePage foxePage in this.FoxeCategory.Pages) { JobQueue.Enqueue(new Job(foxePage)); } }
public BaseTreeViewItem() { FoxeTreeViewNotifications = Global.FoxeTreeViewNotifications; StackPanel = new StackPanel(); StackPanel.Orientation = Orientation.Horizontal; CheckBox = new CheckBox(); CheckBox.IsChecked = false; CheckBox.HorizontalAlignment = System.Windows.HorizontalAlignment.Left; CheckBox.VerticalAlignment = System.Windows.VerticalAlignment.Center; CheckBox.Width = 16; CheckBox.Height = 16; CheckBox.Margin = new Thickness(2); MainTitleTxtBlk = new TextBlock(); MainTitleTxtBlk.Text = "ENTER TITLE"; MainTitleTxtBlk.Margin = new Thickness(2); MainTitleTxtBlk.VerticalAlignment = System.Windows.VerticalAlignment.Center; ProductsImage = new Image(); ProductsImage.HorizontalAlignment = System.Windows.HorizontalAlignment.Left; ProductsImage.VerticalAlignment = System.Windows.VerticalAlignment.Center; ProductsImage.Width = 20; ProductsImage.Height = 20; ProductsImage.Margin = new Thickness(2); ProductsImage.Source = new BitmapImage(new Uri(@"Resources/Images/productsImg.jpg", UriKind.RelativeOrAbsolute)); ProductsCountTxtBlk = new TextBlock(); ProductsCountTxtBlk.Text = "(X)"; ProductsCountTxtBlk.Margin = new Thickness(2); ProductsCountTxtBlk.VerticalAlignment = System.Windows.VerticalAlignment.Center; DownloadStatus = DownloadStatus.NotInitiated; DownLoadStatusImage = new Image(); DownLoadStatusImage.HorizontalAlignment = System.Windows.HorizontalAlignment.Left; DownLoadStatusImage.VerticalAlignment = System.Windows.VerticalAlignment.Center; DownLoadStatusImage.Width = 20; DownLoadStatusImage.Height = 20; DownLoadStatusImage.Margin = new Thickness(2); DownLoadStatusImage.Source = new BitmapImage(new Uri(@"Resources/Images/downloadNotInit.jpg", UriKind.RelativeOrAbsolute)); AreProductsSent = false; ProductsSentImage = new Image(); ProductsSentImage.HorizontalAlignment = System.Windows.HorizontalAlignment.Left; ProductsSentImage.VerticalAlignment = System.Windows.VerticalAlignment.Center; ProductsSentImage.Width = 20; ProductsSentImage.Height = 20; ProductsSentImage.Margin = new Thickness(2); ProductsSentImage.Source = new BitmapImage(new Uri(@"Resources/Images/productNotSent.jpg", UriKind.RelativeOrAbsolute)); }
private void InitApplication() { LogManager.Init(); // Program.DatabaseSetup(); foxeContext = new FoxEbookDbContext(); foxeContext.Database.Log = Console.Write; foxeTreeViewNotifications = Global.FoxeTreeViewNotifications; jobNotifications = Global.JobNotifications; jobNotifications.JobCompleted += new EventHandler <JobCompletedEventArgs>(jobNotifications_JobCompleted); //foxeTreeViewNotifications.DownloadFoxeProducts+=new EventHandler<FoxeDownloadProductsEventArgs>(foxeTreeViewNotifications_DownloadFoxeProducts); foxeTreeViewNotifications.GotoParent += new EventHandler <FoxeGotoParentEventArgs>(foxeTreeViewNotifications_GotoParent); foxeRootTreeViewNode = CreateRootFoxeTreeViewNode(); gvJobsSummary.ItemsSource = JobQueue.JobsSummary; gvLog.ItemsSource = LogManager.LogsList; Global.StartScheduler(); }