-
Notifications
You must be signed in to change notification settings - Fork 130
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Time Tracker 5.0.2.0 - SDLCOM-6009: Time Tracker Start/Stop Actions
* Time Tracker 5.0.2.0: Fix activity tracker not starting from editor if Studio Time Tracker View not opened first * Fix Start/Stop button incorrect state
- Loading branch information
Showing
5 changed files
with
51 additions
and
219 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
using Sdl.Community.Studio.Time.Tracker.Panels.Main; | ||
using Sdl.Desktop.IntegrationApi; | ||
using Sdl.Desktop.IntegrationApi.Extensions; | ||
using Sdl.Desktop.IntegrationApi.Interfaces; | ||
using Sdl.Desktop.IntegrationApi.Notifications.Events; | ||
using Sdl.TranslationStudioAutomation.IntegrationApi; | ||
using Sdl.TranslationStudioAutomation.IntegrationApi.Internal; | ||
using System; | ||
|
||
namespace Sdl.Community.Studio.Time.Tracker | ||
{ | ||
[ApplicationInitializer] | ||
public class ApplicationInitializer : IApplicationInitializer | ||
{ | ||
private static StudioTimeTrackerViewController _studioTimeTrackerViewController; | ||
|
||
private SdlTradosStudioApplication SdlTradosStudioApplication => SdlTradosStudio.Application; | ||
|
||
private StudioTimeTrackerViewController StudioTimeTrackerViewController => _studioTimeTrackerViewController ??= | ||
SdlTradosStudioApplication.GetController<StudioTimeTrackerViewController>(); | ||
|
||
public void Execute() => | ||
SdlTradosStudioApplication.GetService<IStudioEventAggregator>() | ||
.GetEvent<StudioWindowCreatedNotificationEvent>().Subscribe(OnStudioWindowCreated); | ||
|
||
private void OnStudioWindowCreated(StudioWindowCreatedNotificationEvent @event) => StudioTimeTrackerViewController.Initialize(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters