public override object Execute()
        {
            Epi.Data.IDbDriver driver = null;

            if (this.Context.CurrentRead != null)
            {
                driver = Epi.Data.DBReadExecute.GetDataDriver(this.Context.CurrentRead.File);
            }
            else
            {
                return(null);
            }

            List <string> tableNames = driver.GetTableNames();
            List <string> viewNames  = new List <string>();

            foreach (string name in tableNames)
            {
                if (name.ToUpperInvariant().StartsWith("VIEW"))
                {
                    viewNames.Add(name);
                }
            }
            this.DialogThenAssign(viewNames);
            return(null);
        }
 public SocialNetworkGraph(Epi.View view, Epi.Data.IDbDriver db)
 {
     InitializeComponent();
     this.db = db;
     this.view = view;
     this.Loaded += new RoutedEventHandler(SocialNetworkGraph_Loaded);
     grdMain.SizeChanged += new SizeChangedEventHandler(grdMain_SizeChanged);
 }
 public SocialNetworkGraph(Epi.View view, Epi.Data.IDbDriver db)
 {
     InitializeComponent();
     this.db              = db;
     this.view            = view;
     this.Loaded         += new RoutedEventHandler(SocialNetworkGraph_Loaded);
     grdMain.SizeChanged += new SizeChangedEventHandler(grdMain_SizeChanged);
 }
Beispiel #4
0
 public LayerList(ESRI.ArcGIS.Client.Map myMap, Epi.View view, Epi.Data.IDbDriver db, DashboardHelper dashboardHelper)
 {
     InitializeComponent();
     this.myMap = myMap;
     this.view = view;
     this.db = db;
     this.dashboardHelper = dashboardHelper;
 }
        public LayerList(ESRI.ArcGIS.Client.Map myMap, Epi.View view, Epi.Data.IDbDriver db, DashboardHelper dashboardHelper)
        {
            InitializeComponent();

            #region Translation
            tblockMapLayers.Text = DashboardSharedStrings.GADGET_MAP_LAYERS;
            #endregion
        }
Beispiel #6
0
        /// <summary>
        /// TableToViewDialog
        /// </summary>
        /// <param name="pTableName">table name</param>
        /// <param name="pViewName">view name</param>
        /// <param name="pDbDriver">IDBDriver</param>
        /// <param name="pColumnMapping">Column mapping scheme</param>
        public TableToViewDialog(string pTableName, string pViewName, Epi.Data.IDbDriver pDbDriver, Dictionary <string, string> pColumnMapping)
        {
            InitializeComponent();

            TableName     = pTableName;
            ViewName      = pViewName;
            DbDriver      = pDbDriver;
            columnMapping = pColumnMapping;
        }
        /// <summary>
        /// TableToViewDialog
        /// </summary>
        /// <param name="pTableName">table name</param>
        /// <param name="pViewName">view name</param>
        /// <param name="pDbDriver">IDBDriver</param>
        /// <param name="pColumnMapping">Column mapping scheme</param>
        public TableToViewDialog(string pTableName, string pViewName, Epi.Data.IDbDriver pDbDriver, Dictionary<string, string> pColumnMapping)
        {
            InitializeComponent();

            TableName = pTableName;
            ViewName = pViewName;
            DbDriver = pDbDriver;
            columnMapping = pColumnMapping;
        }
