• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Epi.View类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中Epi.View的典型用法代码示例。如果您正苦于以下问题:C# View类的具体用法?C# View怎么用?C# View使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



View类属于Epi命名空间,在下文中一共展示了View类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: ImportEncryptedDataPackageDialog

 /// <summary>
 /// Constructor
 /// </summary>        
 /// <param name="destinationView">The form within the project that will accept the packaged data</param>
 /// <param name="mergeType">Determines how to handle data merging during the import.</param>
 public ImportEncryptedDataPackageDialog(View destinationView, DataMergeType mergeType = DataMergeType.UpdateAndAppend)
 {
     InitializeComponent();
     this.destinationView = destinationView;
     destinationProject = this.destinationView.Project;
     Construct(mergeType);
 }
开发者ID:NALSS,项目名称:epiinfo-82474,代码行数:12,代码来源:ImportEncryptedDataPackageDialog.cs


示例2: MultilineTextField

 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="view">View</param>
 /// <param name="fieldNode">Xml field node</param>
 public MultilineTextField(View view, XmlNode fieldNode)
     : base(view)
 {
     this.fieldNode = fieldNode;
     this.view.Project.Metadata.GetFieldData(this, this.fieldNode);
     Construct();
 }
开发者ID:NALSS,项目名称:epiinfo-82474,代码行数:12,代码来源:MultilineTextField.cs


示例3: DataDictionary

 /// <summary>
 /// Constructor for the class
 /// </summary>
 /// <param name="givenView">The View to load check code for</param>
 /// <param name="givenMainForm">The main form</param>
 public DataDictionary(View givenView, MainForm givenMainForm)
 {
     view = givenView;
     project = view.Project;
     mainForm = givenMainForm;
     Construct();
 }
开发者ID:NALSS,项目名称:epiinfo-82474,代码行数:12,代码来源:DataDictionary.cs


示例4: DateTimeField

 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="view">View</param>
 /// <param name="fieldNode">Xml field node</param>
 public DateTimeField(View view, XmlNode fieldNode)
     : base(view)
 {
     construct();
     this.fieldNode = fieldNode;
     this.view.Project.Metadata.GetFieldData(this, this.fieldNode);
 }
开发者ID:NALSS,项目名称:epiinfo-82474,代码行数:12,代码来源:DateTimeField.cs


示例5: ProjectUnpackager

 /// <summary>
 /// The constructor
 /// </summary>
 /// <param name="destinationView">The destination form.</param>
 /// <param name="packagePaths">The file paths for the packages to be imported.</param>
 /// <param name="password">The password for the encryption.</param>
 public ProjectUnpackager(View destinationView, List<string> packagePaths, string password)
 {
     this.destinationView = destinationView;
     this.destinationProject = destinationView.Project;
     this.packagePaths = packagePaths;
     this.password = password;
     gch = GCHandle.Alloc(password, GCHandleType.Pinned);
 }
开发者ID:NALSS,项目名称:epiinfo-82474,代码行数:14,代码来源:ProjectUnpackager.cs


示例6: RenamePageDialog

 /// <summary>
 /// Constructor for the class
 /// </summary>
 /// <param name="frm">The calling form</param>
 /// <param name="node">The original page node</param>        
 public RenamePageDialog(MainForm frm, PageNode node)
     : base(frm)
 {
     // This call is required by the Windows Form Designer.
     InitializeComponent();
     this.PageNode = node;
     this.parentView = node.Page.view;
 }
开发者ID:NALSS,项目名称:epiinfo-82474,代码行数:13,代码来源:RenamePageDialog.cs


示例7: XmlMultiKeyDataUnpackager

 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="destinationForm">The form that will receive the incoming data</param>
 /// <param name="xmlDataPackage">The data package in Xml format</param>
 public XmlMultiKeyDataUnpackager(View destinationForm, XmlDocument xmlDataPackage)
     : base(destinationForm, xmlDataPackage)
 {
     #region Input Validation
     if (destinationForm == null) { throw new ArgumentNullException("sourceForm"); }
     if (xmlDataPackage == null) { throw new ArgumentNullException("xmlDataPackage"); }
     #endregion // Input Validation
 }
开发者ID:NALSS,项目名称:epiinfo-82474,代码行数:13,代码来源:XmlMultiKeyDataUnpackager.cs


