Ejemplo n.º 1
0
 public static void InsertModuleAction(long id, string txt)
 {
     DbEntry.UsingTransaction(delegate
     {
         DeleteModuleAction(id, txt);
         MainModule mm = MainModule.FindById(id);
         MainAction ma = MainAction.FindOne(CK.K["ChineseName"] == txt);
         mm.Actions.Add(ma);
         mm.Save();
     });
 }
Ejemplo n.º 2
0
 public static void InsertUserModule(long id, string txt)
 {
     DbEntry.UsingTransaction(delegate
     {
         DeleteUserModule(id, txt);
         MainOptr mm   = MainOptr.FindById(id);
         MainModule ma = MainModule.FindOne(CK.K["ChineseName"] == txt);
         mm.Modules.Add(ma);
         mm.Save();
     });
 }
Ejemplo n.º 3
0
 public static void InsertUserModule(long id, long mmId)
 {
     DbEntry.UsingTransaction(delegate
     {
         DeleteUserModule(id, mmId);
         MainOptr mm   = MainOptr.FindById(id);
         MainModule ma = MainModule.FindById(mmId);
         mm.Modules.Add(ma);
         mm.Save();
     });
 }
Ejemplo n.º 4
0
 public static MainModule GetMainModuleByParentID(long id)
 {
     if (id == 0)
     {
         return(MainModule.FindById(1));
     }
     else
     {
         return(MainModule.FindById(id));
     }
 }
Ejemplo n.º 5
0
            public StartupParticleSystemData(int index, ParticleSystem particleSystem)
            {
                //IL_0001: Unknown result type (might be due to invalid IL or missing references)
                //IL_0006: Unknown result type (might be due to invalid IL or missing references)
                //IL_0011: Unknown result type (might be due to invalid IL or missing references)
                //IL_0016: Unknown result type (might be due to invalid IL or missing references)
                MainModule main = particleSystem.get_main();

                particleSystemIndex = index;
                m_ringBufferMode    = main.get_ringBufferMode();
            }
Ejemplo n.º 6
0
    private void SpawnDestroyEffect()  // partical çıkma pozisyonu ve sprite rengine göre oluşması
    {
        Vector3    brickPos      = gameObject.transform.position;
        Vector3    spawnPosition = new Vector3(brickPos.x, brickPos.y, brickPos.z - 0.2f);
        GameObject effect        = Instantiate(DestroyEffect.gameObject, spawnPosition, Quaternion.identity);

        MainModule mm = effect.GetComponent <ParticleSystem>().main;

        mm.startColor = this.sr.color;
        Destroy(effect, DestroyEffect.main.startLifetime.constant);
    }
        private IEnumerable <Instruction> GetReturnOnEqualsInstructionsForMapping(ILProcessor processor, FieldDefinition backingField, MethodReference getValue, Instruction cont, Instruction ret)
        {
            // The PropertyMapping field type is a generic instance type.
            GenericInstanceType mappingType = backingField.FieldType as GenericInstanceType;

            // Get a reference to the equality operator for the generic instance type argument.
            TypeReference type = mappingType.GenericArguments.First();

            // We need to initialize the local variables.
            processor.Body.Variables.Add(new VariableDefinition(MainModule.ImportReference(typeof(bool))));
            processor.Body.InitLocals = true;

            yield return(processor.Create(OpCodes.Nop));

            yield return(processor.Create(OpCodes.Ldarg_0));

            yield return(processor.Create(OpCodes.Ldarg_0));

            yield return(processor.Create(OpCodes.Ldfld, backingField));

            yield return(processor.Create(OpCodes.Callvirt, getValue));

            yield return(processor.Create(OpCodes.Ldarg_1));

            if (type.IsValueType)
            {
                yield return(processor.Create(OpCodes.Ceq));
            }
            else
            {
                MethodReference equals = type.TryGetMethodReference(Assembly, "Equals", type, type);

                if (equals == null)
                {
                    MethodDefinition equalsDefinition = Assembly.GetSystemObjectEqualsMethodReference();

                    equals = MainModule.ImportReference(equalsDefinition);
                }

                yield return(processor.Create(OpCodes.Call, equals));
            }

            yield return(processor.Create(OpCodes.Ldc_I4_0));

            yield return(processor.Create(OpCodes.Ceq));

            yield return(processor.Create(OpCodes.Stloc_0));

            yield return(processor.Create(OpCodes.Ldloc_0));

            yield return(processor.Create(OpCodes.Brtrue_S, cont));

            yield return(processor.Create(OpCodes.Br_S, ret));
        }