Beispiel #8
0
 public TransmissionChain(Epi.View view, Epi.Data.IDbDriver db, Canvas transmissionCanvas, Canvas transmissionDates, MainWindow mainWindow)
 {
     this.db   = db;
     this.view = view;
     this.transmissionCanvas = transmissionCanvas;
     this.transmissionDates  = transmissionDates;
     this.mainWindow         = mainWindow;
     this.IsEnterOpen        = false;
 }
        private void btnImportListValues_Click(object sender, EventArgs e)
        {
            Epi.Windows.Dialogs.BaseReadDialog dlg = new Epi.Windows.Dialogs.BaseReadDialog(this);

            if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                if (dlg.SelectedDataSource is Project)
                {
                    Epi.Windows.MsgBox.ShowInformation(ImportExportSharedStrings.ERROR_CODE_TABLE_PROJECT_IMPORT_NOT_ALLOWED);
                }
                else
                {
                    Epi.Data.IDbDriver db = (Epi.Data.IDbDriver)dlg.SelectedDataSource;
                    if (string.IsNullOrEmpty(dlg.SQLQuery))
                    {
                        DataTable     DT          = db.GetTopTwoTable(dlg.SelectedDataMember);
                        List <string> columnNames = new List <string>();
                        foreach (DataColumn dc in DT.Columns)
                        {
                            columnNames.Add(dc.ColumnName);
                        }
                        Epi.Windows.ImportExport.Dialogs.FieldSelectionDialog fsd = new Windows.ImportExport.Dialogs.FieldSelectionDialog(columnNames);
                        DialogResult fieldDialogResult = fsd.ShowDialog();
                        if (fieldDialogResult == System.Windows.Forms.DialogResult.OK)
                        {
                            string selectedColumn = fsd.SelectedField;
                            string codeTableName  = "code" + dlg.SelectedDataMember + selectedColumn;

                            try
                            {
                                DT           = db.GetTableData(dlg.SelectedDataMember);
                                DT.TableName = codeTableName;
                                codeTables.Add(DT);

                                codeTableList.Add(codeTableName);
                                ((DataGridViewComboBoxColumn)dgvFormFields.Columns["ListSourceTableName"]).Items.Clear();

                                foreach (string s in codeTableList)
                                {
                                    ((DataGridViewComboBoxColumn)dgvFormFields.Columns["ListSourceTableName"]).Items.Add(s);
                                }
                            }
                            catch (OutOfMemoryException)
                            {
                                Epi.Windows.MsgBox.ShowError(ImportExportSharedStrings.ERROR_OUT_OF_MEMORY_CODE_TABLE);
                                DT.Rows.Clear();
                            }
                        }
                    }
                    else
                    {
                        Epi.Windows.MsgBox.ShowInformation(ImportExportSharedStrings.ERROR_CODE_TABLE_QUERY_IMPORT_NOT_ALLOWED);
                    }
                }
            }
        }
        public LayerAdder(ESRI.ArcGIS.Client.Map myMap, Epi.View view, Epi.Data.IDbDriver db, DashboardHelper dashboardHelper, LayerList layerList, MapControl mapControl)
        {
            InitializeComponent();

            this.myMap           = myMap;
            this.view            = view;
            this.db              = db;
            this.dashboardHelper = dashboardHelper;
            this.layerList       = layerList;
            this.mapControl      = mapControl;

            AddItem();
        }
Beispiel #11
0
        public LayerAdder(ESRI.ArcGIS.Client.Map myMap, Epi.View view, Epi.Data.IDbDriver db, DashboardHelper dashboardHelper, LayerList layerList, MapControl mapControl)
        {
            InitializeComponent();

            this.myMap = myMap;
            this.view = view;
            this.db = db;
            this.dashboardHelper = dashboardHelper;
            this.layerList = layerList;
            this.mapControl = mapControl;

            AddItem();
        }
        public LayerListItem(ESRI.ArcGIS.Client.Map myMap, Epi.View view, Epi.Data.IDbDriver db, DashboardHelper dashboardHelper, MapControl mapControl)
        {
            InitializeComponent();

            this.myMap = myMap;
            this.view = view;
            this.db = db;
            this.dashboardHelper = dashboardHelper;
            this.mapControl = mapControl;

            cbxLayerType.SelectionChanged += new SelectionChangedEventHandler(cbxLayerType_SelectionChanged);
            cbxLayerType.SelectedIndex = 0;
            lblLayerType.Foreground = new SolidColorBrush(FontColor);
        }
        public LayerListItem(ESRI.ArcGIS.Client.Map myMap, Epi.View view, Epi.Data.IDbDriver db, DashboardHelper dashboardHelper, MapControl mapControl)
        {
            InitializeComponent();

            this.myMap           = myMap;
            this.view            = view;
            this.db              = db;
            this.dashboardHelper = dashboardHelper;
            this.mapControl      = mapControl;

            cbxLayerType.SelectionChanged += new SelectionChangedEventHandler(cbxLayerType_SelectionChanged);
            cbxLayerType.SelectedIndex     = 0;
            lblLayerType.Foreground        = new SolidColorBrush(FontColor);
        }
Beispiel #14
0
        private void txtStandalonePath_TextChanged(object sender, TextChangedEventArgs e)
        {
            cmbStandaloneFormName.Items.Clear();
            if (System.IO.File.Exists(txtStandalonePath.Text))
            {
                Epi.Data.IDbDriver database = Epi.Data.DBReadExecute.GetDataDriver(txtStandalonePath.Text);

                List <string> tableNames = database.GetTableNames();
                cmbStandaloneFormName.Items.Clear();
                foreach (string tableName in tableNames)
                {
                    cmbStandaloneFormName.Items.Add(tableName);
                }
            }
        }
Beispiel #15
0
 public SNAViewer(View view, Epi.Data.IDbDriver db)
 {
     try
     {
         InitializeComponent();
         host      = new ElementHost();
         host.Dock = DockStyle.Fill;
         control   = new EpiDashboard.SocialNetworkGraph(view, db);
         control.SphereSelected += new EpiDashboard.SphereSelectedHandler(control_RecordSelected);
         host.Child              = control;
         this.toolStripContainer1.ContentPanel.Controls.Add(host);
     }
     catch (Exception ex)
     {
         //catching all for debugging purposes
     }
 }
        public override object Execute()
        {
            DataTable outputTable = null;

            DataSets.Config.DataDriverDataTable dataDrivers = Configuration.GetNewInstance().DataDrivers;
            Epi.Data.IDbDriverFactory           dbFactory   = null;
            foreach (DataSets.Config.DataDriverRow dataDriver in dataDrivers)
            {
                dbFactory = Epi.Data.DbDriverFactoryCreator.GetDbDriverFactory(dataDriver.Type);

                if (dbFactory.CanClaimConnectionString(this.Context.CurrentRead.File))
                {
                    break;
                }
            }

            Epi.Data.IDbDriver OutputDriver = Epi.Data.DBReadExecute.GetDataDriver(this.Context.CurrentRead.File, true);

            outputTable = OutputDriver.GetTableData(this.tableName);

            if (outputTable != null)
            {
                Type columnType = outputTable.Columns[variableName].DataType;

                List <string> values = new List <string>();

                foreach (DataRow row in outputTable.Rows)
                {
                    string value = row[variableName].ToString();

                    if (values.Contains(value) == false && string.IsNullOrEmpty(value) == false)
                    {
                        values.Add(value);
                    }
                }

                this.DialogThenAssign(values);
            }

            return(null);
        }
        /// <summary>
        /// TableToViewDialog
        /// </summary>
        /// <param name="pTableName">table name</param>
        /// <param name="pViewName">view name</param>
        /// <param name="pDbDriver">IDBDriver</param>
        /// <param name="pColumnMapping">Column mapping scheme</param>
        public TableToViewDialog(string pTableName, string pViewName, Epi.Data.IDbDriver pDbDriver, /*Dictionary<string, string> pColumnMapping*/ List <ColumnConversionInfo> pColumnMapping)
        {
            InitializeComponent();

            TableName     = pTableName;
            ViewName      = pViewName;
            DbDriver      = pDbDriver;
            columnMapping = pColumnMapping;
            ConvertMappingsToFieldTable();
            codeTables    = new List <DataTable>();
            codeTableList = new List <string>();

            ((DataGridViewComboBoxColumn)dgvFormFields.Columns["FieldType"]).Items.Add("Text");
            ((DataGridViewComboBoxColumn)dgvFormFields.Columns["FieldType"]).Items.Add("Multiline");
            ((DataGridViewComboBoxColumn)dgvFormFields.Columns["FieldType"]).Items.Add("Number");
            ((DataGridViewComboBoxColumn)dgvFormFields.Columns["FieldType"]).Items.Add("YesNo");
            ((DataGridViewComboBoxColumn)dgvFormFields.Columns["FieldType"]).Items.Add("Checkbox");
            ((DataGridViewComboBoxColumn)dgvFormFields.Columns["FieldType"]).Items.Add("Date");
            ((DataGridViewComboBoxColumn)dgvFormFields.Columns["FieldType"]).Items.Add("DateTime");
            ((DataGridViewComboBoxColumn)dgvFormFields.Columns["FieldType"]).Items.Add("Time");
            ((DataGridViewComboBoxColumn)dgvFormFields.Columns["FieldType"]).Items.Add("LegalValues");
        }
        /// <summary>
        /// TableToViewDialog
        /// </summary>
        /// <param name="pTableName">table name</param>
        /// <param name="pViewName">view name</param>
        /// <param name="pDbDriver">IDBDriver</param>
        /// <param name="pColumnMapping">Column mapping scheme</param>
        public TableToViewDialog(string pTableName, string pViewName, Epi.Data.IDbDriver pDbDriver, /*Dictionary<string, string> pColumnMapping*/List<ColumnConversionInfo> pColumnMapping)
        {
            InitializeComponent();

            TableName = pTableName;
            ViewName = pViewName;
            DbDriver = pDbDriver;
            columnMapping = pColumnMapping;
            ConvertMappingsToFieldTable();
            codeTables = new List<DataTable>();
            codeTableList = new List<string>();

            ((DataGridViewComboBoxColumn)dgvFormFields.Columns["FieldType"]).Items.Add("Text");
            ((DataGridViewComboBoxColumn)dgvFormFields.Columns["FieldType"]).Items.Add("Multiline");
            ((DataGridViewComboBoxColumn)dgvFormFields.Columns["FieldType"]).Items.Add("Number");
            ((DataGridViewComboBoxColumn)dgvFormFields.Columns["FieldType"]).Items.Add("YesNo");
            ((DataGridViewComboBoxColumn)dgvFormFields.Columns["FieldType"]).Items.Add("Checkbox");
            ((DataGridViewComboBoxColumn)dgvFormFields.Columns["FieldType"]).Items.Add("Date");
            ((DataGridViewComboBoxColumn)dgvFormFields.Columns["FieldType"]).Items.Add("DateTime");
            ((DataGridViewComboBoxColumn)dgvFormFields.Columns["FieldType"]).Items.Add("Time");
            ((DataGridViewComboBoxColumn)dgvFormFields.Columns["FieldType"]).Items.Add("LegalValues");
        }
