Example #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        this.Page.Title = "Pgto de Produtores - Relatório de Pagamentos de Produtor";

        try
        {
            Pagamento    pgto          = new Pagamento();
            PagamentoBLL obj           = new PagamentoBLL();
            String       strPathreport = String.Empty;

            pgto.Id_regiao      = Convert.ToInt32(Session["ID_REGIAO"]);
            pgto.Id_cooperativa = Convert.ToInt32(Session["ID_COOPERATIVA"]);
            pgto.Id_propriedade = Convert.ToInt32(Session["ID_PROPRIEDADE"]);
            pgto.Dt_inicio      = Convert.ToString(Session["DT_INICIO"]);
            pgto.Dt_fim         = Convert.ToString(Session["DT_FIM"]);
            pgto.Tp_relatorio   = Convert.ToChar(Session["TP_RELATORIO"]);

            strPathreport = Server.MapPath("Relatorio.rpt");

            CrystalReportViewer1.LogOnInfo    = Crystal.ConectaCrystal();
            CrystalReportViewer1.ReportSource = obj.GerarRelatorioPgtoProdutores(pgto, strPathreport);
            CrystalReportViewer1.DataBind();
        }
        catch (Exception ex)
        {
            ClientScript.RegisterStartupScript(this.GetType(), "alert", "<script>alert('" + ex.Message.ToString() + "');</script>");
        }
    }
Example #2
0
 /// <summary>
 /// Initializes referenced objects.
 /// </summary>
 void Start()
 {
     character       = Character.Instance;
     crystal         = GameObject.Find("crystal").GetComponent <Crystal>();
     healthText      = transform.Find("healthText").GetComponent <TextMesh>();
     healthText.text = this.curHealth.ToString() + "/" + maxHealth;
 }
Example #3
0
        public Crystal GenerateCrystal()
        {
            var rndInt  = _rnd.Next(1, crystalTextureAmount + 1);
            var crystal = new Crystal(crystalTextures[rndInt - 1], rndInt);

            return(crystal);
        }
Example #4
0
        public override bool OnCollision(Fixture f1, Fixture f2, Contact contact)
        {
            CollidingSprite other = SyncedGameCollection.GetCollisionComponent(f2);

            if (other.Tag == TagCategories.CRYSTAL)
            {
                if (Item == null)
                {
                    Crystal crystal = other as Crystal;
                    Item = crystal.PickUp(this, _teamColor);
                }
                return(false);
            }
            else if (other.Tag == TagCategories.UNIT)
            {
                return(false);
            }
            else if (other.Tag == TagCategories.COMPACTZONE)
            {
                if (Item == null)
                {
                    CompactZone compactzone = other as CompactZone;
                    Item = compactzone.PickUp(this, _teamColor);
                }
            }
            else if (other.Tag == TagCategories.BARRIER)
            {
                return(false);
            }

            return(true);
        }
Example #5
0
    private void OnCrystalPickedUp(Crystal crystal)
    {
        CrystalsPickedUp++;

        PrefabPool.Instantiate(crystalPickupParticle, crystal.transform.position, Quaternion.LookRotation(Vector3.up));
        RefreshTileColor();
    }
Example #6
0
    // Update is called once per frame
    void Update()
    {
        if (Input.GetMouseButtonDown(0))
        {
            GameObject missile = Instantiate(shooting_missile, shootposition.position, transform.rotation, shootposition.transform);
        }
        cursor.color = new Color(255, 255, 255);
        RaycastHit hit;
        {
            if (Physics.Raycast(transform.position, transform.forward, out hit, 10, mask))

            {
                if (hit.collider.gameObject.GetComponent <Crystal>())
                {
                    Crystal c = hit.collider.gameObject.GetComponent <Crystal>();

                    cursor.color = new Color(255, 0, 0);

                    if (!c.activated)
                    {
                        if (Input.GetMouseButtonDown(0))

                        {
                            c.activated = true;
                        }
                    }
                }
            }
        }
    }