Ejemplo n.º 8
0
		private static SplashForm splash;// = new SplashForm();

		internal static void Launch()
		{
			Application.CurrentCulture = CultureInfo.InvariantCulture;
            Application.EnableVisualStyles();
            //Application.SetCompatibleTextRenderingDefault(false);
		    splash = new SplashForm();
			splash.Show();
			Timer timer = new Timer();
			//Configure this timer to restart each second ( 1000 millis)
			timer.Interval = 1000;
			timer.Elapsed += new ElapsedEventHandler(timer_Elapsed);
			timer.Start();
			//splash.Refresh();
			
			//Application.DoEvents();
			Application.DoEvents();
			MainModule.Initialize("data");
			splash.SetLoadProgress(50);
			splash.Refresh();
			Application.DoEvents();

			UpdaterHelper.UpdateInfo info;
			info = UpdaterHelper.CheckFromUpdates();
			Application.DoEvents();
			if (info.UpdateAvailable)
			{
				UpdateForm updateForm;
				updateForm = new UpdateForm(info);
				updateForm.ShowDialog();
				Application.DoEvents();
			}

			splash.SetLoadProgress(60);
			splash.Refresh();
			Application.DoEvents();
			IconsManager.Initialize();
			Application.DoEvents();
			MainForm main = new MainForm();
            //if (runSingleInstance)
            //{
            //    main.HandleCreated += new EventHandler(main_HandleCreated);
            //}
			GC.Collect();
            timer.Stop();
            timer.Close();
			splash.SetLoadProgress(100);
			splash.Refresh();
			Application.DoEvents();
			splash.Close();
			splash = null;
			Application.DoEvents();
            
			Application.Run(main);
		} //Launch
Ejemplo n.º 9
0
    private void SpawnDestroyEffect()
    {
        Vector3    brickPos       = gameObject.transform.position;
        Vector3    spawnEffectPos = new Vector3(brickPos.x, brickPos.y, brickPos.z - 0.2f);
        GameObject effect         = Instantiate(destroyEffect.gameObject, spawnEffectPos, Quaternion.identity);

        MainModule mm = effect.GetComponent <ParticleSystem>().main;

        mm.startColor = this.sr.color;
        Destroy(effect, destroyEffect.main.startLifetime.constant);
    }
Ejemplo n.º 10
0
        void DestroyEffect()
        {
            Vector3    brickPosition  = gameObject.transform.position;
            Vector3    effectPosition = new Vector3(brickPosition.x, brickPosition.y, brickPosition.z - 0.2f);
            GameObject effect         = Instantiate(destoryEffect.gameObject, effectPosition, Quaternion.identity);

            MainModule mm = effect.GetComponent <ParticleSystem>().main;

            mm.startColor = sr.color;
            Destroy(effect, destoryEffect.main.startLifetime.constant);
        }
Ejemplo n.º 11
0
    private void SpawnDestroyEffect()
    {
        Vector3    brick    = transform.position;
        Vector3    spawnPos = new Vector3(brick.x, brick.y, brick.z - 0.2f);
        GameObject effect   = Instantiate(destroyEffect.gameObject, spawnPos, Quaternion.identity);

        MainModule mm = effect.GetComponent <ParticleSystem>().main;

        destroyEffect_rn = effect.GetComponent <ParticleSystemRenderer>();
        destroyEffect_rn.material.color = this._mr.material.color;
        Destroy(effect, destroyEffect.main.startLifetime.constant);
    }
