Exemple #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;
            }
        }
Exemple #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);
        }
Exemple #3
0
 public ViewModelLayer(IModul modeLayer) : base(modeLayer)
 {
     if (modeLayer == null)
     {
         throw new ArgumentNullException(nameof(modeLayer));
     }
     Ninject();
 }
        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));
        }
Exemple #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;
 }
Exemple #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)}");
                }
            }
        }
Exemple #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);
            }
        }
 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;
     }
 }
Exemple #9
0
 public WebIPModul(IWebIP otion, IModul modul) : base(modul)
 {
     Option = otion;
 }
Exemple #10
0
 public ModulComand(IModul modul) : base(modul)
 {
 }
Exemple #11
0
 public Node(IModul descriptor)
 {
     Text = descriptor.Name;
     Tag  = descriptor;
 }
 public ContextRepository(String file = "Krypto", IModul modul = null) : this(file)
 {
 }
Exemple #13
0
 public СacheModul(IModul modul) : base(modul)
 {
     cacheEntity = new List <IMyEntity>();
 }
Exemple #14
0
 public TrackingСhangesModul(IModul modul) : base(modul)
 {
 }
Exemple #15
0
 public Modul(IModul modul)
 {
     NextEternalModul = modul;
 }
 public KryptoRepository(IModul repository) : base(repository)
 {
     Ninject();
 }
Exemple #17
0
 // IModul modul;
 public ModeLayer(IModul modul) : base(modul)
 {
     Ninject();
 }
Exemple #18
0
        // IEnumerable<IMyEntity> observable;

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