Beispiel #19
0
        private async void CheckForDbConnectivityAsync()
        {
            if (IsShowingConnectionEditor == true || IsCheckingConnection == true) // don't check for connectivity while the editor is open or if we're already checking
            {
                return;
            }

            IsCheckingConnection = true;

            await Task.Factory.StartNew(delegate
            {
                Epi.Project project = null;

                try
                {
                    if (!System.IO.File.Exists(this.FileInfo.FullName))
                    {
                        IsConnected          = false;
                        IsCheckingConnection = false;
                        return;
                    }

                    project = new Epi.Project(this.FileInfo.FullName);
                    Epi.Data.IDbDriver db = project.CollectedData.GetDatabase();
                    if (db != null)
                    {
                        ConnectionString      = db.ConnectionString;
                        InputConnectionString = db.ConnectionString;

                        if (db is Epi.Data.Office.OleDbDatabase)
                        {
                            IsLocalStorage       = true;
                            IsServerBasedStorage = false;
                        }
                        else
                        {
                            IsLocalStorage       = false;
                            IsServerBasedStorage = true;
                        }
                    }
                    //if (project.CollectedData.GetDatabase() is Epi.Data.Office.OleDbDatabase)
                    //{
                    //    string dataSource = project.CollectedData.DataSource;
                    //    dataSource = dataSource.Replace("data source=", String.Empty);
                    //    bool fileExists = System.IO.File.Exists(dataSource);
                    //    if (!fileExists)
                    //    {
                    //        IsConnected = false;
                    //        return;
                    //    }
                    //}

                    Epi.View view = project.Views["CaseInformationForm"];
                    IsConnected   = true;
                }
                catch (Epi.GeneralException)
                {
                    IsConnected = false;
                }
                catch (System.Security.Cryptography.CryptographicException)
                {
                    // keys don't match
                    IsConnected = false;
                }
                catch (Exception)
                {
                    IsConnected = false;
                }
                finally
                {
                    if (project != null)
                    {
                        project.Dispose();
                    }

                    IsCheckingConnection = false;
                }
            });
        }