Example #7
0
        public static IAtomContainer WashingSoda()
        {
            var co3 = new AtomContainer();

            var carbon = co3.AddAtom("C");

            co3.AddBond(carbon, co3.AddAtom("O"), BondOrder.Double);

            for (var i = 0; i < 2; i++)
            {
                var oxy = co3.AddAtom("O");
                oxy.FormalCharge = -1;
                co3.AddBond(carbon, oxy, BondOrder.Single);
            }

            var washingSoda = new Crystal(co3);

            var sodium00 = washingSoda.AddAtom("Na");

            sodium00.FormalCharge = 1;
            var sodium01 = washingSoda.AddAtom("Na");

            sodium01.FormalCharge = 1;

            washingSoda.Title = nameof(washingSoda);

            return(washingSoda);
        }
Example #8
0
        public static IAtomContainer RootKiller()
        {
            var mol = new AtomContainer();

            var sulfur = mol.AddAtom("S");

            for (var i = 0; i < 2; i++)
            {
                mol.AddBond(sulfur, mol.AddAtom("O"), BondOrder.Double);
            }

            var oxy00 = mol.AddAtom("O");

            oxy00.FormalCharge = -1;
            mol.AddBond(sulfur, oxy00, BondOrder.Single);

            var oxy01 = mol.AddAtom("O");

            oxy01.FormalCharge = -1;
            mol.AddBond(sulfur, oxy01, BondOrder.Single);

            var rootKiller = new Crystal(mol);

            var mg = rootKiller.AddAtom("Cu");

            mg.FormalCharge = 2;

            rootKiller.Title = nameof(rootKiller);

            return(rootKiller);
        }
Example #9
0
        public void TestHasCrystalFalse()
        {
            Player  player  = new Player("player");
            Crystal crystal = new Crystal("crystal");

            Assert.IsFalse(crystal.hasCrystal(player));
        }
Example #10
0
    // Use this for initialization
    void Start()
    {
        switch (draggableType)
        {
        case DraggableType.Self:
            dragBody = transform;
            break;

        case DraggableType.Prefab:
            dragBody = otherBody.GetComponentInChildren <Transform>();
            break;

        case DraggableType.Other:
            dragBody = otherBody.GetComponentInChildren <Transform>();
            break;
        }

        if (dragBody == null)
        {
            print("Draggable was unable to find any Rigidbody! Destroying self.");
            Destroy(this);
        }

        crystal = GetComponentInParent <Crystal>();
    }
Example #11
0
        public static IAtomContainer BakingSoda()
        {
            var co3h = new AtomContainer();

            var carbon = co3h.AddAtom("C");

            co3h.AddBond(carbon, co3h.AddAtom("O"), BondOrder.Double);

            var oxy00 = co3h.AddAtom("O");

            co3h.AddBond(carbon, oxy00, BondOrder.Single);
            co3h.AddBond(oxy00, co3h.AddAtom("H"), BondOrder.Single);

            var oxy01 = co3h.AddAtom("O");

            oxy01.FormalCharge = -1;

            co3h.AddBond(carbon, oxy01, BondOrder.Single);

            var bakingSoda = new Crystal(co3h);
            var sodium     = bakingSoda.AddAtom("Na");

            sodium.FormalCharge = 1;

            bakingSoda.Title = nameof(bakingSoda);

            return(bakingSoda);
        }
Example #12
0
 /// <summary>
 /// Link Rects will be giving to linked new Crystal thir own name, bz I need to have all wth the same name
 /// </summary>
 /// <param name="nextCrystal"></param>
 private void RenameAsNextLinkRect(Crystal nextCrystal)
 {
     if (_type == H.LinkRect || _type == H.LandZone)
     {
         Rename(nextCrystal.Name);
     }
 }
Example #13
0
 public static OGameFleetSender Transport(OGameHttpClient client, Planet source, Planet destination, FleetSpeed speed,
                                          List <ShipBase> ships, Metal metal, Crystal crystal, Deuterium deuterium)
 {
     return(new OGameFleetSender(client, source, destination, speed, ships, MissionType.Transport, metal,
                                 crystal,
                                 deuterium));
 }
