Ejemplo n.º 1
0
        private async void Form1_Shown(object sender, EventArgs e)
        {
            debug.ProgramCodeInfo.SetDebugQueue();
            //<--refer to https://dobon.net/vb/dotnet/control/doublebuffered.html (Copyright(C) DOBON! MIT) から引用しています
            (typeof(DataGridView)).InvokeMember("DoubleBuffered", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.SetProperty,
                                                null, dgvList, new object[] { true });
            //-->

            this.Form1_Resize(null, null);
            DatePicker.MinDate = DateTime.Now.Date.AddYears(-5);
            DatePicker.MaxDate = DateTime.Now.AddDays(1);
            DatePicker.Value   = DateTime.Now;

            splitMain.Panel1Collapsed  = true;
            splitUpper.Panel2Collapsed = true;
            splitLower.Panel2Collapsed = true;
            ProgressBar1.Visible       = false;
            ProgressLabel1.Visible     = false;
            SettingLoad();
            StatusLabel1.Text = "";
            this.Text         = Application.ProductName + " " + Application.ProductVersion;
            if (browser.Url == null)
            {
                browser.Navigate(toppage);
            }
            disclosures = new Disclosures(setting.Directory, setting.UserAgent, TbVersion.Text);
            if (disclosures.Xbrl.Taxonomy.DicTaxonomy.Count == 0)
            {
                await SetTaxonomyDownloadEvent();
            }
            dgvList.DataSource     = disclosures.DvDocuments;
            dgvContents.DataSource = disclosures.DvContents;
            dgvXbrl.DataSource     = disclosures.TableElements;
            FormatDatagridview();
            if (setting.VersionUp)
            {
                await BackGroundStart(TaskType.VersionUp, Application.ProductVersion + "\t" + setting.VersionPrev);
            }
            this.Refresh();
            DatePicker.Enabled  = true;
            DatePicker.CloseUp += DatePicker_CloseUp;
            timer1.Interval     = (int)(setting.Interval * 60 * 1000);
            TimerCheck();
            if (setting.Timer)
            {
                //タイマーが有効であれば起動直後に当日分メタデータを一度取得
                if (TimerCheck())
                {
                    DatePicker_CloseUp(null, null);
                }
            }
            //この前で上のSplitterDistanceが変更されてしまう 原因不明
            this.splitUpper.SplitterDistance = setting.UpperDistance;
            timer1.Enabled = true;
            debug.ProgramCodeInfo.SetDebugQueue();
        }
Ejemplo n.º 2
0
 private void TbVersion_Leave(object sender, EventArgs e)
 {
     TbVersion.Enabled = false;
     disclosures       = new Disclosures(setting.Directory, setting.UserAgent, TbVersion.Text);
 }
Ejemplo n.º 3
0
 private void Form1_Shown(object sender, EventArgs e)
 {
     disclosures = new Disclosures();
 }