Beispiel #20
0
        /// <summary>
        /// Load the form with the saved data
        /// </summary>
        private new void LoadFormData()
        {
            Configuration config = Configuration.GetNewInstance();
            FontStyle     style  = FontStyle.Regular;

            if (config.Settings.EditorFontBold)
            {
                style |= FontStyle.Bold;
            }
            if (config.Settings.EditorFontItalics)
            {
                style |= FontStyle.Italic;
            }
            field.PromptFont = new Font(config.Settings.EditorFontName, (float)config.Settings.EditorFontSize, style);

            style = FontStyle.Regular;
            if (config.Settings.ControlFontBold)
            {
                style |= FontStyle.Bold;
            }
            if (config.Settings.ControlFontItalics)
            {
                style |= FontStyle.Italic;
            }
            field.ControlFont = new Font(config.Settings.ControlFontName, (float)config.Settings.ControlFontSize, style);

            txtPrompt.Text    = field.PromptText;
            txtFieldName.Text = field.Name;
            if (!string.IsNullOrEmpty(field.SourceTableName))
            {
                this.sourceTableName = field.SourceTableName;
                this.textColumnName  = field.TextColumnName;
                txtDataSource.Text   = field.SourceTableName + " :: " + field.TextColumnName;
            }
            chkReadOnly.Checked   = field.IsReadOnly;
            chkRepeatLast.Checked = field.ShouldRepeatLast;
            chkRequired.Checked   = field.IsRequired;
            promptFont            = field.PromptFont;
            controlFont           = field.ControlFont;
            if (!(String.IsNullOrEmpty(txtPrompt.Text)))
            {
                btnDataSource.Enabled = true;
            }
            else
            {
                btnDataSource.Enabled = false;
            }

            Epi.Data.IDbDriver db    = Epi.Data.DBReadExecute.GetDataDriver(page.view.Project.CollectedDataConnectionString);
            Epi.Data.Query     query = db.CreateQuery("select [Name], [FieldId] " +
                                                      "from metaFields " +
                                                      "where [PageId] = @pageID and [FieldTypeId] in (1,3,4,17, 18, 19, 27) " +
                                                      " and [ViewId] = @viewID " +
                                                      "order by [Name]");
            query.Parameters.Add(new Epi.Data.QueryParameter("@pageID", DbType.Int32, page.Id));
            query.Parameters.Add(new Epi.Data.QueryParameter("@viewID", DbType.Int32, page.view.Id));

            //DataTable textFields = page.GetMetadata().GetTextFieldsForPage(page.GetView().Id, page.Id);
            DataTable textFields = db.Select(query);
            string    expression = "Name = '" + txtFieldName.Text + "'";
            string    sortOrder  = "Name DESC";

            DataRow[] rows = textFields.Select(expression, sortOrder);
            if (rows.Length > 0)
            {
                textFields.Rows.Remove(rows[0]);
            }
            lbxLinkedFields.DataSource    = textFields;
            lbxLinkedFields.DisplayMember = ColumnNames.NAME;

            if (!(string.IsNullOrEmpty(txtDataSource.Text)))
            {
                selectedIndex = page.GetProject().CollectedData.GetTableColumnNames(field.SourceTableName);

                String textFieldName = string.Empty;

                for (int i = 0; i < textFields.Rows.Count; i++)
                {
                    textFieldName = textFields.Rows[i][ColumnNames.NAME].ToString();

                    if (selectedIndex.Contains(textFieldName))
                    {
                        lbxLinkedFields.SetSelected(lbxLinkedFields.FindStringExact(textFieldName), true);
                    }
                    else
                    {
                        lbxLinkedFields.SetSelected(lbxLinkedFields.FindStringExact(textFieldName), false);
                    }
                }
                lbxLinkedFields.Enabled = true;
                lblSelectFields.Enabled = true;
                lbxLinkedFields.Visible = true;
                lblSelectFields.Visible = true;
                btnOk.Enabled           = true;
            }
            else
            {
                btnOk.Enabled = true;
            }
        }
