using System.Windows;
using TaskIt.Assets.Resources;

namespace TaskIt.ViewModels
{
    public abstract class WidgetViewModelBase : TaskItViewModelBase
    {
        public void ShowBusyIndicator()
        {
            IsOperationInProgress = true;
        }

        public void HideBusyIndicator()
        {
            IsOperationInProgress = false;
        }

        # region UI Events

        public event RoutedEventHandler DataLoaded;
        public void NotifyDataLoaded()
        {
            if (DataLoaded != null) { DataLoaded(this, new RoutedEventArgs()); }
        }

        public event RoutedEventHandler ViewHtml;
        public void NotifyViewHtml()
        {
            if (ViewHtml != null) { ViewHtml(this, new RoutedEventArgs()); }
        }

        # endregion

        # region Resource Strings

        public string ResourceMessageLoadingData
        {
            get { return CommonStrings.Message_LoadingData; }
        }

        # endregion

    }
}