diff --git a/.vs/HouseholdAccountBook/v15/.suo b/.vs/HouseholdAccountBook/v15/.suo index 1b3c0fb..d72ccc5 100644 Binary files a/.vs/HouseholdAccountBook/v15/.suo and b/.vs/HouseholdAccountBook/v15/.suo differ diff --git a/HouseholdAccountBook/App.xaml.cs b/HouseholdAccountBook/App.xaml.cs index 5e8290d..d85e7ad 100644 --- a/HouseholdAccountBook/App.xaml.cs +++ b/HouseholdAccountBook/App.xaml.cs @@ -4,6 +4,7 @@ using System.Collections.Generic; using System.Diagnostics; using System.IO; +using System.Threading; using System.Windows; namespace HouseholdAccountBook @@ -137,7 +138,7 @@ private void Application_Startup(object sender, StartupEventArgs e) obuw.Left = settings.MainWindow_Left + settings.MainWindow_Width / 2 - obuw.Width / 2; obuw.Topmost = true; obuw.Show(); - CreateBackUpFile(); + this.CreateBackUpFile(); obuw.Close(); } }; @@ -152,7 +153,7 @@ private void Application_Startup(object sender, StartupEventArgs e) /// /// private void Application_Exit(object sender, ExitEventArgs e) { - ReleaseMutex(); + this.ReleaseMutex(); } /// diff --git a/HouseholdAccountBook/Behaviors/BindSelectedItemToTreeViewBehavior.cs b/HouseholdAccountBook/Behaviors/BindSelectedItemToTreeViewBehavior.cs index b2d65f2..f7466d1 100644 --- a/HouseholdAccountBook/Behaviors/BindSelectedItemToTreeViewBehavior.cs +++ b/HouseholdAccountBook/Behaviors/BindSelectedItemToTreeViewBehavior.cs @@ -43,8 +43,8 @@ protected override void OnDetaching() /// public object SelectedItem { - get { return GetValue(SelectedItemProperty); } - set { SetValue(SelectedItemProperty, value); } + get { return this.GetValue(SelectedItemProperty); } + set { this.SetValue(SelectedItemProperty, value); } } /// diff --git a/HouseholdAccountBook/Behaviors/BindSelectedItemsToDataGridBehavior.cs b/HouseholdAccountBook/Behaviors/BindSelectedItemsToDataGridBehavior.cs index 5e2fdef..24f8e24 100644 --- a/HouseholdAccountBook/Behaviors/BindSelectedItemsToDataGridBehavior.cs +++ b/HouseholdAccountBook/Behaviors/BindSelectedItemsToDataGridBehavior.cs @@ -46,8 +46,8 @@ protected override void OnDetaching() /// public IList SelectedItems { - get { return (IList)GetValue(SelectedItemsProperty); } - set { SetValue(SelectedItemsProperty, value); } + get { return (IList)this.GetValue(SelectedItemsProperty); } + set { this.SetValue(SelectedItemsProperty, value); } } /// diff --git a/HouseholdAccountBook/Dao/DaoBase.cs b/HouseholdAccountBook/Dao/DaoBase.cs index 1b2e740..9e1344a 100644 --- a/HouseholdAccountBook/Dao/DaoBase.cs +++ b/HouseholdAccountBook/Dao/DaoBase.cs @@ -31,7 +31,7 @@ private bool Open() { try { this.connection.Open(); - while (this.connection.State == System.Data.ConnectionState.Connecting) {; } + while (this.connection.State == System.Data.ConnectionState.Connecting) { ; } return this.connection.State == System.Data.ConnectionState.Open; } diff --git a/HouseholdAccountBook/Dao/DaoNpgsql.cs b/HouseholdAccountBook/Dao/DaoNpgsql.cs index ddbf146..eb0d92d 100644 --- a/HouseholdAccountBook/Dao/DaoNpgsql.cs +++ b/HouseholdAccountBook/Dao/DaoNpgsql.cs @@ -37,7 +37,7 @@ public DaoNpgsql(string uri, int port, string userName, string password, string public override int ExecNonQuery(string sql, params object[] objects) { try { - return CreateCommand(sql, objects).ExecuteNonQuery(); + return this.CreateCommand(sql, objects).ExecuteNonQuery(); } catch (Exception e) { throw e; @@ -55,7 +55,7 @@ public override DaoReader ExecQuery(string sql, params object[] objects) try { LinkedList> resultSet = new LinkedList>(); - NpgsqlCommand command = CreateCommand(sql, objects); + NpgsqlCommand command = this.CreateCommand(sql, objects); using (NpgsqlDataReader reader = command.ExecuteReader()) { // フィールド名の取得 List fieldList = new List(); @@ -66,8 +66,8 @@ public override DaoReader ExecQuery(string sql, params object[] objects) // レコードの取得 while (reader.Read()) { Dictionary result = new Dictionary(); - for (int i = 0; i < fieldList.Count; ++i) { - result.Add(fieldList[i], reader[fieldList[i]]); + foreach (string fieldName in fieldList) { + result.Add(fieldName, reader[fieldName]); } resultSet.AddLast(result); } diff --git a/HouseholdAccountBook/Dao/DaoOle.cs b/HouseholdAccountBook/Dao/DaoOle.cs index f7786b0..7d35116 100644 --- a/HouseholdAccountBook/Dao/DaoOle.cs +++ b/HouseholdAccountBook/Dao/DaoOle.cs @@ -28,14 +28,14 @@ public partial class DaoOle : DaoBase public override int ExecNonQuery(string sql, params object[] objects) { - return CreateCommand(sql, objects).ExecuteNonQuery(); + return this.CreateCommand(sql, objects).ExecuteNonQuery(); } public override DaoReader ExecQuery(string sql, params object[] objects) { LinkedList> resultSet = new LinkedList>(); - OleDbCommand command = CreateCommand(sql, objects); + OleDbCommand command = this.CreateCommand(sql, objects); using (OleDbDataReader reader = command.ExecuteReader()) { // フィールド名の取得 List fieldList = new List(); @@ -46,8 +46,8 @@ public override DaoReader ExecQuery(string sql, params object[] objects) // レコードの取得 while (reader.Read()) { Dictionary result = new Dictionary(); - for (int i = 0; i < fieldList.Count; ++i) { - result.Add(fieldList[i], reader[fieldList[i]]); + foreach (string fieldName in fieldList) { + result.Add(fieldName, reader[fieldName]); } resultSet.AddLast(result); } diff --git a/HouseholdAccountBook/Dao/DaoSQLite.cs b/HouseholdAccountBook/Dao/DaoSQLite.cs index cec3fad..0d59d5d 100644 --- a/HouseholdAccountBook/Dao/DaoSQLite.cs +++ b/HouseholdAccountBook/Dao/DaoSQLite.cs @@ -27,14 +27,14 @@ public partial class DaoSQLite : DaoBase public override int ExecNonQuery(string sql, params object[] objects) { - return CreateCommand(sql, objects).ExecuteNonQuery(); + return this.CreateCommand(sql, objects).ExecuteNonQuery(); } public override DaoReader ExecQuery(string sql, params object[] objects) { LinkedList> resultSet = new LinkedList>(); - SQLiteCommand command = CreateCommand(sql, objects); + SQLiteCommand command = this.CreateCommand(sql, objects); using (SQLiteDataReader reader = command.ExecuteReader()) { // フィールド名の取得 List fieldList = new List(); @@ -45,8 +45,8 @@ public override DaoReader ExecQuery(string sql, params object[] objects) // レコードの取得 while (reader.NextResult()) { Dictionary result = new Dictionary(); - for (int i = 0; i < fieldList.Count; ++i) { - result.Add(fieldList[i], reader[fieldList[i]]); + foreach (string fieldName in fieldList) { + result.Add(fieldName, reader[fieldName]); } resultSet.AddLast(result); } diff --git a/HouseholdAccountBook/UserControls/DateTimePicker.cs b/HouseholdAccountBook/UserControls/DateTimePicker.cs index a449113..ad422e5 100644 --- a/HouseholdAccountBook/UserControls/DateTimePicker.cs +++ b/HouseholdAccountBook/UserControls/DateTimePicker.cs @@ -92,7 +92,7 @@ private void TextBox_PreviewKeyDown(object sender, KeyEventArgs e) case Key.NumPad9: { int input = e.Key - Key.NumPad0; textBox.TextChanged -= this.TextBox_TextChanged; - TryToInputNumber(textBox, dateTimePicker, input); + this.TryToInputNumber(textBox, dateTimePicker, input); textBox.TextChanged += this.TextBox_TextChanged; e.Handled = true; } @@ -109,7 +109,7 @@ private void TextBox_PreviewKeyDown(object sender, KeyEventArgs e) case Key.D9: { int input = e.Key - Key.D0; textBox.TextChanged -= this.TextBox_TextChanged; - TryToInputNumber(textBox, dateTimePicker, input); + this.TryToInputNumber(textBox, dateTimePicker, input); textBox.TextChanged += this.TextBox_TextChanged; e.Handled = true; } @@ -139,7 +139,7 @@ private void TextBox_PreviewKeyDown(object sender, KeyEventArgs e) case Key.Up: { // 選択している箇所の数字をインクリメントする textBox.TextChanged -= this.TextBox_TextChanged; - IncreaceSelectedNumber(textBox, dateTimePicker); + this.IncreaceSelectedNumber(textBox, dateTimePicker); textBox.TextChanged += this.TextBox_TextChanged; e.Handled = true; } @@ -147,7 +147,7 @@ private void TextBox_PreviewKeyDown(object sender, KeyEventArgs e) case Key.Down: { // 選択している箇所の数字をデクリメントする textBox.TextChanged -= this.TextBox_TextChanged; - DecreaceSelectedNumber(textBox, dateTimePicker); + this.DecreaceSelectedNumber(textBox, dateTimePicker); textBox.TextChanged += this.TextBox_TextChanged; e.Handled = true; } @@ -183,10 +183,10 @@ private void TextBox_MouseWheel(object sender, MouseWheelEventArgs e) textBox.TextChanged -= this.TextBox_TextChanged; if (e.Delta < 0) { - DecreaceSelectedNumber(textBox, this); + this.DecreaceSelectedNumber(textBox, this); } else if (e.Delta > 0) { - IncreaceSelectedNumber(textBox, this); + this.IncreaceSelectedNumber(textBox, this); } textBox.TextChanged += this.TextBox_TextChanged; diff --git a/HouseholdAccountBook/UserControls/NumericInputButton.xaml.cs b/HouseholdAccountBook/UserControls/NumericInputButton.xaml.cs index 081b679..2fda8fb 100644 --- a/HouseholdAccountBook/UserControls/NumericInputButton.xaml.cs +++ b/HouseholdAccountBook/UserControls/NumericInputButton.xaml.cs @@ -25,8 +25,8 @@ public partial class NumericInputButton : UserControl, ICommandSource /// public int? InputedValue { - get { return (int?)GetValue(InputedValueProperty); } - set { SetValue(InputedValueProperty, value); } + get { return (int?)this.GetValue(InputedValueProperty); } + set { this.SetValue(InputedValueProperty, value); } } /// @@ -43,8 +43,8 @@ public partial class NumericInputButton : UserControl, ICommandSource /// public InputKind InputedKind { - get { return (InputKind)GetValue(InputedKindProperty); } - set { SetValue(InputedKindProperty, value); } + get { return (InputKind)this.GetValue(InputedKindProperty); } + set { this.SetValue(InputedKindProperty, value); } } /// @@ -61,8 +61,8 @@ public InputKind InputedKind /// public ICommand Command { - get { return (ICommand)GetValue(CommandProperty); } - set { SetValue(CommandProperty, value); } + get { return (ICommand)this.GetValue(CommandProperty); } + set { this.SetValue(CommandProperty, value); } } /// @@ -79,8 +79,8 @@ public ICommand Command /// public object CommandParameter { - get { return GetValue(CommandParameterProperty); } - set { SetValue(CommandParameterProperty, value); } + get { return this.GetValue(CommandParameterProperty); } + set { this.SetValue(CommandParameterProperty, value); } } /// @@ -97,8 +97,8 @@ public object CommandParameter /// public IInputElement CommandTarget { - get { return (IInputElement)GetValue(CommandTargetProperty); } - set { SetValue(CommandTargetProperty, value); } + get { return (IInputElement)this.GetValue(CommandTargetProperty); } + set { this.SetValue(CommandTargetProperty, value); } } #endregion @@ -107,7 +107,7 @@ public IInputElement CommandTarget /// public NumericInputButton() { - InitializeComponent(); + this.InitializeComponent(); } #region イベントハンドラ @@ -124,7 +124,7 @@ private void NumberInputCommand_Executed(object sender, ExecutedRoutedEventArgs this.InputedValue = value; this.InputedKind = InputKind.Number; - CallCommandToExecute(); + this.CallCommandToExecute(); e.Handled = true; } @@ -137,7 +137,7 @@ private void NumberInputCommand_Executed(object sender, ExecutedRoutedEventArgs private void BackSpaceInputCommand_Executed(object sender, ExecutedRoutedEventArgs e) { this.InputedKind = InputKind.BackSpace; - CallCommandToExecute(); + this.CallCommandToExecute(); e.Handled = true; } @@ -150,7 +150,7 @@ private void BackSpaceInputCommand_Executed(object sender, ExecutedRoutedEventAr private void ClearCommand_Executed(object sender, ExecutedRoutedEventArgs e) { this.InputedKind = InputKind.Clear; - CallCommandToExecute(); + this.CallCommandToExecute(); e.Handled = true; } diff --git a/HouseholdAccountBook/UserControls/NumericUpDown.xaml.cs b/HouseholdAccountBook/UserControls/NumericUpDown.xaml.cs index e42e4fe..ccd07eb 100644 --- a/HouseholdAccountBook/UserControls/NumericUpDown.xaml.cs +++ b/HouseholdAccountBook/UserControls/NumericUpDown.xaml.cs @@ -28,8 +28,8 @@ public partial class NumericUpDown : UserControl #region Value public int? Value { - get { return (int?)GetValue(ValueProperty); } - set { SetValue(ValueProperty, value); } + get { return (int?)this.GetValue(ValueProperty); } + set { this.SetValue(ValueProperty, value); } } #endregion @@ -50,8 +50,8 @@ public partial class NumericUpDown : UserControl #region Stride public int Stride { - get { return (int)GetValue(StrideProperty); } - set { SetValue(StrideProperty, value); } + get { return (int)this.GetValue(StrideProperty); } + set { this.SetValue(StrideProperty, value); } } #endregion @@ -71,8 +71,8 @@ public int Stride #region NullValue public int NullValue { - get { return (int)GetValue(NullValueProperty); } - set { SetValue(NullValueProperty, value); } + get { return (int)this.GetValue(NullValueProperty); } + set { this.SetValue(NullValueProperty, value); } } #endregion @@ -93,8 +93,8 @@ public int NullValue #region MaxValue public int MaxValue { - get { return (int)GetValue(MaxValueProperty); } - set { SetValue(MaxValueProperty, value); } + get { return (int)this.GetValue(MaxValueProperty); } + set { this.SetValue(MaxValueProperty, value); } } #endregion @@ -115,8 +115,8 @@ public int MaxValue #region MinValue public int MinValue { - get { return (int)GetValue(MinValueProperty); } - set { SetValue(MinValueProperty, value); } + get { return (int)this.GetValue(MinValueProperty); } + set { this.SetValue(MinValueProperty, value); } } #endregion #endregion @@ -126,7 +126,7 @@ public int MinValue /// public NumericUpDown() { - InitializeComponent(); + this.InitializeComponent(); } #region イベントハンドラ @@ -148,7 +148,7 @@ private void IncreaseCommand_CanExecute(object sender, CanExecuteRoutedEventArgs /// private void IncreaseCommand_Executed(object sender, ExecutedRoutedEventArgs e) { - IncreaceNumber(); + this.IncreaceNumber(); e.Handled = true; } @@ -169,7 +169,7 @@ private void DecreaseCommand_CanExecute(object sender, CanExecuteRoutedEventArgs /// private void DecreaseCommand_Executed(object sender, ExecutedRoutedEventArgs e) { - DecreaceNumber(); + this.DecreaceNumber(); e.Handled = true; } @@ -288,10 +288,10 @@ private void TextBox_GotFocus(object sender, RoutedEventArgs e) private void TextBox_MouseWheel(object sender, MouseWheelEventArgs e) { if (e.Delta > 0) { - IncreaceNumber(); + this.IncreaceNumber(); } else if (e.Delta < 0) { - DecreaceNumber(); + this.DecreaceNumber(); } } diff --git a/HouseholdAccountBook/ViewModels/ActionVIewModel.cs b/HouseholdAccountBook/ViewModels/ActionVIewModel.cs index 9a29f6e..3902bf3 100644 --- a/HouseholdAccountBook/ViewModels/ActionVIewModel.cs +++ b/HouseholdAccountBook/ViewModels/ActionVIewModel.cs @@ -67,7 +67,7 @@ public class ActionViewModel : BindableBase, IMultiSelectable public bool IsMatch { get { return this._IsMatch; } - set { SetProperty(ref this._IsMatch, value); } + set { this.SetProperty(ref this._IsMatch, value); } } private bool _IsMatch = default(bool); #endregion @@ -79,7 +79,7 @@ public bool IsMatch public bool IsSelected { get { return this._IsSelected; } - set { SetProperty(ref this._IsSelected, value); } + set { this.SetProperty(ref this._IsSelected, value); } } private bool _IsSelected = default(bool); #endregion diff --git a/HouseholdAccountBook/ViewModels/BookSettingViewModel.cs b/HouseholdAccountBook/ViewModels/BookSettingViewModel.cs index edd085d..a405a3a 100644 --- a/HouseholdAccountBook/ViewModels/BookSettingViewModel.cs +++ b/HouseholdAccountBook/ViewModels/BookSettingViewModel.cs @@ -23,7 +23,7 @@ public class BookSettingViewModel : BindableBase public string Name { get { return this._Name; } - set { SetProperty(ref this._Name, value); } + set { this.SetProperty(ref this._Name, value); } } private string _Name = default(string); #endregion @@ -40,9 +40,9 @@ public BookKind SelectedBookKind { get { return this._SelectedBookKind; } set { - SetProperty(ref this._SelectedBookKind, value); - UpdateNeedToPay(); - UpdateCsvDataExists(); + this.SetProperty(ref this._SelectedBookKind, value); + this.UpdateNeedToPay(); + this.UpdateCsvDataExists(); } } private BookKind _SelectedBookKind = BookKind.Uncategorized; @@ -55,7 +55,7 @@ public BookKind SelectedBookKind public int InitialValue { get { return this._InitialValue; } - set { SetProperty(ref this._InitialValue, value); } + set { this.SetProperty(ref this._InitialValue, value); } } private int _InitialValue = 0; #endregion @@ -68,7 +68,7 @@ public int InitialValue public bool NeedToPay { get { return this._NeedToPay; } - private set { SetProperty(ref this._NeedToPay, value); } + private set { this.SetProperty(ref this._NeedToPay, value); } } private bool _NeedToPay = default(bool); #endregion @@ -80,7 +80,7 @@ public bool NeedToPay public ObservableCollection DebitBookVMList { get { return this._DebitBookVMList; } - set { SetProperty(ref this._DebitBookVMList, value); } + set { this.SetProperty(ref this._DebitBookVMList, value); } } private ObservableCollection _DebitBookVMList = default(ObservableCollection); #endregion @@ -91,7 +91,7 @@ public ObservableCollection DebitBookVMList public BookViewModel SelectedDebitBookVM { get { return this._SelectedDebitBookVM; } - set { SetProperty(ref this._SelectedDebitBookVM, value); } + set { this.SetProperty(ref this._SelectedDebitBookVM, value); } } private BookViewModel _SelectedDebitBookVM = default(BookViewModel); #endregion @@ -103,7 +103,7 @@ public BookViewModel SelectedDebitBookVM public int? PayDay { get { return this._PayDay; } - set { SetProperty(ref this._PayDay, value); } + set { this.SetProperty(ref this._PayDay, value); } } private int? _PayDay = default(int?); #endregion @@ -117,7 +117,7 @@ public BookViewModel SelectedDebitBookVM public bool CsvDataExists { get { return this._CsvDataExists; } - private set { SetProperty(ref this._CsvDataExists, value); } + private set { this.SetProperty(ref this._CsvDataExists, value); } } private bool _CsvDataExists = default(bool); #endregion @@ -129,7 +129,7 @@ public bool CsvDataExists public int? ActDateIndex { get { return this._ActDateIndex; } - set { SetProperty(ref this._ActDateIndex, value); } + set { this.SetProperty(ref this._ActDateIndex, value); } } private int? _ActDateIndex = default(int?); #endregion @@ -141,7 +141,7 @@ public bool CsvDataExists public int? OutgoIndex { get { return this._OutgoIndex; } - set { SetProperty(ref this._OutgoIndex, value); } + set { this.SetProperty(ref this._OutgoIndex, value); } } private int? _OutgoIndex = default(int?); #endregion @@ -153,7 +153,7 @@ public bool CsvDataExists public int? ItemNameIndex { get { return this._ItemNameIndex; } - set { SetProperty(ref this._ItemNameIndex, value); } + set { this.SetProperty(ref this._ItemNameIndex, value); } } private int? _ItemNameIndex = default(int?); #endregion @@ -166,7 +166,7 @@ public bool CsvDataExists public ObservableCollection RelationVMList { get { return this._RelationVMList; } - set { SetProperty(ref this._RelationVMList, value); } + set { this.SetProperty(ref this._RelationVMList, value); } } private ObservableCollection _RelationVMList = default(ObservableCollection); #endregion @@ -177,7 +177,7 @@ public ObservableCollection RelationVMList public RelationViewModel SelectedRelationVM { get { return this._SelectedRelationVM; } - set { SetProperty(ref this._SelectedRelationVM, value); } + set { this.SetProperty(ref this._SelectedRelationVM, value); } } private RelationViewModel _SelectedRelationVM = default(RelationViewModel); #endregion diff --git a/HouseholdAccountBook/ViewModels/CsvComparisonViewModel.CsvRecord.cs b/HouseholdAccountBook/ViewModels/CsvComparisonViewModel.CsvRecord.cs index 4a0f15f..5b8165a 100644 --- a/HouseholdAccountBook/ViewModels/CsvComparisonViewModel.CsvRecord.cs +++ b/HouseholdAccountBook/ViewModels/CsvComparisonViewModel.CsvRecord.cs @@ -17,7 +17,7 @@ public class CsvRecord : BindableBase public DateTime Date { get { return this._Date; } - set { SetProperty(ref this._Date, value); } + set { this.SetProperty(ref this._Date, value); } } private DateTime _Date = default(DateTime); #endregion @@ -29,7 +29,7 @@ public DateTime Date public int Value { get { return this._Value; } - set { SetProperty(ref this._Value, value); } + set { this.SetProperty(ref this._Value, value); } } private int _Value = default(int); #endregion @@ -41,7 +41,7 @@ public int Value public string Name { get { return this._Name; } - set { SetProperty(ref this._Name, value); } + set { this.SetProperty(ref this._Name, value); } } private string _Name = default(string); #endregion diff --git a/HouseholdAccountBook/ViewModels/CsvComparisonViewModel.cs b/HouseholdAccountBook/ViewModels/CsvComparisonViewModel.cs index f048327..452c1a8 100644 --- a/HouseholdAccountBook/ViewModels/CsvComparisonViewModel.cs +++ b/HouseholdAccountBook/ViewModels/CsvComparisonViewModel.cs @@ -15,7 +15,7 @@ public partial class CsvComparisonViewModel : BindableBase public int? ActionId { get { return this._ActionId; } - set { SetProperty(ref this._ActionId, value); } + set { this.SetProperty(ref this._ActionId, value); } } private int? _ActionId = default(int?); #endregion @@ -27,7 +27,7 @@ public partial class CsvComparisonViewModel : BindableBase public string ItemName { get { return this._ItemName; } - set { SetProperty(ref this._ItemName, value); } + set { this.SetProperty(ref this._ItemName, value); } } private string _ItemName = default(string); #endregion @@ -39,7 +39,7 @@ public string ItemName public string ShopName { get { return this._ShopName; } - set { SetProperty(ref this._ShopName, value); } + set { this.SetProperty(ref this._ShopName, value); } } private string _ShopName = default(string); #endregion @@ -51,7 +51,7 @@ public string ShopName public string Remark { get { return this._Remark; } - set { SetProperty(ref this._Remark, value); } + set { this.SetProperty(ref this._Remark, value); } } private string _Remark = default(string); #endregion @@ -63,7 +63,7 @@ public string Remark public bool IsMatch { get { return this._IsMatch; } - set { SetProperty(ref this._IsMatch, value); } + set { this.SetProperty(ref this._IsMatch, value); } } private bool _IsMatch = default(bool); #endregion @@ -75,7 +75,7 @@ public bool IsMatch public CsvRecord Record { get { return this._Record; } - set { SetProperty(ref this._Record, value); } + set { this.SetProperty(ref this._Record, value); } } private CsvRecord _Record = default(CsvRecord); #endregion diff --git a/HouseholdAccountBook/ViewModels/DateValueViewModel.cs b/HouseholdAccountBook/ViewModels/DateValueViewModel.cs index 2a4c0a0..f4a35f7 100644 --- a/HouseholdAccountBook/ViewModels/DateValueViewModel.cs +++ b/HouseholdAccountBook/ViewModels/DateValueViewModel.cs @@ -23,7 +23,7 @@ public class DateValueViewModel : BindableBase { get { return this._ActValue; } set { - if (SetProperty(ref this._ActValue, value)) { + if (this.SetProperty(ref this._ActValue, value)) { CommandManager.InvalidateRequerySuggested(); } } diff --git a/HouseholdAccountBook/ViewModels/HierarchicalItemViewModel.cs b/HouseholdAccountBook/ViewModels/HierarchicalItemViewModel.cs index 0d306f0..73c17a1 100644 --- a/HouseholdAccountBook/ViewModels/HierarchicalItemViewModel.cs +++ b/HouseholdAccountBook/ViewModels/HierarchicalItemViewModel.cs @@ -32,7 +32,7 @@ public partial class HierarchicalItemViewModel : BindableBase, IMultiSelectable public string Name { get { return this._Name; } - set { SetProperty(ref this._Name, value); } + set { this.SetProperty(ref this._Name, value); } } private string _Name = default(string); #endregion @@ -44,7 +44,7 @@ public string Name public bool IsSelected { get { return this._IsSelected; } - set { SetProperty(ref this._IsSelected, value); } + set { this.SetProperty(ref this._IsSelected, value); } } private bool _IsSelected = default(bool); #endregion @@ -56,7 +56,7 @@ public bool IsSelected public ObservableCollection ChildrenVMList { get { return this._ChildrenVMList; } - set { SetProperty(ref this._ChildrenVMList, value); } + set { this.SetProperty(ref this._ChildrenVMList, value); } } private ObservableCollection _ChildrenVMList = default(ObservableCollection); #endregion @@ -68,7 +68,7 @@ public ObservableCollection ChildrenVMList public ObservableCollection RelationVMList { get { return this._RelationVMList; } - set { SetProperty(ref this._RelationVMList, value); } + set { this.SetProperty(ref this._RelationVMList, value); } } private ObservableCollection _RelationVMList = default(ObservableCollection); #endregion @@ -79,7 +79,7 @@ public ObservableCollection RelationVMList public RelationViewModel SelectedRelationVM { get { return this._SelectedRelationVM; } - set { SetProperty(ref this._SelectedRelationVM, value); } + set { this.SetProperty(ref this._SelectedRelationVM, value); } } private RelationViewModel _SelectedRelationVM = default(RelationViewModel); #endregion @@ -91,7 +91,7 @@ public RelationViewModel SelectedRelationVM public ObservableCollection ShopNameList { get { return this._ShopNameList; } - set { SetProperty(ref this._ShopNameList, value); } + set { this.SetProperty(ref this._ShopNameList, value); } } private ObservableCollection _ShopNameList = default(ObservableCollection); #endregion @@ -102,7 +102,7 @@ public ObservableCollection ShopNameList public string SelectedShopName { get { return this._SelectedShopName; } - set { SetProperty(ref this._SelectedShopName, value); } + set { this.SetProperty(ref this._SelectedShopName, value); } } private string _SelectedShopName = default(string); #endregion @@ -114,7 +114,7 @@ public string SelectedShopName public ObservableCollection RemarkList { get { return this._RemarkList; } - set { SetProperty(ref this._RemarkList, value); } + set { this.SetProperty(ref this._RemarkList, value); } } private ObservableCollection _RemarkList = default(ObservableCollection); #endregion @@ -125,7 +125,7 @@ public ObservableCollection RemarkList public string SelectedRemark { get { return this._SelectedRemark; } - set { SetProperty(ref this._SelectedRemark, value); } + set { this.SetProperty(ref this._SelectedRemark, value); } } private string _SelectedRemark = default(string); #endregion diff --git a/HouseholdAccountBook/ViewModels/RelationViewModel.cs b/HouseholdAccountBook/ViewModels/RelationViewModel.cs index 5f0b264..abd12a6 100644 --- a/HouseholdAccountBook/ViewModels/RelationViewModel.cs +++ b/HouseholdAccountBook/ViewModels/RelationViewModel.cs @@ -15,7 +15,7 @@ public class RelationViewModel : BindableBase public bool IsRelated { get { return this._IsRelated; } - set { SetProperty(ref this._IsRelated, value); } + set { this.SetProperty(ref this._IsRelated, value); } } private bool _IsRelated = default(bool); #endregion diff --git a/HouseholdAccountBook/ViewModels/SeriesItemViewModel.cs b/HouseholdAccountBook/ViewModels/SeriesItemViewModel.cs index d9483f8..d8621df 100644 --- a/HouseholdAccountBook/ViewModels/SeriesItemViewModel.cs +++ b/HouseholdAccountBook/ViewModels/SeriesItemViewModel.cs @@ -15,7 +15,7 @@ public class SeriesItemViewModel : BindableBase public int Value { get { return this._Value; } - set { SetProperty(ref this._Value, value); } + set { this.SetProperty(ref this._Value, value); } } private int _Value = default(int); #endregion @@ -27,7 +27,7 @@ public int Value public int Number { get { return this._Number; } - set { SetProperty(ref this._Number, value); } + set { this.SetProperty(ref this._Number, value); } } private int _Number = default(int); #endregion @@ -39,7 +39,7 @@ public int Number public int ItemId { get { return this._ItemId; } - set { SetProperty(ref this._ItemId, value); } + set { this.SetProperty(ref this._ItemId, value); } } private int _ItemId = default(int); #endregion @@ -51,7 +51,7 @@ public int ItemId public int CategoryId { get { return this._CategoryId; } - set { SetProperty(ref this._CategoryId, value); } + set { this.SetProperty(ref this._CategoryId, value); } } private int _CategoryId = default(int); #endregion diff --git a/HouseholdAccountBook/ViewModels/UserControlViewModel/NumericUpDownViewModel.cs b/HouseholdAccountBook/ViewModels/UserControlViewModel/NumericUpDownViewModel.cs index cdfb7ce..3368cb7 100644 --- a/HouseholdAccountBook/ViewModels/UserControlViewModel/NumericUpDownViewModel.cs +++ b/HouseholdAccountBook/ViewModels/UserControlViewModel/NumericUpDownViewModel.cs @@ -23,7 +23,7 @@ class NumericUpDownViewModel : BindableBase public int? InputedValue { get { return this._InputedValue; } - set { SetProperty(ref this._InputedValue, value); } + set { this.SetProperty(ref this._InputedValue, value); } } private int? _InputedValue = default(int?); #endregion @@ -35,7 +35,7 @@ class NumericUpDownViewModel : BindableBase public NumericInputButton.InputKind InputedKind { get { return this._InputedKind; } - set { SetProperty(ref this._InputedKind, value); } + set { this.SetProperty(ref this._InputedKind, value); } } private NumericInputButton.InputKind _InputedKind = default(NumericInputButton.InputKind); #endregion @@ -47,7 +47,7 @@ public NumericInputButton.InputKind InputedKind public bool IsOpen { get { return this._IsOpen; } - set { SetProperty(ref this._IsOpen, value); } + set { this.SetProperty(ref this._IsOpen, value); } } private bool _IsOpen = default(bool); #endregion @@ -61,7 +61,7 @@ public bool NumericUpDownFocused get { return this._NumericUpDownFocused; } set { this._NumericUpDownFocused = value; - SetIsOpen(); + this.SetIsOpen(); } } private bool _NumericUpDownFocused = default(bool); @@ -76,7 +76,7 @@ public bool PopupFocused get { return this._PopupFocused; } set { this._PopupFocused = value; - SetIsOpen(); + this.SetIsOpen(); } } private bool _PopupFocused = default(bool); diff --git a/HouseholdAccountBook/ViewModels/WindowViewModel/ActionListRegistrationWindowViewModel.cs b/HouseholdAccountBook/ViewModels/WindowViewModel/ActionListRegistrationWindowViewModel.cs index 8416597..d9cd618 100644 --- a/HouseholdAccountBook/ViewModels/WindowViewModel/ActionListRegistrationWindowViewModel.cs +++ b/HouseholdAccountBook/ViewModels/WindowViewModel/ActionListRegistrationWindowViewModel.cs @@ -57,7 +57,7 @@ public RegistrationMode RegMode public ObservableCollection BookVMList { get { return this._BookVMList; } - set { SetProperty(ref this._BookVMList, value); } + set { this.SetProperty(ref this._BookVMList, value); } } private ObservableCollection _BookVMList = default(ObservableCollection); #endregion @@ -69,7 +69,7 @@ public BookViewModel SelectedBookVM { get { return this._SelectedBookVM; } set { - if (SetProperty(ref this._SelectedBookVM, value)) { + if (this.SetProperty(ref this._SelectedBookVM, value)) { if (!this.isUpdateOnChanged) { this.isUpdateOnChanged = true; BookChanged?.Invoke(); @@ -96,7 +96,7 @@ public BalanceKind SelectedBalanceKind { get { return this._SelectedBalanceKind; } set { - if (SetProperty(ref this._SelectedBalanceKind, value)) { + if (this.SetProperty(ref this._SelectedBalanceKind, value)) { if (!this.isUpdateOnChanged) { this.isUpdateOnChanged = true; BalanceKindChanged?.Invoke(); @@ -115,7 +115,7 @@ public BalanceKind SelectedBalanceKind public ObservableCollection CategoryVMList { get { return this._CategoryVMList; } - set { SetProperty(ref this._CategoryVMList, value); } + set { this.SetProperty(ref this._CategoryVMList, value); } } private ObservableCollection _CategoryVMList = default(ObservableCollection); #endregion @@ -127,7 +127,7 @@ public CategoryViewModel SelectedCategoryVM { get { return this._SelectedCategoryVM; } set { - if (SetProperty(ref this._SelectedCategoryVM, value)) { + if (this.SetProperty(ref this._SelectedCategoryVM, value)) { if (!this.isUpdateOnChanged) { this.isUpdateOnChanged = true; CategoryChanged?.Invoke(); @@ -146,7 +146,7 @@ public CategoryViewModel SelectedCategoryVM public ObservableCollection ItemVMList { get { return this._ItemVMList; } - set { SetProperty(ref this._ItemVMList, value); } + set { this.SetProperty(ref this._ItemVMList, value); } } private ObservableCollection _ItemVMList = default(ObservableCollection); #endregion @@ -158,7 +158,7 @@ public ItemViewModel SelectedItemVM { get { return this._SelectedItemVM; } set { - if (SetProperty(ref this._SelectedItemVM, value)) { + if (this.SetProperty(ref this._SelectedItemVM, value)) { if (!this.isUpdateOnChanged) { this.isUpdateOnChanged = true; ItemChanged?.Invoke(); @@ -177,7 +177,7 @@ public ItemViewModel SelectedItemVM public ObservableCollection DateValueVMList { get { return this._DateValueVMList; } - set { SetProperty(ref this._DateValueVMList, value); } + set { this.SetProperty(ref this._DateValueVMList, value); } } private ObservableCollection _DateValueVMList = new ObservableCollection(); #endregion @@ -189,7 +189,7 @@ public ObservableCollection DateValueVMList public bool IsEditing { get { return this._IsEditing; } - set { SetProperty(ref this._IsEditing, value); } + set { this.SetProperty(ref this._IsEditing, value); } } private bool _IsEditing = default(bool); #endregion @@ -201,7 +201,7 @@ public bool IsEditing public ObservableCollection ShopNameList { get { return this._ShopNameList; } - set { SetProperty(ref this._ShopNameList, value); } + set { this.SetProperty(ref this._ShopNameList, value); } } private ObservableCollection _ShopNameList = default(ObservableCollection); #endregion @@ -212,7 +212,7 @@ public ObservableCollection ShopNameList public string SelectedShopName { get { return this._SelectedShopName; } - set { SetProperty(ref this._SelectedShopName, value); } + set { this.SetProperty(ref this._SelectedShopName, value); } } private string _SelectedShopName = default(string); #endregion @@ -224,7 +224,7 @@ public string SelectedShopName public ObservableCollection RemarkList { get { return this._RemarkList; } - set { SetProperty(ref this._RemarkList, value); } + set { this.SetProperty(ref this._RemarkList, value); } } private ObservableCollection _RemarkList = default(ObservableCollection); #endregion @@ -235,7 +235,7 @@ public ObservableCollection RemarkList public string SelectedRemark { get { return this._SelectedRemark; } - set { SetProperty(ref this._SelectedRemark, value); } + set { this.SetProperty(ref this._SelectedRemark, value); } } private string _SelectedRemark = default(string); #endregion diff --git a/HouseholdAccountBook/ViewModels/WindowViewModel/ActionRegistrationWindowViewModel.cs b/HouseholdAccountBook/ViewModels/WindowViewModel/ActionRegistrationWindowViewModel.cs index 35ce5c1..a7946ec 100644 --- a/HouseholdAccountBook/ViewModels/WindowViewModel/ActionRegistrationWindowViewModel.cs +++ b/HouseholdAccountBook/ViewModels/WindowViewModel/ActionRegistrationWindowViewModel.cs @@ -46,7 +46,7 @@ public class ActionRegistrationWindowViewModel : BindableBase public RegistrationMode RegMode { get { return this._RegMode; } - set { SetProperty(ref this._RegMode, value); } + set { this.SetProperty(ref this._RegMode, value); } } private RegistrationMode _RegMode = default(RegistrationMode); #endregion @@ -58,7 +58,7 @@ public RegistrationMode RegMode public ObservableCollection BookVMList { get { return this._BookVMList; } - set { SetProperty(ref this._BookVMList, value); } + set { this.SetProperty(ref this._BookVMList, value); } } private ObservableCollection _BookVMList = default(ObservableCollection); #endregion @@ -70,7 +70,7 @@ public BookViewModel SelectedBookVM { get { return this._SelectedBookVM; } set { - if (SetProperty(ref this._SelectedBookVM, value)) { + if (this.SetProperty(ref this._SelectedBookVM, value)) { if (!this.isUpdateOnChanged) { this.isUpdateOnChanged = true; BookChanged?.Invoke(); @@ -91,7 +91,7 @@ public DateTime SelectedDate { get { return this._SelectedDate; } set { - if (SetProperty(ref this._SelectedDate, value)) { + if (this.SetProperty(ref this._SelectedDate, value)) { CommandManager.InvalidateRequerySuggested(); } } @@ -113,7 +113,7 @@ public BalanceKind SelectedBalanceKind { get { return this._SelectedBalanceKind; } set { - if (SetProperty(ref this._SelectedBalanceKind, value)) { + if (this.SetProperty(ref this._SelectedBalanceKind, value)) { if (!this.isUpdateOnChanged) { this.isUpdateOnChanged = true; BalanceKindChanged?.Invoke(); @@ -132,7 +132,7 @@ public BalanceKind SelectedBalanceKind public ObservableCollection CategoryVMList { get { return this._CategoryVMList; } - set { SetProperty(ref this._CategoryVMList, value); } + set { this.SetProperty(ref this._CategoryVMList, value); } } private ObservableCollection _CategoryVMList = default(ObservableCollection); #endregion @@ -144,7 +144,7 @@ public CategoryViewModel SelectedCategoryVM { get { return this._SelectedCategoryVM; } set { - if (SetProperty(ref this._SelectedCategoryVM, value)) { + if (this.SetProperty(ref this._SelectedCategoryVM, value)) { if (!this.isUpdateOnChanged) { this.isUpdateOnChanged = true; CategoryChanged?.Invoke(); @@ -163,7 +163,7 @@ public CategoryViewModel SelectedCategoryVM public ObservableCollection ItemVMList { get { return this._ItemVMList; } - set { SetProperty(ref this._ItemVMList, value); } + set { this.SetProperty(ref this._ItemVMList, value); } } private ObservableCollection _ItemVMList = default(ObservableCollection); #endregion @@ -175,7 +175,7 @@ public ItemViewModel SelectedItemVM { get { return this._SelectedItemVM; } set { - if (SetProperty(ref this._SelectedItemVM, value)) { + if (this.SetProperty(ref this._SelectedItemVM, value)) { if (!this.isUpdateOnChanged) { this.isUpdateOnChanged = true; ItemChanged?.Invoke(); @@ -195,7 +195,7 @@ public ItemViewModel SelectedItemVM { get { return this._Value; } set { - if (SetProperty(ref this._Value, value)) { + if (this.SetProperty(ref this._Value, value)) { CommandManager.InvalidateRequerySuggested(); } } @@ -210,7 +210,7 @@ public ItemViewModel SelectedItemVM public ObservableCollection ShopNameList { get { return this._ShopNameList; } - set { SetProperty(ref this._ShopNameList, value); } + set { this.SetProperty(ref this._ShopNameList, value); } } private ObservableCollection _ShopNameList = default(ObservableCollection); #endregion @@ -221,7 +221,7 @@ public ObservableCollection ShopNameList public string SelectedShopName { get { return this._SelectedShopName; } - set { SetProperty(ref this._SelectedShopName, value); } + set { this.SetProperty(ref this._SelectedShopName, value); } } private string _SelectedShopName = default(string); #endregion @@ -233,7 +233,7 @@ public string SelectedShopName public ObservableCollection RemarkList { get { return this._RemarkList; } - set { SetProperty(ref this._RemarkList, value); } + set { this.SetProperty(ref this._RemarkList, value); } } private ObservableCollection _RemarkList = default(ObservableCollection); #endregion @@ -244,7 +244,7 @@ public ObservableCollection RemarkList public string SelectedRemark { get { return this._SelectedRemark; } - set { SetProperty(ref this._SelectedRemark, value); } + set { this.SetProperty(ref this._SelectedRemark, value); } } private string _SelectedRemark = default(string); #endregion @@ -257,7 +257,7 @@ public int Count { get { return this._Count; } set { - if (SetProperty(ref this._Count, value)) { + if (this.SetProperty(ref this._Count, value)) { CommandManager.InvalidateRequerySuggested(); } } @@ -271,7 +271,7 @@ public int Count public bool IsLink { get { return this._IsLink; } - set { SetProperty(ref this._IsLink, value); } + set { this.SetProperty(ref this._IsLink, value); } } private bool _IsLink = default(bool); #endregion @@ -288,7 +288,7 @@ public bool IsLink public HolidaySettingKind SelectedHolidaySettingKind { get { return this._SelectedHolidaySettingKind; } - set { SetProperty(ref this._SelectedHolidaySettingKind, value); } + set { this.SetProperty(ref this._SelectedHolidaySettingKind, value); } } private HolidaySettingKind _SelectedHolidaySettingKind = HolidaySettingKind.Nothing; #endregion @@ -300,7 +300,7 @@ public HolidaySettingKind SelectedHolidaySettingKind public bool IsMatch { get { return this._IsMatch; } - set { SetProperty(ref this._IsMatch, value); } + set { this.SetProperty(ref this._IsMatch, value); } } private bool _IsMatch = default(bool); #endregion diff --git a/HouseholdAccountBook/ViewModels/WindowViewModel/CsvComparisonWindowViewModel.cs b/HouseholdAccountBook/ViewModels/WindowViewModel/CsvComparisonWindowViewModel.cs index 88320a3..d716a87 100644 --- a/HouseholdAccountBook/ViewModels/WindowViewModel/CsvComparisonWindowViewModel.cs +++ b/HouseholdAccountBook/ViewModels/WindowViewModel/CsvComparisonWindowViewModel.cs @@ -16,7 +16,7 @@ public class CsvComparisonWindowViewModel : BindableBase public string CsvFileName { get { return this._CsvFileName; } - set { SetProperty(ref this._CsvFileName, value); } + set { this.SetProperty(ref this._CsvFileName, value); } } private string _CsvFileName = default(string); #endregion @@ -28,7 +28,7 @@ public string CsvFileName public ObservableCollection BookVMList { get { return this._BookVMList; } - set { SetProperty(ref this._BookVMList, value); } + set { this.SetProperty(ref this._BookVMList, value); } } private ObservableCollection _BookVMList = default(ObservableCollection); #endregion @@ -39,7 +39,7 @@ public ObservableCollection BookVMList public BookComparisonViewModel SelectedBookVM { get { return this._SelectedBookVM; } - set { SetProperty(ref this._SelectedBookVM, value); } + set { this.SetProperty(ref this._SelectedBookVM, value); } } private BookComparisonViewModel _SelectedBookVM = new BookComparisonViewModel() { }; #endregion @@ -51,7 +51,7 @@ public BookComparisonViewModel SelectedBookVM public ObservableCollection CsvComparisonVMList { get { return this._CsvComparisonVMList; } - set { SetProperty(ref this._CsvComparisonVMList, value); } + set { this.SetProperty(ref this._CsvComparisonVMList, value); } } private ObservableCollection _CsvComparisonVMList = new ObservableCollection(); #endregion @@ -62,7 +62,7 @@ public ObservableCollection CsvComparisonVMList public CsvComparisonViewModel SelectedCsvComparisonVM { get { return this._SelectedCsvComparisonVM; } - set { SetProperty(ref this._SelectedCsvComparisonVM, value); } + set { this.SetProperty(ref this._SelectedCsvComparisonVM, value); } } private CsvComparisonViewModel _SelectedCsvComparisonVM = default(CsvComparisonViewModel); #endregion diff --git a/HouseholdAccountBook/ViewModels/WindowViewModel/DbSettingWindowViewModel.cs b/HouseholdAccountBook/ViewModels/WindowViewModel/DbSettingWindowViewModel.cs index eb28118..fcef7b7 100644 --- a/HouseholdAccountBook/ViewModels/WindowViewModel/DbSettingWindowViewModel.cs +++ b/HouseholdAccountBook/ViewModels/WindowViewModel/DbSettingWindowViewModel.cs @@ -15,7 +15,7 @@ public class DbSettingWindowViewModel : BindableBase public string Message { get { return this._Message; } - set { SetProperty(ref this._Message, value); } + set { this.SetProperty(ref this._Message, value); } } private string _Message = default(string); #endregion @@ -27,7 +27,7 @@ public string Message public string Host { get { return this._Host; } - set { SetProperty(ref this._Host, value); } + set { this.SetProperty(ref this._Host, value); } } private string _Host = default(string); #endregion @@ -39,7 +39,7 @@ public string Host public int Port { get { return this._Port; } - set { SetProperty(ref this._Port, value); } + set { this.SetProperty(ref this._Port, value); } } private int _Port = default(int); #endregion @@ -51,7 +51,7 @@ public int Port public string UserName { get { return this._UserName; } - set { SetProperty(ref this._UserName, value); } + set { this.SetProperty(ref this._UserName, value); } } private string _UserName = default(string); #endregion @@ -63,7 +63,7 @@ public string UserName public string Password { get { return this._Password; } - set { SetProperty(ref this._Password, value); } + set { this.SetProperty(ref this._Password, value); } } private string _Password = default(string); #endregion @@ -75,7 +75,7 @@ public string Password public string DatabaseName { get { return this._DatabaseName; } - set { SetProperty(ref this._DatabaseName, value); } + set { this.SetProperty(ref this._DatabaseName, value); } } private string _DatabaseName = default(string); #endregion @@ -87,7 +87,7 @@ public string DatabaseName public string Role { get { return this._Role; } - set { SetProperty(ref this._Role, value); } + set { this.SetProperty(ref this._Role, value); } } private string _Role = default(string); #endregion @@ -99,7 +99,7 @@ public string Role public string DumpExePath { get { return this._DumpExePath; } - set { SetProperty(ref this._DumpExePath, value); } + set { this.SetProperty(ref this._DumpExePath, value); } } private string _DumpExePath = default(string); #endregion @@ -111,7 +111,7 @@ public string DumpExePath public string RestoreExePath { get { return this._RestoreExePath; } - set { SetProperty(ref this._RestoreExePath, value); } + set { this.SetProperty(ref this._RestoreExePath, value); } } private string _RestoreExePath = default(string); #endregion diff --git a/HouseholdAccountBook/ViewModels/WindowViewModel/MainWindowViewModel.cs b/HouseholdAccountBook/ViewModels/WindowViewModel/MainWindowViewModel.cs index 8f745d4..db99ab7 100644 --- a/HouseholdAccountBook/ViewModels/WindowViewModel/MainWindowViewModel.cs +++ b/HouseholdAccountBook/ViewModels/WindowViewModel/MainWindowViewModel.cs @@ -29,7 +29,7 @@ public int SelectedTabIndex { get { return this._SelectedTabIndex; } set { - if (SetProperty(ref this._SelectedTabIndex, value)) { + if (this.SetProperty(ref this._SelectedTabIndex, value)) { this.SelectedTab = (Tabs)value; } } @@ -44,7 +44,7 @@ public Tabs SelectedTab { get { return this._SelectedTab; } set { - if (SetProperty(ref this._SelectedTab, value)) { + if (this.SetProperty(ref this._SelectedTab, value)) { this.SelectedTabIndex = (int)value; } } @@ -59,7 +59,7 @@ public Tabs SelectedTab public ObservableCollection BookVMList { get { return this._BookVMList; } - set { SetProperty(ref this._BookVMList, value); } + set { this.SetProperty(ref this._BookVMList, value); } } private ObservableCollection _BookVMList = default(ObservableCollection); #endregion @@ -70,7 +70,7 @@ public ObservableCollection BookVMList public BookViewModel SelectedBookVM { get { return this._SelectedBookVM; } - set { SetProperty(ref this._SelectedBookVM, value); } + set { this.SetProperty(ref this._SelectedBookVM, value); } } private BookViewModel _SelectedBookVM; #endregion @@ -127,7 +127,7 @@ public TermKind DisplayedTermKind } } if(oldDisplayedMonth != this.DisplayedMonth) { - RaisePropertyChanged(); + this.RaisePropertyChanged(); } } } @@ -142,8 +142,8 @@ public DateTime StartDate { get { return this._StartDate; } set { - SetProperty(ref this._StartDate, value); - RaisePropertyChanged(nameDisplayedMonth); + this.SetProperty(ref this._StartDate, value); + this.RaisePropertyChanged(nameDisplayedMonth); } } private DateTime _StartDate = DateTime.Now.GetFirstDateOfMonth(); @@ -156,8 +156,8 @@ public DateTime EndDate { get { return this._EndDate; } set { - SetProperty(ref this._EndDate, value); - RaisePropertyChanged(nameDisplayedMonth); + this.SetProperty(ref this._EndDate, value); + this.RaisePropertyChanged(nameDisplayedMonth); } } private DateTime _EndDate = DateTime.Now.GetFirstDateOfMonth().AddMonths(1).AddMilliseconds(-1); @@ -171,8 +171,8 @@ public ObservableCollection ActionVMList { get { return this._ActionVMList; } set { - SetProperty(ref this._ActionVMList, value); - UpdateDisplayedActionVMList(); + this.SetProperty(ref this._ActionVMList, value); + this.UpdateDisplayedActionVMList(); } } private ObservableCollection _ActionVMList = default(ObservableCollection); @@ -184,7 +184,7 @@ public ObservableCollection ActionVMList public ObservableCollection DisplayedActionVMList { get { return this._DisplayedActionVMList; } - set { SetProperty(ref this._DisplayedActionVMList, value); } + set { this.SetProperty(ref this._DisplayedActionVMList, value); } } private ObservableCollection _DisplayedActionVMList = default(ObservableCollection); #endregion @@ -196,7 +196,7 @@ public ObservableCollection DisplayedActionVMList public ActionViewModel SelectedActionVM { get { return this._SelectedActionVM; } - set { SetProperty(ref this._SelectedActionVM, value); } + set { this.SetProperty(ref this._SelectedActionVM, value); } } private ActionViewModel _SelectedActionVM = default(ActionViewModel); #endregion @@ -214,7 +214,7 @@ public ActionViewModel SelectedActionVM public DateTime? ActDateLastEdited { get { return this._ActDateLastEdited; } - set { SetProperty(ref this._ActDateLastEdited, value); } + set { this.SetProperty(ref this._ActDateLastEdited, value); } } private DateTime? _ActDateLastEdited = null; #endregion @@ -226,7 +226,7 @@ public ActionViewModel SelectedActionVM public double? AverageValue { get { return this._AverageValue; } - private set { SetProperty(ref this._AverageValue, value); } + private set { this.SetProperty(ref this._AverageValue, value); } } private double? _AverageValue = default(double?); #endregion @@ -237,7 +237,7 @@ public ActionViewModel SelectedActionVM public int Amount { get { return this._Amount; } - set { SetProperty(ref this._Amount, value); } + set { this.SetProperty(ref this._Amount, value); } } private int _Amount = default(int); #endregion @@ -248,7 +248,7 @@ public int Amount public int? SumValue { get { return this._SumValue; } - private set { SetProperty(ref this._SumValue, value); } + private set { this.SetProperty(ref this._SumValue, value); } } private int? _SumValue = default(int?); #endregion @@ -261,8 +261,8 @@ public ObservableCollection SummaryVMList { get { return this._SummaryVMList; } set { - SetProperty(ref this._SummaryVMList, value); - UpdateDisplayedActionVMList(); + this.SetProperty(ref this._SummaryVMList, value); + this.UpdateDisplayedActionVMList(); } } private ObservableCollection _SummaryVMList; @@ -275,8 +275,8 @@ public SummaryViewModel SelectedSummaryVM { get { return this._SelectedSummaryVM; } set { - SetProperty(ref this._SelectedSummaryVM, value); - UpdateDisplayedActionVMList(); + this.SetProperty(ref this._SelectedSummaryVM, value); + this.UpdateDisplayedActionVMList(); } } private SummaryViewModel _SelectedSummaryVM = default(SummaryViewModel); @@ -336,7 +336,7 @@ public DateTime DisplayedYear get { return this._DisplayedYear; } set { DateTime oldDisplayedYear = this._DisplayedYear; - if (SetProperty(ref this._DisplayedYear, value)) { + if (this.SetProperty(ref this._DisplayedYear, value)) { if (!this.onUpdateDisplayedDate) { int startMonth = Properties.Settings.Default.App_StartMonth; int yearDiff = value.GetFirstDateOfFiscalYear(startMonth).Year - oldDisplayedYear.GetFirstDateOfFiscalYear(startMonth).Year; @@ -372,7 +372,7 @@ public DateTime DisplayedYear public ObservableCollection DisplayedMonths { get { return this._DisplayedMonths; } - set { SetProperty(ref this._DisplayedMonths, value); } + set { this.SetProperty(ref this._DisplayedMonths, value); } } private ObservableCollection _DisplayedMonths = default(ObservableCollection); #endregion @@ -384,7 +384,7 @@ public ObservableCollection DisplayedMonths public ObservableCollection MonthlySummaryVMList { get { return this._MonthlySummaryVMList; } - set { SetProperty(ref this._MonthlySummaryVMList, value); } + set { this.SetProperty(ref this._MonthlySummaryVMList, value); } } private ObservableCollection _MonthlySummaryVMList = default(ObservableCollection); #endregion @@ -400,7 +400,7 @@ public ObservableCollection MonthlySummaryVMList public ObservableCollection DisplayedYears { get { return this._DisplayedYears; } - set { SetProperty(ref this._DisplayedYears, value); } + set { this.SetProperty(ref this._DisplayedYears, value); } } private ObservableCollection _DisplayedYears = default(ObservableCollection); #endregion @@ -412,7 +412,7 @@ public ObservableCollection DisplayedYears public ObservableCollection YearlySummaryVMList { get { return this._YearlySummaryVMList; } - set { SetProperty(ref this._YearlySummaryVMList, value); } + set { this.SetProperty(ref this._YearlySummaryVMList, value); } } private ObservableCollection _YearlySummaryVMList = default(ObservableCollection); #endregion @@ -435,7 +435,7 @@ public ObservableCollection YearlySummaryVMList public GraphKind SelectedGraphKind { get { return this._SelectedGraphKind; } - set { SetProperty(ref this._SelectedGraphKind, value); } + set { this.SetProperty(ref this._SelectedGraphKind, value); } } private GraphKind _SelectedGraphKind = default(GraphKind); #endregion @@ -447,7 +447,7 @@ public GraphKind SelectedGraphKind public PlotModel WholeItemDailyGraphModel { get { return this._WholeItemDailyGraphModel; } - set { SetProperty(ref this._WholeItemDailyGraphModel, value); } + set { this.SetProperty(ref this._WholeItemDailyGraphModel, value); } } private PlotModel _WholeItemDailyGraphModel = new PlotModel() { Title = "日別グラフ", @@ -466,7 +466,7 @@ public PlotModel WholeItemDailyGraphModel public PlotModel SelectedItemDailyGraphModel { get { return this._SelectedItemDailyGraphModel; } - set { SetProperty(ref this._SelectedItemDailyGraphModel, value); } + set { this.SetProperty(ref this._SelectedItemDailyGraphModel, value); } } private PlotModel _SelectedItemDailyGraphModel = new PlotModel() { Title = "個別グラフ", @@ -485,7 +485,7 @@ public PlotModel SelectedItemDailyGraphModel public PlotModel WholeItemMonthlyGraphModel { get { return this._WholeItemMonthlyGraphModel; } - set { SetProperty(ref this._WholeItemMonthlyGraphModel, value); } + set { this.SetProperty(ref this._WholeItemMonthlyGraphModel, value); } } private PlotModel _WholeItemMonthlyGraphModel = new PlotModel() { Title = "月別グラフ", @@ -504,7 +504,7 @@ public PlotModel WholeItemMonthlyGraphModel public PlotModel SelectedItemMonthlyGraphModel { get { return this._SelectedItemMonthlyGraphModel; } - set { SetProperty(ref this._SelectedItemMonthlyGraphModel, value); } + set { this.SetProperty(ref this._SelectedItemMonthlyGraphModel, value); } } private PlotModel _SelectedItemMonthlyGraphModel = new PlotModel() { Title = "個別グラフ", @@ -523,7 +523,7 @@ public PlotModel SelectedItemMonthlyGraphModel public PlotModel WholeItemYearlyGraphModel { get { return this._WholeItemYearlyGraphModel; } - set { SetProperty(ref this._WholeItemYearlyGraphModel, value); } + set { this.SetProperty(ref this._WholeItemYearlyGraphModel, value); } } private PlotModel _WholeItemYearlyGraphModel = new PlotModel() { Title = "年別グラフ", @@ -542,7 +542,7 @@ public PlotModel WholeItemYearlyGraphModel public PlotModel SelectedItemYearlyGraphModel { get { return this._SelectedItemYearlyGraphModel; } - set { SetProperty(ref this._SelectedItemYearlyGraphModel, value); } + set { this.SetProperty(ref this._SelectedItemYearlyGraphModel, value); } } private PlotModel _SelectedItemYearlyGraphModel = new PlotModel() { Title = "個別グラフ", @@ -561,7 +561,7 @@ public PlotModel SelectedItemYearlyGraphModel public PlotController Controller { get { return this._Controller; } - set { SetProperty(ref this._Controller, value); } + set { this.SetProperty(ref this._Controller, value); } } private PlotController _Controller = new PlotController(); #endregion @@ -587,7 +587,7 @@ public bool IsDebug /// public MainWindowViewModel() { - this.SelectedActionVMList.CollectionChanged += (sender, e) => UpdateStatisticsValue(); + this.SelectedActionVMList.CollectionChanged += (sender, e) => this.UpdateStatisticsValue(); this.Controller.BindMouseEnter(PlotCommands.HoverPointsOnlyTrack); } } diff --git a/HouseholdAccountBook/ViewModels/WindowViewModel/MoveRegistrationWindowViewModel.cs b/HouseholdAccountBook/ViewModels/WindowViewModel/MoveRegistrationWindowViewModel.cs index 716384e..e95e17d 100644 --- a/HouseholdAccountBook/ViewModels/WindowViewModel/MoveRegistrationWindowViewModel.cs +++ b/HouseholdAccountBook/ViewModels/WindowViewModel/MoveRegistrationWindowViewModel.cs @@ -46,7 +46,7 @@ public class MoveRegistrationWindowViewModel : BindableBase public RegistrationMode RegMode { get { return this._RegMode; } - set { SetProperty(ref this._RegMode, value); } + set { this.SetProperty(ref this._RegMode, value); } } private RegistrationMode _RegMode = default(RegistrationMode); #endregion @@ -59,7 +59,7 @@ public DateTime MovedDate { get { return this._MovedDate; } set { - if (SetProperty(ref this._MovedDate, value)) { + if (this.SetProperty(ref this._MovedDate, value)) { CommandManager.InvalidateRequerySuggested(); if(this.MovingDate < value) { @@ -78,7 +78,7 @@ public DateTime MovingDate { get { return this._MovingDate; } set { - if (SetProperty(ref this._MovingDate, value)) { + if (this.SetProperty(ref this._MovingDate, value)) { CommandManager.InvalidateRequerySuggested(); if (value < this.MovedDate) { @@ -97,7 +97,7 @@ public DateTime MovingDate public ObservableCollection BookVMList { get { return this._BookVMList; } - set { SetProperty(ref this._BookVMList, value); } + set { this.SetProperty(ref this._BookVMList, value); } } private ObservableCollection _BookVMList = default(ObservableCollection); #endregion @@ -109,7 +109,7 @@ public BookViewModel MovedBookVM { get { return this._MovedBookVM; } set { - if (SetProperty(ref this._MovedBookVM, value)) { + if (this.SetProperty(ref this._MovedBookVM, value)) { if (!this.isUpdateOnChanged) { this.isUpdateOnChanged = true; FromBookChanged?.Invoke(); @@ -128,7 +128,7 @@ public BookViewModel MovingBookVM { get { return this._MovingBookVM; } set { - if (SetProperty(ref this._MovingBookVM, value)) { + if (this.SetProperty(ref this._MovingBookVM, value)) { if (!this.isUpdateOnChanged) { this.isUpdateOnChanged = true; ToBookChanged?.Invoke(); @@ -148,7 +148,7 @@ public BookViewModel MovingBookVM { get { return this._Value; } set { - if (SetProperty(ref this._Value, value)) { + if (this.SetProperty(ref this._Value, value)) { CommandManager.InvalidateRequerySuggested(); } } @@ -170,7 +170,7 @@ public CommissionKind SelectedCommissionKind { get { return this._SelectedCommissionKind; } set { - if (SetProperty(ref this._SelectedCommissionKind, value)) { + if (this.SetProperty(ref this._SelectedCommissionKind, value)) { if (!this.isUpdateOnChanged) { this.isUpdateOnChanged = true; CommissionKindChanged?.Invoke(); @@ -189,7 +189,7 @@ public CommissionKind SelectedCommissionKind public ObservableCollection ItemVMList { get { return this._ItemVMList; } - set { SetProperty(ref this._ItemVMList, value); } + set { this.SetProperty(ref this._ItemVMList, value); } } private ObservableCollection _ItemVMList = default(ObservableCollection); #endregion @@ -201,7 +201,7 @@ public ItemViewModel SelectedItemVM { get { return this._SelectedItemVM; } set { - if (SetProperty(ref this._SelectedItemVM, value)) { + if (this.SetProperty(ref this._SelectedItemVM, value)) { if (!this.isUpdateOnChanged) { this.isUpdateOnChanged = true; ItemChanged?.Invoke(); @@ -221,7 +221,7 @@ public ItemViewModel SelectedItemVM { get { return this._Commission; } set { - if (SetProperty(ref this._Commission, value)) { + if (this.SetProperty(ref this._Commission, value)) { CommandManager.InvalidateRequerySuggested(); } } @@ -236,7 +236,7 @@ public ItemViewModel SelectedItemVM public ObservableCollection RemarkList { get { return this._RemarkList; } - set { SetProperty(ref this._RemarkList, value); } + set { this.SetProperty(ref this._RemarkList, value); } } private ObservableCollection _RemarkList = default(ObservableCollection); #endregion @@ -247,7 +247,7 @@ public ObservableCollection RemarkList public string SelectedRemark { get { return this._SelectedRemark; } - set { SetProperty(ref this._SelectedRemark, value); } + set { this.SetProperty(ref this._SelectedRemark, value); } } private string _SelectedRemark = default(string); #endregion diff --git a/HouseholdAccountBook/ViewModels/WindowViewModel/SettingsWindowViewModel.cs b/HouseholdAccountBook/ViewModels/WindowViewModel/SettingsWindowViewModel.cs index 4b08ef7..fb5a183 100644 --- a/HouseholdAccountBook/ViewModels/WindowViewModel/SettingsWindowViewModel.cs +++ b/HouseholdAccountBook/ViewModels/WindowViewModel/SettingsWindowViewModel.cs @@ -28,7 +28,7 @@ public int SelectedTabIndex { get { return this._SelectedTabIndex; } set { - if (SetProperty(ref this._SelectedTabIndex, value)) { + if (this.SetProperty(ref this._SelectedTabIndex, value)) { this.SelectedTab = (SettingsTabs)value; } } @@ -43,7 +43,7 @@ public SettingsTabs SelectedTab { get { return this._SelectedTab; } set { - if (SetProperty(ref this._SelectedTab, value)) { + if (this.SetProperty(ref this._SelectedTab, value)) { this.SelectedTabIndex = (int)value; } } @@ -59,7 +59,7 @@ public SettingsTabs SelectedTab public ObservableCollection HierachicalItemVMList { get { return this._HierachicalItemVMList; } - set { SetProperty(ref this._HierachicalItemVMList, value); } + set { this.SetProperty(ref this._HierachicalItemVMList, value); } } private ObservableCollection _HierachicalItemVMList = default(ObservableCollection); #endregion @@ -71,7 +71,7 @@ public ObservableCollection HierachicalItemVMList public HierarchicalItemViewModel SelectedItemVM { get { return this._SelectedItemVM; } - set { SetProperty(ref this._SelectedItemVM, value); } + set { this.SetProperty(ref this._SelectedItemVM, value); } } private HierarchicalItemViewModel _SelectedItemVM = default(HierarchicalItemViewModel); #endregion @@ -85,7 +85,7 @@ public HierarchicalItemViewModel SelectedItemVM public ObservableCollection BookVMList { get { return this._BookVMList; } - set { SetProperty(ref this._BookVMList, value); } + set { this.SetProperty(ref this._BookVMList, value); } } private ObservableCollection _BookVMList = default(ObservableCollection); #endregion @@ -97,7 +97,7 @@ public ObservableCollection BookVMList public BookSettingViewModel SelectedBookVM { get { return this._SelectedBookVM; } - set { SetProperty(ref this._SelectedBookVM, value); } + set { this.SetProperty(ref this._SelectedBookVM, value); } } private BookSettingViewModel _SelectedBookVM = default(BookSettingViewModel); #endregion @@ -112,7 +112,7 @@ public string DumpExePath { get { return this._DumpExePath; } set { - if (SetProperty(ref this._DumpExePath, value) && this.WithSave) { + if (this.SetProperty(ref this._DumpExePath, value) && this.WithSave) { this.settings.App_Postgres_DumpExePath = value; this.settings.Save(); } @@ -129,7 +129,7 @@ public string RestoreExePath { get { return this._RestoreExePath; } set { - if (SetProperty(ref this._RestoreExePath, value) && this.WithSave) { + if (this.SetProperty(ref this._RestoreExePath, value) && this.WithSave) { this.settings.App_Postgres_RestoreExePath = value; this.settings.Save(); } @@ -146,7 +146,7 @@ public int BackUpNum { get { return this._BackUpNum; } set { - if (SetProperty(ref this._BackUpNum, value) && this.WithSave) { + if (this.SetProperty(ref this._BackUpNum, value) && this.WithSave) { this.settings.App_BackUpNum = value; this.settings.Save(); } @@ -163,7 +163,7 @@ public string BackUpFolderPath { get { return this._BackUpFolderPath; } set { - if (SetProperty(ref this._BackUpFolderPath, value) && this.WithSave) { + if (this.SetProperty(ref this._BackUpFolderPath, value) && this.WithSave) { this.settings.App_BackUpFolderPath = value; this.settings.Save(); } @@ -180,7 +180,7 @@ public int StartMonth { get { return this._StartMonth; } set { - if (SetProperty(ref this._StartMonth, value) && this.WithSave) { + if (this.SetProperty(ref this._StartMonth, value) && this.WithSave) { this.settings.App_StartMonth = value; this.settings.Save(); } diff --git a/HouseholdAccountBook/ViewModels/WindowViewModel/TermWindowViewModel.cs b/HouseholdAccountBook/ViewModels/WindowViewModel/TermWindowViewModel.cs index cb56fe1..9f17bea 100644 --- a/HouseholdAccountBook/ViewModels/WindowViewModel/TermWindowViewModel.cs +++ b/HouseholdAccountBook/ViewModels/WindowViewModel/TermWindowViewModel.cs @@ -17,7 +17,7 @@ public class TermWindowViewModel : BindableBase public DateTime StartDate { get { return this._StartDate; } - set { SetProperty(ref this._StartDate, value); } + set { this.SetProperty(ref this._StartDate, value); } } private DateTime _StartDate = DateTime.Now; #endregion @@ -29,7 +29,7 @@ public DateTime StartDate public DateTime EndDate { get { return this._EndDate; } - set { SetProperty(ref this._EndDate, value); } + set { this.SetProperty(ref this._EndDate, value); } } private DateTime _EndDate = DateTime.Now; #endregion diff --git a/HouseholdAccountBook/Windows/ActionListRegistrationWindow.xaml.cs b/HouseholdAccountBook/Windows/ActionListRegistrationWindow.xaml.cs index e38190f..800ec1a 100644 --- a/HouseholdAccountBook/Windows/ActionListRegistrationWindow.xaml.cs +++ b/HouseholdAccountBook/Windows/ActionListRegistrationWindow.xaml.cs @@ -57,7 +57,7 @@ public ActionListRegistrationWindow(DaoBuilder builder, int? bookId, DateTime? s this.builder = builder; this.selectedDateTime = selectedDateTime; - InitializeComponent(); + this.InitializeComponent(); ObservableCollection bookVMList = new ObservableCollection(); BookViewModel selectedBookVM = null; @@ -81,34 +81,34 @@ public ActionListRegistrationWindow(DaoBuilder builder, int? bookId, DateTime? s DateTime dateTime = selectedDateTime ?? DateTime.Today; this.WVM.DateValueVMList.Add(new DateValueViewModel() { ActDate = dateTime }); - UpdateCategoryList(); - UpdateItemList(); - UpdateShopList(); - UpdateRemarkList(); + this.UpdateCategoryList(); + this.UpdateItemList(); + this.UpdateShopList(); + this.UpdateRemarkList(); - LoadSetting(); + this.LoadSetting(); #region イベントハンドラの設定 this.WVM.BookChanged += () => { - UpdateCategoryList(); - UpdateItemList(); - UpdateShopList(); - UpdateRemarkList(); + this.UpdateCategoryList(); + this.UpdateItemList(); + this.UpdateShopList(); + this.UpdateRemarkList(); }; this.WVM.BalanceKindChanged += () => { - UpdateCategoryList(); - UpdateItemList(); - UpdateShopList(); - UpdateRemarkList(); + this.UpdateCategoryList(); + this.UpdateItemList(); + this.UpdateShopList(); + this.UpdateRemarkList(); }; this.WVM.CategoryChanged += () => { - UpdateItemList(); - UpdateShopList(); - UpdateRemarkList(); + this.UpdateItemList(); + this.UpdateShopList(); + this.UpdateRemarkList(); }; this.WVM.ItemChanged += () => { - UpdateShopList(); - UpdateRemarkList(); + this.UpdateShopList(); + this.UpdateRemarkList(); }; #endregion } @@ -142,7 +142,7 @@ private void RegisterCommand_Executed(object sender, ExecutedRoutedEventArgs e) } // DB登録 - List idList = RegisterToDb(); + List idList = this.RegisterToDb(); // MainWindow更新 Registrated?.Invoke(this, new EventArgs>(idList ?? new List())); @@ -245,7 +245,7 @@ private void ButtonInputCommand_Executed(object sender, ExecutedRoutedEventArgs /// private void ActionListRegistrationWindow_Closed(object sender, EventArgs e) { - SaveSetting(); + this.SaveSetting(); } /// diff --git a/HouseholdAccountBook/Windows/ActionRegistrationWindow.xaml.cs b/HouseholdAccountBook/Windows/ActionRegistrationWindow.xaml.cs index 98a89a6..11c19b2 100644 --- a/HouseholdAccountBook/Windows/ActionRegistrationWindow.xaml.cs +++ b/HouseholdAccountBook/Windows/ActionRegistrationWindow.xaml.cs @@ -50,7 +50,7 @@ public ActionRegistrationWindow(DaoBuilder builder, int? bookId, DateTime? selec { this.builder = builder; - InitializeComponent(); + this.InitializeComponent(); this.WVM.RegMode = RegistrationMode.Add; this.actionId = null; @@ -75,34 +75,34 @@ public ActionRegistrationWindow(DaoBuilder builder, int? bookId, DateTime? selec this.WVM.SelectedDate = selectedDateTime != null ? selectedDateTime.Value : DateTime.Today; this.WVM.SelectedBalanceKind = BalanceKind.Outgo; - UpdateCategoryList(); - UpdateItemList(); - UpdateShopList(); - UpdateRemarkList(); + this.UpdateCategoryList(); + this.UpdateItemList(); + this.UpdateShopList(); + this.UpdateRemarkList(); - LoadSetting(); + this.LoadSetting(); #region イベントハンドラの設定 this.WVM.BookChanged += () => { - UpdateCategoryList(); - UpdateItemList(); - UpdateShopList(); - UpdateRemarkList(); + this.UpdateCategoryList(); + this.UpdateItemList(); + this.UpdateShopList(); + this.UpdateRemarkList(); }; this.WVM.BalanceKindChanged += () => { - UpdateCategoryList(); - UpdateItemList(); - UpdateShopList(); - UpdateRemarkList(); + this.UpdateCategoryList(); + this.UpdateItemList(); + this.UpdateShopList(); + this.UpdateRemarkList(); }; this.WVM.CategoryChanged += () => { - UpdateItemList(); - UpdateShopList(); - UpdateRemarkList(); + this.UpdateItemList(); + this.UpdateShopList(); + this.UpdateRemarkList(); }; this.WVM.ItemChanged += () => { - UpdateShopList(); - UpdateRemarkList(); + this.UpdateShopList(); + this.UpdateRemarkList(); }; #endregion } @@ -117,7 +117,7 @@ public ActionRegistrationWindow(DaoBuilder builder, int actionId, RegistrationMo { this.builder = builder; - InitializeComponent(); + this.InitializeComponent(); this.WVM.RegMode = mode; switch (this.WVM.RegMode) { @@ -186,34 +186,34 @@ FROM hst_action this.WVM.Count = count; this.WVM.IsMatch = isMatch; - UpdateCategoryList(); - UpdateItemList(itemId); - UpdateShopList(shopName); - UpdateRemarkList(remark); + this.UpdateCategoryList(); + this.UpdateItemList(itemId); + this.UpdateShopList(shopName); + this.UpdateRemarkList(remark); - LoadSetting(); + this.LoadSetting(); #region イベントハンドラの設定 this.WVM.BookChanged += () => { - UpdateCategoryList(); - UpdateItemList(); - UpdateShopList(); - UpdateRemarkList(); + this.UpdateCategoryList(); + this.UpdateItemList(); + this.UpdateShopList(); + this.UpdateRemarkList(); }; this.WVM.BalanceKindChanged += () => { - UpdateCategoryList(); - UpdateItemList(); - UpdateShopList(); - UpdateRemarkList(); + this.UpdateCategoryList(); + this.UpdateItemList(); + this.UpdateShopList(); + this.UpdateRemarkList(); }; this.WVM.CategoryChanged += () => { - UpdateItemList(); - UpdateShopList(); - UpdateRemarkList(); + this.UpdateItemList(); + this.UpdateShopList(); + this.UpdateRemarkList(); }; this.WVM.ItemChanged += () => { - UpdateShopList(); - UpdateRemarkList(); + this.UpdateShopList(); + this.UpdateRemarkList(); }; #endregion } @@ -263,7 +263,7 @@ private void ContinueToRegisterCommand_Executed(object sender, ExecutedRoutedEve } // DB登録 - int? id = RegisterToDb(); + int? id = this.RegisterToDb(); // MainWindow更新 List value = id != null ? new List() { id.Value } : new List(); @@ -297,7 +297,7 @@ private void RegisterCommand_Executed(object sender, ExecutedRoutedEventArgs e) } // DB登録 - int? id = RegisterToDb(); + int? id = this.RegisterToDb(); // MainWindow更新 List value = id != null ? new List() { id.Value } : new List(); @@ -326,7 +326,7 @@ private void CancelCommand_Executed(object sender, ExecutedRoutedEventArgs e) /// private void ActionRegistrationWindow_Closed(object sender, EventArgs e) { - SaveSetting(); + this.SaveSetting(); } #endregion diff --git a/HouseholdAccountBook/Windows/CsvComparisonWindow.xaml.cs b/HouseholdAccountBook/Windows/CsvComparisonWindow.xaml.cs index 5a5c912..dca6fff 100644 --- a/HouseholdAccountBook/Windows/CsvComparisonWindow.xaml.cs +++ b/HouseholdAccountBook/Windows/CsvComparisonWindow.xaml.cs @@ -48,10 +48,10 @@ public CsvComparisonWindow(DaoBuilder builder, int? bookId) { this.builder = builder; - InitializeComponent(); + this.InitializeComponent(); - UpdateBookList(bookId); - LoadSetting(); + this.UpdateBookList(bookId); + this.LoadSetting(); } #region イベントハンドラ @@ -139,7 +139,7 @@ private void OpenCsvFilesCommand_Executed(object sender, ExecutedRoutedEventArgs } this.csvCompDataGrid.ScrollToTop(); - UpdateComparisonInfo(); + this.UpdateComparisonInfo(); this.Cursor = cCursor; } @@ -164,7 +164,7 @@ private void EditActionCommand_Executed(object sender, ExecutedRoutedEventArgs e { ActionRegistrationWindow arw = new ActionRegistrationWindow(this.builder, this.WVM.SelectedCsvComparisonVM.ActionId.Value); arw.Registrated += (sender2, e2) => { - UpdateComparisonInfo(); + this.UpdateComparisonInfo(); }; arw.ShowDialog(); } @@ -206,7 +206,7 @@ UPDATE hst_action } }); } - UpdateComparisonInfo(); + this.UpdateComparisonInfo(); this.Cursor = cursor; } @@ -231,7 +231,7 @@ private void UpdateCommand_Executed(object sender, ExecutedRoutedEventArgs e) Cursor cCursor = this.Cursor; this.Cursor = Cursors.Wait; - UpdateComparisonInfo(); + this.UpdateComparisonInfo(); this.Cursor = cCursor; } @@ -266,7 +266,7 @@ private void ChangeIsMatchCommand_Executed(object sender, ExecutedRoutedEventArg { CsvComparisonViewModel vm = (this.WVM.SelectedCsvComparisonVM = (e.OriginalSource as CheckBox)?.DataContext as CsvComparisonViewModel); if (vm.ActionId.HasValue) { - ChangeIsMatch(vm.ActionId.Value, vm.IsMatch); + this.ChangeIsMatch(vm.ActionId.Value, vm.IsMatch); } } #endregion @@ -278,7 +278,7 @@ private void ChangeIsMatchCommand_Executed(object sender, ExecutedRoutedEventArg /// private void CsvComparisonWindow_Closed(object sender, EventArgs e) { - SaveSetting(); + this.SaveSetting(); } /// @@ -294,7 +294,7 @@ private void CheckBox_MouseEnter(object sender, MouseEventArgs e) CsvComparisonViewModel vm = (this.WVM.SelectedCsvComparisonVM = checkBox?.DataContext as CsvComparisonViewModel); if (vm.ActionId.HasValue) { - ChangeIsMatch(vm.ActionId.Value, vm.IsMatch); + this.ChangeIsMatch(vm.ActionId.Value, vm.IsMatch); } } } diff --git a/HouseholdAccountBook/Windows/DbSettingWindow.xaml.cs b/HouseholdAccountBook/Windows/DbSettingWindow.xaml.cs index 66f05bc..179a445 100644 --- a/HouseholdAccountBook/Windows/DbSettingWindow.xaml.cs +++ b/HouseholdAccountBook/Windows/DbSettingWindow.xaml.cs @@ -18,7 +18,7 @@ public partial class DbSettingWindow : Window /// 表示メッセージ public DbSettingWindow(string message) { - InitializeComponent(); + this.InitializeComponent(); Properties.Settings settings = Properties.Settings.Default; this.WVM.Message = message; diff --git a/HouseholdAccountBook/Windows/MainWindow.xaml.cs b/HouseholdAccountBook/Windows/MainWindow.xaml.cs index fb8afae..6a62032 100644 --- a/HouseholdAccountBook/Windows/MainWindow.xaml.cs +++ b/HouseholdAccountBook/Windows/MainWindow.xaml.cs @@ -44,22 +44,22 @@ public MainWindow(DaoBuilder builder) { this.builder = builder; - InitializeComponent(); + this.InitializeComponent(); // 帳簿リスト更新 - UpdateBookList(Properties.Settings.Default.MainWindow_SelectedBookId); + this.UpdateBookList(Properties.Settings.Default.MainWindow_SelectedBookId); // 日別データ更新 - UpdateBookTabData(isScroll: true, isUpdateActDateLastEdited: true); - InitializeDailyGraphTabData(); - UpdateDailyGraphTabData(); + this.UpdateBookTabData(isScroll: true, isUpdateActDateLastEdited: true); + this.InitializeDailyGraphTabData(); + this.UpdateDailyGraphTabData(); // 月別データ更新 - UpdateMonthlyListTabData(); - InitializeMonthlyGraphTabData(); - UpdateMonthlyGraphTabData(); + this.UpdateMonthlyListTabData(); + this.InitializeMonthlyGraphTabData(); + this.UpdateMonthlyGraphTabData(); - LoadSetting(); + this.LoadSetting(); } #region イベントハンドラ @@ -302,11 +302,11 @@ private void ImportKichoHugetsuDbCommand_Executed(object sender, ExecutedRoutedE } if (isOpen) { - UpdateBookList(); - UpdateBookTabData(isScroll: true, isUpdateActDateLastEdited: true); - UpdateDailyGraphTabData(); - UpdateMonthlyListTabData(); - UpdateMonthlyGraphTabData(); + this.UpdateBookList(); + this.UpdateBookTabData(isScroll: true, isUpdateActDateLastEdited: true); + this.UpdateDailyGraphTabData(); + this.UpdateMonthlyListTabData(); + this.UpdateMonthlyGraphTabData(); this.Cursor = cCursor; @@ -407,11 +407,11 @@ private void ImportCustomFileCommand_Excuted(object sender, ExecutedRoutedEventA if (process.ExitCode == 0) { // 画面を更新する - UpdateBookList(); - UpdateBookTabData(isScroll: true, isUpdateActDateLastEdited: true); - UpdateDailyGraphTabData(); - UpdateMonthlyListTabData(); - UpdateMonthlyGraphTabData(); + this.UpdateBookList(); + this.UpdateBookTabData(isScroll: true, isUpdateActDateLastEdited: true); + this.UpdateDailyGraphTabData(); + this.UpdateMonthlyListTabData(); + this.UpdateMonthlyGraphTabData(); this.Cursor = cCursor; @@ -546,7 +546,7 @@ private void MoveToBookCommand_Executed(object sender, ExecutedRoutedEventArgs e // 登録時イベントを登録する mrw.Registrated += (sender2, e2) => { // 帳簿一覧タブを更新する - UpdateBookTabData(e2.Value, isUpdateActDateLastEdited: true); + this.UpdateBookTabData(e2.Value, isUpdateActDateLastEdited: true); FocusManager.SetFocusedElement(this, this.actionDataGrid); this.actionDataGrid.Focus(); }; @@ -576,7 +576,7 @@ private void AddActionToBookCommand_Executed(object sender, ExecutedRoutedEventA // 登録時イベントを登録する arw.Registrated += (sender2, e2)=> { // 帳簿一覧タブを更新する - UpdateBookTabData(e2.Value, isUpdateActDateLastEdited: true); + this.UpdateBookTabData(e2.Value, isUpdateActDateLastEdited: true); FocusManager.SetFocusedElement(this, this.actionDataGrid); this.actionDataGrid.Focus(); }; @@ -606,7 +606,7 @@ private void AddActionListToBookCommand_Executed(object sender, ExecutedRoutedEv // 登録時イベントを登録する alrw.Registrated += (sender2, e2) => { // 帳簿一覧タブを更新する - UpdateBookTabData(e2.Value, isUpdateActDateLastEdited: true); + this.UpdateBookTabData(e2.Value, isUpdateActDateLastEdited: true); FocusManager.SetFocusedElement(this, this.actionDataGrid); this.actionDataGrid.Focus(); }; @@ -653,7 +653,7 @@ private void EditActionCommand_Executed(object sender, ExecutedRoutedEventArgs e // 登録時イベントを登録する arw.Registrated += (sender2, e2) => { // 帳簿一覧タブを更新する - UpdateBookTabData(e2.Value, isUpdateActDateLastEdited: true); + this.UpdateBookTabData(e2.Value, isUpdateActDateLastEdited: true); FocusManager.SetFocusedElement(this, this.actionDataGrid); this.actionDataGrid.Focus(); }; @@ -665,7 +665,7 @@ private void EditActionCommand_Executed(object sender, ExecutedRoutedEventArgs e // 登録時イベントを登録する mrw.Registrated += (sender2, e2) => { // 帳簿一覧タブを更新する - UpdateBookTabData(e2.Value, isUpdateActDateLastEdited: true); + this.UpdateBookTabData(e2.Value, isUpdateActDateLastEdited: true); FocusManager.SetFocusedElement(this, this.actionDataGrid); this.actionDataGrid.Focus(); }; @@ -713,7 +713,7 @@ private void CopyActionCommand_Executed(object sender, ExecutedRoutedEventArgs e // 登録時イベントを登録する arw.Registrated += (sender2, e2) => { // 帳簿一覧タブを更新する - UpdateBookTabData(e2.Value, isUpdateActDateLastEdited: true); + this.UpdateBookTabData(e2.Value, isUpdateActDateLastEdited: true); FocusManager.SetFocusedElement(this, this.actionDataGrid); this.actionDataGrid.Focus(); }; @@ -725,7 +725,7 @@ private void CopyActionCommand_Executed(object sender, ExecutedRoutedEventArgs e // 登録時イベントを登録する mrw.Registrated += (sender2, e2) => { // 帳簿一覧タブを更新する - UpdateBookTabData(e2.Value, isUpdateActDateLastEdited: true); + this.UpdateBookTabData(e2.Value, isUpdateActDateLastEdited: true); FocusManager.SetFocusedElement(this, this.actionDataGrid); this.actionDataGrid.Focus(); }; @@ -796,7 +796,7 @@ UPDATE hst_group } // 帳簿一覧タブを更新する - UpdateBookTabData(isUpdateActDateLastEdited: true); + this.UpdateBookTabData(isUpdateActDateLastEdited: true); } } #endregion @@ -932,17 +932,17 @@ private void UpdateCommand_Executed(object sender, ExecutedRoutedEventArgs e) Cursor cCursor = this.Cursor; this.Cursor = Cursors.Wait; - UpdateBookTabData(isScroll:false); - InitializeDailyGraphTabData(); - UpdateDailyGraphTabData(); + this.UpdateBookTabData(isScroll:false); + this.InitializeDailyGraphTabData(); + this.UpdateDailyGraphTabData(); - UpdateMonthlyListTabData(); - InitializeMonthlyGraphTabData(); - UpdateMonthlyGraphTabData(); + this.UpdateMonthlyListTabData(); + this.InitializeMonthlyGraphTabData(); + this.UpdateMonthlyGraphTabData(); - UpdateYearlyListTabData(); - InitializeYearlyGraphTabData(); - UpdateYearlyGraphTabData(); + this.UpdateYearlyListTabData(); + this.InitializeYearlyGraphTabData(); + this.UpdateYearlyGraphTabData(); this.Cursor = cCursor; } @@ -972,10 +972,10 @@ private void GoToLastMonthCommand_Executed(object sender, ExecutedRoutedEventArg switch (this.WVM.DisplayedTermKind) { case TermKind.Monthly: this.WVM.DisplayedMonth = this.WVM.DisplayedMonth.Value.AddMonths(-1); - UpdateBookTabData(isScroll:true); + this.UpdateBookTabData(isScroll:true); - InitializeDailyGraphTabData(); - UpdateDailyGraphTabData(); + this.InitializeDailyGraphTabData(); + this.UpdateDailyGraphTabData(); break; } @@ -1006,10 +1006,10 @@ private void GoToThisMonthCommand_Executed(object sender, ExecutedRoutedEventArg this.Cursor = Cursors.Wait; this.WVM.DisplayedMonth = DateTime.Now.GetFirstDateOfMonth(); - UpdateBookTabData(isScroll:true); + this.UpdateBookTabData(isScroll:true); - InitializeDailyGraphTabData(); - UpdateDailyGraphTabData(); + this.InitializeDailyGraphTabData(); + this.UpdateDailyGraphTabData(); this.Cursor = cCursor; } @@ -1038,10 +1038,10 @@ private void GoToNextMonthCommand_Executed(object sender, ExecutedRoutedEventArg switch (this.WVM.DisplayedTermKind) { case TermKind.Monthly: this.WVM.DisplayedMonth = this.WVM.DisplayedMonth.Value.AddMonths(1); - UpdateBookTabData(isScroll:true); + this.UpdateBookTabData(isScroll:true); - InitializeDailyGraphTabData(); - UpdateDailyGraphTabData(); + this.InitializeDailyGraphTabData(); + this.UpdateDailyGraphTabData(); break; } @@ -1072,11 +1072,11 @@ private void OpenSelectingDailyTermWindowCommand_Executed(object sender, Execute this.WVM.StartDate = stw.WVM.StartDate; this.WVM.EndDate = stw.WVM.EndDate; - - UpdateBookTabData(isScroll:true); - InitializeDailyGraphTabData(); - UpdateDailyGraphTabData(); + this.UpdateBookTabData(isScroll:true); + + this.InitializeDailyGraphTabData(); + this.UpdateDailyGraphTabData(); this.Cursor = cCursor; } @@ -1106,8 +1106,8 @@ private void GoToLastYearCommand_Executed(object sender, ExecutedRoutedEventArgs this.Cursor = Cursors.Wait; this.WVM.DisplayedYear = this.WVM.DisplayedYear.AddYears(-1); - UpdateMonthlyListTabData(); - UpdateMonthlyGraphTabData(); + this.UpdateMonthlyListTabData(); + this.UpdateMonthlyGraphTabData(); this.Cursor = cCursor; } @@ -1136,8 +1136,8 @@ private void GoToThisYearCommand_Executed(object sender, ExecutedRoutedEventArgs this.Cursor = Cursors.Wait; this.WVM.DisplayedYear = DateTime.Now.GetFirstDateOfFiscalYear(Properties.Settings.Default.App_StartMonth); - UpdateMonthlyListTabData(); - UpdateMonthlyGraphTabData(); + this.UpdateMonthlyListTabData(); + this.UpdateMonthlyGraphTabData(); this.Cursor = cCursor; } @@ -1164,8 +1164,8 @@ private void GoToNextYearCommand_Executed(object sender, ExecutedRoutedEventArgs this.Cursor = Cursors.Wait; this.WVM.DisplayedYear = this.WVM.DisplayedYear.AddYears(1); - UpdateMonthlyListTabData(); - UpdateMonthlyGraphTabData(); + this.UpdateMonthlyListTabData(); + this.UpdateMonthlyGraphTabData(); this.Cursor = cCursor; } @@ -1185,19 +1185,19 @@ private void OpenSettingsWindowCommand_Executed(object sender, ExecutedRoutedEve Cursor cCursor = this.Cursor; this.Cursor = Cursors.Wait; - UpdateBookList(); + this.UpdateBookList(); - UpdateBookTabData(); - InitializeDailyGraphTabData(); - UpdateDailyGraphTabData(); + this.UpdateBookTabData(); + this.InitializeDailyGraphTabData(); + this.UpdateDailyGraphTabData(); - UpdateMonthlyListTabData(); - InitializeMonthlyGraphTabData(); - UpdateMonthlyGraphTabData(); + this.UpdateMonthlyListTabData(); + this.InitializeMonthlyGraphTabData(); + this.UpdateMonthlyGraphTabData(); - UpdateYearlyListTabData(); - InitializeYearlyGraphTabData(); - UpdateYearlyGraphTabData(); + this.UpdateYearlyListTabData(); + this.InitializeYearlyGraphTabData(); + this.UpdateYearlyGraphTabData(); this.Cursor = cCursor; } @@ -1255,7 +1255,7 @@ private void OpenVersionWindowCommand_Executed(object sender, ExecutedRoutedEven /// private void MainWindow_Closed(object sender, EventArgs e) { - SaveSetting(); + this.SaveSetting(); } /// @@ -1286,25 +1286,25 @@ private void TabControl_SelectionChanged(object sender, SelectionChangedEventArg switch (this.WVM.SelectedTab) { case Tabs.BooksTab: - UpdateBookTabData(isScroll:true); + this.UpdateBookTabData(isScroll:true); break; case Tabs.DailyGraphTab: - InitializeDailyGraphTabData(); - UpdateDailyGraphTabData(); + this.InitializeDailyGraphTabData(); + this.UpdateDailyGraphTabData(); break; case Tabs.MonthlyListTab: - UpdateMonthlyListTabData(); + this.UpdateMonthlyListTabData(); break; case Tabs.MonthlyGraphTab: - InitializeMonthlyGraphTabData(); - UpdateMonthlyGraphTabData(); + this.InitializeMonthlyGraphTabData(); + this.UpdateMonthlyGraphTabData(); break; case Tabs.YearlyListTab: - UpdateYearlyListTabData(); + this.UpdateYearlyListTabData(); break; case Tabs.YearlyGraphTab: - InitializeYearlyGraphTabData(); - UpdateYearlyGraphTabData(); + this.InitializeYearlyGraphTabData(); + this.UpdateYearlyGraphTabData(); break; } this.Cursor = cCursor; @@ -1323,15 +1323,15 @@ private void BookComboBox_SelectionChanged(object sender, SelectionChangedEventA { Cursor cCursor = this.Cursor; this.Cursor = Cursors.Wait; - - UpdateBookTabData(isScroll:true); - UpdateDailyGraphTabData(); - UpdateMonthlyListTabData(); - UpdateMonthlyGraphTabData(); + this.UpdateBookTabData(isScroll:true); + this.UpdateDailyGraphTabData(); + + this.UpdateMonthlyListTabData(); + this.UpdateMonthlyGraphTabData(); - UpdateYearlyListTabData(); - UpdateYearlyGraphTabData(); + this.UpdateYearlyListTabData(); + this.UpdateYearlyGraphTabData(); this.Cursor = cCursor; } @@ -1346,14 +1346,14 @@ private void GraphKindComboBox_SelectionChanged(object sender, SelectionChangedE Cursor cCursor = this.Cursor; this.Cursor = Cursors.Wait; - InitializeDailyGraphTabData(); - UpdateDailyGraphTabData(); + this.InitializeDailyGraphTabData(); + this.UpdateDailyGraphTabData(); - InitializeMonthlyGraphTabData(); - UpdateMonthlyGraphTabData(); + this.InitializeMonthlyGraphTabData(); + this.UpdateMonthlyGraphTabData(); - InitializeYearlyGraphTabData(); - UpdateYearlyGraphTabData(); + this.InitializeYearlyGraphTabData(); + this.UpdateYearlyGraphTabData(); this.Cursor = cCursor; } @@ -1404,7 +1404,7 @@ private ObservableCollection LoadActionViewModelListWithinMonth { DateTime startTime = includedTime.GetFirstDateOfMonth(); DateTime endTime = startTime.AddMonths(1).AddMilliseconds(-1); - return LoadActionViewModelList(bookId, startTime, endTime); + return this.LoadActionViewModelList(bookId, startTime, endTime); } /// @@ -1548,7 +1548,7 @@ private ObservableCollection LoadSummaryViewModelListWithinDay { DateTime startTime = new DateTime(includedTime.Year, includedTime.Month, includedTime.Day); DateTime endTime = startTime.AddDays(1).AddMilliseconds(-1); - return LoadSummaryViewModelList(bookId, startTime, endTime); + return this.LoadSummaryViewModelList(bookId, startTime, endTime); } /// @@ -1561,7 +1561,7 @@ private ObservableCollection LoadSummaryViewModelListWithinMon { DateTime startTime = includedTime.GetFirstDateOfMonth(); DateTime endTime = startTime.AddMonths(1).AddMilliseconds(-1); - return LoadSummaryViewModelList(bookId, startTime, endTime); + return this.LoadSummaryViewModelList(bookId, startTime, endTime); } /// @@ -1692,7 +1692,7 @@ private ObservableCollection LoadDailySummaryViewModelListWithi DateTime startTime = includedTime.GetFirstDateOfMonth(); DateTime endTime = startTime.AddMonths(1).AddMilliseconds(-1); - return LoadDailySummaryViewModelList(bookId, startTime, endTime); + return this.LoadDailySummaryViewModelList(bookId, startTime, endTime); } /// @@ -1825,7 +1825,7 @@ private ObservableCollection LoadMonthlySummaryViewModelListWit DateTime startTime = includedTime.GetFirstDateOfFiscalYear(Properties.Settings.Default.App_StartMonth); DateTime endTime = startTime.AddYears(1).AddMilliseconds(-1); - return LoadMonthlySummaryViewModelList(bookId, startTime, endTime); + return this.LoadMonthlySummaryViewModelList(bookId, startTime, endTime); } /// @@ -2078,12 +2078,12 @@ private void UpdateBookTabData(List actionIdList = null, bool isScroll = fa switch (this.WVM.DisplayedTermKind) { case TermKind.Monthly: - this.WVM.ActionVMList = LoadActionViewModelListWithinMonth(this.WVM.SelectedBookVM?.Id, this.WVM.DisplayedMonth.Value); - this.WVM.SummaryVMList = LoadSummaryViewModelListWithinMonth(this.WVM.SelectedBookVM?.Id, this.WVM.DisplayedMonth.Value); + this.WVM.ActionVMList = this.LoadActionViewModelListWithinMonth(this.WVM.SelectedBookVM?.Id, this.WVM.DisplayedMonth.Value); + this.WVM.SummaryVMList = this.LoadSummaryViewModelListWithinMonth(this.WVM.SelectedBookVM?.Id, this.WVM.DisplayedMonth.Value); break; case TermKind.Selected: - this.WVM.ActionVMList = LoadActionViewModelList(this.WVM.SelectedBookVM?.Id, this.WVM.StartDate, this.WVM.EndDate); - this.WVM.SummaryVMList = LoadSummaryViewModelList(this.WVM.SelectedBookVM?.Id, this.WVM.StartDate, this.WVM.EndDate); + this.WVM.ActionVMList = this.LoadActionViewModelList(this.WVM.SelectedBookVM?.Id, this.WVM.StartDate, this.WVM.EndDate); + this.WVM.SummaryVMList = this.LoadSummaryViewModelList(this.WVM.SelectedBookVM?.Id, this.WVM.StartDate, this.WVM.EndDate); break; } @@ -2223,10 +2223,10 @@ private void UpdateDailyGraphTabData() ObservableCollection vmList = null; switch (this.WVM.DisplayedTermKind) { case TermKind.Monthly: - vmList = LoadDailySummaryViewModelListWithinMonth(this.WVM.SelectedBookVM?.Id, this.WVM.DisplayedMonth.Value); + vmList = this.LoadDailySummaryViewModelListWithinMonth(this.WVM.SelectedBookVM?.Id, this.WVM.DisplayedMonth.Value); break; case TermKind.Selected: - vmList = LoadDailySummaryViewModelList(this.WVM.SelectedBookVM?.Id, this.WVM.StartDate, this.WVM.EndDate); + vmList = this.LoadDailySummaryViewModelList(this.WVM.SelectedBookVM?.Id, this.WVM.StartDate, this.WVM.EndDate); break; } List sumPlus = new List(); // 日ごとの合計収入 @@ -2314,10 +2314,10 @@ private void UpdateDailyGraphTabData() ObservableCollection vmList = null; switch (this.WVM.DisplayedTermKind) { case TermKind.Monthly: - vmList = LoadDailySummaryViewModelListWithinMonth(this.WVM.SelectedBookVM?.Id, this.WVM.DisplayedMonth.Value); + vmList = this.LoadDailySummaryViewModelListWithinMonth(this.WVM.SelectedBookVM?.Id, this.WVM.DisplayedMonth.Value); break; case TermKind.Selected: - vmList = LoadDailySummaryViewModelList(this.WVM.SelectedBookVM?.Id, this.WVM.StartDate, this.WVM.EndDate); + vmList = this.LoadDailySummaryViewModelList(this.WVM.SelectedBookVM?.Id, this.WVM.StartDate, this.WVM.EndDate); break; } cSeries.Points.AddRange(new List(vmList[0].Values).Select((value, index) => new DataPoint(index, value))); @@ -2358,7 +2358,7 @@ private void UpdateMonthlyListTabData() displayedMonths.Add(string.Format("{0}月", (i - 1) % 12 + 1)); } this.WVM.DisplayedMonths = displayedMonths; - this.WVM.MonthlySummaryVMList = LoadMonthlySummaryViewModelListWithinYear(this.WVM.SelectedBookVM.Id, this.WVM.DisplayedYear); + this.WVM.MonthlySummaryVMList = this.LoadMonthlySummaryViewModelListWithinYear(this.WVM.SelectedBookVM.Id, this.WVM.DisplayedYear); } } #endregion @@ -2454,7 +2454,7 @@ private void UpdateMonthlyGraphTabData() switch (this.WVM.SelectedGraphKind) { case GraphKind.IncomeAndOutgo: { - ObservableCollection vmList = LoadMonthlySummaryViewModelListWithinYear(this.WVM.SelectedBookVM.Id, this.WVM.DisplayedYear); + ObservableCollection vmList = this.LoadMonthlySummaryViewModelListWithinYear(this.WVM.SelectedBookVM.Id, this.WVM.DisplayedYear); List sumPlus = new List(); // 月ごとの合計収入 List sumMinus = new List(); // 月ごとの合計支出 @@ -2531,7 +2531,7 @@ private void UpdateMonthlyGraphTabData() Title = "残高", TrackerFormatString = "{2}月: {4:#,0}" //月: 金額 }; - ObservableCollection vmList = LoadMonthlySummaryViewModelListWithinYear(this.WVM.SelectedBookVM.Id, this.WVM.DisplayedYear); + ObservableCollection vmList = this.LoadMonthlySummaryViewModelListWithinYear(this.WVM.SelectedBookVM.Id, this.WVM.DisplayedYear); cSeries.Points.AddRange(new List(vmList[0].Values).Select((value, index) => new DataPoint(index, value))); this.WVM.WholeItemMonthlyGraphModel.Series.Add(cSeries); @@ -2569,7 +2569,7 @@ private void UpdateYearlyListTabData() displayedYears.Add(string.Format("{0}年", i)); } this.WVM.DisplayedYears = displayedYears; - this.WVM.YearlySummaryVMList = LoadYearlySummaryViewModelListWithinDecade(this.WVM.SelectedBookVM.Id); + this.WVM.YearlySummaryVMList = this.LoadYearlySummaryViewModelListWithinDecade(this.WVM.SelectedBookVM.Id); } } #endregion @@ -2666,7 +2666,7 @@ private void UpdateYearlyGraphTabData() switch (this.WVM.SelectedGraphKind) { case GraphKind.IncomeAndOutgo: { - ObservableCollection vmList = LoadYearlySummaryViewModelListWithinDecade(this.WVM.SelectedBookVM.Id); + ObservableCollection vmList = this.LoadYearlySummaryViewModelListWithinDecade(this.WVM.SelectedBookVM.Id); List sumPlus = new List(); // 年ごとの合計収入 List sumMinus = new List(); // 年ごとの合計支出 @@ -2743,7 +2743,7 @@ private void UpdateYearlyGraphTabData() Title = "残高", TrackerFormatString = "{2}年: {4:#,0}" //年: 金額 }; - ObservableCollection vmList = LoadYearlySummaryViewModelListWithinDecade(this.WVM.SelectedBookVM.Id); + ObservableCollection vmList = this.LoadYearlySummaryViewModelListWithinDecade(this.WVM.SelectedBookVM.Id); cSeries.Points.AddRange(new List(vmList[0].Values).Select((value, index) => new DataPoint(index, value))); this.WVM.WholeItemYearlyGraphModel.Series.Add(cSeries); @@ -2818,10 +2818,10 @@ private void LoadSetting() { Properties.Settings settings = Properties.Settings.Default; - if (settings.MainWindow_Left != -1) { + if (0 <= settings.MainWindow_Left) { this.Left = settings.MainWindow_Left; } - if (settings.MainWindow_Top != -1) { + if (0 <= settings.MainWindow_Top) { this.Top = settings.MainWindow_Top; } if (settings.MainWindow_Width != -1) { diff --git a/HouseholdAccountBook/Windows/MoveRegistrationWindow.xaml.cs b/HouseholdAccountBook/Windows/MoveRegistrationWindow.xaml.cs index 3dc3859..574238e 100644 --- a/HouseholdAccountBook/Windows/MoveRegistrationWindow.xaml.cs +++ b/HouseholdAccountBook/Windows/MoveRegistrationWindow.xaml.cs @@ -61,7 +61,7 @@ public MoveRegistrationWindow(DaoBuilder builder, int? selectedBookId, DateTime? { this.builder = builder; - InitializeComponent(); + this.InitializeComponent(); this.WVM.RegMode = RegistrationMode.Add; this.selectedBookId = selectedBookId; @@ -100,26 +100,26 @@ public MoveRegistrationWindow(DaoBuilder builder, int? selectedBookId, DateTime? this.WVM.MovingBookVM = selectedBookVM; this.WVM.SelectedCommissionKind = CommissionKind.FromBook; - UpdateItemList(); - UpdateRemarkList(); + this.UpdateItemList(); + this.UpdateRemarkList(); - LoadSetting(); + this.LoadSetting(); #region イベントハンドラの設定 this.WVM.FromBookChanged += () => { - UpdateItemList(); - UpdateRemarkList(); + this.UpdateItemList(); + this.UpdateRemarkList(); }; this.WVM.ToBookChanged += () => { - UpdateItemList(); - UpdateRemarkList(); + this.UpdateItemList(); + this.UpdateRemarkList(); }; this.WVM.CommissionKindChanged += () => { - UpdateItemList(); - UpdateRemarkList(); + this.UpdateItemList(); + this.UpdateRemarkList(); }; this.WVM.ItemChanged += () => { - UpdateRemarkList(); + this.UpdateRemarkList(); }; #endregion } @@ -135,7 +135,7 @@ public MoveRegistrationWindow(DaoBuilder builder, int? selectedBookId, int group { this.builder = builder; - InitializeComponent(); + this.InitializeComponent(); this.WVM.RegMode = mode; this.selectedBookId = selectedBookId; @@ -229,26 +229,26 @@ public MoveRegistrationWindow(DaoBuilder builder, int? selectedBookId, int group this.WVM.SelectedCommissionKind = commissionKind; this.WVM.Commission = commissionValue; - UpdateItemList(commissionItemId); - UpdateRemarkList(commissionRemark); + this.UpdateItemList(commissionItemId); + this.UpdateRemarkList(commissionRemark); - LoadSetting(); + this.LoadSetting(); #region イベントハンドラの設定 this.WVM.FromBookChanged += () => { - UpdateItemList(); - UpdateRemarkList(); + this.UpdateItemList(); + this.UpdateRemarkList(); }; this.WVM.ToBookChanged += () => { - UpdateItemList(); - UpdateRemarkList(); + this.UpdateItemList(); + this.UpdateRemarkList(); }; this.WVM.CommissionKindChanged += () => { - UpdateItemList(); - UpdateRemarkList(); + this.UpdateItemList(); + this.UpdateRemarkList(); }; this.WVM.ItemChanged += () => { - UpdateRemarkList(); + this.UpdateRemarkList(); }; #endregion } @@ -312,7 +312,7 @@ private void RegisterCommand_Executed(object sender, ExecutedRoutedEventArgs e) } // DB登録 - int? id = RegisterToDb(); + int? id = this.RegisterToDb(); // MainWindow更新 List value = id != null ? new List() { id.Value } : new List(); @@ -341,7 +341,7 @@ private void CancelCommand_Executed(object sender, ExecutedRoutedEventArgs e) /// private void MoveRegistrationWindow_Closed(object sender, EventArgs e) { - SaveSetting(); + this.SaveSetting(); } #endregion diff --git a/HouseholdAccountBook/Windows/OnBackUpWindow.xaml.cs b/HouseholdAccountBook/Windows/OnBackUpWindow.xaml.cs index 7233b65..0e8d80d 100644 --- a/HouseholdAccountBook/Windows/OnBackUpWindow.xaml.cs +++ b/HouseholdAccountBook/Windows/OnBackUpWindow.xaml.cs @@ -12,7 +12,7 @@ public partial class OnBackUpWindow : Window /// public OnBackUpWindow() { - InitializeComponent(); + this.InitializeComponent(); } } } diff --git a/HouseholdAccountBook/Windows/SettingsWindow.xaml.cs b/HouseholdAccountBook/Windows/SettingsWindow.xaml.cs index 343100c..c741464 100644 --- a/HouseholdAccountBook/Windows/SettingsWindow.xaml.cs +++ b/HouseholdAccountBook/Windows/SettingsWindow.xaml.cs @@ -48,11 +48,11 @@ public SettingsWindow(DaoBuilder builder) { this.builder = builder; - InitializeComponent(); + this.InitializeComponent(); - UpdateSettingWindowData(); + this.UpdateSettingWindowData(); - LoadSetting(); + this.LoadSetting(); } #region イベントハンドラ @@ -104,7 +104,7 @@ private void AddCategoryCommand_Executed(object sender, ExecutedRoutedEventArgs categoryId = record.ToInt("category_id"); }); } - UpdateItemSettingsTabData(HierarchicalKind.Category, categoryId); + this.UpdateItemSettingsTabData(HierarchicalKind.Category, categoryId); this.IsSaved = true; } @@ -142,7 +142,7 @@ private void AddItemCommand_Executed(object sender, ExecutedRoutedEventArgs e) itemId = record.ToInt("item_id"); }); } - UpdateItemSettingsTabData(HierarchicalKind.Item, itemId); + this.UpdateItemSettingsTabData(HierarchicalKind.Item, itemId); this.IsSaved = true; } @@ -209,7 +209,7 @@ UPDATE mst_item break; } } - UpdateItemSettingsTabData(this.WVM.SelectedItemVM.ParentVM.Kind, this.WVM.SelectedItemVM.ParentVM.Id); + this.UpdateItemSettingsTabData(this.WVM.SelectedItemVM.ParentVM.Kind, this.WVM.SelectedItemVM.ParentVM.Id); this.IsSaved = true; } @@ -317,7 +317,7 @@ UPDATE mst_item } } - UpdateItemSettingsTabData(this.WVM.SelectedItemVM.Kind, this.WVM.SelectedItemVM.Id); + this.UpdateItemSettingsTabData(this.WVM.SelectedItemVM.Kind, this.WVM.SelectedItemVM.Id); this.IsSaved = true; } @@ -456,7 +456,7 @@ UPDATE mst_item } } - UpdateItemSettingsTabData(this.WVM.SelectedItemVM.Kind, this.WVM.SelectedItemVM.Id); + this.UpdateItemSettingsTabData(this.WVM.SelectedItemVM.Kind, this.WVM.SelectedItemVM.Id); this.IsSaved = true; } @@ -658,7 +658,7 @@ private void AddBookCommand_Executed(object sender, ExecutedRoutedEventArgs e) }); } - UpdateBookSettingTabData(bookId); + this.UpdateBookSettingTabData(bookId); this.IsSaved = true; } @@ -697,7 +697,7 @@ UPDATE mst_book }); } - UpdateBookSettingTabData(); + this.UpdateBookSettingTabData(); this.IsSaved = true; } @@ -750,7 +750,7 @@ UPDATE mst_book }); } - UpdateBookSettingTabData(changingId); + this.UpdateBookSettingTabData(changingId); this.IsSaved = true; } @@ -803,7 +803,7 @@ UPDATE mst_book }); } - UpdateBookSettingTabData(changingId); + this.UpdateBookSettingTabData(changingId); this.IsSaved = true; } @@ -1012,7 +1012,7 @@ private void SettingsWindow_Closing(object sender, CancelEventArgs e) /// private void SettingsWindow_Closed(object sender, EventArgs e) { - SaveSetting(); + this.SaveSetting(); } /// @@ -1028,13 +1028,13 @@ private void SettingsTabControl_SelectionChanged(object sender, SelectionChanged switch (this.WVM.SelectedTab) { case SettingsTabs.ItemSettingsTab: - UpdateItemSettingsTabData(); + this.UpdateItemSettingsTabData(); break; case SettingsTabs.BookSettingsTab: - UpdateBookSettingTabData(); + this.UpdateBookSettingTabData(); break; case SettingsTabs.OtherSettingsTab: - UpdateOtherSettingTabData(); + this.UpdateOtherSettingTabData(); break; } this.Cursor = cCursor; @@ -1077,9 +1077,9 @@ private void TreeView_SelectedItemChanged(object sender, RoutedPropertyChangedEv /// 選択対象の帳簿ID private void UpdateSettingWindowData(HierarchicalKind? kind = null, int? id = null, int? bookId = null) { - UpdateItemSettingsTabData(kind, id); - UpdateBookSettingTabData(bookId); - UpdateOtherSettingTabData(); + this.UpdateItemSettingsTabData(kind, id); + this.UpdateBookSettingTabData(bookId); + this.UpdateOtherSettingTabData(); } /// @@ -1090,7 +1090,7 @@ private void UpdateSettingWindowData(HierarchicalKind? kind = null, int? id = nu private void UpdateItemSettingsTabData(HierarchicalKind? kind = null, int? id = null) { if (this.WVM.SelectedTab == SettingsTabs.ItemSettingsTab) { - this.WVM.HierachicalItemVMList = LoadItemViewModelList(); + this.WVM.HierachicalItemVMList = this.LoadItemViewModelList(); if (kind == null || id == null) { this.WVM.SelectedItemVM = null; @@ -1129,7 +1129,7 @@ private void UpdateItemSettingsTabData(HierarchicalKind? kind = null, int? id = private void UpdateBookSettingTabData(int? bookId = null) { if (this.WVM.SelectedTab == SettingsTabs.BookSettingsTab) { - this.WVM.BookVMList = LoadBookSettingViewModelList(); + this.WVM.BookVMList = this.LoadBookSettingViewModelList(); if (bookId == null) { this.WVM.SelectedBookVM = null; diff --git a/HouseholdAccountBook/Windows/TermWindow.xaml.cs b/HouseholdAccountBook/Windows/TermWindow.xaml.cs index 364159f..11ebb26 100644 --- a/HouseholdAccountBook/Windows/TermWindow.xaml.cs +++ b/HouseholdAccountBook/Windows/TermWindow.xaml.cs @@ -18,12 +18,12 @@ public partial class TermWindow : Window /// 終了日 public TermWindow(DateTime startDate, DateTime endDate) { - InitializeComponent(); + this.InitializeComponent(); this.WVM.StartDate = startDate; this.WVM.EndDate = endDate; - LoadSetting(); + this.LoadSetting(); } /// @@ -32,12 +32,12 @@ public TermWindow(DateTime startDate, DateTime endDate) /// 月内日付 public TermWindow(DateTime dateWithinMonth) { - InitializeComponent(); + this.InitializeComponent(); this.WVM.StartDate = dateWithinMonth.GetFirstDateOfMonth(); this.WVM.EndDate = this.WVM.StartDate.AddMonths(1).AddMilliseconds(-1); - LoadSetting(); + this.LoadSetting(); } #region イベントハンドラ @@ -49,7 +49,7 @@ public TermWindow(DateTime dateWithinMonth) /// private void TermWindow_Closed(object sender, EventArgs e) { - SaveSetting(); + this.SaveSetting(); } #endregion diff --git a/HouseholdAccountBook/Windows/VersionWindow.xaml.cs b/HouseholdAccountBook/Windows/VersionWindow.xaml.cs index 2e89555..35eb70b 100644 --- a/HouseholdAccountBook/Windows/VersionWindow.xaml.cs +++ b/HouseholdAccountBook/Windows/VersionWindow.xaml.cs @@ -14,7 +14,7 @@ public partial class VersionWindow : Window /// public VersionWindow() { - InitializeComponent(); + this.InitializeComponent(); } #region イベントハンドラ