Beispiel #21
0
        public DashboardProperties(DashboardHelper dashboardHelper)
        {
            #region Input Validation
            if (dashboardHelper == null)
            {
                throw new ArgumentNullException("dashboardHelper");
            }
            #endregion // Input Validation

            InitializeComponent();
            this.DashboardHelper = dashboardHelper;

            DataContext = this;

            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;

                panelDataSourceProject.Visibility = System.Windows.Visibility.Visible;
                panelDataSourceOther.Visibility   = System.Windows.Visibility.Collapsed;
                panelDataSourceSql.Visibility     = System.Windows.Visibility.Collapsed;
                panelAdvancedSQLQuery.Visibility  = System.Windows.Visibility.Collapsed;
            }
            else
            {
                if (dashboardHelper.Database.ToString().Contains("SqlDatabase"))
                {
                    txtSQLConnectionString.Text = DashboardHelper.Database.ConnectionString;

                    Epi.Data.IDbDriver database   = Epi.Data.DBReadExecute.GetDataDriver(txtSQLConnectionString.Text);
                    List <string>      tableNames = database.GetTableNames();
                    cmbSqlTable.Items.Clear();
                    cmbSqlTable.Items.Add("");

                    foreach (string tableName in tableNames)
                    {
                        cmbSqlTable.Items.Add(tableName);
                    }

                    cmbSqlTable.SelectedItem = DashboardHelper.TableName;

                    if (!String.IsNullOrEmpty(dashboardHelper.CustomQuery))
                    {
                        CustomQuery = DashboardHelper.CustomQuery;
                    }

                    panelDataSourceProject.Visibility = System.Windows.Visibility.Collapsed;
                    panelDataSourceOther.Visibility   = System.Windows.Visibility.Collapsed;
                    panelDataSourceSql.Visibility     = System.Windows.Visibility.Visible;
                    panelAdvancedSQLQuery.Visibility  = System.Windows.Visibility.Visible;
                }
                else
                {
                    txtStandalonePath.Text = DashboardHelper.Database.DataSource;

                    Epi.Data.IDbDriver database   = Epi.Data.DBReadExecute.GetDataDriver(txtStandalonePath.Text);
                    List <string>      tableNames = database.GetTableNames();
                    cmbStandaloneFormName.Items.Clear();
                    cmbStandaloneFormName.Items.Add("");
                    foreach (string tableName in tableNames)
                    {
                        cmbStandaloneFormName.Items.Add(tableName);
                    }

                    cmbStandaloneFormName.SelectedItem = DashboardHelper.TableName;

                    if (!String.IsNullOrEmpty(dashboardHelper.CustomQuery))
                    {
                        CustomQuery = DashboardHelper.CustomQuery;
                    }

                    panelDataSourceProject.Visibility = System.Windows.Visibility.Collapsed;
                    panelDataSourceOther.Visibility   = System.Windows.Visibility.Visible;
                    panelDataSourceSql.Visibility     = System.Windows.Visibility.Collapsed;
                    panelAdvancedSQLQuery.Visibility  = System.Windows.Visibility.Visible;
                }
            }

            tblockRows.Text             = dashboardHelper.DataSet.Tables[0].Rows.Count.ToString() + DashboardSharedStrings.GADGET_INFO_UNFILTERED_ROWS;
            tblockColumns.Text          = dashboardHelper.DataSet.Tables[0].Columns.Count.ToString() + DashboardSharedStrings.CANVAS_COLUMNS;
            tblockCacheDateTime.Text    = DashboardSharedStrings.CANVAS_DATA_LAST_CACHED + dashboardHelper.LastCacheTime.ToShortDateString() + " " + dashboardHelper.LastCacheTime.ToShortTimeString();
            tblockCacheTimeElapsed.Text = DashboardSharedStrings.CANVAS_INFO_TOOK + dashboardHelper.TimeToCache + DashboardSharedStrings.CANVAS_INFO_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);
                }
            }


            #region Translation

            lblConfigExpandedTitle.Content = DashboardSharedStrings.CMENU_PROPERTIES;
            tbtnDataSource.Title           = DashboardSharedStrings.GADGET_DATA_SOURCE;
            tbtnDataSource.Description     = DashboardSharedStrings.CANVASPROPERTIES_TABDESC_DATASOURCE;
            tbtnHTML.Title       = DashboardSharedStrings.GADGET_TABBUTTON_DISPLAY;
            tbtnHTML.Description = DashboardSharedStrings.CANVASPROPERTIES_DESC_HTMLOUTPUT;
            //tbtnCharts.Title = DashboardSharedStrings.GADGET_TAB_COLORS_STYLES;
            //tbtnCharts.Description = DashboardSharedStrings.CANVASPROPERTIES_DESC_CHARTS;
            tbtnInfo.Title       = DashboardSharedStrings.CANVASPROPERTIES_TITLE_INFORMATION;
            tbtnInfo.Description = DashboardSharedStrings.CANVASPROPERTIES_DESC_INFORMATION;

            //Data Source Panel
            tblockPanelDataSource.Content = DashboardSharedStrings.GADGET_DATA_SOURCE;
            tblockEpiInfoPro.Content      = DashboardSharedStrings.CANVAS_EPIINFOPRO;
            btnBrowse.Content             = DashboardSharedStrings.BUTTON_BROWSE;
            tblockForm.Content            = DashboardSharedStrings.CANVAS_FORM;
            lblRelatedDataSources.Content = DashboardSharedStrings.RALATED_DATASOURCE;

            //Display Panel
            tblockHTMLOutput.Content        = DashboardSharedStrings.GADGET_PANELHEADER_DISPLAY;
            tblockHTMLSetting.Content       = DashboardSharedStrings.CANVAS_HTMLOUTPUT_SETTINGS;
            txtTitle.Text                   = DashboardSharedStrings.CANVAS_TITLE;
            txtSummary.Text                 = DashboardSharedStrings.CANVAS_SUMMARY;
            txtConclusion.Text              = DashboardSharedStrings.CANVAS_CONCLUSION;
            checkboxGadgetHeadings.Content  = DashboardSharedStrings.CANVAS_GADGET_HEADING;
            checkboxGadgetSettings.Content  = DashboardSharedStrings.CANVAS_GADGET_SETTINGS;
            checkboxCanvasSummary.Content   = DashboardSharedStrings.CANVAS_CANVAS_SUMMARY;
            checkboxAlternateColors.Content = DashboardSharedStrings.CANVAS_ALTERNATING_COLORS;
            checkboxTopToBottom.Content     = DashboardSharedStrings.CANVAS_DISPLAY_TOPTO_BOTTOM;
            tblockChartSetting.Content      = DashboardSharedStrings.CANVAS_CHART_SETTINGS;
            lbldefaultwidth.Content         = DashboardSharedStrings.CANVAS_DEFAULT_WIDTH;
            lbldefaultheight.Content        = DashboardSharedStrings.CANVAS_DEFAULT_HEIGHT;

            //Information Panel
            lblCanvasInformation.Content = DashboardSharedStrings.GADGET_CANVAS_INFO;

            #endregion // Translation
        }