示例8: XmlSqlDataPackager

 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="sourceForm">The form within the project whose data will be packaged.</param>
 /// <param name="packageName">The name of the data package.</param>
 public XmlSqlDataPackager(View sourceForm, string packageName)
     : base(sourceForm, packageName)
 {
     #region Input Validation
     if (sourceForm == null) { throw new ArgumentNullException("sourceForm"); }
     if (String.IsNullOrEmpty(packageName)) { throw new ArgumentNullException("packageName"); }
     #endregion // Input Validation
 }
开发者ID:NALSS,项目名称:epiinfo-82474,代码行数:13,代码来源:XmlSqlDataPackager.cs


示例9: FormDataImporter

 /// <summary>
 /// Constructor
 /// </summary>
 public FormDataImporter(Project sourceProject, Project destinationProject, View destinationView, List<View> viewsToProcess)
 {
     this.formsToProcess = viewsToProcess;
     this.sourceProject = sourceProject;
     this.destinationProject = destinationProject;
     this.sourceView = sourceProject.Views[destinationView.Name];
     this.destinationView = destinationView;
     Construct();
 }
开发者ID:NALSS,项目名称:epiinfo-82474,代码行数:12,代码来源:FormDataImporter.cs


示例10: ImportWebDataForm

        /// <summary>
        /// Constructor
        /// </summary>        
        /// <param name="destinationView">The destination form; should be the currently-open view</param>
        public ImportWebDataForm(View destinationView)
        {
            InitializeComponent();

            this.destinationProject = destinationView.Project;
            this.destinationView = destinationView;

            Construct();
        }
开发者ID:NALSS,项目名称:epiinfo-82474,代码行数:13,代码来源:ImportWebData.cs


示例11: ViewNode

 /// <summary>
 /// Constructor for ViewNode
 /// </summary>
 /// <param name="view">The current view</param>
 public ViewNode(View view)
 {
     Initialize();
     this.View = view;
     this.Text = view.Name;
     foreach (Page page in view.Pages)
     {
         this.Nodes.Add(new PageNode(page));
     }
 }
开发者ID:NALSS,项目名称:epiinfo-82474,代码行数:14,代码来源:ViewNode.cs


示例12: UnSubscribe

 public void UnSubscribe()
 {
     this.Controls.Clear();
     this.host = null;            
     this.dashboard = null;
     this.host = null;
     this.enterMainForm = null;
     this.currentView = null;
     this.db = null;
     this.loadedRuntimeView = null;
 }
开发者ID:NALSS,项目名称:epiinfo-82474,代码行数:11,代码来源:AnalyticsViewer.cs


示例13: RelatedConnection

 public RelatedConnection(View view, IDbDriver db, string parentKey, string childKey, bool useUnmatched, bool sameDataSource)
 {
     this.view = view;
     this.db = db;
     this.TableName = "";
     this.ConnectionName = "";
     this.ChildKeyField = childKey;
     this.ParentKeyField = parentKey;
     this.UseUnmatched = useUnmatched;
     this.SameDataSource = sameDataSource;
 }
开发者ID:NALSS,项目名称:epiinfo-82474,代码行数:11,代码来源:RelatedConnection.cs


示例14: Render

 public void Render(Epi.View view)
 {
     try
     {
         if (!view.IsRelatedView)
         {
             this.currentView = view;
         }
     }
     catch (Exception ex)
     {
         //temporarily catch all
     }
 }
开发者ID:NALSS,项目名称:epiinfo-82474,代码行数:14,代码来源:MapViewer.cs


示例15: CheckCode

        /// <summary>
        /// Constructor for the class
        /// </summary>
        /// <param name="view">The View to load check code for</param>
        /// <param name="frm">The main form</param>
        public CheckCode(View currentview, MakeViewMainForm frm)
        {
            mainForm = frm;
            if(currentview!=null)
            currentview.MustRefreshFieldCollection = true;
            view = currentview;
            Construct();
            EpiInfo.Plugin.IEnterInterpreter MR = mainForm.EpiInterpreter;
            MR.Context.RemoveVariablesInScope(VariableScope.Standard);

            if (!string.IsNullOrEmpty(view.CheckCode))
            {
                try
                {
                    mainForm.EpiInterpreter.Execute(view.CheckCode);
                }
                catch
                {

                }
            }

            foreach (Field field in view.Fields)
            {
                if (field is IDataField)
                {
                    EpiInfo.Plugin.IVariable definedVar = (EpiInfo.Plugin.IVariable)field;
                    MR.Context.DefineVariable(definedVar);
                }
                else if (field is Epi.Fields.LabelField)
                {
                    PluginVariable p = new PluginVariable();
                    p.Name = field.Name;
                    p.Prompt = ((Epi.Fields.LabelField)field).PromptText;
                    p.VariableScope = EpiInfo.Plugin.VariableScope.DataSource;
                    p.DataType = EpiInfo.Plugin.DataType.Text;
                    MR.Context.DefineVariable(p);
                }
                else
                {
                }
            }

            BuildComboBox();

            this.codeText.SelectionStart = 0;
            this.codeText.SelectionLength = 0;
        }
