Beispiel #1
0
        }         // /////////////////////////////////////////////////////////////////////////////

        public void Add(ItemDists add_item)
        {
            foreach (int y in add_item.Positions)
            {
                Add(y);
            }
        } // /////////////////////////////////////////////////////////////////////////////
Beispiel #2
0
        }         // ////////////// public void Run(string inp_text) ///////////////////////

        private void Run1(string s, int pos)
        {
            if (irrVerb)
            {
                s = irr.GetInfinitive(s);
            }
            allWord++;
            allChars += s.Length;
            if (lst.TryGetValue(s, out ItemDists itdst))
            {
                itdst.Add(pos);                 //lst[s] = cnt + 1;
            }
            else if (s != "the" && s != "and" && s != "you")
            {
                itdst = new ItemDists(pos);
                lst.Add(s, itdst);
                uniqWord++;
            }
        }         // //////////////////////////////////////////////////////////////////////
        }         // ///////////////////////////////////////////////////////////////////////////////////////////////

        private void DtOut_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (dtOut.SelectedItems.Count == 0)
            {
                return;
            }
            bind.PosLines.Clear();

            OutGridData o     = (OutGridData)dtOut.SelectedItems[dtOut.SelectedItems.Count - 1];
            ItemDists   idsts = tp.lst[o.Word];

            foreach (int pos in idsts.Positions)
            {
                Point p = new Point {
                    X = lhor.X1 + (lhor.X2 - lhor.X1) * pos / sReadFiles.Length,
                    Y = -6
                };
                bind.PosLines.Add(p);
            }
        }         // ///////////////////////////////////////////////////////////////////////////////////////