Esempio n. 1
0
        public void appendFromDirectory()
        {
            using (var dlg = new Dialogs.NumberFile("Append from Directory", "Position:", "Directory:", this, true))
            {
                dlg.inputNumber.ValueChanged += (o, args) => PreviewFilter(FilterType.AppendFromDirectory, dlg.inputFile.Text, dlg.inputNumber.Value);
                dlg.inputFile.TextChanged    += (o, args) => PreviewFilter(FilterType.AppendFromDirectory, dlg.inputFile.Text, dlg.inputNumber.Value);

                if (dlg.ShowDialog() == DialogResult.OK)
                {
                    AddFilter(new Filter(FilterType.AppendFromDirectory, dlg.inputFile.Text, dlg.inputNumber.Value));
                }

                ApplyFiltersAndUpdate();
            }
        }
Esempio n. 2
0
        public void appendFromTextFileToolStripMenuItem_Click(object sender, EventArgs e)
        {
            using (var dlg = new Dialogs.NumberFile("Append from Text File", "Position:", "Text File:", this))
            {
                dlg.fileDialog.Filter = @"Text Files (*.txt)|*.txt|All Files|*.*";

                dlg.inputNumber.ValueChanged += (o, args) => PreviewFilter(FilterType.AppendFromTextFile, dlg.inputFile.Text, dlg.inputNumber.Value);
                dlg.inputFile.TextChanged    += (o, args) => PreviewFilter(FilterType.AppendFromTextFile, dlg.inputFile.Text, dlg.inputNumber.Value);

                if (dlg.ShowDialog() == DialogResult.OK)
                {
                    AddFilter(new Filter(FilterType.AppendFromTextFile, dlg.inputFile.Text, dlg.inputNumber.Value));
                }

                ApplyFiltersAndUpdate();
            }
        }