开发者ID:NALSS,项目名称:epiinfo-82474,代码行数:53,代码来源:CheckCode.cs


示例16: FindRecords

        /// <summary>
        /// Constructor for FindRecords dialog
        /// </summary>
        /// <param name="view">The current view</param>
        /// <param name="mainForm">Enter module's main form</param>
        public FindRecords(View view, EnterMainForm mainForm)
            : base(mainForm)
        {
            #region Input Validation
            if (view == null)
            {
                {
                    throw new ArgumentNullException("view");
                }
            }
            #endregion Input Validation

            InitializeComponent();
            this.view = view;
            this.mainForm = mainForm;
            this.KeyPreview = true;
        }
开发者ID:NALSS,项目名称:epiinfo-82474,代码行数:22,代码来源:FindRecordDialog.cs


示例17: XmlDataPackager

        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="sourceForm">The form within the project whose data will be packaged.</param>
        /// <param name="packageName">The name of the data package.</param>
        public XmlDataPackager(View sourceForm, string packageName)
        {
            #region Input Validation
            if (sourceForm == null) { throw new ArgumentNullException("sourceForm"); }
            if (String.IsNullOrEmpty(packageName)) { throw new ArgumentNullException("packageName"); }
            #endregion // Input Validation

            IncludeNullFieldData = true;
            RecordProcessingScope = RecordProcessingScope.Undeleted;
            SourceForm = sourceForm;
            SourceProject = SourceForm.Project;
            PackageName = packageName;
            GridColumnsToNull = new Dictionary<string, List<string>>();
            FieldsToNull = new Dictionary<string, List<string>>();
            KeyFields = new List<Field>();
            ParentIdList = new List<string>();
            CurrentDistanceFromRoot = 0;
            PreviousDistanceFromRoot = 0;
        }
开发者ID:NALSS,项目名称:epiinfo-82474,代码行数:24,代码来源:XmlDataPackager.cs


示例18: LineListingViewer

 public LineListingViewer(View view, IDbDriver db, string title)
 {
     try
     {
         InitializeComponent();
         host = new ElementHost();
         host.Dock = DockStyle.Fill;
         control = new EpiDashboard.SimpleDataGrid(view, db);
         control.RecordSelected += new EpiDashboard.Mapping.RecordSelectedHandler(control_RecordSelected);
         host.Child = control;
         this.Controls.Add(host);
         this.Text += " - " + title;
         this.Shown += new EventHandler(LineListingViewer_Shown);
     }
     catch (Exception ex)
     {
         //catching all for debugging purposes
     }
 }
开发者ID:NALSS,项目名称:epiinfo-82474,代码行数:19,代码来源:LineListingViewer.cs