Example #14
0
    IEnumerator turnOffCrystal(float delayTime, Crystal crystal)
    {
        contColor++;

        yield return(new WaitForSeconds(delayTime));

        foreach (Transform child in activeCrystals.transform)
        {
            if (child.gameObject.GetComponent <CrystalController>().crystalColor == crystal.crystalColor)
            {
                child.gameObject.GetComponent <CrystalController>().changeCrystal(false, crystal);
                if (contColor >= countPatrons) //Este indica que es el ultimo
                {
                    child.gameObject.GetComponent <CrystalController>().idleAnimation();
                }
            }
        }

        messageInScreen.GetComponent <ScreenMessage>().turnOffText();

        if (contColor < countPatrons)
        {
            showPatron();
        }
        else
        {
            contColor = 0;
            currentPatron++;
            showingPattern = false;
            messageInScreen.GetComponent <ScreenMessage>().repeatPattern();
        }
    }
Example #15
0
        public static IAtomContainer EpsomSalt()
        {
            var mol = new AtomContainer();

            var sulfur = mol.AddAtom("S");

            for (var i = 0; i < 2; i++)
            {
                mol.AddBond(sulfur, mol.AddAtom("O"), BondOrder.Double);
            }

            var oxy00 = mol.AddAtom("O");

            oxy00.FormalCharge = -1;
            mol.AddBond(sulfur, oxy00, BondOrder.Single);

            var oxy01 = mol.AddAtom("O");

            oxy01.FormalCharge = -1;
            mol.AddBond(sulfur, oxy01, BondOrder.Single);

            var epsomSalt = new Crystal(mol);

            var mg = epsomSalt.AddAtom("Mg");

            mg.FormalCharge = 2;

            epsomSalt.Title = nameof(epsomSalt);

            return(epsomSalt);
        }
Example #16
0
        //新規追加が呼び出されたとき
        public void AddCrystal(Crystal cry)
        {
            if (cry != null)
            {
                Bitmap   bmp = new Bitmap(18, 18);
                Graphics g   = Graphics.FromImage(bmp);
                g.Clear(Color.FromArgb(cry.Argb));
                formMain.dataSet.DataTableCrystal.Rows.Add(new object[] { false, cry, bmp });
                formMain.bindingSourceCrystal.Position = formMain.bindingSourceCrystal.List.Count - 1;
                formMain.dataGridViewCrystals_CellMouseClick
                    (this, new DataGridViewCellMouseEventArgs(0, formMain.dataSet.DataTableCrystal.Rows.Count - 1, 0, 0,
                                                              new MouseEventArgs(System.Windows.Forms.MouseButtons.Left, 1, 0, 0, 0)));

                //formMain.bindingSourceCrystal.Position = formMain.bindingSourceCrystal.List.Count - 1;
                //bindingSource.Position = bindingSource.List.Count - 1;
                //formMain.SelectedCrysatlIndex = bindingSource.Position;
                formMain.InitializeCrystalPlane();

                formMain.Draw();
                if (crystalControl.Enabled == false)
                {
                    crystalControl.Enabled = true;
                }
            }
        }
Example #17
0
        public override void OnTeamWin(PvPTeam team)
        {
            WorldBroadcast("{0} has won the Battle of Wind!", team.Name);

            var t = team as BoWTeam;

            if (t == null)
            {
                return;
            }

            /*if (IsFaction)
             * {
             *      if (WinGate != null)
             *      {
             *              WinGate.Delete();
             *      }
             *
             *      WinGate = new BoWWinPortal(this)
             *      {
             *              Controller = t.Name,
             *              Hue = t.Color
             *      };
             *
             *      WinGate.MoveToWorld(t.GatePoint, Map);
             * }*/

            if (Crystal != null)
            {
                Crystal.Carrier = null;

                //For the lols
                if (!MyPeopleNeedMe())
                {
                    //Aesthetic stuff for crystal
                    Crystal.Hue = t.Color;

                    if (t.Name == "Minax" || t.Name == "The Shadowlords")
                    {
                        Crystal.Name = "the corrupted Crystal of Power";
                    }

                    if (t.Name == "The True Britannians" || t.Name == "The Council of Mages")
                    {
                        Crystal.Name = "the purified Crystal of Power";
                    }

                    if (Crystal == null || Crystal.Deleted)
                    {
                        Crystal = new BoWCrystal(this);
                    }

                    Crystal.MoveToWorld(t.CrystalLoc, Map);
                }
            }

            Cleanup();

            base.OnTeamWin(team);
        }
