public ChoroplethProperties(EpiDashboard.Mapping.StandaloneMapControl mapControl, ESRI.ArcGIS.Client.Map myMap)
        {
            InitializeComponent();
            this.mapControl = mapControl;
            this.myMap = myMap;
            ////this.DashboardHelper = dashboardHelper;

            //if (DashboardHelper.IsUsingEpiProject)
            //{
            //    //txtProjectPath.Text = dashboardHelper.View.Project.FilePath;

            //    if (System.IO.File.Exists(txtProjectPath.Text))
            //    {
            //        cmbFormName.Items.Clear();
            //        Project project = new Project(txtProjectPath.Text);
            //        foreach (View view in project.Views)
            //        {
            //            cmbFormName.Items.Add(view.Name);
            //        }
            //    }

            //    //cmbFormName.Text = dashboardHelper.View.Name;
            //}
            //else
            //{
            //    //if (!string.IsNullOrEmpty(dashboardHelper.CustomQuery))
            //    //{
            //    //    SqlQuery = DashboardHelper.CustomQuery;
            //    //}
            //}

            //tblockRows.Text = dashboardHelper.DataSet.Tables[0].Rows.Count.ToString() + " unfiltered rows";
            //tblockColumns.Text = dashboardHelper.DataSet.Tables[0].Columns.Count.ToString() + " columns";
            //tblockCacheDateTime.Text = "Data last cached at " + dashboardHelper.LastCacheTime.ToShortDateString() + " " + dashboardHelper.LastCacheTime.ToShortTimeString();
            //tblockCacheTimeElapsed.Text = "Took " + dashboardHelper.TimeToCache + " to locally cache data";

            Epi.ApplicationIdentity appId = new Epi.ApplicationIdentity(typeof(Configuration).Assembly);
            tblockCurrentEpiVersion.Text = "Epi Info " + appId.Version;

            //lbxRelatedDataSources.Items.Clear();
            //if (dashboardHelper.ConnectionsForRelate.Count > 0)
            //{
            //    // Related Data
            //    foreach (RelatedConnection rConn in dashboardHelper.ConnectionsForRelate)
            //    {
            //        lbxRelatedDataSources.Items.Add(rConn.db.ConnectionString);
            //    }
            //}
        }
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="view">The view to attach</param>
        /// <param name="db">The database to attach</param>
        /// <param name="dashboardHelper">The dashboard helper to attach</param>
        public RowFilterControl(DashboardHelper dashboardHelper, EpiDashboard.Dialogs.FilterDialogMode pMode, DataFilters filters = null, bool includeUserDefinedVars = true)
        {
            InitializeComponent();
            this.dashboardHelper = dashboardHelper;
            this.config = dashboardHelper.Config;
            this.includeUserDefinedVars = includeUserDefinedVars;
            this.Mode = pMode;

            if (filters == null)
            {
                DataFilters = new DataFilters(this.dashboardHelper);
            }
            else
            {
                DataFilters = filters;
            }

            //txtTitle.RenderTransform = new RotateTransform(270);
            FillSelectionComboboxes();

            selectionGridHeight = grdSelectionProperties.Height;
            guidedButtonsGridHeight = grdGuidedModeButtons.Height;

            //if (dashboardHelper.UseAdvancedUserDataFilter)
            //{
            //    pnlAdvancedMode.Visibility = Visibility.Visible;
            //    txtAdvancedFilter.Text = dashboardHelper.AdvancedUserDataFilter;
            //    SetAdvancedFilterMode();
            //    ApplyAdvancedModeFilter();
            //}
            //else
            //{
                pnlAdvancedMode.Visibility = Visibility.Collapsed;
                txtAdvancedFilter.Text = string.Empty;
                SetGuidedFilterMode();
            //}

            UpdateFilterConditions();

            if (!dashboardHelper.IsUsingEpiProject)
            {
                //panelAdvanced.Visibility = Visibility.Collapsed;
            }
            config = Configuration.GetNewInstance();
        }
Exemple #3
0
 void mapControl_MapLoaded(EpiDashboard.Mapping.StandaloneMapControl control, bool isTimeLapsePossible)
 {
     btnAddLayer.Enabled = true;
     btnOpen.Enabled = true;
     btnSave.Enabled = true;
     btnSaveImage.Enabled = true;
     btnTimeLapse.Enabled = isTimeLapsePossible;
     btnReference.Enabled = true;
 }