Example #1
0
        //private void FillComboColumn()
        //{
        //    DataGridViewComboBoxColumn column = (DataGridViewComboBoxColumn)this.dgvConditions.Columns[2];
        //    column.Items.Add(CConstValue.StringDecimalCondition);
        //    column.Items.Add(CConstValue.DateCondition);
        //}

        private void lstLogSource_ItemChecked(object sender, ItemCheckedEventArgs e)
        {
            this.myTabControl1.SuspendLayout();

            try
            {
                LogShowTabPage page = m_tabPages[Convert.ToString(e.Item.Tag)];
                if (page.Parent == null && e.Item.Checked)
                {
                    page.Parent = this.myTabControl1;
                }
                else
                {
                    page.Parent = null;
                }

                ReCalculateCommonFilter();
            }
            catch (Exception ex)
            {
                MessageBox.Show("设置日志来源失败,错误消息为:" + ex.Message);
            }
            finally
            {
                this.myTabControl1.ResumeLayout();
            }
        }
Example #2
0
        private void InitLogSource()
        {
            this.m_tabPages = new Dictionary <string, LogShowTabPage>();
            this.lstLogSource.Items.Clear();
            m_tabPages = new Dictionary <string, LogShowTabPage>();

            foreach (LogTable lt in m_app.Tables)
            {
                LogShowTabPage page = new LogShowTabPage(lt.Name);
                page.Tag = lt.GUID;
                m_tabPages.Add(lt.GUID, page);
                page.Parent = this.myTabControl1;
                page.ResetCloumns(lt);
                page.AppGuid   = m_app.AppGUID;
                page.TableGuid = lt.GUID;

                ListViewItem lvi = new ListViewItem(lt.Name);
                lvi.Tag     = lt.GUID;
                lvi.Checked = true;

                this.lstLogSource.Items.Add(lvi);
            }
        }