예제 #1
0
        public PolyFileDbWriterFrame(PolyFileDbWriter writer)
        {
            InitializeComponent();
            m_writer = writer;

            cbxFileType.Items.Add(new FileWriterComboItem {
                Frame = new CodeWriterFrame(this, TextGeneratorLanguage.Template)
            });
            cbxFileType.Items.Add(new FileWriterComboItem {
                Frame = new CodeWriterFrame(this, TextGeneratorLanguage.Python)
            });
            cbxFileType.Items.Add(new FileWriterComboItem {
                Frame = new BlobWriterFrame(this)
            });
            cbxFileType.Items.Add(new FileWriterComboItem {
                Frame = new DataStoreWriterFrame(this)
            });
            m_created = true;

            foreach (var file in writer.Files)
            {
                lbxFiles.Items.Add(file);
            }

            UpdateEnabling();
            Translating.TranslateControl(this);
        }
예제 #2
0
 public MultiTableDatabaseWriterFrame(MultiTableDatabaseWriter writer)
 {
     InitializeComponent();
     m_writer = writer;
     dataStoreFrame1.DataStoreMode = TabularDataStoreMode.WriteStream;
     if (m_writer.DataStore != null)
     {
         dataStoreFrame1.SetDataStore(m_writer.DataStore);
     }
     tbxFileName.Text = m_writer.FileNameTemplate;
     m_created        = true;
     Translating.TranslateControl(this);
 }
예제 #3
0
 private void cbxDataSourceType_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (m_cfgFrame != null)
     {
         m_cfgFrame.Visible = false;
     }
     m_cfgFrame = Configurator.GetEditor();
     if (m_cfgFrame.Parent == null)
     {
         panConfigurator.Controls.Add(m_cfgFrame);
         m_cfgFrame.Dock = DockStyle.Fill;
         Translating.TranslateControl(m_cfgFrame);
     }
     else
     {
         m_cfgFrame.Visible = true;
     }
     if (chbAutoRefresh.Checked)
     {
         RefreshChartData();
     }
 }
예제 #4
0
 public GenericConnWizard()
 {
     InitializeComponent();
     Translating.TranslateControl(this);
     //wizard1.Pages.Remove(wpselectdb);
 }
예제 #5
0
 protected override void OnVisibleChanged(EventArgs e)
 {
     base.OnVisibleChanged(e);
     Translating.TranslateControl(this);
 }
예제 #6
0
 private void Initialize()
 {
     Translating.TranslateControl(this);
     dataGridView1.Sort(dataGridView1.Columns[1], ListSortDirection.Descending);
 }
예제 #7
0
        public TextImportFrame(TextImportDataStore store)
        {
            InitializeComponent();

            foreach (var i in EncodingTypeConverter.EncodingItems)
            {
                cbxEncoding.Items.Add(i);
            }

            m_store = store;

            cbxFieldType.Items.Add(new FieldAnalyseComboItem {
                Frame = new WholeLineFieldFrame(this)
            });
            cbxFieldType.Items.Add(new FieldAnalyseComboItem {
                Frame = new SeparatedFieldsFrame(this)
            });
            cbxFieldType.Items.Add(new FieldAnalyseComboItem {
                Frame = new RegexFieldsFrame(this)
            });
            cbxFieldType.Items.Add(new FieldAnalyseComboItem {
                Frame = new ScriptFieldsFrame(this)
            });

            switch (m_store.SourceType)
            {
            case TextSourceType.File:
                tbxFile.Text    = m_store.Source;
                rbtFile.Checked = true;
                break;

            case TextSourceType.Url:
                tbxUrl.Text    = m_store.Source;
                rbtUrl.Checked = true;
                break;

            case TextSourceType.Text:
                tbxTextInput.Text    = m_store.Source;
                rbtTextInput.Checked = true;
                break;
            }

            tbxLineLimitBegin.Text  = m_store.LineLimitBegin ?? "";
            tbxLineLimitEnd.Text    = m_store.LineLimitEnd ?? "";
            tbxLineRegex.Text       = m_store.LineRegex ?? "";
            tbxLineRegexGroup.Text  = m_store.LineRegexGroup ?? "";
            tbxLineSeparator.Text   = m_store.LineSeparator ?? "";
            chbLineSepRegex.Checked = m_store.LineSeparatowIsRegex;

            switch (m_store.RowDelimiter)
            {
            case RowDelimiterType.Limitation:
                rbtLineLimitation.Checked = true;
                break;

            case RowDelimiterType.Lines:
                rbtLines.Checked = true;
                break;

            case RowDelimiterType.Regex:
                rbtLineRegex.Checked = true;
                break;

            case RowDelimiterType.Separator:
                rbtLineSeparator.Checked = true;
                break;
            }

            UpdateRowsEnabling();
            UpdateSourceEnabling();

            cbxEncoding.SelectedIndex = EncodingTypeConverter.GetEncodingIndex(m_store.SourceEncoding);

            Translating.TranslateControl(this);

            if (m_store.FieldAnalyser is WholeLineAnalyser)
            {
                cbxFieldType.SelectedIndex = 0;
            }
            else if (m_store.FieldAnalyser is SeparatedFieldsAnalyser)
            {
                cbxFieldType.SelectedIndex = 1;
            }
            else if (m_store.FieldAnalyser is RegexFieldAnalyser)
            {
                cbxFieldType.SelectedIndex = 2;
            }
            else if (m_store.FieldAnalyser is ScriptAnalyser)
            {
                cbxFieldType.SelectedIndex = 3;
            }

            FieldFrame.LoadFromAnalyser(m_store.FieldAnalyser);

            // add field frame
            panel1.Controls.Add(FieldFrame);
            FieldFrame.Dock = DockStyle.Fill;

            m_created = true;
        }