/// <summary> /// Raises the <see cref="QueryClosing" /> event. /// </summary> /// <param name="column">The <see cref="UserColumns"/> which has fired the event.</param> public void OnQueryClosing(QueryControl qc, CancelEventArgs e) { if (QueryClosing != null) { QueryClosing(qc, e); } }
/// <summary> /// Creates a new QueryControl and add it to the documents collection. /// </summary> /// <returns></returns> public QueryControl CreateQueryControl() { QueryControl qc = new QueryControl(); this.AddQuery(qc); qc.Name = string.Format("{0}", this.Queries.Length); //this.Text = string.Format("query - input name - untitled {0}", QueryControl.seed); qc.Text = string.Format("Untitled {0}", this.Queries.Length); //qc.Query.InputName = inputName; qc.Activate(); return(qc); }
/// <summary> /// Adds the queryControl to this container. /// </summary> /// <remarks>Raise an event when a attempt is made to close this control</remarks> /// <param name="c">C.</param> private void AddQuery(QueryControl c) { c.Closing += new CancelEventHandler(qc_Closing); base.AddDocument(c); }