/// <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; }
/// <summary> /// 作品一覧更新 /// </summary> private void updateList() { lstTitles.Items.Clear(); current = analyzer.Current; if (current == null) { return; } var order = cmbSortType.SelectedItem as SortOrderEntry; if (order == null) { order = new SortOrderEntry(); } foreach (var title in order.Order(current.Titles)) { var item = new TitleListEntry(title, order.TitlePicker(title)); lstTitles.Items.Add(item); } lblAuthor.Text = current.Name; ShowUser(); }