コード例 #1
0
        public override void Initialize()
        {
            _reportsViewerController = SdlTradosStudio.Application.GetController <ReportsViewerController>();
            _reportsViewerController.ReportSelectionChanged += ReportsViewerController_ReportSelectionChanged;

            SetEnabled();
        }
コード例 #2
0
        public SettingsViewModel(Window window, Settings settings, ImageService imageService,
                                 PathInfo pathInfo, ReportsViewerController controller, List <string> groupNames)
        {
            _window       = window;
            _settings     = settings;
            _pathInfo     = pathInfo;
            _imageService = imageService;
            _controller   = controller;
            _groupNames   = groupNames;

            WindowTitle = "Settings";

            DisplayDateSuffixWithReportName = settings.DisplayDateSuffixWithReportName;
            GroupType = GroupTypes.FirstOrDefault(a => a.Type == settings.GroupByType) ?? GroupTypes.First();

            var reportTemplates = new List <ReportTemplate>();

            foreach (var reportTemplate in _controller.GetCustomReportTemplates())
            {
                if (!string.IsNullOrEmpty(reportTemplate.Path) && File.Exists(reportTemplate.Path))
                {
                    reportTemplate.IsAvailable = true;
                }

                reportTemplates.Add(reportTemplate);
            }

            _reportTemplates = new ObservableCollection <ReportTemplate>(reportTemplates);
        }
コード例 #3
0
        public override void Initialize()
        {
            _canEnable  = true;
            _controller = SdlTradosStudio.Application.GetController <ReportsViewerController>();

            SetEnabled();
        }
コード例 #4
0
        public override void Initialize()
        {
            _canEnable               = true;
            _pathInfo                = new PathInfo();
            _imageService            = new ImageService();
            _reportsViewerController = SdlTradosStudio.Application.GetController <ReportsViewerController>();

            SetEnabled();
        }
コード例 #5
0
		public override void Initialize()
		{
			_pathInfo = new PathInfo();
			_imageService = new ImageService();
			_reportsViewerController = SdlTradosStudio.Application.GetController<ReportsViewerController>();
			_reportsViewerController.ReportSelectionChanged += ReportsViewerController_ReportSelectionChanged;

			SetEnabled();
		}
コード例 #6
0
 public DataViewModel(List <Report> reports, ReportsViewerController reportViewerController)
 {
     Reports = reports;
     _reportViewerController = reportViewerController;
 }