Exemplo n.º 1
0
        public Sqlite_LogTable()
        {
            current = this;
            InitializeComponent();

            foreach (var v in log_type)
            {
                comboBox_type.Items.Add(v);
            }
            foreach (var v in log_action)
            {
                comboBox_action.Items.Add(v);
            }
            foreach (var v in log_result)
            {
                comboBox_result.Items.Add(v);
            }

            comboBox_type.Items.Add("Type");
            comboBox_action.Items.Add("Action");
            comboBox_result.Items.Add("Result");
            comboBox_type.SelectedIndex   = comboBox_type.Items.Count - 1;
            comboBox_action.SelectedIndex = comboBox_action.Items.Count - 1;
            comboBox_result.SelectedIndex = comboBox_result.Items.Count - 1;

            comboBox_type.DataContext   = log_type;
            comboBox_action.DataContext = log_action;
            comboBox_result.DataContext = log_result;

            comboBox_change_count_page.ItemsSource       = arr_cnt_page;
            comboBox_change_count_page.SelectedIndex     = 0;
            comboBox_change_count_page.SelectionChanged += ComboBox_change_count_page_SelectionChanged;
        }
Exemplo n.º 2
0
        public Sqlite_LogTable()
        {
            current = this;
            InitializeComponent();

            foreach (var v in log_type)
            {
                comboBox_type.Items.Add(v);
            }
            foreach (var v in log_action)
            {
                comboBox_action.Items.Add(v);
            }
            foreach (var v in log_result)
            {
                comboBox_result.Items.Add(v);
            }

            comboBox_type.Items.Add("Type");
            comboBox_action.Items.Add("Action");
            comboBox_result.Items.Add("Result");
            comboBox_type.SelectedIndex   = comboBox_type.Items.Count - 1;
            comboBox_action.SelectedIndex = comboBox_action.Items.Count - 1;
            comboBox_result.SelectedIndex = comboBox_result.Items.Count - 1;

            comboBox_type.DataContext   = log_type;
            comboBox_action.DataContext = log_action;
            comboBox_result.DataContext = log_result;

            comboBox_change_count_page.ItemsSource       = arr_cnt_page;
            comboBox_change_count_page.SelectedIndex     = 0;
            comboBox_change_count_page.SelectionChanged += ComboBox_change_count_page_SelectionChanged;

            this.Loaded += (sender, e) => {
                if (!DataBaseInfo.bUpdated)
                {
                    DataBaseInfo.RefreshUi();
                }
            };
            this.IsVisibleChanged += (sender, e) => { if (this.IsVisible && !DataBaseInfo.bUpdated)
                                                      {
                                                          DataBaseInfo.RefreshUi();
                                                      }
            };
        }