コード例 #1
0
    private void showContent(string command)
    {
        this.ucSheetLinks.HighLight(command);

        //allow print of all sheets
        this.ucDownloadPrint.Show(false, true);
        this.ucDownloadPrint.SetPrintControl(this);

        //get id from viewstate
        DiffuseSources.Map map      = DiffuseSources.GetMap(LayerId);
        string             headline = String.Empty;
        string             content  = String.Empty;

        if (command.Equals(Sheets.DiffuseSources.GeneralInfo.ToString()))
        {
            headline = Resources.GetGlobal("DiffuseSources", "GeneralInfo");
            content  = map.GetGeneralInformation();
        }
        else if (command.Equals(Sheets.DiffuseSources.Methodology.ToString()))
        {
            headline = Resources.GetGlobal("DiffuseSources", "Methodology");
            content  = map.GetMethodology();
        }
        else if (command.Equals(Sheets.DiffuseSources.SourceData.ToString()))
        {
            headline = Resources.GetGlobal("DiffuseSources", "SourceData");
            content  = map.GetSourceData();
        }

        this.litHeadline.Text      = String.Format("{0} / {1}", Resources.GetGlobal("DiffuseSources", "DiffuseSources"), headline);
        this.lbDiffuseContent.Text = content;
        updateSubHeader(map);
    }
コード例 #2
0
    private void setMapList(MediumFilter.Medium medium)
    {
        string sectorId = "";

        if (MediumFilter.Medium.Air == medium)
        {
            sectorId = this.ddlSelectSector.SelectedValue;
        }

        DiffuseSources.Map[] maps = DiffuseSources.GetMaps(medium, sectorId);


        if (maps.Length > 0)
        {
            divAvailableLayers.Visible = true;
            rblMaps.Items.Clear();
            foreach (DiffuseSources.Map map in maps)
            {
                rblMaps.Items.Add(new ListItem(map.GetTitleShort(), map.LayerId));
            }
        }
        else if (MediumFilter.Medium.Water == medium)
        {
            //if no maps hide radiobuttons and map
            ((MasterSearchPage)this.Master).HideSearchForm();
            ((MasterSearchPage)this.Master).HideMap();
            this.divEnlarge.Visible = false;
        }
        else
        {
            divAvailableLayers.Visible = false;
        }
    }
コード例 #3
0
    // update flash map
    private void updateFlashMap(string layerID)
    {
        MapFilter mapFilterSmall;
        MapFilter mapFilterExpanded;
        String    header;

        if (String.IsNullOrEmpty(layerID)) //clear map
        {
            mapFilterSmall        = new MapFilter();
            mapFilterSmall.Layers = layerID;

            mapFilterExpanded = mapFilterSmall;
            header            = "";
        }
        else
        {
            DiffuseSources.Map map = DiffuseSources.GetMap(layerID);
            mapFilterSmall    = map.MapFilterSmall;
            mapFilterExpanded = map.MapFilterExpanded;
            header            = map.GetTitleFull();
        }

        MapUtils.UpdateDiffuseMap(MAPID, Page, Page.ClientID, mapFilterSmall, "", Request.ApplicationPath);
        // ((MasterSearchPage)this.Master).UpdateExpandedScript(mapFilterExpanded, header);
    }
コード例 #4
0
    private void populateSectors()
    {
        this.ddlSelectSector.Items.Clear();

        this.ddlSelectSector.Items.Add(new ListItem(Resources.GetGlobal("DiffuseSources", "SelectSector"), "SelectSector"));
        foreach (string sector in DiffuseSources.GetSectors())
        {
            this.ddlSelectSector.Items.Add(new ListItem(Resources.GetGlobal("DiffuseSources", sector), sector));
        }

        this.ddlSelectSector.SelectedIndex = 0;
    }