Exemple #1
0
        /// <summary>
        /// Create a new ListViewGroup and assign to the current listview
        /// </summary>
        /// <param name="doc"></param>
        public void CreateDocument( ITabbedDocument doc )
        {
            ListViewGroup group = new ListViewGroup();
            Hashtable table = new Hashtable();
            table["FileName"] = doc.FileName;
            table["Document"] = doc;
            table["Markers"]  = new List<int>();
            table["Parsed"]   = false;

            group.Header = Path.GetFileName(doc.FileName);
            group.Tag    = table;
            group.Name = doc.FileName;

            this.listView1.BeginUpdate();
            this.listView1.Groups.Add(group);
            this.listView1.EndUpdate();

            TagTimer timer = new TagTimer();
            timer.AutoReset = true;
            timer.SynchronizingObject = this;
            timer.Interval = 200;
            timer.Elapsed += new System.Timers.ElapsedEventHandler(timer_Elapsed);
            timer.Tag = group;
            timer.Start();
        }
Exemple #2
0
		/// <summary>
		/// Waits for timeout and calls method
		/// </summary>
        public void SetTimeout(TimeoutDelegate timeoutHandler, String tag, Int32 timeout)
        {
            TagTimer timer = new TagTimer();
            timer.Interval = timeout;
            timer.Tick += this.TimerElapsed;
            timer.Tag = tag;
            timer.TimeoutHandler = timeoutHandler;
            timer.Start();
        }