Interaction logic for DebugTokenDialog.xaml
Inheritance: DialogWindow
        /// <summary>
        /// This function is called when the user clicks the menu item that shows the
        /// tool window. See the Initialize method to see how the menu item is associated to
        /// this function using the OleMenuCommandService service and the MenuCommand class.
        /// </summary>
        private void ShowDebugTokenWindow(object sender, EventArgs e)
        {
            // Create the dialog instance without Help support.
            var DebugTokenDialog = new DebugToken.DebugTokenDialog();

            // Show the dialog.
            if (!DebugTokenDialog.IsClosing)
            {
                DebugTokenDialog.ShowModal();
            }
        }
Beispiel #2
0
        /// <summary>
        /// Read the author information from the debug token and update the appropriate boxes.
        /// </summary>
        public void setAuthorInfo()
        {
            if (!File.Exists(_localRIMFolder + "DebugToken.bar"))
            {
                // Create the dialog instance without Help support.
                var DebugTokenDialog = new DebugToken.DebugTokenDialog();
                // Show the dialog.
                if (!DebugTokenDialog.IsClosing)
                    DebugTokenDialog.ShowDialog();
            }

            System.Diagnostics.Process p = new System.Diagnostics.Process();
            System.Diagnostics.ProcessStartInfo startInfo = p.StartInfo;
            startInfo.UseShellExecute = false;
            startInfo.CreateNoWindow = true;
            startInfo.RedirectStandardError = true;
            startInfo.RedirectStandardOutput = true;
            p.OutputDataReceived += new System.Diagnostics.DataReceivedEventHandler(p_OutputDataReceived);

            /// Get Device PIN
            startInfo.FileName = "cmd.exe";
            startInfo.Arguments = string.Format(@"/C blackberry-airpackager.bat -listManifest ""{0}""", _localRIMFolder + "DebugToken.bar");

            try
            {
                p.Start();
                p.BeginErrorReadLine();
                p.BeginOutputReadLine();
                p.WaitForExit();
                p.Close();
            }
            catch (Exception e)
            {
                System.Diagnostics.Debug.WriteLine(startInfo.Arguments);
                System.Diagnostics.Debug.WriteLine(e.Message);
            }
        }
 /// <summary>
 /// This function is called when the user clicks the menu item that shows the 
 /// tool window. See the Initialize method to see how the menu item is associated to 
 /// this function using the OleMenuCommandService service and the MenuCommand class.
 /// </summary>
 private void ShowDebugTokenWindow(object sender, EventArgs e)
 {
     // Create the dialog instance without Help support.
     var DebugTokenDialog = new DebugToken.DebugTokenDialog();
     // Show the dialog.
     if ((!DebugTokenDialog.IsClosing) && (VSNDK_Package.DebugToken.Model.DebugTokenData._initializedCorrectly))
         DebugTokenDialog.ShowDialog();
 }
 /// <summary>
 /// This function is called when the user clicks the menu item that shows the 
 /// tool window. See the Initialize method to see how the menu item is associated to 
 /// this function using the OleMenuCommandService service and the MenuCommand class.
 /// </summary>
 private void ShowDebugTokenWindow(object sender, EventArgs e)
 {
     // Create the dialog instance without Help support.
     var DebugTokenDialog = new DebugToken.DebugTokenDialog();
     // Show the dialog.
     if (!DebugTokenDialog.IsClosing)
         DebugTokenDialog.ShowModal();
 }