Exemplo n.º 1
0
        // TO ADD
        //https://api.lecho.be/services/search/fund?q=lyxor%20s%26p%20&pageSize=10000 -> fonds
        //https://api.lecho.be/services/stocks?quotes=urn:issue:150011694,urn:issue:330188109 -> un fond lyxor
        //https://api.lecho.be/services/search/company-risk?q=saint%20gobin&page=0&pageSize=200&lang=fr -> risk

        public MainForm()
        {
            this.InitializeComponent();

            // Keep default culture (for decimal keyboard usage) but set euro as currency symbol
            //CultureInfo info = new CultureInfo("fr-FR");
            var info = (CultureInfo)Thread.CurrentThread.CurrentCulture.Clone();

            info.NumberFormat.CurrencySymbol          = "€";
            info.NumberFormat.CurrencyNegativePattern = 8;
            info.NumberFormat.CurrencyPositivePattern = 3;
            Thread.CurrentThread.CurrentCulture       = info;

            // Load Theme colors
            this.Theme = new Theme(Theme.ThemeName.Dark);

            this.dataTable = new DataTable();
            this.dataTable.Columns.Add("Market");
            this.dataTable.Columns.Add("Id");
            this.dataTable.Columns.Add("Isin");
            this.dataTable.Columns.Add("Name");
            this.dataTable.Columns.Add("Ticker");
            this.dataTable.Columns.Add("Value", typeof(decimal));
            this.dataTable.Columns.Add("Pct", typeof(decimal));
            this.dataTable.Columns.Add("Highlight", typeof(bool));

            this.stockBindingSource.DataSource = this.dataTable;

            this.LoadFile();

            this.myNotifyIcon.Visible = false;
            this.pictureBox1.Visible  = false;

            List <string> idList = this.StocksInNotifTable.Rows.Cast <DataRow>().Select(x => x["Id"].ToString()).ToList();

            this.notificationWindow = new NotificationWindow(idList, this);

            this.InitializeComboBoxTime();
            this.InitializeComboBoxTheme();
        }