コード例 #1
0
ファイル: ControlFactory.cs プロジェクト: NALSS/epiinfo-82474
 private ControlFactory()
 {
     _controlFields = new Dictionary<Control, Field>();
     fieldControls = new Dictionary<Field, List<Control>>();
     controlsList = new List<Control>();
     config = Configuration.GetNewInstance();
 }
コード例 #2
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="sourceProject">The source project</param>
 /// <param name="formName">The name of the top-level form</param>
 public PackageRecordSelectionDialog(Project sourceProject, string formName)
 {
     InitializeComponent();
     this.sourceProject = sourceProject;
     this.formName = formName;
     rowFilterConditions = new List<IRowFilterCondition>();
     FillFields();
     config = Configuration.GetNewInstance();
 }
コード例 #3
0
 /// <summary>
 /// The constructor
 /// </summary>
 /// <param name="sourceProject">The project from which to create the package.</param>
 /// <param name="packagePath">The file path to where the package will reside.</param>
 /// <param name="formName">The name of the form within the project to package.</param>
 /// <param name="password">The password for the encryption.</param>
 public ProjectPackagerBase(Project sourceProject, string packagePath, string formName, string password)
 {
     this.sourceProject = sourceProject;
     this.packagePath = packagePath;
     this.formName = formName;
     this.password = password;
     this.columnsToNull = new Dictionary<string, List<string>>();
     this.gridColumnsToNull = new Dictionary<string, List<string>>();
     this.config = Configuration.GetNewInstance();
 }
コード例 #4
0
        /// <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();
        }
コード例 #5
0
 private void Load()
 {
     config = Configuration.GetNewInstance();
     PopulateDataSourcePlugIns();
     PopulateRecentDataSources();
     //PopulateAvailableProjects();
 }
コード例 #6
0
        private void Construct(DataMergeType mergeType)
        {
            config = Configuration.GetNewInstance();

            switch (mergeType)
            {
                case DataMergeType.UpdateAndAppend:
                    this.cmbImportType.SelectedIndex = 0;
                    break;
                case DataMergeType.UpdateOnly:
                    this.cmbImportType.SelectedIndex = 1;
                    break;
                case DataMergeType.AppendOnly:
                    this.cmbImportType.SelectedIndex = 2;
                    break;
            }
        }
コード例 #7
0
ファイル: Rule_Context.cs プロジェクト: NALSS/epiinfo-82474
        public Dictionary<string, string> GetGlobalSettingProperties(Configuration config = null)
        {
            Dictionary<string, string> result = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);

            if (config == null)
            {
                config = Configuration.GetNewInstance();
            }

            ApplyOverridenConfigSettings(config);

            result.Add("RepresentationOfMissing", config.Settings.RepresentationOfMissing);
            result.Add("RepresentationOfNo", config.Settings.RepresentationOfNo);
            result.Add("RepresentationOfYes", config.Settings.RepresentationOfYes);
            result.Add("STATISTICS",config.Settings.StatisticsLevel.ToString());
            result.Add("RECORD-PROCESSING-SCOPE",config.Settings.RecordProcessingScope.ToString());
            result.Add("DELETED-RECORD-INCLUSION-LEVEL", config.Settings.RecordProcessingScope.ToString());
            result.Add("ShOW-PERCENTS",config.Settings.ShowPercents.ToString());
            result.Add("INCLUDE-MISSING",config.Settings.IncludeMissingValues.ToString());
            result.Add("SHOW-SELECT",config.Settings.ShowSelection.ToString());
            result.Add("SHOW-FREQGRAPH",config.Settings.ShowGraphics.ToString());
            result.Add("SHOW-HYPERLINKS",config.Settings.ShowHyperlinks.ToString());
            result.Add("SHOW-PROMPTS", config.Settings.ShowCompletePrompt.ToString());
            result.Add("SHOW-TABLES", config.Settings.ShowTables.ToString());

            return result;
        }
コード例 #8
0
ファイル: Rule_Context.cs プロジェクト: NALSS/epiinfo-82474
        public void ApplyOverridenConfigSettings(Configuration config)
        {
            foreach (KeyValuePair<string, string> kvp in OverriddenSetOptions)
            {
                switch (kvp.Key.ToUpper())
                {

                    case "STATISTICS":// '=' <StatisticsOption>	!These options could be set in FREQ,MATCH, and MEANS commands also
                        /*<StatisticsOption>	::= NONE
                           | MINIMAL
                           | INTERMEDIATE
                           | COMPLETE*/
                        switch(kvp.Value.ToUpper())
                        {
                            case "NONE":
                                config.Settings.StatisticsLevel = 0;
                                break;
                            case "MINIMAL":
                                config.Settings.StatisticsLevel = 1;
                                break;
                            case "COMPLETE":
                                config.Settings.StatisticsLevel = 3;
                                break;
                            case "INTERMEDIATE":
                            default:
                                config.Settings.StatisticsLevel = 2;
                                break;
                        }
                        break;
                    case "PROCESS":// '=' <ProcessOption>
                        /*<ProcessOption> ::= UNDELETED
                        | DELETED
                        | BOTH*/
                        switch(kvp.Value.ToUpper())
                        {
                            case "UNDELETED":
                            case "NORMAL": // deleted records are NOT incuded
                                config.Settings.RecordProcessingScope = 1;
                                break;

                            case "DELETED": // only deleted records are included
                                config.Settings.RecordProcessingScope = 2;
                                break;
                             case "BOTH": // Deleted records are included
                            default:
                                config.Settings.RecordProcessingScope = 3;
                                break;
                        }
                        break;
                    case "DELETED":// '=' <DeletedOption>
                        switch(kvp.Value.ToUpper())
                        {
                            case "ONLY":
                                config.Settings.RecordProcessingScope = 1;
                                break;
                            case "YES":
                            case "(+)":
                                config.Settings.RecordProcessingScope = 2;
                                break;
                            case "NO":
                            case "(-)":
                            default:
                                config.Settings.RecordProcessingScope = 0;
                                break;
                        }
                        break;

                    //case "PROCESS":// '=' Identifier
                    case "Boolean":// '=' String
                        //config.Settings = true;
                        break;
                    case "(+)":// '=' String
                        config.Settings.RepresentationOfYes = kvp.Value;
                        break;
                    case "(-)":// '=' String
                        config.Settings.RepresentationOfNo = kvp.Value;
                        break;
                    case "(.)":// '=' String
                        config.Settings.RepresentationOfMissing = kvp.Value;
                        break;
                    case "YN"://	'=' String ',' String ',' String
                        string[] yn = kvp.Value.Split(',');
                        if (yn.Length > 0)
                        {
                            config.Settings.RepresentationOfYes = yn[0];
                        }

                        if (yn.Length > 1)
                        {
                            config.Settings.RepresentationOfNo = yn[1];
                        }

                        if (yn.Length > 2)
                        {
                            config.Settings.RepresentationOfMissing = yn[2];
                        }
                        break;
                    case "PERCENTS":// '=' <OnOff>
                        switch (kvp.Value.ToUpper())
                        {
                            // <OnOff> ::= ON | OFF  | Boolean
                            case "ON":
                            case"TRUE":
                            case "(+)":
                                config.Settings.ShowPercents = true;
                                break;
                            case "OFF":
                            case "FALSE":
                            case "(-)":
                                config.Settings.ShowPercents = false;
                                break;
                        }
                        break;
                    case "MISSING":// '=' <OnOff>
                        switch (kvp.Value.ToUpper())
                        {
                            // <OnOff> ::= ON | OFF  | Boolean
                            case "ON":
                            case"TRUE":
                            case "(+)":
                                config.Settings.IncludeMissingValues = true;
                                break;
                            case "OFF":
                            case "FALSE":
                            case "(-)":
                                config.Settings.IncludeMissingValues = false;
                                break;
                        }
                        break;

                    case "IGNORE":// '=' <OnOff>
                        switch (kvp.Value.ToUpper())
                        {
                            // <OnOff> ::= ON | OFF  | Boolean
                            case "ON":
                            case "TRUE":
                            case "(+)":
                                config.Settings.IncludeMissingValues = false;
                                break;
                            case "OFF":
                            case "FALSE":
                            case "(-)":
                                config.Settings.IncludeMissingValues = true;
                                break;
                        }
                        break;

                    case "SELECT":// '=' <OnOff>
                        switch (kvp.Value.ToUpper())
                        {
                            // <OnOff> ::= ON | OFF  | Boolean
                            case "ON":
                            case"TRUE":
                            case "(+)":
                                config.Settings.ShowSelection = true;
                                break;
                            case "OFF":
                            case "FALSE":
                            case "(-)":
                                config.Settings.ShowSelection = false;
                                break;
                        }
                        break;

                    case "FREQGRAPH":// '=' <OnOff>
                        switch (kvp.Value.ToUpper())
                        {
                            // <OnOff> ::= ON | OFF  | Boolean
                            case "ON":
                            case"TRUE":
                            case "(+)":
                                config.Settings.ShowGraphics = true;
                                break;
                            case "OFF":
                            case "FALSE":
                            case "(-)":
                                config.Settings.ShowGraphics = false;
                                break;
                        }
                        break;

                    case "HYPERLINKS":// '=' <OnOff>
                        switch (kvp.Value.ToUpper())
                        {
                            // <OnOff> ::= ON | OFF  | Boolean
                            case "ON":
                            case"TRUE":
                            case "(+)":
                                config.Settings.ShowHyperlinks = true;
                                break;
                            case "OFF":
                            case "FALSE":
                            case "(-)":
                                config.Settings.ShowHyperlinks = false;
                                break;
                        }
                        break;

                    case "SHOWPROMPTS":// '=' <OnOff>
                        switch (kvp.Value.ToUpper())
                        {
                            // <OnOff> ::= ON | OFF  | Boolean
                            case "ON":
                            case"TRUE":
                            case "(+)":
                                config.Settings.ShowCompletePrompt = true;
                                break;
                            case "OFF":
                            case "FALSE":
                            case "(-)":
                                config.Settings.ShowCompletePrompt = false;
                                break;
                        }
                        break;

                    case "TABLES":// '=' <OnOff>
                        switch (kvp.Value.ToUpper())
                        {
                            // <OnOff> ::= ON | OFF  | Boolean
                            case "ON":
                            case"TRUE":
                            case "(+)":
                                config.Settings.ShowTables = true;
                                break;
                            case "OFF":
                            case "FALSE":
                            case "(-)":
                                config.Settings.ShowTables = false;
                                break;
                        }
                        break;

                    case "USEBROWSER":// '=' <OnOff>*/
                        /*
                        switch (kvp.Value.ToUpper())
                        {
                            // <OnOff> ::= ON | OFF  | Boolean
                            case "ON":
                            case"TRUE":
                                config.Settings. = true;
                                break;
                            case "OFF":
                            case "FALSE":
                                config.Settings. = false;
                                break;
                        }*/
                        break;
                }
            }
            Configuration.Save(config);
        }
