Пример #1
0
    private mapItem AddMapItem(List <uItem> ItemList, string CenterCoord, string MarkCoord, float Height)
    {
        mapItem new_item = new mapItem(CenterCoord, MarkCoord, Height);

        ItemList.Add(new_item);
        return(new_item);
    }
Пример #2
0
 private void fillNextContainer(List <uItem> Items, GameObject NextContainer)
 {
     for (int itemIndex = 0; itemIndex < Items.Count; itemIndex++)
     {
         if (Items[itemIndex] is subMenuItemExtra)
         {
             subMenuItemExtra smItem = Items[itemIndex] as subMenuItemExtra;
             addSubMenu(NextContainer, smItem);
         }
         if (Items[itemIndex] is subMenuItemSingle)
         {
             subMenuItemSingle smItem = Items[itemIndex] as subMenuItemSingle;
             addSubMenu2(NextContainer, smItem);
         }
         if (Items[itemIndex] is callInfoItem)
         {
             callInfoItem iItem = Items[itemIndex] as callInfoItem;
             addInfoPhoneNumber(NextContainer, iItem);
         }
         if (Items[itemIndex] is inetLinkItem)
         {
             inetLinkItem iItem = Items[itemIndex] as inetLinkItem;
             addUrlItem(NextContainer, iItem);
         }
         if (Items[itemIndex] is calendarItem)
         {
             calendarItem iItem = Items[itemIndex] as calendarItem;
             addCalendarItem(NextContainer, iItem);
         }
         if (Items[itemIndex] is tableItem)
         {
             tableItem iItem = Items[itemIndex] as tableItem;
             addTableItem(NextContainer, iItem);
         }
         if (Items[itemIndex] is textInfoItem)
         {
             textInfoItem iItem = Items[itemIndex] as textInfoItem;
             addTextInfoItem(NextContainer, iItem);
         }
         if (Items[itemIndex] is mapItem)
         {
             mapItem iItem = Items[itemIndex] as mapItem;
             addMapItem(NextContainer, iItem);
         }
     }
 }
Пример #3
0
    // Items Procs

    public void addMapItem(GameObject Container, mapItem infoItem)
    {
        GameObject newMenu   = Instantiate(infoItemMap, new Vector3(0, 0, 0), new Quaternion(0, 0, 0, 0)) as GameObject;
        MapFill    mapScript = newMenu.GetComponent <MapFill> ();

        smprocSetCustomButton(newMenu.transform.FindChild("update").gameObject, () => mapScript.UpdateMap());
        Image         mapImg = newMenu.transform.FindChild("mapImage").gameObject.GetComponent <Image> ();
        RectTransform menuRT = newMenu.GetComponent <RectTransform> ();

        FillItemRectTransform(menuRT, infoItem.Height, Container.transform);
        float aspect = menuRT.rect.height / menuRT.rect.width;
        float width  = 600;
        float height = width * aspect;

        if (height > 450)
        {
            height = 450;
            width  = height / aspect;
        }
        StartCoroutine(mapScript.LoadMap(infoItem.CenterCoord, infoItem.MarkCoord, Mathf.RoundToInt(width), Mathf.RoundToInt(height), mapImg));
    }
Пример #4
0
 public LabyrinthMap(mapItem[,] m)
 {
     map = m;
     h = m.GetLength (0);
     w = m.GetLength (1);
 }