Example #18
0
        public override bool ReceiveMessage(object source, Crystal.Messaging.Message message)
        {
            switch (message.MessageString)
            {
                case "UpdateIndeterminateStatus":
                    {
                        try
                        {
                            Tuple<bool, string> tup = (Tuple<bool, string>)message.Data;

                            Microsoft.Phone.Shell.SystemTray.ProgressIndicator.Text = tup.Item2;
                            Microsoft.Phone.Shell.SystemTray.ProgressIndicator.IsIndeterminate = true;
                            Microsoft.Phone.Shell.SystemTray.ProgressIndicator.IsVisible = tup.Item1;
                        }
                        catch (Exception) { }
                        return true;
                    }
                case "SwitchTab":
                    {
                        SelectedTab = (int)message.Data;
                        return true;
                    }
                default:
                    return base.ReceiveMessage(source, message);
            }

        }
 public void onRabbitDeath(HeroRabbit rabbit)
 {
     if (lives > 0)
     {
         rabbit.PlayDeathSound();
         Image crystImg = GameObject.Find("Heart" + lives).GetComponent <Image>();
         crystImg.sprite = EmptyHeart;
         --lives;
         rabbit.transform.position = this.startingPosition;
         rabbit.Live();
     }
     else
     {
         lives   = 3;
         Coins.n = 0;
         Coins.Refresh();
         Fruit.n = 0;
         Fruit.Refresh();
         Crystal.Clean();
         for (int i = 1; i < 4; i++)
         {
             Image crystImg = GameObject.Find("NonCrystal" + i).GetComponent <Image>();
             crystImg.sprite = EmptyCrystal;
         }
         LoseLevel.Instance.Show();
     }
 }
Example #20
0
    /// <summary>
    /// Will say if 'c' is one of the corners tht are in closest to the door
    ///
    /// Those crystal if a line from door to them is intersecting can be ignore bz is in the same building
    /// and only means is getting out of building or in
    /// </summary>
    /// <param name="c"></param>
    /// <returns></returns>
    bool IsCrystalOnDoorCorners(Crystal c)
    {
        var iniBool = _ini != null && _ini.MyId == c.ParentId;
        var finBool = _fin != null && _fin.MyId == c.ParentId;

        //if is not a Crystal of ini or fin then return
        if (!iniBool && !finBool)
        {
            return(false);
        }
        if (c.ParentId.Contains("Dummy"))//used for idle routing
        {
            return(false);
        }

        //this is to address the case of a Terrain Spawner
        var build = Brain.GetBuildingFromKey(c.ParentId);

        if (build == null)
        {
            return(false);
        }

        var facer = build.RotationFacerIndex;

        return(IsThisCrystalOnDoorSide(facer, c.AnchorIndex));
    }
Example #21
0
    /// <summary>
    /// Will try to reach RectC or Final and will set explorer object that will tell if are
    /// Buidings in the middle or not
    /// </summary>
    /// <returns></returns>
    private bool ExploreToFin()
    {
        var stepFinalPos = ReturnCorFinal();

        //        //Debug.Log("Exploring");
        canIExplore = false;
        Line line = new Line(U2D.FromV2ToV3(_curr.Position), stepFinalPos, durationOfLines);

        _debugLines.Add(line);

        var interCount = IntersectCount(line);

        if (interCount == 0)
        {
            //            //Debug.Log("Exploring went good ");
            _curr = new Crystal(stepFinalPos, H.None, "", setIdAndName: false);
            loop  = true;
            //canIExplore = true;//needs to be able to keep exploring
            ResetExplorer();

            ResetLoop();
            ClearPrevLoop();

            return(true);
        }
        return(false);
    }