示例19: CreateXmlFormDataElement

        /// <summary>
        /// Creates an XmlElement representing an Epi Info 7 view's data.
        /// </summary>
        /// <param name="xmlDataPackage">The data package xml document that the XmlElement should be added to</param>
        /// <param name="form">The form whose data will be serialized</param>
        /// <returns>XmlElement; represents the form's data in Xml format, suitable for use in data packaging</returns>
        protected override XmlElement CreateXmlFormDataElement(XmlDocument xmlDataPackage, View form)
        {
            #region Input Validation
            if (xmlDataPackage == null) { throw new ArgumentNullException("xmlDataPackage"); }
            if (form == null) { throw new ArgumentNullException("form"); }
            #endregion // Input Validation

            XmlElement data = xmlDataPackage.CreateElement("Data");

            OnStatusChanged(String.Format("Packaging data for form {0}...", form.Name));
            OnResetProgress();

            /* This seems like an usual set of steps to just iterate over the data. The problem is that we can't "just
             * iterate over the data" - the data is split up page tables, with one table representing one page on the
             * form. While a JOIN might be able to bring everything together into one table, it might not - for example,
             * if there are >255 fields after the JOIN, an OleDb exception will be thrown.
             *
             * To get around this issue: The code first iterates over the rows in the BASE TABLE, obtaining the GUID
             * values for each. The GUIDs and their corresponding XmlElement go into a dictionary.
             *
             * Later, each row in each page is iterated over; as the GUIDs for each page table are accessed, the corresponding
             * XmlElement is pulled from the dictionary. Field data is added to it for each field that has data. In this
             * manner, it doesn't matter that each row is technically accessed out-of-order because they'll still show up
             * in-order in the resulting Xml.
             *
             * Filtering adds another layer of complexity. To filter, a JOIN operation is needed so that the filters can
             * be applied across all those tables, since the fields in the filter may be across different tables. The
             * RowFilter class provides a way to handle this; we simply get the query from that object and apply it to the
             * reader. Only GUIDs that match the filter are added to the dictionary of guids.
             */

            // We need to exclude records from child forms that may now be orphaned as a result of a filter applied to the parent
            if (form.IsRelatedView && PreviousDistanceFromRoot < CurrentDistanceFromRoot)
            {
                ParentIdList.Clear();
                foreach (KeyValuePair<string, XmlElement> kvp in IdList) { ParentIdList.Add(kvp.Key); }
            }

            IdList.Clear(); // Very important, this needs to be re-set in case we've already processed a form (this is a class level variable)

            if (!ExportInfo.RecordsPackaged.ContainsKey(form))
            {
                ExportInfo.RecordsPackaged.Add(form, 0);
            }

            //bool filterThisForm = false;
            RowFilters filters = null;
            Query selectQuery = null;

            IDbDriver db = SourceProject.CollectedData.GetDatabase();

            if (Filters != null && Filters.ContainsKey(form.Name) && Filters[form.Name].Count() > 0)
            {
                //filterThisForm = true;
                filters = Filters[form.Name];
                filters.RecordProcessingScope = RecordProcessingScope;
                selectQuery = filters.GetGuidSelectQuery(form);
            }

            double totalRecords = Convert.ToDouble(db.ExecuteScalar(db.CreateQuery("SELECT COUNT(*) FROM " + form.TableName)));

            string selectQueryText = "SELECT * " + form.FromViewSQL;

            if (selectQuery != null)
            {
                int whereClauseIndex = selectQuery.SqlStatement.LastIndexOf(" WHERE ");

                if (whereClauseIndex >= 0)
                {
                    selectQueryText = "SELECT * " + form.FromViewSQL + " " + selectQuery.SqlStatement.Substring(whereClauseIndex);
                }
            }

            selectQuery = db.CreateQuery(selectQueryText);

            int processedRecords = 0;

            using (IDataReader guidReader = db.ExecuteReader(selectQuery))
            //using (IDataReader guidReader = filterThisForm ? db.ExecuteReader(selectQuery) : db.GetTableDataReader(form.TableName))
            {
                while (guidReader.Read())
                {
                    string guid = guidReader["GlobalRecordId"].ToString();
                    string fkey = guidReader["FKEY"].ToString();
                    string recstatus = guidReader["RECSTATUS"].ToString();
                    string firstSaveUserId = string.Empty;
                    DateTime? firstSaveTime = null;
                    string lastSaveUserId = string.Empty;
                    DateTime? lastSaveTime = null;

                    firstSaveUserId = guidReader["FirstSaveLogonName"].ToString();
                    if (guidReader["FirstSaveTime"] != DBNull.Value)
                    {
                        firstSaveTime = (DateTime)guidReader["FirstSaveTime"];
//.........这里部分代码省略.........
开发者ID:NALSS,项目名称:epiinfo-82474,代码行数:101,代码来源:XmlSqlDataPackager.cs


示例20: DDLFieldOfLegalValues

 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="view">The view</param>
 /// <param name="fieldNode">Xml field node</param>
 public DDLFieldOfLegalValues(View view, XmlNode fieldNode)
     : base(view)
 {
     this.fieldNode = fieldNode;
     this.view.Project.Metadata.GetFieldData(this, this.fieldNode);
 }
开发者ID:NALSS,项目名称:epiinfo-82474,代码行数:11,代码来源:DDLFieldOfLegalValues.cs



注:本文中的Epi.View类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Calabrese.FNode类代码示例发布时间:2022-05-24
下一篇:
C# Epi.Page类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap