Ejemplo n.º 1
0
        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();
        }
Ejemplo n.º 2
0
        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();
        }
Ejemplo n.º 3
0
        public IssuesUserControl()
        {
            InitializeComponent();
            if (IsDesignMode)
            {
                return;
            }
            // List which contains all issues.
            IssueList = new BindingListInvoked <IssueItem>();
            IssueList.SynchronizingObject = this;
            IssueList.ListChanged        += IssueList_ListChanged;
            // 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(IssuesDataGridView);
            IssuesDataGridView.AutoGenerateColumns = false;
            IssuesDataGridView.DataSource          = Warnings;
            // Timer which checks for the issues.
            CheckTimer                     = new System.Timers.Timer();
            CheckTimer.Interval            = 1000;
            CheckTimer.AutoReset           = false;
            CheckTimer.SynchronizingObject = this;
            CheckTimer.Elapsed            += CheckTimer_Elapsed;
            var ai    = new JocysCom.ClassLibrary.Configuration.AssemblyInfo();
            var title = ai.GetTitle(true, true, true, true, false) + " - Issues";

            Text = title;
        }
Ejemplo n.º 4
0
 /// <summary>
 /// In the form load we take an initial hardware inventory,
 /// then hook the notifications so we can respond if any
 /// device is added or removed.
 /// </summary>
 private void HardwareControl_Load(object sender, EventArgs e)
 {
     if (IsDesignMode)
     {
         return;
     }
     ControlsHelper.ApplyBorderStyle(MainToolStrip);
     ControlsHelper.ApplyImageStyle(MainTabControl);
     ControlsHelper.ApplyBorderStyle(DeviceDataGridView);
     UpdateButtons();
     detector = new DeviceDetector(false);
     detector.DeviceChanged += Detector_DeviceChanged;
     RefreshHardwareList();
 }
Ejemplo n.º 5
0
        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();
        }