From fbc2a13d460f4c31ef94df00c719c6f9b8775ced Mon Sep 17 00:00:00 2001 From: Kimura Youichi Date: Fri, 18 Nov 2016 21:53:24 +0900 Subject: [PATCH 1/1] =?utf8?q?C#7.0=E3=81=A7=E8=BF=BD=E5=8A=A0=E3=81=95?= =?utf8?q?=E3=82=8C=E3=81=9FExpression-Bodied=E3=83=A1=E3=83=B3=E3=83=90?= =?utf8?q?=E3=81=AE=E6=A7=8B=E6=96=87=E3=82=92=E4=BD=BF=E7=94=A8=E3=81=99?= =?utf8?q?=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- OpenTween.Tests/Connection/LazyJsonTest.cs | 4 +- OpenTween/AuthDialog.cs | 8 +-- OpenTween/Connection/TwitterApiConnection.cs | 8 +-- OpenTween/DetailsListView.cs | 4 +- OpenTween/HookGlobalHotkey.cs | 4 +- OpenTween/ImageCache.cs | 4 +- OpenTween/InputTabName.cs | 12 ++-- OpenTween/MediaItem.cs | 4 +- OpenTween/MemoryImage.cs | 4 +- OpenTween/Models/PostClass.cs | 2 +- OpenTween/Models/PostFilterRule.cs | 84 +++++++++++++------------- OpenTween/OTPictureBox.cs | 2 +- OpenTween/SendErrorReportForm.cs | 8 +-- OpenTween/Setting/SettingCommon.cs | 12 ++-- OpenTween/Setting/SettingLocal.cs | 88 ++++++++++++++-------------- OpenTween/TabsDialog.cs | 2 +- OpenTween/ToolStripAPIGauge.cs | 12 ++-- OpenTween/Tween.cs | 4 +- OpenTween/TweetDetailsView.cs | 4 +- OpenTween/UpdateDialog.cs | 8 +-- OpenTween/WaitingDialog.cs | 4 +- 21 files changed, 136 insertions(+), 146 deletions(-) diff --git a/OpenTween.Tests/Connection/LazyJsonTest.cs b/OpenTween.Tests/Connection/LazyJsonTest.cs index 39a36551..759255d2 100644 --- a/OpenTween.Tests/Connection/LazyJsonTest.cs +++ b/OpenTween.Tests/Connection/LazyJsonTest.cs @@ -110,8 +110,8 @@ namespace OpenTween.Connection public override long Length => 100L; public override long Position { - get { return 0L; } - set { throw new NotSupportedException(); } + get => 0L; + set => throw new NotSupportedException(); } public override void Flush() diff --git a/OpenTween/AuthDialog.cs b/OpenTween/AuthDialog.cs index f6139ca6..a24df9d2 100644 --- a/OpenTween/AuthDialog.cs +++ b/OpenTween/AuthDialog.cs @@ -45,14 +45,14 @@ namespace OpenTween public string AuthUrl { - get { return AuthLinkLabel.Text; } - set { AuthLinkLabel.Text = value; } + get => AuthLinkLabel.Text; + set => AuthLinkLabel.Text = value; } public string Pin { - get { return PinTextBox.Text.Trim(); } - set { PinTextBox.Text = value; } + get => PinTextBox.Text.Trim(); + set => PinTextBox.Text = value; } private void AuthLinkLabel_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) diff --git a/OpenTween/Connection/TwitterApiConnection.cs b/OpenTween/Connection/TwitterApiConnection.cs index 4e090320..254eb315 100644 --- a/OpenTween/Connection/TwitterApiConnection.cs +++ b/OpenTween/Connection/TwitterApiConnection.cs @@ -43,8 +43,8 @@ namespace OpenTween.Connection // SettingCommon.xml の TwitterUrl との互換性のために用意 public static string RestApiHost { - get { return RestApiBase.Host; } - set { RestApiBase = new Uri($"https://{value}/1.1/"); } + get => RestApiBase.Host; + set => RestApiBase = new Uri($"https://{value}/1.1/"); } public bool IsDisposed { get; private set; } = false; @@ -358,9 +358,7 @@ namespace OpenTween.Connection } ~TwitterApiConnection() - { - this.Dispose(false); - } + => this.Dispose(false); private void Networking_WebProxyChanged(object sender, EventArgs e) { diff --git a/OpenTween/DetailsListView.cs b/OpenTween/DetailsListView.cs index 3778c3a4..1b5382c0 100644 --- a/OpenTween/DetailsListView.cs +++ b/OpenTween/DetailsListView.cs @@ -106,8 +106,8 @@ namespace OpenTween.OpenTweenCustomControl /// public int SelectionMark { - get { return NativeMethods.ListView_GetSelectionMark(this.Handle); } - set { NativeMethods.ListView_SetSelectionMark(this.Handle, value); } + get => NativeMethods.ListView_GetSelectionMark(this.Handle); + set => NativeMethods.ListView_SetSelectionMark(this.Handle, value); } public void SelectItems(int[] indices) diff --git a/OpenTween/HookGlobalHotkey.cs b/OpenTween/HookGlobalHotkey.cs index df694cfc..376934e9 100644 --- a/OpenTween/HookGlobalHotkey.cs +++ b/OpenTween/HookGlobalHotkey.cs @@ -171,8 +171,6 @@ namespace OpenTween #endregion ~HookGlobalHotkey() - { - this.Dispose(false); - } + => this.Dispose(false); } } diff --git a/OpenTween/ImageCache.cs b/OpenTween/ImageCache.cs index 5f66cfcf..6f72f49a 100644 --- a/OpenTween/ImageCache.cs +++ b/OpenTween/ImageCache.cs @@ -185,8 +185,6 @@ namespace OpenTween } ~ImageCache() - { - this.Dispose(false); - } + => this.Dispose(false); } } diff --git a/OpenTween/InputTabName.cs b/OpenTween/InputTabName.cs index 9c135dee..cda919ad 100644 --- a/OpenTween/InputTabName.cs +++ b/OpenTween/InputTabName.cs @@ -57,20 +57,20 @@ namespace OpenTween public string TabName { - get { return this.TextTabName.Text.Trim(); } - set { TextTabName.Text = value.Trim(); } + get => this.TextTabName.Text.Trim(); + set => TextTabName.Text = value.Trim(); } public string FormTitle { - get { return this.Text; } - set { this.Text = value; } + get => this.Text; + set => this.Text = value; } public string FormDescription { - get { return this.LabelDescription.Text; } - set { this.LabelDescription.Text = value; } + get => this.LabelDescription.Text; + set => this.LabelDescription.Text = value; } public bool IsShowUsage { get; set; } diff --git a/OpenTween/MediaItem.cs b/OpenTween/MediaItem.cs index 3273bc10..7b8a400c 100644 --- a/OpenTween/MediaItem.cs +++ b/OpenTween/MediaItem.cs @@ -284,8 +284,6 @@ namespace OpenTween } ~MemoryImageMediaItem() - { - this.Dispose(false); - } + => this.Dispose(false); } } diff --git a/OpenTween/MemoryImage.cs b/OpenTween/MemoryImage.cs index fa3efbe9..55dae220 100644 --- a/OpenTween/MemoryImage.cs +++ b/OpenTween/MemoryImage.cs @@ -255,9 +255,7 @@ namespace OpenTween } ~MemoryImage() - { - this.Dispose(false); - } + => this.Dispose(false); /// /// 指定された Stream から MemoryImage を作成します。 diff --git a/OpenTween/Models/PostClass.cs b/OpenTween/Models/PostClass.cs index 8a4c9513..1cf0558d 100644 --- a/OpenTween/Models/PostClass.cs +++ b/OpenTween/Models/PostClass.cs @@ -88,7 +88,7 @@ namespace OpenTween.Models return expandedHtml; } - set { this._text = value; } + set => this._text = value; } private string _text; diff --git a/OpenTween/Models/PostFilterRule.cs b/OpenTween/Models/PostFilterRule.cs index 87d3febc..a69c95d5 100644 --- a/OpenTween/Models/PostFilterRule.cs +++ b/OpenTween/Models/PostFilterRule.cs @@ -68,162 +68,162 @@ namespace OpenTween.Models public bool Enabled { - get { return this._enabled; } - set { this.SetProperty(ref this._enabled, value); } + get => this._enabled; + set => this.SetProperty(ref this._enabled, value); } private bool _enabled; [XmlElement("NameFilter")] public string FilterName { - get { return this._FilterName; } - set { this.SetProperty(ref this._FilterName, value); } + get => this._FilterName; + set => this.SetProperty(ref this._FilterName, value); } private string _FilterName; [XmlElement("ExNameFilter")] public string ExFilterName { - get { return this._ExFilterName; } - set { this.SetProperty(ref this._ExFilterName, value); } + get => this._ExFilterName; + set => this.SetProperty(ref this._ExFilterName, value); } private string _ExFilterName; [XmlArray("BodyFilterArray")] public string[] FilterBody { - get { return this._FilterBody; } - set { this.SetProperty(ref this._FilterBody, value ?? throw new ArgumentNullException(nameof(value))); } + get => this._FilterBody; + set => this.SetProperty(ref this._FilterBody, value ?? throw new ArgumentNullException(nameof(value))); } private string[] _FilterBody = new string[0]; [XmlArray("ExBodyFilterArray")] public string[] ExFilterBody { - get { return this._ExFilterBody; } - set { this.SetProperty(ref this._ExFilterBody, value ?? throw new ArgumentNullException(nameof(value))); } + get => this._ExFilterBody; + set => this.SetProperty(ref this._ExFilterBody, value ?? throw new ArgumentNullException(nameof(value))); } private string[] _ExFilterBody = new string[0]; [XmlElement("SearchBoth")] public bool UseNameField { - get { return this._UseNameField; } - set { this.SetProperty(ref this._UseNameField, value); } + get => this._UseNameField; + set => this.SetProperty(ref this._UseNameField, value); } private bool _UseNameField; [XmlElement("ExSearchBoth")] public bool ExUseNameField { - get { return this._ExUseNameField; } - set { this.SetProperty(ref this._ExUseNameField, value); } + get => this._ExUseNameField; + set => this.SetProperty(ref this._ExUseNameField, value); } private bool _ExUseNameField; [XmlElement("MoveFrom")] public bool MoveMatches { - get { return this._MoveMatches; } - set { this.SetProperty(ref this._MoveMatches, value); } + get => this._MoveMatches; + set => this.SetProperty(ref this._MoveMatches, value); } private bool _MoveMatches; [XmlElement("SetMark")] public bool MarkMatches { - get { return this._MarkMatches; } - set { this.SetProperty(ref this._MarkMatches, value); } + get => this._MarkMatches; + set => this.SetProperty(ref this._MarkMatches, value); } private bool _MarkMatches; [XmlElement("SearchUrl")] public bool FilterByUrl { - get { return this._FilterByUrl; } - set { this.SetProperty(ref this._FilterByUrl, value); } + get => this._FilterByUrl; + set => this.SetProperty(ref this._FilterByUrl, value); } private bool _FilterByUrl; [XmlElement("ExSearchUrl")] public bool ExFilterByUrl { - get { return this._ExFilterByUrl; } - set { this.SetProperty(ref this._ExFilterByUrl, value); } + get => this._ExFilterByUrl; + set => this.SetProperty(ref this._ExFilterByUrl, value); } private bool _ExFilterByUrl; public bool CaseSensitive { - get { return this._CaseSensitive; } - set { this.SetProperty(ref this._CaseSensitive, value); } + get => this._CaseSensitive; + set => this.SetProperty(ref this._CaseSensitive, value); } private bool _CaseSensitive; public bool ExCaseSensitive { - get { return this._ExCaseSensitive; } - set { this.SetProperty(ref this._ExCaseSensitive, value); } + get => this._ExCaseSensitive; + set => this.SetProperty(ref this._ExCaseSensitive, value); } private bool _ExCaseSensitive; public bool UseLambda { - get { return this._UseLambda; } - set { this.SetProperty(ref this._UseLambda, value); } + get => this._UseLambda; + set => this.SetProperty(ref this._UseLambda, value); } private bool _UseLambda; public bool ExUseLambda { - get { return this._ExUseLambda; } - set { this.SetProperty(ref this._ExUseLambda, value); } + get => this._ExUseLambda; + set => this.SetProperty(ref this._ExUseLambda, value); } private bool _ExUseLambda; public bool UseRegex { - get { return this._UseRegex; } - set { this.SetProperty(ref this._UseRegex, value); } + get => this._UseRegex; + set => this.SetProperty(ref this._UseRegex, value); } private bool _UseRegex; public bool ExUseRegex { - get { return this._ExUseRegex; } - set { this.SetProperty(ref this._ExUseRegex, value); } + get => this._ExUseRegex; + set => this.SetProperty(ref this._ExUseRegex, value); } private bool _ExUseRegex; [XmlElement("IsRt")] public bool FilterRt { - get { return this._FilterRt; } - set { this.SetProperty(ref this._FilterRt, value); } + get => this._FilterRt; + set => this.SetProperty(ref this._FilterRt, value); } private bool _FilterRt; [XmlElement("IsExRt")] public bool ExFilterRt { - get { return this._ExFilterRt; } - set { this.SetProperty(ref this._ExFilterRt, value); } + get => this._ExFilterRt; + set => this.SetProperty(ref this._ExFilterRt, value); } private bool _ExFilterRt; [XmlElement("Source")] public string FilterSource { - get { return this._FilterSource; } - set { this.SetProperty(ref this._FilterSource, value); } + get => this._FilterSource; + set => this.SetProperty(ref this._FilterSource, value); } private string _FilterSource; [XmlElement("ExSource")] public string ExFilterSource { - get { return this._ExFilterSource; } - set { this.SetProperty(ref this._ExFilterSource, value); } + get => this._ExFilterSource; + set => this.SetProperty(ref this._ExFilterSource, value); } private string _ExFilterSource; diff --git a/OpenTween/OTPictureBox.cs b/OpenTween/OTPictureBox.cs index 2e9c2902..bd3c8f3c 100644 --- a/OpenTween/OTPictureBox.cs +++ b/OpenTween/OTPictureBox.cs @@ -171,7 +171,7 @@ namespace OpenTween [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] public new string ImageLocation { - get { return null; } + get => null; set { } } diff --git a/OpenTween/SendErrorReportForm.cs b/OpenTween/SendErrorReportForm.cs index cc78cdc4..ab6a8fb2 100644 --- a/OpenTween/SendErrorReportForm.cs +++ b/OpenTween/SendErrorReportForm.cs @@ -120,15 +120,15 @@ namespace OpenTween public bool CanSendByDM { - get { return this._canSendByDm; } - private set { this.SetProperty(ref this._canSendByDm, value); } + get => this._canSendByDm; + private set => this.SetProperty(ref this._canSendByDm, value); } private bool _canSendByDm; public string EncodedReportForDM { - get { return this._encodedReportForDM; } - private set { this.SetProperty(ref this._encodedReportForDM, value); } + get => this._encodedReportForDM; + private set => this.SetProperty(ref this._encodedReportForDM, value); } private string _encodedReportForDM; diff --git a/OpenTween/Setting/SettingCommon.cs b/OpenTween/Setting/SettingCommon.cs index 4c5cc62f..8abdaf7a 100644 --- a/OpenTween/Setting/SettingCommon.cs +++ b/OpenTween/Setting/SettingCommon.cs @@ -53,8 +53,8 @@ namespace OpenTween public string Password = ""; public string EncryptPassword { - get { return Encrypt(Password); } - set { Password = Decrypt(value); } + get => Encrypt(Password); + set => Password = Decrypt(value); } public string Token = ""; @@ -62,8 +62,8 @@ namespace OpenTween public string TokenSecret = ""; public string EncryptTokenSecret { - get { return Encrypt(TokenSecret); } - set { TokenSecret = Decrypt(value); } + get => Encrypt(TokenSecret); + set => TokenSecret = Decrypt(value); } private string Encrypt(string password) @@ -253,8 +253,8 @@ namespace OpenTween public string TokenSecret = ""; public string EncryptTokenSecret { - get { return Encrypt(TokenSecret); } - set { TokenSecret = Decrypt(value); } + get => Encrypt(TokenSecret); + set => TokenSecret = Decrypt(value); } private string Encrypt(string password) { diff --git a/OpenTween/Setting/SettingLocal.cs b/OpenTween/Setting/SettingLocal.cs index d45b8205..518a4240 100644 --- a/OpenTween/Setting/SettingLocal.cs +++ b/OpenTween/Setting/SettingLocal.cs @@ -92,168 +92,168 @@ namespace OpenTween public Font FontUnread = new Font(SystemFonts.DefaultFont, FontStyle.Bold | FontStyle.Underline); public string FontUnreadStr { - get { return this.FontToString(this.FontUnread); } - set { this.FontUnread = this.StringToFont(value); } + get => this.FontToString(this.FontUnread); + set => this.FontUnread = this.StringToFont(value); } [XmlIgnore] public Color ColorUnread = System.Drawing.SystemColors.ControlText; public string ColorUnreadStr { - get { return this.ColorToString(this.ColorUnread); } - set { this.ColorUnread = this.StringToColor(value); } + get => this.ColorToString(this.ColorUnread); + set => this.ColorUnread = this.StringToColor(value); } [XmlIgnore] public Font FontRead = System.Drawing.SystemFonts.DefaultFont; public string FontReadStr { - get { return this.FontToString(this.FontRead); } - set { this.FontRead = this.StringToFont(value); } + get => this.FontToString(this.FontRead); + set => this.FontRead = this.StringToFont(value); } [XmlIgnore] public Color ColorRead = System.Drawing.SystemColors.ControlText; public string ColorReadStr { - get { return this.ColorToString(this.ColorRead); } - set { this.ColorRead = this.StringToColor(value); } + get => this.ColorToString(this.ColorRead); + set => this.ColorRead = this.StringToColor(value); } [XmlIgnore] public Color ColorFav = Color.FromKnownColor(System.Drawing.KnownColor.Red); public string ColorFavStr { - get { return this.ColorToString(this.ColorFav); } - set { this.ColorFav = this.StringToColor(value); } + get => this.ColorToString(this.ColorFav); + set => this.ColorFav = this.StringToColor(value); } [XmlIgnore] public Color ColorOWL = Color.FromKnownColor(System.Drawing.KnownColor.Blue); public string ColorOWLStr { - get { return this.ColorToString(this.ColorOWL); } - set { this.ColorOWL = this.StringToColor(value); } + get => this.ColorToString(this.ColorOWL); + set => this.ColorOWL = this.StringToColor(value); } [XmlIgnore] public Color ColorRetweet = Color.FromKnownColor(System.Drawing.KnownColor.Green); public string ColorRetweetStr { - get { return this.ColorToString(this.ColorRetweet); } - set { this.ColorRetweet = this.StringToColor(value); } + get => this.ColorToString(this.ColorRetweet); + set => this.ColorRetweet = this.StringToColor(value); } [XmlIgnore] public Font FontDetail = System.Drawing.SystemFonts.DefaultFont; public string FontDetailStr { - get { return this.FontToString(this.FontDetail); } - set { this.FontDetail = this.StringToFont(value); } + get => this.FontToString(this.FontDetail); + set => this.FontDetail = this.StringToFont(value); } [XmlIgnore] public Color ColorSelf = Color.FromKnownColor(System.Drawing.KnownColor.AliceBlue); public string ColorSelfStr { - get { return this.ColorToString(this.ColorSelf); } - set { this.ColorSelf = this.StringToColor(value); } + get => this.ColorToString(this.ColorSelf); + set => this.ColorSelf = this.StringToColor(value); } [XmlIgnore] public Color ColorAtSelf = Color.FromKnownColor(System.Drawing.KnownColor.AntiqueWhite); public string ColorAtSelfStr { - get { return this.ColorToString(this.ColorAtSelf); } - set { this.ColorAtSelf = this.StringToColor(value); } + get => this.ColorToString(this.ColorAtSelf); + set => this.ColorAtSelf = this.StringToColor(value); } [XmlIgnore] public Color ColorTarget = Color.FromKnownColor(System.Drawing.KnownColor.LemonChiffon); public string ColorTargetStr { - get { return this.ColorToString(this.ColorTarget); } - set { this.ColorTarget = this.StringToColor(value); } + get => this.ColorToString(this.ColorTarget); + set => this.ColorTarget = this.StringToColor(value); } [XmlIgnore] public Color ColorAtTarget = Color.FromKnownColor(System.Drawing.KnownColor.LavenderBlush); public string ColorAtTargetStr { - get { return this.ColorToString(this.ColorAtTarget); } - set { this.ColorAtTarget = this.StringToColor(value); } + get => this.ColorToString(this.ColorAtTarget); + set => this.ColorAtTarget = this.StringToColor(value); } [XmlIgnore] public Color ColorAtFromTarget = Color.FromKnownColor(System.Drawing.KnownColor.Honeydew); public string ColorAtFromTargetStr { - get { return this.ColorToString(this.ColorAtFromTarget); } - set { this.ColorAtFromTarget = this.StringToColor(value); } + get => this.ColorToString(this.ColorAtFromTarget); + set => this.ColorAtFromTarget = this.StringToColor(value); } [XmlIgnore] public Color ColorAtTo = Color.FromKnownColor(System.Drawing.KnownColor.Pink); public string ColorAtToStr { - get { return this.ColorToString(this.ColorAtTo); } - set { this.ColorAtTo = this.StringToColor(value); } + get => this.ColorToString(this.ColorAtTo); + set => this.ColorAtTo = this.StringToColor(value); } [XmlIgnore] public Color ColorInputBackcolor = Color.FromKnownColor(System.Drawing.KnownColor.LemonChiffon); public string ColorInputBackcolorStr { - get { return this.ColorToString(this.ColorInputBackcolor); } - set { this.ColorInputBackcolor = this.StringToColor(value); } + get => this.ColorToString(this.ColorInputBackcolor); + set => this.ColorInputBackcolor = this.StringToColor(value); } [XmlIgnore] public Color ColorInputFont = Color.FromKnownColor(System.Drawing.KnownColor.ControlText); public string ColorInputFontStr { - get { return this.ColorToString(this.ColorInputFont); } - set { this.ColorInputFont = this.StringToColor(value); } + get => this.ColorToString(this.ColorInputFont); + set => this.ColorInputFont = this.StringToColor(value); } [XmlIgnore] public Font FontInputFont = System.Drawing.SystemFonts.DefaultFont; public string FontInputFontStr { - get { return this.FontToString(this.FontInputFont); } - set { this.FontInputFont = this.StringToFont(value); } + get => this.FontToString(this.FontInputFont); + set => this.FontInputFont = this.StringToFont(value); } [XmlIgnore] public Color ColorListBackcolor = Color.FromKnownColor(System.Drawing.KnownColor.Window); public string ColorListBackcolorStr { - get { return this.ColorToString(this.ColorListBackcolor); } - set { this.ColorListBackcolor = this.StringToColor(value); } + get => this.ColorToString(this.ColorListBackcolor); + set => this.ColorListBackcolor = this.StringToColor(value); } [XmlIgnore] public Color ColorDetailBackcolor = Color.FromKnownColor(System.Drawing.KnownColor.Window); public string ColorDetailBackcolorStr { - get { return this.ColorToString(this.ColorDetailBackcolor); } - set { this.ColorDetailBackcolor = this.StringToColor(value); } + get => this.ColorToString(this.ColorDetailBackcolor); + set => this.ColorDetailBackcolor = this.StringToColor(value); } [XmlIgnore] public Color ColorDetail = Color.FromKnownColor(System.Drawing.KnownColor.ControlText); public string ColorDetailStr { - get { return this.ColorToString(this.ColorDetail); } - set { this.ColorDetail = this.StringToColor(value); } + get => this.ColorToString(this.ColorDetail); + set => this.ColorDetail = this.StringToColor(value); } [XmlIgnore] public Color ColorDetailLink = Color.FromKnownColor(System.Drawing.KnownColor.Blue); public string ColorDetailLinkStr { - get { return this.ColorToString(this.ColorDetailLink); } - set { this.ColorDetailLink = this.StringToColor(value); } + get => this.ColorToString(this.ColorDetailLink); + set => this.ColorDetailLink = this.StringToColor(value); } [XmlIgnore] @@ -267,8 +267,8 @@ namespace OpenTween /// public string FontUIGlobalStr { - get { return this.FontToString(this.FontUIGlobal); } - set { this.FontUIGlobal = this.StringToFont(value); } + get => this.FontToString(this.FontUIGlobal); + set => this.FontUIGlobal = this.StringToFont(value); } [XmlIgnore] diff --git a/OpenTween/TabsDialog.cs b/OpenTween/TabsDialog.cs index b0216d59..9ba8cbaa 100644 --- a/OpenTween/TabsDialog.cs +++ b/OpenTween/TabsDialog.cs @@ -38,7 +38,7 @@ namespace OpenTween private bool _MultiSelect = false; public bool MultiSelect { - get { return this._MultiSelect; } + get => this._MultiSelect; set { this._MultiSelect = value; this.UpdateTabList(); } } diff --git a/OpenTween/ToolStripAPIGauge.cs b/OpenTween/ToolStripAPIGauge.cs index b13a779f..bfcfc10e 100644 --- a/OpenTween/ToolStripAPIGauge.cs +++ b/OpenTween/ToolStripAPIGauge.cs @@ -123,24 +123,24 @@ namespace OpenTween [EditorBrowsable(EditorBrowsableState.Never)] public new string Text { - get { return base.Text; } - set { base.Text = value; } + get => base.Text; + set => base.Text = value; } [Browsable(false)] [EditorBrowsable(EditorBrowsableState.Never)] public new string ToolTipText { - get { return base.ToolTipText; } - set { base.ToolTipText = value; } + get => base.ToolTipText; + set => base.ToolTipText = value; } [DefaultValue(ToolStripItemDisplayStyle.Text)] [RefreshProperties(RefreshProperties.Repaint)] public new ToolStripItemDisplayStyle DisplayStyle { - get { return base.DisplayStyle; } - set { base.DisplayStyle = value; } + get => base.DisplayStyle; + set => base.DisplayStyle = value; } protected double remainMinutes = -1; diff --git a/OpenTween/Tween.cs b/OpenTween/Tween.cs index e6cd7048..1ac7310e 100644 --- a/OpenTween/Tween.cs +++ b/OpenTween/Tween.cs @@ -7118,8 +7118,8 @@ namespace OpenTween public Color InputBackColor { - get { return _clInputBackcolor; } - set { _clInputBackcolor = value; } + get => _clInputBackcolor; + set => _clInputBackcolor = value; } private void StatusText_Leave(object sender, EventArgs e) diff --git a/OpenTween/TweetDetailsView.cs b/OpenTween/TweetDetailsView.cs index cc8abffa..9909d825 100644 --- a/OpenTween/TweetDetailsView.cs +++ b/OpenTween/TweetDetailsView.cs @@ -59,8 +59,8 @@ namespace OpenTween [DefaultValue(false)] public new bool TabStop { - get { return base.TabStop; } - set { base.TabStop = value; } + get => base.TabStop; + set => base.TabStop = value; } /// ステータスバーに表示するテキストの変化を通知するイベント diff --git a/OpenTween/UpdateDialog.cs b/OpenTween/UpdateDialog.cs index 8b4d8bc7..bfa9c549 100644 --- a/OpenTween/UpdateDialog.cs +++ b/OpenTween/UpdateDialog.cs @@ -40,14 +40,14 @@ namespace OpenTween { public string SummaryText { - get { return this.LabelSummary.Text; } - set { this.LabelSummary.Text = value; } + get => this.LabelSummary.Text; + set => this.LabelSummary.Text = value; } public string DetailsText { - get { return this.TextDetail.Text; } - set { this.TextDetail.Text = value; } + get => this.TextDetail.Text; + set => this.TextDetail.Text = value; } public UpdateDialog() diff --git a/OpenTween/WaitingDialog.cs b/OpenTween/WaitingDialog.cs index ecd7ee9b..4a992a55 100644 --- a/OpenTween/WaitingDialog.cs +++ b/OpenTween/WaitingDialog.cs @@ -53,8 +53,8 @@ namespace OpenTween /// public string Message { - get { return this.labelMessage.Text; } - set { this.labelMessage.Text = value; } + get => this.labelMessage.Text; + set => this.labelMessage.Text = value; } public WaitingDialog() -- 2.11.0