Example #22
0
        private void CheckCrystal(String dungeonName, Crystal c)
        {
            if ((doneCrystals & c) == c)
            {
                return;
            }

            if (IsRandomized)
            {
                // see the pendant check for why this is done
                var   pointer = bossRoomFlags[dungeonName];
                short value   = pointer.Deref <short>(Emulator);

                // Is the boss for this room cleared?
                if ((value & 0x0800) == 0x0800)
                {
                    doneCrystals |= c;
                    Split?.Invoke(this, new SplitEventArgs(currentState, dungeonName));
                }
            }
            else
            {
                if ((Crystals.Current & c) == c)
                {
                    doneCrystals = Crystals.Current;
                    Split?.Invoke(this, new SplitEventArgs(currentState, dungeonName));
                }
            }
        }
Example #23
0
        public Crystal AddCrystal(Vector2 position, int id, int score, int energy)
        {
            var crystal = new Crystal(position, id, score, energy);

            this._gameObjectCollection.Add(crystal);
            return(crystal);
        }
Example #24
0
 /// <summary>
 /// Will add to _links if is not there already
 /// </summary>
 /// <param name="newLink"></param>
 private void AddToLinks(Crystal newLink)
 {
     if (!_links.Contains(newLink))
     {
         _links.Add(newLink);
     }
 }
Example #25
0
 private void AddToTerraCrystals(Crystal c)
 {
     if (!_terraCrystals.Contains(c))
     {
         _terraCrystals.Add(c);
     }
 }
Example #26
0
    public ExplorerUnit(Crystal crystal, Vector3 intersect, Vector3 currPosition, Vector3 final)//the curr Position of the Crystal reaching Final
    {
        Current = currPosition;
        Final   = final;
        Key     = crystal.ParentId;
        Intersections.Add(intersect);
        OrderIntersections();

        Distance = Mathf.Abs(Vector3.Distance(intersect, currPosition));
        Building = Brain.GetBuildingFromKey(Key);

        StillElement =
            Program.gameScene.controllerMain.TerraSpawnController.Find(crystal.ParentId);

        if (Building != null)
        {
            IsHasAValidObstacle = true;
        }
        else if (StillElement != null)
        {
            //Debug.Log("Hey hit random: " + StillElement.MyId);
            IsHasAValidObstacle = true;
        }
        else
        {
            //is set to that so if never was calculated its really far
            //since distance will be used for ordering
            Distance = 10000;
        }
    }
    private void SetMoveCrystalValue(int a_value, bool a_visible = false)
    {
        var crystalList = JimJamManager.instance.GetCrystals(a_value);
        //Debug.LogFormat( "For value {0} got {1} crystals", a_value, crystalList.Count );
        var crystalPrefab = crystalList[0];

        if (m_crystal != null)
        {
            Destroy(m_crystal.gameObject);
        }

        m_crystal      = Instantiate(crystalPrefab, Vector3.forward * 1000.0f, Quaternion.identity);
        m_crystal.name = "Create Enemy Crystal";

        Destroy(m_crystal.GetComponent <BlinkSprite>());
        Destroy(m_crystal.GetComponent <Rigidbody>());

        m_crystal.GetComponent <Collider>().enabled = false;

        var spriteRenderer = m_crystal.GetComponent <SpriteRenderer>();

        spriteRenderer.sprite  = crystalPrefab.GetComponent <SpriteRenderer>().sprite;
        spriteRenderer.enabled = a_visible;

        m_crystal.transform.SetParent(transform);
    }
Example #28
0
 /// <summary>
 /// This are the crystals tht get added by buildins
 /// </summary>
 /// <param name="c"></param>
 private void AddToObstacleCrystals(Crystal c)
 {
     if (!_obstaCrystals.Contains(c))
     {
         _obstaCrystals.Add(c);
     }
 }
