Пример #1
0
        private void Initialize(bool textFile, string header)
        {
            this.Text     = header;
            this.status   = new StatusWriter(this.toolStripStatusLabel_status, this.statusStrip, this.Status);
            this.canceled = false;
            if (textFile)
            {
                this.shownText = new DGVData <TextFileLine>();
                this.filteredDataGridView.SetDataSource(this.shownText);
                // ReSharper disable PossibleNullReferenceException

                this.filteredDataGridView.DataGridView.Columns["Line"].FillWeight = 5;
                this.filteredDataGridView.DataGridView.Columns["Line"].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight;
                this.contextMenuStrip.Enabled = false;
            }
            else
            {
                this.shownLogLines = new DGVData <PositionedDryadLogEntry>();
                this.filteredDataGridView.SetDataSource(this.shownLogLines);
                foreach (string s in new string[] { "Malformed", "IsError", "OriginalLogLine", "File", "LineNo" })
                {
                    this.filteredDataGridView.DataGridView.Columns[s].Visible = false;
                }
                this.filteredDataGridView.DataGridView.Columns["Timestamp"].DefaultCellStyle.Format = "HH:mm:ss.fff";
                // ReSharper restore PossibleNullReferenceException
            }
            this.filteredDataGridView.DataGridView.AutoSizeColumnsMode      = DataGridViewAutoSizeColumnsMode.DisplayedCellsExceptHeader;
            this.filteredDataGridView.DataGridView.AllowUserToResizeColumns = true;
            this.filteredDataGridView.DataGridView.Columns[this.filteredDataGridView.DataGridView.Columns.Count - 1].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
        }
Пример #2
0
        /// <summary>
        /// Create a cluster browser object which stores the databases in the specified directory.
        /// </summary>
        public ClusterBrowser()
        {
            this.InitializeComponent();
            this.status = new StatusWriter(this.statuslabel, this.statusStrip, this.Status);

            BackgroundWorker queueWorker = new BackgroundWorker();

            this.queue = new BackgroundWorkQueue(queueWorker, null, null);

            this.completeJobsList              = new List <ClusterJobInformation>();
            this.refreshTimer                  = new Timer();
            this.refreshTimer.Interval         = 30000; // 30 seconds
            this.refreshTimer.Tick            += this.refreshTimer_Tick;
            this.toolStripMenuItem_job.Enabled = false;

            this.clusterJobs = new DGVData <ClusterJobInformation>();
            this.filteredDataGridView.SetDataSource(this.clusterJobs);
            this.filteredDataGridView.DataGridView.Columns["IsUnavailable"].Visible = false;
            this.filteredDataGridView.DataGridView.Columns["Cluster"].Visible       = false;
            this.filteredDataGridView.DataGridView.Columns["Name"].FillWeight       = 50;
            this.filteredDataGridView.DataGridView.Columns["Status"].FillWeight     = 10;
            this.filteredDataGridView.ViewChanged += this.filteredDataGridView_ViewChanged;

            #region TOOLTIPS
            //ToolTip help = new ToolTip();
            //help.SetToolTip(this.combo_cluster, "Cluster whose jobs are visualized (or a \"Cache\" cluster with previously seen data).");
            //help.SetToolTip(this.autoRefreshToolStripMenuItem, "Select to refresh the cluster view every 30 seconds.");
            #endregion

            this.Status("Please pick a cluster.", StatusKind.OK);
        }
Пример #3
0
 private void BuildDataGridView()
 {
     dgvData = new DGVData();
     dataGridView.DataSource = dgvData;
     dataGridView.Columns["Name"].HeaderText  = "Параметер";
     dataGridView.Columns["Value"].HeaderText = "Значение";
     OnSettingsFormSettingsChanged();
 }
Пример #4
0
        /// <summary>
        /// Create a cluster browser object which stores the databases in the specified directory.
        /// </summary>
        public ClusterBrowser()
        {
            this.InitializeComponent();
            this.status = new StatusWriter(this.statuslabel, this.statusStrip, this.Status);

            BackgroundWorker queueWorker = new BackgroundWorker();
            this.queue = new BackgroundWorkQueue(queueWorker, null, null);

            this.completeJobsList = new List<ClusterJobInformation>();
            this.refreshTimer = new Timer();
            this.refreshTimer.Interval = 30000; // 30 seconds
            this.refreshTimer.Tick += this.refreshTimer_Tick;
            this.toolStripMenuItem_job.Enabled = false;

            this.clusterJobs = new DGVData<ClusterJobInformation>();
            this.filteredDataGridView.SetDataSource(this.clusterJobs);
            this.filteredDataGridView.DataGridView.Columns["IsUnavailable"].Visible = false;
            this.filteredDataGridView.DataGridView.Columns["Cluster"].Visible = false;
            this.filteredDataGridView.DataGridView.Columns["Name"].FillWeight = 50;
            this.filteredDataGridView.DataGridView.Columns["Status"].FillWeight = 10;
            this.filteredDataGridView.ViewChanged += this.filteredDataGridView_ViewChanged;

            #region TOOLTIPS
            //ToolTip help = new ToolTip();
            //help.SetToolTip(this.combo_cluster, "Cluster whose jobs are visualized (or a \"Cache\" cluster with previously seen data).");
            //help.SetToolTip(this.autoRefreshToolStripMenuItem, "Select to refresh the cluster view every 30 seconds.");
            #endregion

            this.Status("Please pick a cluster.", StatusKind.OK);
        }