Catrobat.IDE.Core.ViewModels.Main.MainViewModel.ShowMessagesAction C# (CSharp) Method

ShowMessagesAction() private method

private ShowMessagesAction ( ) : void
return void
        private void ShowMessagesAction()
        {
            string notificationString = "";
            int length = 15;
            if (_showDownloadMessage)
            {
                //var portbleImage = new PortableImage();
                //await portbleImage.LoadFromResources(ResourceScope.Ide,
                //    "Content/Images/ApplicationBar/dark/appbar.download.rest.png");
                if (_lastImportedProgram.Length > length)
                {
                    _lastImportedProgram = _lastImportedProgram.Substring(0, length) + "...";
                }
                notificationString = String.Format(AppResourcesHelper.Get("Main_DownloadQueueMessage"), _lastImportedProgram);

                ServiceLocator.NotifictionService.ShowToastNotification("",
                    notificationString, ToastDisplayDuration.Short, ToastTag.Default);
                _showDownloadMessage = false;
            }
            if (_showUploadMessage)
            {
                //var portbleImage = new PortableImage();
                //await portbleImage.LoadFromResources(ResourceScope.Ide,
                //    "Content/Images/ApplicationBar/dark/appbar.upload.rest.png");
                if (_lastUploadedProgram.Length > length)
                {
                    _lastUploadedProgram = _lastUploadedProgram.Substring(0, length) + "...";
                }
                notificationString = String.Format(AppResourcesHelper.Get("Main_UploadQueueMessage"), _lastUploadedProgram);
                ServiceLocator.NotifictionService.ShowToastNotification("",
                    notificationString, ToastDisplayDuration.Short, ToastTag.Default);
                _showUploadMessage = false;
            }
        }