Example #29
0
        public static Goods ChoseMarketGoods(Player p, uint func)
        {
            Goods x = new Goods();

            switch (func)
            {
            case 1:
                Grain g = new Grain();
                Ui.PrintGood(p, g);
                return(g);

            case 2:
                Crystal c = new Crystal();
                Ui.PrintGood(p, c);
                return(c);

            case 3:
                Oil o = new Oil();
                Ui.PrintGood(p, o);
                return(o);

            case 4:
                Metal m = new Metal();
                Ui.PrintGood(p, m);
                return(m);

            case 5:
                Game.MainMenue(p);
                return(x);

            default:
                Ui.PrintError("Ungültige Eingabe");
                return(x);
            }
        }
Example #30
0
 private void AddToAllObstas(Crystal c)
 {
     if (c.Type1 == H.Obstacle || c.Type1.ToString().Contains("Way"))
     {
         _allObstas.Add(c);
     }
 }
Example #31
0
    public void StopLinking(H type)
    {
        Debug.Log("StopLinking t:" + type);
        linkNow = false;
        Crystal.ResetAccumNumbers();
        CleanBoundsList();

        //if the one stped was water now Terrain needs to be initiated
        if (type == H.WaterObstacle)
        {
            m.MeshController.WaterBound1.FindVertexAboveTerrainLevel();
        }
        else if (type == H.MountainObstacle)
        {
            //Creates the land zones
            m.MeshController.LandZoneManager1.Create();

            Save();

            //m.MeshController.WaterBound1.Create();
        }
        else if (type == H.LinkRect)
        {
            m.MeshController.LandZoneManager1.FirstLinkRectsLinkDone(type);
        }
        else if (type == H.LandZone)
        {
            m.MeshController.LandZoneManager1.FirstLinkRectsLinkDone(type);
        }
        else if (type == H.Poll)
        {
        }
    }
        public void AddParameter(Crystal.Parameter param)
        {
            if(_parameters.Contains(param)==false)
            {
                OnChangeReport(false);
                _parameters.Add(param);

                //subscribe to change event
                param.BeforeChange+=new EventHandler(Parameter_BeforeChange);
            }
        }
Example #33
0
        public override bool ReceiveMessage(object source, Crystal.Messaging.Message message)
        {
            switch (message.MessageString.ToLower())
            {
                case "updateisbusy":
                    UIDispatcher.BeginInvoke(new Action(() =>
                        {
                            IsBusy = (bool)message.Data;
                        }));
                    return true;
            }

            return base.ReceiveMessage(source, message);
        }
        public void RemoveParameter(Crystal.Parameter param)
        {
            OnChangeReport(false);
            _parameters.Remove(param);

            //unsubscribe from change event
            param.BeforeChange-=new EventHandler(Parameter_BeforeChange);
        }
Example #35
0
 public Player(Crystal.Pet pet)
     : this()
 {
     this.Pet = pet;
 }
Example #36
0
	// Update is called once per frame
	void Update () {
		if (_followTarget && _crystal == null) {
			//check if you hit a crystal:
			RaycastHit hit;
			if (_laser.Enabled && _followTarget && Physics.Raycast(transform.position, transform.forward, out hit, 100f, 1 << LayerMask.NameToLayer("Crystal"))) {
				Crystal theCristal = hit.collider.GetComponent<Crystal>();
				
				if (theCristal != null) {
					if (theCristal.AddEye(this)) {
						_followTarget = false;
						_crystal = theCristal;
					}
				}
				
				CancelCurrentTween();
			}
		} else if (_crystal != null) {
			_target = _crystal.transform;
		}

		if (_target) {
			Vector3 dir = _target.position - transform.position;
			Quaternion lookAtRotation = Quaternion.LookRotation(dir, _hero.transform.up);
			transform.rotation = Quaternion.Slerp(transform.rotation, lookAtRotation, 0.5f * Time.deltaTime);
		}
	}