コード例 #9
0
ファイル: BaseReadDialog.cs プロジェクト: NALSS/epiinfo-82474
 private void Construct()
 {
     config = Configuration.GetNewInstance();
     if (!this.DesignMode)           // designer throws an error
     {
         this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
     }
 }
コード例 #10
0
ファイル: ImportWebData.cs プロジェクト: NALSS/epiinfo-82474
        /// <summary>
        /// Construct method
        /// </summary>
        private void Construct()
        {
            try
            {
                this.destinationProjectDataDriver = destinationProject.CollectedData.GetDbDriver();
                this.config = Configuration.GetNewInstance();

                this.importWorker = new BackgroundWorker();
                this.importWorker.WorkerSupportsCancellation = true;

                this.requestWorker = new BackgroundWorker();
                this.requestWorker.WorkerSupportsCancellation = true;

                this.IsBatchImport = false;

                this.cmbImportType.SelectedIndex = 0;

                if (config.Settings.WebServiceAuthMode == 1) // Windows Authentication
                {
                    System.ServiceModel.BasicHttpBinding binding = new System.ServiceModel.BasicHttpBinding();
                    binding.Name = "BasicHttpBinding";
                    binding.CloseTimeout = new TimeSpan(0, 1, 0);
                    binding.OpenTimeout = new TimeSpan(0, 1, 0);
                    binding.ReceiveTimeout = new TimeSpan(0, 10, 0);
                    binding.SendTimeout = new TimeSpan(0, 1, 0);
                    binding.AllowCookies = false;
                    binding.BypassProxyOnLocal = false;
                    binding.HostNameComparisonMode = System.ServiceModel.HostNameComparisonMode.StrongWildcard;
                    binding.MaxBufferPoolSize = config.Settings.WebServiceMaxBufferPoolSize;
                    binding.MaxReceivedMessageSize = config.Settings.WebServiceMaxReceivedMessageSize;
                    binding.MessageEncoding = System.ServiceModel.WSMessageEncoding.Text;
                    binding.TextEncoding = System.Text.Encoding.UTF8;
                    binding.TransferMode = System.ServiceModel.TransferMode.Buffered;
                    binding.UseDefaultWebProxy = true;
                    binding.ReaderQuotas.MaxDepth = config.Settings.WebServiceReaderMaxDepth;
                    binding.ReaderQuotas.MaxStringContentLength = config.Settings.WebServiceReaderMaxStringContentLength;
                    binding.ReaderQuotas.MaxArrayLength = config.Settings.WebServiceReaderMaxArrayLength;
                    binding.ReaderQuotas.MaxBytesPerRead = config.Settings.WebServiceReaderMaxBytesPerRead;
                    binding.ReaderQuotas.MaxNameTableCharCount = config.Settings.WebServiceReaderMaxNameTableCharCount;

                    binding.Security.Mode = System.ServiceModel.BasicHttpSecurityMode.TransportCredentialOnly;
                    binding.Security.Transport.ClientCredentialType = System.ServiceModel.HttpClientCredentialType.Windows;
                    binding.Security.Transport.ProxyCredentialType = System.ServiceModel.HttpProxyCredentialType.None;
                    binding.Security.Transport.Realm = string.Empty;

                    binding.Security.Message.ClientCredentialType = System.ServiceModel.BasicHttpMessageCredentialType.UserName;

                    System.ServiceModel.EndpointAddress endpoint = new System.ServiceModel.EndpointAddress(config.Settings.WebServiceEndpointAddress);

                    client = new SurveyManagerService.ManagerServiceV3Client(binding, endpoint);

                    client.ClientCredentials.Windows.AllowedImpersonationLevel = System.Security.Principal.TokenImpersonationLevel.Impersonation;
                    client.ChannelFactory.Credentials.Windows.ClientCredential = System.Net.CredentialCache.DefaultNetworkCredentials;
                }
                else
                {

                    if (config.Settings.WebServiceBindingMode.Equals("wshttp", StringComparison.OrdinalIgnoreCase))
                    {
                        System.ServiceModel.WSHttpBinding binding = new System.ServiceModel.WSHttpBinding();
                        binding.Name = "WSHttpBinding";
                        binding.CloseTimeout = new TimeSpan(0, 1, 0);
                        binding.OpenTimeout = new TimeSpan(0, 1, 0);
                        binding.ReceiveTimeout = new TimeSpan(0, 10, 0);
                        binding.SendTimeout = new TimeSpan(0, 1, 0);
                        binding.BypassProxyOnLocal = false;
                        binding.TransactionFlow = false;
                        binding.HostNameComparisonMode = System.ServiceModel.HostNameComparisonMode.StrongWildcard;
                        binding.MaxBufferPoolSize = config.Settings.WebServiceMaxBufferPoolSize;
                        binding.MaxReceivedMessageSize = config.Settings.WebServiceMaxReceivedMessageSize;
                        binding.MessageEncoding = System.ServiceModel.WSMessageEncoding.Text;
                        binding.TextEncoding = System.Text.Encoding.UTF8;
                        binding.UseDefaultWebProxy = true;
                        binding.AllowCookies = false;

                        binding.ReaderQuotas.MaxDepth = config.Settings.WebServiceReaderMaxDepth;
                        binding.ReaderQuotas.MaxStringContentLength = config.Settings.WebServiceReaderMaxStringContentLength;
                        binding.ReaderQuotas.MaxArrayLength = config.Settings.WebServiceReaderMaxArrayLength;
                        binding.ReaderQuotas.MaxBytesPerRead = config.Settings.WebServiceReaderMaxBytesPerRead;
                        binding.ReaderQuotas.MaxNameTableCharCount = config.Settings.WebServiceReaderMaxNameTableCharCount;

                        binding.ReliableSession.Ordered = true;
                        binding.ReliableSession.InactivityTimeout = new TimeSpan(0, 10, 0);
                        binding.ReliableSession.Enabled = false;

                        binding.Security.Mode = System.ServiceModel.SecurityMode.Message;
                        binding.Security.Transport.ClientCredentialType = System.ServiceModel.HttpClientCredentialType.Windows;
                        binding.Security.Transport.ProxyCredentialType = System.ServiceModel.HttpProxyCredentialType.None;
                        binding.Security.Transport.Realm = string.Empty;
                        binding.Security.Message.ClientCredentialType = System.ServiceModel.MessageCredentialType.Windows;
                        binding.Security.Message.NegotiateServiceCredential = true;

                        System.ServiceModel.EndpointAddress endpoint = new System.ServiceModel.EndpointAddress(config.Settings.WebServiceEndpointAddress);

                        client = new SurveyManagerService.ManagerServiceV3Client(binding, endpoint);

                    }
                    else
                    {
                        System.ServiceModel.BasicHttpBinding binding = new System.ServiceModel.BasicHttpBinding();
                        binding.Name = "BasicHttpBinding";
                        binding.CloseTimeout = new TimeSpan(0, 1, 0);
                        binding.OpenTimeout = new TimeSpan(0, 1, 0);
                        binding.ReceiveTimeout = new TimeSpan(0, 10, 0);
                        binding.SendTimeout = new TimeSpan(0, 1, 0);
                        binding.AllowCookies = false;
                        binding.BypassProxyOnLocal = false;
                        binding.HostNameComparisonMode = System.ServiceModel.HostNameComparisonMode.StrongWildcard;
                        binding.MaxBufferPoolSize = config.Settings.WebServiceMaxBufferPoolSize;
                        binding.MaxReceivedMessageSize = config.Settings.WebServiceMaxReceivedMessageSize;
                        binding.MessageEncoding = System.ServiceModel.WSMessageEncoding.Text;
                        binding.TextEncoding = System.Text.Encoding.UTF8;
                        binding.TransferMode = System.ServiceModel.TransferMode.Buffered;
                        binding.UseDefaultWebProxy = true;
                        binding.ReaderQuotas.MaxDepth = config.Settings.WebServiceReaderMaxDepth;
                        binding.ReaderQuotas.MaxStringContentLength = config.Settings.WebServiceReaderMaxStringContentLength;
                        binding.ReaderQuotas.MaxArrayLength = config.Settings.WebServiceReaderMaxArrayLength;
                        binding.ReaderQuotas.MaxBytesPerRead = config.Settings.WebServiceReaderMaxBytesPerRead;
                        binding.ReaderQuotas.MaxNameTableCharCount = config.Settings.WebServiceReaderMaxNameTableCharCount;

                        binding.Security.Mode = System.ServiceModel.BasicHttpSecurityMode.TransportCredentialOnly;
                        binding.Security.Transport.ClientCredentialType = System.ServiceModel.HttpClientCredentialType.Windows;
                        binding.Security.Transport.ProxyCredentialType = System.ServiceModel.HttpProxyCredentialType.None;
                        binding.Security.Transport.Realm = string.Empty;

                        System.ServiceModel.EndpointAddress endpoint = new System.ServiceModel.EndpointAddress(config.Settings.WebServiceEndpointAddress);

                        client = new SurveyManagerService.ManagerServiceV3Client(binding, endpoint);
                    }

                }
                this.wfList = new Dictionary<string, Dictionary<string, WebFieldData>>(StringComparer.OrdinalIgnoreCase);
            }
            catch (Exception ex)
            {
                SetStatusMessage("Error: Web service information was not found.");
            }
        }
