Ejemplo n.º 1
0
        /// <summary>
        /// Handles the Click event of the btnAddTestPlan 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 void btnAddTestPlan_Click(object sender, RoutedEventArgs e)
        {
            RegistryManager.WriteTitleTitlePromtDialog(string.Empty);
            var dialog = new PrompDialogWindow();

            dialog.ShowDialog();

            bool   isCanceled;
            string newTitle;
            Task   t = Task.Factory.StartNew(() =>
            {
                isCanceled = RegistryManager.GetIsCanceledPromtDialog();
                newTitle   = RegistryManager.GetContentPromtDialog();
                while (string.IsNullOrEmpty(newTitle) && !isCanceled)
                {
                }
            });

            t.Wait();
            isCanceled = RegistryManager.GetIsCanceledPromtDialog();
            newTitle   = RegistryManager.GetContentPromtDialog();

            if (!isCanceled)
            {
                log.InfoFormat("Add New Test Plan with Name=\"{0}\"", newTitle);
                //this.ProjectEditViewModel.AddTestPlan(newTitle);
            }
        }
        /// <summary>
        /// Handles the Click event of the btnAddTestPlan 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 void btnAddTestPlan_Click(object sender, RoutedEventArgs e)
        {
                 RegistryManager.WriteTitleTitlePromtDialog(string.Empty);
            var dialog = new PrompDialogWindow();
            dialog.ShowDialog();

            bool isCanceled;
            string newTitle;
            Task t = Task.Factory.StartNew(() =>
            {
                isCanceled = RegistryManager.GetIsCanceledPromtDialog();
                newTitle = RegistryManager.GetContentPromtDialog();
                while (string.IsNullOrEmpty(newTitle) && !isCanceled)
                {
                }
            });
            t.Wait();
            isCanceled = RegistryManager.GetIsCanceledPromtDialog();
            newTitle = RegistryManager.GetContentPromtDialog();

            if (!isCanceled)
            {
                log.InfoFormat("Add New Test Plan with Name=\"{0}\"", newTitle);
                //this.ProjectEditViewModel.AddTestPlan(newTitle);
            }
        }