Esempio n. 1
0
        private void szukaj()
        {
            if (searchQueryInputBox.Text.Trim().Length == 0)
            {
                setResultOptions(false);
                MessageBox.Show("Nie podano wzorca wyszukiwania");
                return;
            }

            extraCellTable = ((MDIUI)MdiParent).activeDocument.extraCellTable;
            RegexOptions options = RegexOptions.Compiled;// = RegexOptions.None;

            if (!wielkoscZnakowCheck.Checked)
                options |= RegexOptions.IgnoreCase;

            if (caleWyrazyCheck.Checked)
                options |= RegexOptions.ExplicitCapture;

            System.Diagnostics.Debug.WriteLine(options);

            res = extraCellTable.ece.search(searchQueryInputBox.Text.ToString(), options);
            if (res.Count > 0)
            {
                setResultOptions(true);
                selectCell();
            }
            else
            {
                setResultOptions(false);
                MessageBox.Show("Nie znaleziono żadnych komórek");
            }
        }
Esempio n. 2
0
        private void wklejToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ExtraCellTable ect = activeDocument.extraCellTable;

            if (ect.GetCellCount(DataGridViewElementStates.Selected) > 0)
            {
                try
                {
                    int x = ect.CurrentCell.ColumnIndex;
                    int y = ect.CurrentCell.RowIndex;

                    char[] lineDelim = { '\r', '\n' },
                    colDelim = { '\t' };

                    string[] rows = ((string)Clipboard.GetDataObject().GetData(DataFormats.Text)).Split(lineDelim, StringSplitOptions.RemoveEmptyEntries);

                    for (int i = 0; i < rows.Length; i++)
                    {
                        string[] cols = rows[i].Split(colDelim);
                        for (int j = 0; j < cols.Length; j++)
                        {
                            ect.Rows[y + i].Cells[x + j].Value = cols[j];
                        }
                    }
                }
                catch (Exception) { }
            }
        }
Esempio n. 3
0
        private void kopiujToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ExtraCellTable ect = activeDocument.extraCellTable;

            try
            {
                Clipboard.SetDataObject(ect.GetClipboardContent().GetData(DataFormats.Text));
            }
            catch (Exception) { }
        }
Esempio n. 4
0
        private void wytnijToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ExtraCellTable ect = activeDocument.extraCellTable;

            try
            {
                Clipboard.SetDataObject(ect.GetClipboardContent().GetData(DataFormats.Text));
                foreach (DataGridViewCell cell in ect.SelectedCells)
                {
                    cell.Value = "";
                }
            }
            catch (Exception) { }
        }
Esempio n. 5
0
        private void Initialize(MDIUI p, string filePath)
        {
            InitializeComponent();
            MdiParent = p;

            extraCellTable = new ExtraCellTable();

            documentsCount++;
            ((MDIUI)MdiParent).activeDocument = this;

            extraCellTable.ece.fill();
            Controls.Add(extraCellTable);

            documentPath = "";
            documentName = "Niezapisany(" + documentsCount + ")";

            this.Text = documentName;
        }
Esempio n. 6
0
        private void szukaj()
        {
            if (searchQueryInputBox.Text.Trim().Length == 0)
            {
                setResultOptions(false);
                MessageBox.Show("Nie podano wzorca wyszukiwania");
                return;
            }

            extraCellTable = ((MDIUI)MdiParent).activeDocument.extraCellTable;
            RegexOptions options = RegexOptions.Compiled;// = RegexOptions.None;

            if (!wielkoscZnakowCheck.Checked)
            {
                options |= RegexOptions.IgnoreCase;
            }

            if (caleWyrazyCheck.Checked)
            {
                options |= RegexOptions.ExplicitCapture;
            }

            System.Diagnostics.Debug.WriteLine(options);

            res = extraCellTable.ece.search(searchQueryInputBox.Text.ToString(), options);
            if (res.Count > 0)
            {
                setResultOptions(true);
                selectCell();
            }
            else
            {
                setResultOptions(false);
                MessageBox.Show("Nie znaleziono żadnych komórek");
            }
        }
Esempio n. 7
0
        private void Initialize(MDIUI p, string filePath)
        {
            InitializeComponent();
            MdiParent = p;

            extraCellTable = new ExtraCellTable();

            documentsCount++;
            ((MDIUI)MdiParent).activeDocument = this;

            extraCellTable.ece.fill();
            Controls.Add(extraCellTable);

            documentPath = "";
            documentName = "Niezapisany(" + documentsCount + ")";

            this.Text = documentName;
        }