Ejemplo n.º 12
0
    private void ShowDestroyEffect(ParticleSystem particleEffect)
    {
        Vector3 brickPosition = gameObject.transform.position;
        Vector3 spawnPosition = new Vector3(brickPosition.x, brickPosition.y, brickPosition.z + 2f);

        _destroyEffect = Instantiate(particleEffect.gameObject, spawnPosition, Quaternion.identity);
        MainModule mm = _destroyEffect.GetComponent <ParticleSystem>().main;

        mm.startColor = spriteRenderer.color;
        _destroyEffect.GetComponent <ParticleSystem>().Play();
        Destroy(_destroyEffect, particleEffect.main.startLifetime.constant);
    }
Ejemplo n.º 13
0
    private void SpawnDestroyEffect()
    {
        Vector3    posBloque = gameObject.transform.position;
        Vector3    spawnPos  = new Vector3(posBloque.x, posBloque.y, posBloque.z - 0.2f);
        GameObject efecto    = Instantiate(efectoDestruccion.gameObject, spawnPos, Quaternion.identity);

        MainModule mm = efecto.GetComponent <ParticleSystem>().main;

        mm.startColor = sr.color;

        Destroy(efecto, efectoDestruccion.main.startLifetime.constant);
    }
Ejemplo n.º 14
0
        public override void LoadPanels(MainForm mainForm, ServiceContainer serviceContainer, List <ModuleProvider> moduleProviders)
        {
            if (ServerManager == null && _status != NodeStatus.Loaded)
            {
                return;
            }

            serviceContainer.RemoveService(typeof(IConfigurationService));
            serviceContainer.RemoveService(typeof(IControlPanel));
            var server = (ServerManager)Tag;
            var panel  = new ServerPage(server);
            var scope  = ManagementScope.Server;

            serviceContainer.AddService(typeof(IControlPanel), new ControlPanel());
            serviceContainer.AddService(typeof(IConfigurationService),
                                        new ConfigurationService(mainForm, server.GetApplicationHostConfiguration(), scope, server, null, null,
                                                                 null, null, null));

            var moduleDefinitions = new List <ModuleDefinition>();
            var modules           = new List <Module>();

            foreach (var provider in moduleProviders)
            {
                if (!provider.SupportsScope(scope))
                {
                    continue;
                }

                var definition = provider.GetModuleDefinition(null);
                moduleDefinitions.Add(definition);
                var type = Type.GetType(definition.ClientModuleTypeName);
                if (type == null)
                {
                    continue;
                }

                if (!typeof(Module).IsAssignableFrom(type))
                {
                    continue;
                }

                var module = (Module)Activator.CreateInstance(type);
                module.Initialize(serviceContainer, null);
                modules.Add(module);
            }

            IModulePage page       = panel;
            var         mainModule = new MainModule();

            mainModule.Initialize(serviceContainer, null);
            page.Initialize(mainModule, null, null);
            mainForm.LoadPage(page);
        }
Ejemplo n.º 15
0
        public void SetUp()
        {
            DbHelper.Initialize("test");
            DbHelper.DeleteDataSource();
            MainModule.Initialize("test");

            tasksRowChangedEvent_RowAddedCount   = 0;
            tasksRowChangedEvent_RowUpdatedCount = 0;
            tasksRowDeletingEventCount           = 0;
            Tasks.TaskChanged  += new Tasks.TaskChangeEventHandler(Tasks_TasksRowChanged);
            Tasks.TaskDeleting += new Tasks.TaskChangeEventHandler(Tasks_TasksRowDeleting);
        }