コード例 #11
0
 /// <summary>
 /// Constructs the object
 /// </summary>
 private void Construct()
 {
     config = Configuration.GetNewInstance();
 }
コード例 #12
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="row">Permanent variable <see cref="System.Data.DataRow"/>.</param>
 public PermanentVariable(Config.PermanentVariableRow row)
     : base(row.Name, (DataType)row.DataType, VariableType.Permanent)
 {
     config = Configuration.GetNewInstance();
     this.Expression = row.DataValue;
 }
コード例 #13
0
 //public string Name { get; set; }
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="name">Variable name.</param>
 /// <param name="dataType">Variable data type enumeration.</param>
 public PermanentVariable(string name, DataType dataType)
     : base(name, dataType, VariableType.Permanent)
 {
     config = Configuration.GetNewInstance();
 }
コード例 #14
0
ファイル: OptionsDialog.cs プロジェクト: NALSS/epiinfo-82474
        private void btnImportSource_Click(object sender, EventArgs e)
        {
            string xmlFilePath = string.Empty;
            string xmlFileName = string.Empty;
            string dllFileName = string.Empty;
            string directory = string.Empty;

            DialogResult result = openFileDialogDataDriver.ShowDialog(this);

            if (result.Equals(DialogResult.OK))
            {
                xmlFilePath = openFileDialogDataDriver.FileName;
                xmlFileName = openFileDialogDataDriver.SafeFileName;
                directory = xmlFilePath.Remove(xmlFilePath.Length - xmlFileName.Length, xmlFileName.Length);

                XmlDocument doc = new XmlDocument();

                if (!xmlFilePath.Equals(""))
                {
                    doc.Load(xmlFilePath);
                    XmlNode dataDriverNode = doc.DocumentElement.SelectSingleNode("/DataDriver");

                    if (dataDriverNode != null)
                    {
                        XmlNode metadataProviderNode = doc.DocumentElement.SelectSingleNode("/DataDriver/MetadataProvider");
                        XmlNode dataProviderNode = doc.DocumentElement.SelectSingleNode("/DataDriver/DataProvider");

                        string displayName = dataDriverNode.Attributes.GetNamedItem("DisplayName").Value;
                        string type = dataDriverNode.Attributes.GetNamedItem("Type").Value;
                        dllFileName = dataDriverNode.Attributes.GetNamedItem("FileName").Value;
                        bool isMetadataProvider = bool.Parse(metadataProviderNode.InnerText);
                        bool isDataProvider = bool.Parse(dataProviderNode.InnerText);

                        string[] filePaths = Directory.GetFiles(directory, dllFileName);

                        string currentFolder = Directory.GetCurrentDirectory();

                        foreach (string path in filePaths)
                        {
                            int index = path.LastIndexOf('\\');
                            string libraryFileName = path.Remove(0, index);
                            File.Copy(path, currentFolder + libraryFileName, true);
                        }

                        Configuration.OnDataDriverImport(displayName, type, dllFileName, isMetadataProvider, isDataProvider);

                        config = Configuration.GetNewInstance();

                        LoadPluginTab();
                    }
                }
            }
        }