Пример #5
0
        public AssemblerResult konverze_DA(BLOB docIN_form, BLOB docIN_orig, string text_1, string text_2, string text_3, int tisk_prosty, [System.Xml.Serialization.XmlIgnoreAttribute()] bool tisk_prostySpecified, string typ, out string StatusKod, out string StatusText, out BLOB docOUT, out int muj_vystup)
        {
            if (logovani)
            {
                XmlDocument xmlSoapRequest = new XmlDocument();

                // Get raw request body
                using (Stream receiveStream = HttpContext.Current.Request.InputStream)
                {
                    receiveStream.Position = 0;
                    using (StreamReader readStream =
                               new StreamReader(receiveStream, System.Text.Encoding.UTF8))
                    {
                        xmlSoapRequest.Load(readStream);
                    }

                    xmlSoapRequest.Save(@"C:\Sluzby\602\konverze_DA_" + DateTime.Now.ToString("yyyyMMdd_HHmmss") + ".xml");
                }
            }

            //public BLOB invoke() {
            AssemblerResult outAsembler = new AssemblerResult();

            StatusText = "";
            docOUT     = new BLOB();
            muj_vystup = 0;
            StatusKod  = "0000";

            BLOB outBlob = new BLOB();

            try
            {
                WS602Info = Database.getWS602Info();
            }
            catch (Exception ddd)
            {
                StatusText = ddd.Message;
                StatusKod  = "1111";
                return(outAsembler);
            }

            if (WS602Info.URL == "")
            {
                StatusText = "Není vyplněna URL adresa pro webovou službu Software602 LTD!";
                StatusKod  = "2222";
                return(outAsembler);
            }

            if (WS602Info.Certifikat == "")
            {
                //StatusText = "Není cesta k podepisujícímu systémovému certifikátu (značce / pečeti)!";
                //StatusKod = "3333";
                //return outAsembler;
            }

            ConvertOptions ConvertOptions = new ConvertOptions();

            //dokumentu převedu do PDF
            //Je li tisk prosty, tak se přidá hlavička a patička
            //není li tisk, tak se vystup spoji se šablonou
            //Render_PDF_From_XML:<druh>A-D-69</druh> - actipn_upload_to_db.asp
            //Render_PDF_From_XML:<druh>D-A-69</druh> - prevedeni_dle_69
            //Render_PDF_From_XML:<druh>D-zmena-69</druh> - prevod_formatu

            if (tisk_prosty == 1)
            {
                //přidám k tomu hlavicku a paticku

                HF_Options hlavicka = new HF_Options();
                HF_Options paticka  = new HF_Options();
                //hlavicka.

                hlavicka.HorizontalAlignment = HorizontalPosition.Center;
                hlavicka.Mode = PlacementMode.AllPages;
                hlavicka.VerticalAlignment = VerticalPosition.Top;
                hlavicka.Text     = text_1 + "\n" + text_2 + "\n" + text_3;
                hlavicka.FontSize = 8;

                paticka.HorizontalAlignment = HorizontalPosition.Center;
                paticka.Mode = PlacementMode.AllPages;
                paticka.VerticalAlignment = VerticalPosition.Bottom;
                paticka.Text     = text_1 + "\n" + text_2 + "\n" + text_3;
                paticka.FontSize = 8;

                ConvertOptions.Header = hlavicka;
                ConvertOptions.Footer = paticka;

                ConvertOptions.PdfFormat = PdfFormat.PDF;

                //ConvertOptions.


                service.Url = WS602Info.URL;

                try
                {
                    vysledek = service.ConvertFileEx(docIN_orig.binaryData, "test." + typ, ConvertOptions, "", out output, out report, out error);
                }
                catch (Exception ddd)
                {
                    StatusText = ddd.Message;
                    StatusKod  = "4444";
                    return(outAsembler);
                }
            }
            else
            {
                List <ConcatFile> pole = new List <ConcatFile>();

                ConcatOptions conOptions = new ConcatOptions();

                ConcatFile source = new ConcatFile();
                ConcatFile att    = new ConcatFile();

                source.Data = docIN_orig.binaryData;
                source.Name = "original." + typ;

                att.Data = docIN_form.binaryData;
                att.Name = "sablona.rtf";

                pole.Add(source);
                pole.Add(att);


                ConvertOptions.PdfFormat = PdfFormat.PDF;

                //ConvertOptions.


                service.Url = WS602Info.URL;

                try
                {
                    vysledek = service.Concat(pole.ToArray(), conOptions, ConvertOptions, out output, out report);
                }
                catch (Exception ddd)
                {
                    StatusText = ddd.Message;
                    StatusKod  = "4555";
                    return(outAsembler);
                }
            }

            error = "";

            OperationContext context = OperationContext.Current;

            if (context != null && context.RequestContext != null)
            {
                //Message msg = context.RequestContext.RequestMessage;

                //string reqXML = msg.ToString();
            }

            if (vysledek == 0)
            {
                List <mapItem> itmMap = new List <mapItem>();
                mapItem        itmmm  = new mapItem();

                BLOB ret = new BLOB();
                ret.contentType = "application/pdf";
                ret.binaryData  = output;

                List <mapItem> atributes = new List <mapItem>();

                mapItem attmmm = new mapItem();
                attmmm.key   = (string)"basename";
                attmmm.value = (string)"DocumentOUT.pdf";
                atributes.Add(attmmm);

                attmmm.key   = (string)"basename";
                attmmm.value = (string)"DocumentOUT.pdf";
                atributes.Add(attmmm);

                attmmm.key   = (string)"file";
                attmmm.value = (string)"DocumentOUT.pdf";
                atributes.Add(attmmm);

                attmmm.key   = (string)"wsfilename";
                attmmm.value = (string)"DocumentOUT.pdf";
                atributes.Add(attmmm);

                attmmm.key   = (string)"ADOBE_SAVE_MODE_ATTRIBUTE";
                attmmm.value = (string)"INCREMENTAL";
                atributes.Add(attmmm);


                ret.attributes = atributes.ToArray();


                itmmm.key   = (string)"DocumentOUT";
                itmmm.value = (BLOB)ret;
                //itmmm.
                itmMap.Add(itmmm);
                outAsembler.documents = itmMap.ToArray();
            }
            else
            {
                StatusText = report;
                StatusKod  = "5555";
                return(outAsembler);
            }

            return(outAsembler);
        }