Skip to content

Commit

Permalink
🎇 Style: 不必要的 public
Browse files Browse the repository at this point in the history
  • Loading branch information
Dynesshely committed Jun 16, 2022
1 parent 8f0aafc commit 185f120
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 23 deletions.
6 changes: 3 additions & 3 deletions KitX Dashboard/ViewModels/MainWindowViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@

namespace KitX_Dashboard.ViewModels
{
public class MainWindowViewModel : ViewModelBase
internal class MainWindowViewModel : ViewModelBase
{
public double DB_Width
internal double DB_Width
{
get => (double)(Helper.local_db_table.Query(1).ReturnResult as List<object>)[1];
set => (Helper.local_db_table.Query(1).ReturnResult as List<object>)[1] = value;
}

public double DB_Height
internal double DB_Height
{
get => (double)(Helper.local_db_table.Query(1).ReturnResult as List<object>)[2];
set => (Helper.local_db_table.Query(1).ReturnResult as List<object>)[2] = value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

namespace KitX_Dashboard.ViewModels.Pages.Controls
{
public class Settings_AboutViewModel : ViewModelBase
internal class Settings_AboutViewModel : ViewModelBase
{
public Settings_AboutViewModel()
internal Settings_AboutViewModel()
{
InitCommands();
}
Expand All @@ -20,19 +20,19 @@ private void InitCommands()
/// <summary>
/// 版本号属性
/// </summary>
public static string VersionText => Program.LocalVersion.GetVersionText();
internal static string VersionText => Program.LocalVersion.GetVersionText();

/// <summary>
/// 制作人员列表属性
/// </summary>
public bool AuthorsListVisibility { get; set; } = false;
internal bool AuthorsListVisibility { get; set; } = false;

public int clickCount = 0;
internal int clickCount = 0;

/// <summary>
/// 应用名称按钮单击命令
/// </summary>
public DelegateCommand? AppNameButtonClickedCommand { get; set; }
internal DelegateCommand? AppNameButtonClickedCommand { get; set; }

private void AppNameButtonClicked(object _) => ++clickCount;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@

namespace KitX_Dashboard.ViewModels.Pages.Controls
{
public class Settings_GeneralViewModel : ViewModelBase
internal class Settings_GeneralViewModel : ViewModelBase
{

public Settings_GeneralViewModel()
internal Settings_GeneralViewModel()
{
InitCommands();
}
Expand All @@ -34,7 +34,7 @@ private void InitCommands()
/// <summary>
/// 可选的应用主题属性
/// </summary>
public string[] AppThemes { get; } = new[]
internal string[] AppThemes { get; } = new[]
{
FluentAvaloniaTheme.LightModeString,
FluentAvaloniaTheme.DarkModeString,
Expand All @@ -51,7 +51,7 @@ private void InitCommands()
/// <summary>
/// 主题色属性
/// </summary>
public Color2 ThemeColor
internal Color2 ThemeColor
{
get => new((Application.Current.Resources["ThemePrimaryAccent"] as SolidColorBrush).Color);
set => nowColor = value;
Expand All @@ -60,7 +60,7 @@ public Color2 ThemeColor
/// <summary>
/// 当前应用主题属性
/// </summary>
public string CurrentAppTheme
internal string CurrentAppTheme
{
get => _currentAppTheme;
set
Expand All @@ -77,7 +77,7 @@ public string CurrentAppTheme
/// <summary>
/// 加载语言
/// </summary>
public static void LoadLanguage()
internal static void LoadLanguage()
{
string lang = (Helper.local_db_table_app.Query(1).ReturnResult as List<object>)[2] as string;
Application.Current.Resources.MergedDictionaries.Clear();
Expand All @@ -91,7 +91,7 @@ public static void LoadLanguage()
/// <summary>
/// 显示语言属性
/// </summary>
public static int LanguageSelected
internal static int LanguageSelected
{
get => (string)(Helper.local_db_table_app.Query(1).ReturnResult as List<object>)[2] switch
{
Expand All @@ -118,7 +118,7 @@ public static int LanguageSelected
/// <summary>
/// Mica 效果是否启用属性
/// </summary>
public static int MicaStatus
internal static int MicaStatus
{
get => (bool)(Helper.local_db_table.Query(1).ReturnResult as List<object>)[5] ? 0 : 1;
set => (Helper.local_db_table.Query(1).ReturnResult as List<object>)[5] = value != 1;
Expand All @@ -127,7 +127,7 @@ public static int MicaStatus
/// <summary>
/// Mica 效果透明度属性
/// </summary>
public static double MicaOpacity
internal static double MicaOpacity
{
get => (double)(Helper.local_db_table.Query(1).ReturnResult as List<object>)[6];
set => (Helper.local_db_table.Query(1).ReturnResult as List<object>)[6] = value;
Expand All @@ -136,12 +136,12 @@ public static double MicaOpacity
/// <summary>
/// 网络服务端口属性
/// </summary>
public static int WebServerPort => GlobalInfo.ServerPortNumber;
internal static int WebServerPort => GlobalInfo.ServerPortNumber;

/// <summary>
/// 确认主题色变更命令
/// </summary>
public DelegateCommand? ColorConfirmedCommand { get; set; }
internal DelegateCommand? ColorConfirmedCommand { get; set; }

private void ColorConfirmed(object _)
{
Expand Down
6 changes: 3 additions & 3 deletions KitX Dashboard/ViewModels/Pages/SettingsViewModel.cs
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
namespace KitX_Dashboard.ViewModels.Pages
{
public class SettingsViewModel : ViewModelBase
internal class SettingsViewModel : ViewModelBase
{
public SettingsViewModel()
internal SettingsViewModel()
{

}

/// <summary>
/// ÒÑÑ¡Ôñ±êÇ©Ò³±àºÅÊôÐÔ
/// </summary>
public int TabControlSelectedIndex { get; set; } = 0;
internal int TabControlSelectedIndex { get; set; } = 0;
}
}

0 comments on commit 185f120

Please sign in to comment.