Esempio n. 1
0
    // Use this for initialization
    void Start()
    {
        rb   = GetComponent <Rigidbody>();
        myAs = GetComponent <AudioSource>();

        rb.maxAngularVelocity = (1.5f * Mathf.PI); // Make sure we don't spin too fast

        //jumpSpeed = FindReqJumpSpeed(2.6f); // Figure out what Viy should be to jump 2.6 units all the time
        jumpSpeed = FIN.FindViForPeak(2.6f);

        gm = GameObject.FindGameObjectWithTag("GameController").GetComponent <GameManager>();
        Debug.Log(SwitchBoard.gm);
        Debug.Log(SwitchBoard.gm == gm ? "Nothing seems wrong, switchboard has gm" : "Switchboard.gm != gm");
        gm.Register(this);

        // register to delegate
        GameManager.ScoreAction += HUDScoreUpdate;
    }
    protected void rpt_cuadro()
    {
        INICIO       = Request.QueryString["INICIO"];
        FIN          = Request.QueryString["FIN"];
        CENTRO_COSTO = Request.QueryString["CENTRO_COSTO"];



        DataTable        dsCustomers = GetData();
        ReportDataSource datasource  = new ReportDataSource("DataSet1", dsCustomers);

        if (dsCustomers.Rows.Count > 0)
        {
            ReportViewer1.LocalReport.DataSources.Clear();


            FIN    = FIN.Replace("/", @"_");
            INICIO = INICIO.Replace("/", @"_");

            this.ReportViewer1.LocalReport.Refresh();
            this.ReportViewer1.Reset();


            this.ReportViewer1.LocalReport.EnableExternalImages = true;
            this.ReportViewer1.ProcessingMode = ProcessingMode.Local;
            LocalReport rep = ReportViewer1.LocalReport;
            rep.ReportPath = Server.MapPath("~/OPERACIONES/Reportes/Rp_TareoHistorico.rdlc");
            //rep.SetParameters(param);

            //this.ReportViewer1.LocalReport.RefreshReport();


            //ReportViewer1.LocalReport.EnableExternalImages = true;
            //string imagePath = new Uri(Server.MapPath(FolderFirmas + "44085236.jpg")).AbsoluteUri;
            //ReportParameter parameter = new ReportParameter("Path", imagePath);
            //ReportViewer1.LocalReport.SetParameters(parameter);



            ReportViewer1.LocalReport.Refresh();
            ReportViewer1.LocalReport.DataSources.Add(datasource);

            Warning[] warnings;
            string[]  streamIds;
            string    mimeType = string.Empty;
            string    encoding = string.Empty;
            string    extension = string.Empty;
            DataSet   dsGrpSum, dsActPlan, dsProfitDetails,
                      dsProfitSum, dsSumHeader, dsDetailsHeader, dsBudCom = null;

            byte[] bytes = ReportViewer1.LocalReport.Render("EXCEL", null, out mimeType, out encoding, out extension, out streamIds, out warnings);

            Response.Buffer = true;
            Response.Clear();
            Response.ContentType = mimeType;
            Response.AddHeader("content-disposition", "attachment; filename=" + CENTRO_COSTO + "_" + INICIO + "_" + FIN + "." + extension);
            Response.OutputStream.Write(bytes, 0, bytes.Length); // create the file
            Response.Flush();                                    // send it to the client to download
            Response.End();
        }
        else
        {
            ReportViewer1.LocalReport.DataSources.Clear();
        }
    }
Esempio n. 3
0
 public MRt(FIN fin, TONE tone) : this(fin, MED._, tone)
 {
 }
Esempio n. 4
0
 public MRt(FIN fin, MED med = MED._, TONE tone = TONE.NEUTRAL)
 {
     _syl = new MSyl(INIT.Void, med, fin, tone);
 }
Esempio n. 5
0
        MunchSyllable(string s, ref int idx)
        {
            MImt imt;
            MRt  rt;

            INIT init = 0;
            MED  med = 0;
            FIN  fin = 0;
            TONE t1 = TONE.NEUTRAL, t2 = TONE.NEUTRAL;

            bool match = _miDict.TryMatchStart(s, ref idx, out imt);

            do
            {
                if (match)
                {
                    init = imt.Initial;
                    med  = imt.Medial;
                    t1   = imt.Tone;
                }

                var iMark = idx;
                match = _mfDict.TryMatchStart(s, ref idx, out rt);

                if (match)
                {
                    t2 = rt.Tone;

                    if (t2 != TONE.NEUTRAL && t1 != TONE.NEUTRAL)
                    {
                        idx = iMark;
                        break;
                    }

                    if (rt.Medial == MED.U)                       //IU + ONG
                    {
                        if (rt.Final == FIN.ZERO && med == MED.I) //IU
                        {
                            fin = FIN.OU;
                        }
                        else if (rt.Final == FIN.ENG)                        //ONG
                        {
                            med = med | MED.U;
                            fin = rt.Final;
                        }
                        else
                        {
                            idx = iMark;
                        }
                    }
                    else
                    {
                        fin = rt.Final;
                        if (fin == FIN.Y && med == MED.U)                       //UI
                        {
                            fin = FIN.EI;
                        }
                        else if (fin == FIN.E && ((med & MED.I) == MED.I))                              //ie,üe
                        {
                            fin = FIN.È;
                        }
                    }
                }
            } while(false);

            if (init == 0 && med == 0 && fin == 0)
            {
                return(MSyl.Default);
            }

            return(new MSyl(init, med, fin, (t1 == TONE.NEUTRAL ? t2 : t1)));
        }
Esempio n. 6
0
 public MSyl(INIT init, MED med, FIN fin, TONE tone)
     : this((byte)((byte)init | (byte)tone), (byte)((byte)med | (byte)fin))
 {
 }