Esempio n. 1
0
        /// <summary>
        /// ロード時処理
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void NPVAMain_Load(object sender, EventArgs e)
        {
            //初期状態で表示されないタブ
            RemoveChartTab();
            RemovePartTab();

            //アナライザー
            analyzer = new Analyzer();
            analyzer.AnalyzingStart += Analyzer_AnalyzingStart;
            analyzer.AnalyzingEnd   += Analyzer_AnalyzingEnd;

            //ソートオブジェクトの準備
            cmbSortType.Items.AddRange(SortOrderEntry.CreateEntries().ToArray());
            cmbSortType.SelectedIndex         = 0;
            cmbSortType.SelectedIndexChanged += (s, a) => updateList();

            //チャートコンストラクタの準備
            cmbChartType.Items.AddRange(Chart.ChartConstructor.CreateConstactors().ToArray());
            if (cmbChartType.Items.Count > 0)
            {
                cmbChartType.SelectedIndex = 0;
            }
            cmbChartType.SelectedIndexChanged += (s, a) => redrawChart();

            //部位別PVアナライザの準備
            cmbPPVAnalyzer.Items.AddRange(PartialPVAnalyzer.CreatePartialPVAnalyzers().ToArray());
            if (cmbPPVAnalyzer.Items.Count > 0)
            {
                cmbPPVAnalyzer.SelectedIndex = 0;
            }

            //IDリスト
            foreach (var aid in analyzer.StoredAuthorInfo)
            {
                cmbUserId.Items.Add(aid);
            }

            //ユーザーの初期表示
            dlvTitleInfo.AuthorSummaryPvSums = Properties.Settings.Default.AuthorSummaryPvLength;
            var defaultAuthor = Properties.Settings.Default.StartupAuthor;

            if (analyzer.StoredAuthorInfo.Contains(defaultAuthor))
            {
                cmbUserId.Text = defaultAuthor;
                analyzer.Load(defaultAuthor);
                updateList();
            }

            //設定変更時イベント
            Properties.Settings.Default.SettingsSaving += Default_SettingsSaving;
        }
Esempio n. 2
0
 /// <summary>
 /// 設定を変更したときの処理
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void Default_SettingsSaving(object sender, CancelEventArgs e)
 {
     //著者情報の設定
     //dlvTitleInfo.AuthorSummaryDiffDays = (no prefference)
     dlvTitleInfo.AuthorSummaryPvSums = Properties.Settings.Default.AuthorSummaryPvLength;
     // チャートコンストラクタを再生成
     cmbChartType.Items.Clear();
     cmbChartType.Items.AddRange(Chart.ChartConstructor.CreateConstactors().ToArray());
     if (cmbChartType.Items.Count > 0)
     {
         cmbChartType.SelectedIndex = 0;
     }
     //部位別PVアナライザの再生成
     cmbPPVAnalyzer.Items.Clear();
     cmbPPVAnalyzer.Items.AddRange(PartialPVAnalyzer.CreatePartialPVAnalyzers().ToArray());
     if (cmbPPVAnalyzer.Items.Count > 0)
     {
         cmbPPVAnalyzer.SelectedIndex = 0;
     }
 }