예제 #1
0
        /// <summary>
        /// Handles the Click event of the btnDeleteCircuito control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="RoutedEventArgs"/> instance containing the event data.</param>
        private async void btnDeleteCircuito_Click(object sender, RoutedEventArgs e)
        {
            string   cKey;
            Circuito cto = GetCircuito(sender as Button, out cKey);

            if (await this.ShowQuestionDialog("Eliminar circuito", String.Format("Esta seguro de querere eliminar el cto {0}", cto)))
            {
                cto.DeleteCircuitTr(
                    (Object result) =>
                {
                    if ((Boolean)result)
                    {
                        this.Refresh();
                    }
                });
            }
        }