Example #1
0
        public MainWindow()
        {
            InitializeComponent();
            ConfigureReader.Init();
            SQLiteHelper.m_Path          = ConfigureReader.ConfigP.StockDBP.StockDBPath;
            DatePicker_Select_SDate.Text = DateTime.Now.AddDays(-30).ToShortDateString();
            DatePicker_Select_EDate.Text = DateTime.Now.ToShortDateString();

            DataTable tables_info_concept_info = SQLiteHelper.GetDataTable(@"SELECT name FROM concept_info", new SQLiteParameter[0]);

            for (int i = 0; i < tables_info_concept_info.Rows.Count; i++)
            {
                ComboBox_Bankuai_Select.Items.Add(tables_info_concept_info.Rows[i][0].ToString());
            }

            SeriesCollection = new SeriesCollection();
            LineSeries l1 = new LineSeries();

            l1.Values = new ChartValues <double> {
                3, 5, 7, 4
            };
            LineSeries l2 = new LineSeries();

            l2.Values = new ChartValues <double> {
                0.1, 0.2, 0.5
            };
            l2.ScalesYAt = 1;
            SeriesCollection.Add(l1);
            SeriesCollection.Add(l2);
            DataContext = this;

            foreach (string item in Line_Names_1)
            {
                ComBox_Line1.Items.Add(item);
            }

            foreach (string item in Line_Names_2)
            {
                ComBox_Line2.Items.Add(item);
            }

            ComBox_Line1.SelectedIndex = 0;
            ComBox_Line2.SelectedIndex = 0;
        }
Example #2
0
 private void Button_DBSave_Click(object sender, RoutedEventArgs e)
 {
     ConfigureReader.ConfigP.StockDBP.StockDBPath = TextBox_DBPath.Text;
     ConfigureReader.Save();
     MessageBox.Show("save good");
 }