コード例 #15
0
        /// <summary>
        /// Construct method
        /// </summary>
        private void Construct()
        {
            this.stopwatch = new Stopwatch();
            this.destinationProjectDataDriver = destinationProject.CollectedData.GetDbDriver();
            this.config = Configuration.GetNewInstance();
            //this.destinationGUIDList = new List<string>();

            this.importWorker = new BackgroundWorker();
            this.importWorker.WorkerSupportsCancellation = true;

            this.IsBatchImport = false;

            this.cmbImportType.SelectedIndex = 2;
            //this.cmbImportType.Enabled = false;
        }
コード例 #16
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="sourceProject">The source project</param>
        /// <param name="formName">The name of the top-level form</param>
        /// <param name="rowFilterConditions">The list of row filter conditions to apply</param>
        public PackageRecordSelectionDialog(Project sourceProject, string formName, List<IRowFilterCondition> rowFilterConditions)
        {
            InitializeComponent();
            this.sourceProject = sourceProject;
            this.formName = formName;

            if (rowFilterConditions != null)
            {
                this.rowFilterConditions = rowFilterConditions;

                foreach (IRowFilterCondition rowFc in this.rowFilterConditions)
                {
                    lbxRecordFilters.Items.Add(rowFc.Description);
                }
            }
            else
            {
                this.rowFilterConditions = new List<IRowFilterCondition>();
            }

            FillFields();
            config = Configuration.GetNewInstance();
        }