Esempio n. 1
0
 private void unregisterModule()
 {
     WriteMessage("Unregister the module from Noah 4");
     try
     {
         using (var registration = new Himsa.Noah.Modules.Registration())
         {
             registration.UnRegisterModule(ManufactureID, ManufactureModuleIDother);
         }
     }
     catch (Exception err)
     {
         WriteMessage(err.ToString());
     }
 }
Esempio n. 2
0
        //Should register when module is deployed/installed. required only once after deployment
        //Registration is necessary to connect to Noah
        //"This task is accomplished by using the ‘Himsa.Noah.Modules.Registration’ and ‘Himsa.Noah.Modules.RegistrationData’ classes."
        private void registerModule()
        {
            WriteMessage("Register module to Noah 4 as Other Module");
            using (var regData = new Himsa.Noah.Modules.RegistrationData
            {
                ModuleName = "Noah 4 FRESH Sample Module as OTHER",
                ModuleCategory = 2, //"mcOther - 2-  Other type of module
                ExePath = Application.ExecutablePath,
                ManufacturerId = ManufactureID,
                ManufacturerModuleId = ManufactureModuleIDother,
                ButtonDLLPath = Application.ExecutablePath,
                HelpPath = "",
                PrintHandler = Application.ExecutablePath,
                Show = true,
                ActionMake = new List<Himsa.Noah.Modules.Registration.DataType>
                                        {
                                            new Himsa.Noah.Modules.Registration.DataType {DataTypeCode = 1, DataFmtStd = 100},
                                        },
                ActionShow = new List<Himsa.Noah.Modules.Registration.DataType>
                                        {
                                            new Himsa.Noah.Modules.Registration.DataType {DataTypeCode = 1, DataFmtStd = 100},
                                            new Himsa.Noah.Modules.Registration.DataType {DataTypeCode = 1, DataFmtStd = 200}
                                        },
                Protocols = null,
                ModuleAlias = new List<Himsa.Noah.Modules.Registration.ModuleAlias>
                                         {
                                             new Himsa.Noah.Modules.Registration.ModuleAlias {ManufacturerId = ManufactureID, ModuleId = 2}
                                         },
                IMCServer = "",
                UninstallCmd = ""
            })
            {

                using (var registration = new Himsa.Noah.Modules.Registration())
                {
                    registration.RegisterModule(regData);
                }
            }
        }