Esempio n. 1
0
        public static void TriggerModule(IModul mdl, ModulEvent modulevent, params object[] args)
        {
            switch (modulevent)
            {
            case ModulEvent.DXClick:
                mdl.DXClick((MouseEventArgs)args[0]);
                break;

            case ModulEvent.Load:
                mdl.Load();
                break;

            case ModulEvent.RegionLoad:
                mdl.RegionLoad((RegionMgr.Region)args[0]);
                break;

            case ModulEvent.RegionUnload:
                mdl.RegionUnload((RegionMgr.Region)args[0]);
                break;

            case ModulEvent.Unload:
                mdl.Unload();
                break;

            case ModulEvent.Filter:
                mdl.Filter();
                break;

            case ModulEvent.Unfilter:
                mdl.Unfilter();
                break;
            }
        }
Esempio n. 2
0
        public static void PreloadModules()
        {
            Assembly asmly = Assembly.GetCallingAssembly();

            foreach (Type type in asmly.GetTypes())
            {
                if (type == null)
                {
                    continue;
                }

                ModulAttribute attrib = GetModulAttributeForType(type);

                if (attrib == null)
                {
                    continue;
                }



                IModul o = (IModul)Activator.CreateInstance(type);
                m_Modules.Add(o);
            }
            TriggerModules(ModulEvent.Load);
        }
Esempio n. 3
0
 public ViewModelLayer(IModul modeLayer) : base(modeLayer)
 {
     if (modeLayer == null)
     {
         throw new ArgumentNullException(nameof(modeLayer));
     }
     Ninject();
 }
Esempio n. 4
0
        public KryptoRepository(String file = "Krypto") : base(null)
        {
            Ninject();
            // kernelТекущая.Get<IContextRepository>(GetConstructorArgument("file", file), GetConstructorArgument("modul", null));
            // RequestInsideModul = (IModul)kernelТекущая.Get<IСacheModul>();


            IModul modul  = (IModul)kernelТекущая.Get <IContextRepository>(GetConstructorArgument("file", file), GetConstructorArgument("modul", null));
            IModul modul2 = (IModul)kernelТекущая.Get <ITrackingСhangesModul>(GetConstructorArgument("modul", modul));

            RequestInsideModul = (IModul)kernelТекущая.Get <IСacheModul>(GetConstructorArgument("modul", modul2));
        }
Esempio n. 5
0
 /// <summary>
 /// Creates a new Geometry Object
 /// </summary>
 /// <param name="model">The Model</param>
 /// <param name="drawlevel">The Render Level</param>
 /// <param name="lvl">The Detail Level</param>
 /// <param name="x">World X</param>
 /// <param name="y">World Y</param>
 /// <param name="z">World Z</param>
 /// <param name="yaw">Yaw</param>
 /// <param name="pitch">Pitch</param>
 /// <param name="roll">Roll</param>
 public GeometryObj(IModul modul, Model model, DrawLevel drawlevel, DetailLevel lvl, float x, float y, float z, float yaw,
                    float pitch, float roll, Vector3 scale, bool isMovable, Boolean showHeading)
 {
     Modul       = modul;
     Model       = model;
     DrawLevel   = drawlevel;
     DetailLevel = lvl;
     X           = x;
     Y           = y;
     Z           = z;
     Yaw         = yaw;
     Pitch       = pitch;
     Roll        = roll;
     ScaleVector = scale;
     IsMovable   = isMovable;
     ShowHeading = showHeading;
 }
Esempio n. 6
0
        public static void VypisKonfiguraci(IModul modul)
        {
            var properties = modul.GetType().GetProperties()
                .Where(p => p.CanRead && p.CanWrite)
                .Where(p => p.GetMethod.IsPublic)
                .Where(p => p.SetMethod.IsPublic);

            foreach(var property in properties)
            {
                Console.WriteLine($"{property.Name}: {property.GetValue(modul)}");

                if(property.PropertyType == typeof(double))
                {
                    property.SetValue(modul, 10);
                    Console.WriteLine($"{property.Name} * 10: {property.GetValue(modul)}");
                }
            }
        }
Esempio n. 7
0
        void filterMenuItem_Click(object sender, EventArgs e)
        {
            ToolStripMenuItem item = (ToolStripMenuItem)sender;

            IModul mod = ModulMgr.GetModulByName(item.Text);

            if (mod == null)
            {
                throw new ArgumentException(String.Format(Resources.msgModuleFoundError, item.Text));
            }

            if (item.Checked)
            {
                ModulMgr.TriggerModule(mod, ModulEvent.Unfilter);
            }
            else
            {
                ModulMgr.TriggerModule(mod, ModulEvent.Filter);
            }
        }
Esempio n. 8
0
 public static void TriggerModule(IModul mdl, ModulEvent modulevent, params object[] args)
 {
     switch (modulevent)
     {
         case ModulEvent.DXClick:
             mdl.DXClick((MouseEventArgs) args[0]);
             break;
         case ModulEvent.Load:
             mdl.Load();
             break;
         case ModulEvent.RegionLoad:
             mdl.RegionLoad((RegionMgr.Region) args[0]);
             break;
         case ModulEvent.RegionUnload:
             mdl.RegionUnload((RegionMgr.Region) args[0]);
             break;
         case ModulEvent.Unload:
             mdl.Unload();
             break;
         case ModulEvent.Filter:
             mdl.Filter();
             break;
         case ModulEvent.Unfilter:
             mdl.Unfilter();
             break;
     }
 }
Esempio n. 9
0
 public WebIPModul(IWebIP otion, IModul modul) : base(modul)
 {
     Option = otion;
 }
Esempio n. 10
0
 public ModulComand(IModul modul) : base(modul)
 {
 }
Esempio n. 11
0
 public Node(IModul descriptor)
 {
     Text = descriptor.Name;
     Tag  = descriptor;
 }
Esempio n. 12
0
 public ContextRepository(String file = "Krypto", IModul modul = null) : this(file)
 {
 }
Esempio n. 13
0
 public СacheModul(IModul modul) : base(modul)
 {
     cacheEntity = new List <IMyEntity>();
 }
Esempio n. 14
0
 public TrackingСhangesModul(IModul modul) : base(modul)
 {
 }
Esempio n. 15
0
 public Modul(IModul modul)
 {
     NextEternalModul = modul;
 }
Esempio n. 16
0
 public KryptoRepository(IModul repository) : base(repository)
 {
     Ninject();
 }
Esempio n. 17
0
 // IModul modul;
 public ModeLayer(IModul modul) : base(modul)
 {
     Ninject();
 }
Esempio n. 18
0
        // IEnumerable<IMyEntity> observable;

        public ConversionModul(IModul modul) : base(modul)
        {
        }
Esempio n. 19
0
 public static void AddModule(IModul modul)
 {
     modules.Add(modul);
 }
Esempio n. 20
0
 public ModulInject(IModul modul) : base(modul)
 {
 }