Ejemplo n.º 16
0
        private static void InitializationDataAndRun()
        {
            MainModule mainModule = new MainModule();

            mainModule.AddModule(CreateTeacherModule());
            mainModule.AddModule(CreateStudentModule());
            mainModule.AddModule(CreateSubjectModule());
            mainModule.AddModule(CreateVehicleModule());
            mainModule.AddModule(CreateActivityModule());
            mainModule.AddModule(CreatePaymentModule());

            Application.Run(new MainForm(mainModule));
        }
Ejemplo n.º 17
0
 public ActionResult MainModuleListAdd(MainModule model)
 {
     if ((model.Id == null) || model.Id == new Guid("00000000-0000-0000-0000-000000000000"))
     {
         this.dalIMainModule.addMainModule(model);
     }
     else
     {
         model.AddDate = DateTime.Now;
         this.dalIMainModule.Update(model, model.Id);
     }
     return(View());
 }
        /// <summary>
        /// Returns all Components and Structs in the project
        /// </summary>
        public List <UTinyType.Reference> GetTypes()
        {
            var types = new List <UTinyType.Reference>();

            foreach (var dependency in MainModule.Dereference(Registry).EnumerateDependencies())
            {
                types.AddRange(dependency.Components);
                types.AddRange(dependency.Structs);
                types.AddRange(dependency.Enums);
            }

            return(types);
        }
Ejemplo n.º 19
0
 public GClass40()
 {
     MainModule.smethod_267(this, "00000000000000000000000000000000");
     MainModule.smethod_269(this, "00000000000000000000000000000000");
     MainModule.smethod_271(this, "00000000000000000000000000000000");
     MainModule.smethod_273(this, "00000000000000000000000000000000");
     MainModule.smethod_275(this, "00000000000000000000000000000000");
     MainModule.smethod_277(this, "00000000000000000000000000000000");
     MainModule.smethod_279(this, "00000000000000000000000000000000");
     MainModule.smethod_281(this, "00000000000000000000000000000000");
     MainModule.smethod_283(this, "00000000000000000000000000000000");
     MainModule.smethod_285(this, "00000000000000000000000000000000");
 }
Ejemplo n.º 20
0
        public void MainModule()
        {
            var container = new DryIoc.Container();
            var mock      = new Mock <Prism.Regions.IRegionManager>();

            mock.Setup(m => m.RegisterViewWithRegion(It.IsNotNull <string>(), It.IsNotNull <Type>()));

            var module = new MainModule(container, mock.Object);

            module.Initialize();

            container.Dispose();
        }
Ejemplo n.º 21
0
        public static List <MainModule> GetAllSysMenu()
        {
            MainModule mm = MainModule.New;

            mm.Id          = 0;
            mm.Name        = "Root";
            mm.ChineseName = "根节点";
            mm.ParentId    = -1;
            List <MainModule> mainModules = MainModule.FindAll();

            mainModules.Insert(0, mm);
            return(mainModules);
        }
Ejemplo n.º 22
0
 public void SetAutoplay(bool on)
 {
     if (on == false)
     {
         foreach (ParticleSystem ps in ParticleSystems)
         {
             MainModule module = ps.main;
             module.loop = false;
             EmissionModule emModule = ps.emission;
             emModule.enabled = false;
         }
     }
 }
Ejemplo n.º 23
0
        private void MainForm_Load(object sender, System.EventArgs e)
        {
            MainModule.LoadDoc();
            MainModule.InitHardware();
            InitMainForms();
            EventsInit();

            timerRefresh.Start();
            //andon.StartAndonThread();

            SetViewMenuItems();
            SetMenuBtnChoosed(btnStartView);
            formStart.Show();
        }
        private IEnumerable <Instruction> GetCallSetValueInstructions(ILProcessor processor, FieldReference backingField, MethodReference setValue)
        {
            yield return(processor.Create(OpCodes.Ldarg_0));

            yield return(processor.Create(OpCodes.Ldarg_0));

            yield return(processor.Create(OpCodes.Ldfld, backingField));

            yield return(processor.Create(OpCodes.Ldarg_1));

            yield return(processor.Create(OpCodes.Callvirt, MainModule.ImportReference(setValue)));

            yield return(processor.Create(OpCodes.Nop));
        }
