Files
DP44/Common/DTS.CommonCore/Interface/Database/IDatabaseStatusBarViewModel.cs
2026-04-17 14:55:32 -04:00

51 lines
1.8 KiB
C#

using System.Windows.Media;
using DTS.Common.Base;
using DTS.Common.Enums.Database;
namespace DTS.Common.Interface.Database
{
/// <summary>
/// this viewmodel handles the logic for database status in a UI
/// it handles the current connection and status
/// </summary>
public interface IDatabaseStatusBarViewModel : IBaseViewModel
{
/// <summary>
/// the associated view for the model
/// </summary>
IDatabaseStatusBarView View { get; set; }
//frees up any memory associated with viewmodel
void Unset();
/// <summary>
/// gets the database type
/// use initializevalues to populate
/// </summary>
DbType DatabaseType { get; }
/// <summary>
/// gets whether the remote database is connected
/// use initializevalues to populate
/// </summary>
bool RemoteConnected { get; }
/// <summary>
/// the server (not db) name
/// use initialize values to populate
/// </summary>
string ServerName { get; }
/// <summary>
/// sets the initial values for db type, server name, and remote connection status
/// </summary>
/// <param name="dbType"></param>
/// <param name="serverName"></param>
/// <param name="remoteConnected"></param>
void InitializeValues(DbType dbType, string serverName, bool remoteConnected);
/// <summary>
/// returns the current active db name (either server name or local depending on db type and remote connection status)
/// </summary>
string ActiveDbName { get; }
/// <summary>
/// returns the background brush for the active db name
/// </summary>
Brush BackgroundBrush { get; }
}
}