public CloudUserControl() { InitializeComponent(); if (IsDesignMode) { return; } JocysCom.ClassLibrary.Controls.ControlsHelper.ApplyBorderStyle(TasksDataGridView); EngineHelper.EnableDoubleBuffering(TasksDataGridView); InitNetworkInformation(); // Enable task timer. TasksTimer = new JocysCom.ClassLibrary.Threading.QueueTimer <CloudItem>(0, 5000, this); TasksTimer.DoWork += queueTimer_DoWork; TasksTimer.Queue.ListChanged += Data_ListChanged; TasksDataGridView.AutoGenerateColumns = false; // Suspend errors. TasksDataGridView.DataError += TasksDataGridView_DataError; // Attach TasksDataGridView.DataSource = TasksTimer.Queue; // Force to create handle. var handle = this.Handle; // Start monitoring tasks queue. QueueMonitorTimer.Start(); }
public CloudUserControl() { InitializeComponent(); if (IsDesignMode) { return; } // Make font more consistent with the rest of the interface. Controls.OfType <ToolStrip>().ToList().ForEach(x => x.Font = Font); JocysCom.ClassLibrary.Controls.ControlsHelper.ApplyBorderStyle(TasksDataGridView); EngineHelper.EnableDoubleBuffering(TasksDataGridView); InitNetworkInformation(); // Enable task timer. var scheduler = TaskScheduler.FromCurrentSynchronizationContext(); TasksTimer = new JocysCom.ClassLibrary.Threading.QueueTimer <CloudItem>(0, 5000, scheduler); HandleCreated += (sender, e) => { TasksTimer.HasHandle = true; }; HandleDestroyed += (sender, e) => { TasksTimer.HasHandle = false; }; TasksTimer.HasHandle = IsHandleCreated; TasksTimer.DoWork += queueTimer_DoWork; TasksTimer.Queue.ListChanged += Data_ListChanged; TasksDataGridView.AutoGenerateColumns = false; // Suspend errors. TasksDataGridView.DataError += TasksDataGridView_DataError; // Attach TasksDataGridView.DataSource = TasksTimer.Queue; // Force to create handle. var handle = this.Handle; // Start monitoring tasks queue. QueueMonitorTimer.Start(); }
public IssuesUserControl() { InitializeComponent(); if (IsDesignMode) { return; } NoIssuesPanel.Visible = false; LinePanel.Visible = false; ExceptionInfoButton.Visible = false; // List which contains all issues. IssueList = new BindingListInvoked <IssueItem>(); IssueList.SynchronizingObject = this; IssueList.ListChanged += IssueList_ListChanged; UpdateIgnoreAllButton(); // List which is bound to the grid and displays issues, which needs user attention. Warnings = new BindingListInvoked <IssueItem>(); Warnings.SynchronizingObject = this; // Configure data grid. ControlsHelper.ApplyBorderStyle(WarningsDataGridView); WarningsDataGridView.AutoGenerateColumns = false; WarningsDataGridView.DataSource = Warnings; UpdateIgnoreButton(); // Timer which checks for the issues. var ai = new JocysCom.ClassLibrary.Configuration.AssemblyInfo(); var title = ai.GetTitle(true, true, true, true, false) + " - Issues"; Text = title; TasksTimer = new JocysCom.ClassLibrary.Threading.QueueTimer <object>(0, 5000, this); TasksTimer.DoWork += queueTimer_DoWork; TasksTimer.Queue.ListChanged += Data_ListChanged; // Start monitoring tasks queue. QueueMonitorTimer.Start(); }
public CloudUserControl() { InitializeComponent(); if (IsDesignMode) { return; } // Make font more consistent with the rest of the interface. Controls.OfType <ToolStrip>().ToList().ForEach(x => x.Font = Font); ControlsHelper.ApplyBorderStyle(TasksDataGridView); EngineHelper.EnableDoubleBuffering(TasksDataGridView); //TasksTimer.Queue.AsynchronousInvoke = true; TasksDataGridView.AutoGenerateColumns = false; // Suspend errors. TasksDataGridView.DataError += TasksDataGridView_DataError; // Enable task timer. var scheduler = TaskScheduler.FromCurrentSynchronizationContext(); Global.CloudClient.StartServer(scheduler, this); // Display cloud queue results. EnableDataSource(true); // Force to create handle. var handle = this.Handle; // Start monitoring tasks queue. QueueMonitorTimer.Start(); }
public CloudUserControl() { InitializeComponent(); JocysCom.ClassLibrary.Controls.ControlsHelper.ApplyBorderStyle(TasksDataGridView); EngineHelper.EnableDoubleBuffering(TasksDataGridView); data = new SortableBindingList <CloudItem>(); data.ListChanged += Data_ListChanged; TasksDataGridView.AutoGenerateColumns = false; TasksDataGridView.DataSource = data; // Force to create handle. var handle = this.Handle; queueTimer = new JocysCom.ClassLibrary.Threading.QueueTimer(500, 1000); queueTimer.SynchronizingObject = this; queueTimer.DoAction = DoAction; queueTimer.DoActionNow(); QueueMonitorTimer.Start(); }
public IssuesUserControl() { InitializeComponent(); if (IsDesignMode) { return; } // Set tool strip to the same font. Controls.OfType <ToolStrip>().ToList().ForEach(x => x.Font = this.Font); NoIssuesPanel.Visible = false; LinePanel.Visible = false; ExceptionInfoButton.Visible = false; // List which contains all issues. var scheduler = TaskScheduler.FromCurrentSynchronizationContext(); IssueList = new BindingListInvoked <IssueItem>(); IssueList.AsynchronousInvoke = true; IssueList.SynchronizingObject = scheduler; IssueList.ListChanged += IssueList_ListChanged; UpdateIgnoreAllButton(); // List which is bound to the grid and displays issues, which needs user attention. Warnings = new BindingListInvoked <IssueItem>(); Warnings.SynchronizingObject = scheduler; // Configure data grid. ControlsHelper.ApplyBorderStyle(WarningsDataGridView); WarningsDataGridView.AutoGenerateColumns = false; WarningsDataGridView.DataSource = Warnings; UpdateIgnoreButton(); // Timer which checks for the issues. var ai = new JocysCom.ClassLibrary.Configuration.AssemblyInfo(); var title = ai.GetTitle(true, true, true, true, false) + " - Issues"; Text = title; TasksTimer = new QueueTimer <object>(0, 0); TasksTimer.DoWork += queueTimer_DoWork; TasksTimer.Queue.ListChanged += Data_ListChanged; // Start monitoring tasks queue. QueueMonitorTimer.Start(); }