Ejemplo n.º 25
0
    public void SpawnDestroyEffect()
    {
        // Spawn the brick destroy effect at a given coordinate.
        // Gets its color from the brick itself
        Vector3    brickPos = gameObject.transform.position;
        Vector3    spawnPos = new Vector3(brickPos.x, brickPos.y, brickPos.z - 0.2f);
        GameObject effect   = Instantiate(destroyEffect.gameObject, spawnPos, Quaternion.identity);

        MainModule mainModule = effect.GetComponent <ParticleSystem>().main;

        mainModule.startColor = this.brickRenderer.color;

        Destroy(effect, destroyEffect.main.startLifetime.constant);
    }
Ejemplo n.º 26
0
 public override void Execute()
 {
     MainModule.DoNothing();
     object_2 = MainModule.GetOrCreateVMCpu();
     MainModule.SetCurrentInstruction(object_2, "000000001000000000000000000000001001");
     MainModule.SetInt0(object_2, 0);
     MainModule.SetInt1(object_2, 0);
     MainModule.SetMust1234567(object_2, 1);
     MainModule.SetMustReset(object_2, 0);
     MainModule.SetBool3(object_2, 0);
     MainModule.SetBool2(object_2, 0);
     MainModule.smethod_82(object_1);
     vmethod_0((VMCpu)object_2, AutomatonState.GetStateByName("maths"));
 }
Ejemplo n.º 27
0
 protected override void toolStripButtonSave_Click(object sender, EventArgs e)
 {
     if (IsAdd)
     {
         var currentMainModule = MainModule.New;
         FrmAddEditBind.BindControlsToObject(currentMainModule, tabPage1);
         currentMainModule.Save();
     }
     else
     {
         var currentMainModule = MainModule.FindById(long.Parse(ItemID));
         FrmAddEditBind.BindControlsToObject(currentMainModule, tabPage1);
         currentMainModule.Save();
         Close();
     }
 }
Ejemplo n.º 28
0
        private void editBindingsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var node = treeView1.SelectedNode.Tag as Site;

            if (node == null)
            {
                return;
            }

            var module = new MainModule();

            module.Initialize(_serviceContainer, null);
            var dialog = new BindingsDialog(module, node);

            dialog.ShowDialog(this);
        }
Ejemplo n.º 29
0
 private void SetParticle3DSize(MainModule module, bool init)
 {
     if (module.startSize.mode == ParticleSystemCurveMode.TwoConstants)
     {
         if (init)
         {
             Original3DSizes.Add(new Vector3(module.startSize.constantMax, module.startSize.constantMax, module.startSize.constantMax));
             Original3DSizes.Add(new Vector3(module.startSize.constantMin, module.startSize.constantMin, module.startSize.constantMin));
         }
         float newSizeMax = __percent.Find(Size, module.startSize.constantMax);
         float newSizeMin = __percent.Find(Size, module.startSize.constantMin);
         module.startSizeX = new MinMaxCurve(newSizeMax, newSizeMin);
         module.startSizeY = new MinMaxCurve(newSizeMax, newSizeMin);
         module.startSizeZ = new MinMaxCurve(newSizeMax, newSizeMin);
     }
 }
Ejemplo n.º 30
0
 protected override void Saving()
 {
     if (IsAdd)
     {
         var currentMainModule = MainModule.New;
         FrmAddEditBind.BindControlsToObject(currentMainModule, tabPage1);
         currentMainModule.Save();
     }
     else
     {
         var currentMainModule = MainModule.FindById(long.Parse(ItemID));
         FrmAddEditBind.BindControlsToObject(currentMainModule, tabPage1);
         currentMainModule.Save();
         Close();
     }
 }