Ejemplo n.º 1
0
        private void OnInitialized(IApplication app, IServiceContainer svcProvider, IModule[] modules)
        {
            m_BatchInAppModule = modules.OfType <IBatchInAppModule>().FirstOrDefault();

            if (m_BatchInAppModule != null)
            {
                m_EntDesc = svcProvider.GetService <ICadDescriptor>();
                m_BatchInAppModule.ProcessInput += OnProcessInput;
            }
        }
Ejemplo n.º 2
0
        private void OnHostInitialized(IApplication app, IServiceContainer svcProvider, IModule[] modules)
        {
            m_MacroRunnerSvc = svcProvider.GetService <IMacroExecutor>();
            m_Msg            = svcProvider.GetService <IMessageService>();
            m_Logger         = svcProvider.GetService <IXLogger>();

            m_CadDesc = svcProvider.GetService <ICadDescriptor>();

            m_Data = new AssemblyBatchData(m_CadDesc);
        }
Ejemplo n.º 3
0
        public SwApplicationProvider(IXLogger logger, IMacroExecutor svc, ICadDescriptor entDesc)
        {
            m_Logger = logger;

            MacroRunnerService = svc;
            Descriptor         = entDesc;
            m_CustomServices   = new ServiceCollection();
            m_CustomServices.AddOrReplace <IXLogger>(() => m_Logger);

            m_ForceDisabledAddIns = new Dictionary <Process, List <string> >();
        }
Ejemplo n.º 4
0
        public CommandManagerVM(IToolbarConfigurationProvider confsProvider,
                                IMessageService msgService, IXLogger logger, ICadDescriptor cadEntDesc, Func <CommandGroupInfo, CommandGroupVM> cmdGrpFact)
        {
            m_ConfsProvider = confsProvider;
            m_MsgService    = msgService;
            m_Logger        = logger;

            HelpCommand = new RelayCommand(Help);

            m_MacroExtensions = cadEntDesc.MacroFileFilters
                                .Select(f => f.Extensions)
                                .SelectMany(x => x)
                                .Union(XCadMacroProvider.Filter.Extensions)
                                .Select(x => Path.GetExtension(x))
                                .Distinct(StringComparer.InvariantCultureIgnoreCase)
                                .ToArray();

            m_CmdGrpFact = cmdGrpFact;
        }
Ejemplo n.º 5
0
 public JobItemDocumentVM(JobItemDocument jobItemFile, ICadDescriptor cadDesc) : base(jobItemFile)
 {
     m_JobItemFile = jobItemFile;
     Macros        = m_JobItemFile.Operations.Select(o => new JobItemMacroVM(o)).ToArray();
     DisplayObject = new JobItemCadObject(jobItemFile.Document, jobItemFile.FilePath, cadDesc);
 }
Ejemplo n.º 6
0
 public JobItemCadObject(IXDocument doc, string filePath, ICadDescriptor cadDesc)
 {
     m_Doc     = doc;
     Path      = filePath;
     m_CadDesc = cadDesc;
 }
Ejemplo n.º 7
0
 protected override FileFilter[] GetFileFilters(ICadDescriptor cadEntDesc)
 => new FileFilter[0];