public MainForm() { InitializeComponent(); this.ColorSettings(); this.Icon = Properties.Resources.applicationIcon; this.Text = CommonConst.ApplicationName; this.ToolStripMenuItem_ItemSetting_Remove.Enabled = false; // 未実装のため,無効にする。 _dataManager = new DataManager(CommonConst.DBFileName); _spendingOrIncome = 0; _isMenuOpened = false; this.InitButtonArray(); // DBから初期設定情報を読み込む。 _settings = _dataManager.GetMainFormSettings(); this.SetYearControlValueWithoutEventHandler(); // 表示月を変えるとコンボボックスの値を変えたことによるイベントが発生し,イベントハンドラが実行される。 // イベントハンドラの処理により,表示月の家計簿データがDBから読み込まれる。 this.comboBox_Month.SelectedIndex = _settings.month.Month - 1; //this.SetTooltipProperties(); //this.SetButtonProperties(); this.AdjustButtonShape(); this.DrawPlusMark(_dataManager.GetNumberOfKindOfSpendings()); }