Beispiel #1
0
        private void cb_DropDownOpened(object sender, EventArgs e)
        {
            var list_gaps = new List <string>();

            list_settings_sensors = db.GetItems <ModelGaps>();
            foreach (var item in list_settings_sensors)
            {
                list_gaps.Add(item.Name_gaps + " " + item.Array_gaps);
            }
            ComboBoxGaps.ItemsSource = list_gaps;
        }
Beispiel #2
0
        private void Save_Click(object sender, RoutedEventArgs e)
        {
            if (Name_gaps.Text == string.Empty)
            {
                MessageBox.Show("Заповніть поля!", "Network Security Module", MessageBoxButton.OK, MessageBoxImage.Information);
            }
            else
            {
                TextBox txtBox;

                var array_gaps = new List <int>();
                for (var i = 1; i <= count_txtbox + 1; i++)
                {
                    txtBox = (TextBox)GroupBoxCountClient.FindName("txtBox" + i);
                    array_gaps.Add(Convert.ToInt32(txtBox.Text));
                }

                var item_parameter = new ModelGaps()
                {
                    Name_gaps  = Name_gaps.Text,
                    Array_gaps = JsonConvert.SerializeObject(array_gaps)
                };
                db.SaveItem(item_parameter, false);
                ListViewParameter.ItemsSource = db.GetItems <ModelGaps>();
            }
        }
Beispiel #3
0
 public PageSettings()
 {
     InitializeComponent();
     connection = new DataBaseConnection().SQLiteConnection();
     db         = new DataBaseHelp(connection);
     ListViewParameter.ItemsSource = db.GetItems <ModelGaps>();
     ChangeCountTextBox.Gap(GroupBoxCountClient, 1, 4, "txtBox", 7, true);
 }
 private void Param1_cb_DropDownOpened(object sender, EventArgs e)
 {
     itemsParameterCountConnectClients = db.GetItems <ModelTabelParameter>().Where(w => w.Name_parameter.Contains(NameCountConnectClients)).ToList();
     GetNameParameter(itemsParameterCountConnectClients, param1_cb);
 }