public void RunStarted(object automationObject, Dictionary<string, string> replacementsDictionary, WizardRunKind runKind, object[] customParams)
 {
     try
     {
         CheckAssemblySourceFolder();
         RunStarted(replacementsDictionary, TargetProgrammingLanguage.VisualBasic, TargetProjectType.AutomationAddin);
     }
     catch (Exception exception)
     {
         ErrorDialog dialog = new ErrorDialog(exception, NetOfficeProject.TargetLanguage);
         dialog.ShowDialog();
     }  
 }
예제 #2
0
 public void ProjectFinishedGenerating(EnvDTE.Project project)
 {
     try
     {
         CopyAssemblies();
         RefreshProject(project);
     }
     catch (Exception exception)
     {
         ErrorDialog dialog = new ErrorDialog(exception, NetOfficeProject.TargetLanguage);
         dialog.ShowDialog();
     }  
 }
예제 #3
0
        public WizardDialog(NetOfficeProject parent)
        {
            try
            {
                this.Tag = parent.Name;

                _parent = parent;
                InitializeComponent();
                LoadControls();

                if (TargetLanguage.German == NetOfficeProject.TargetLanguage)
                    this.Text = string.Format("Assistent für {0}", parent.Name);
                else
                    this.Text = string.Format("{0} Assistant", parent.Name);

                Translator.TranslateControls(this, "Dialogs.WizardDialog.txt", NetOfficeProject.TargetLanguage, true);
             
                languageChangeFlag = true;
                
                if (TargetLanguage.German == NetOfficeProject.TargetLanguage)
                    comboBoxLanguage.SelectedIndex = 1;
                else
                    comboBoxLanguage.SelectedIndex = 0;

                languageChangeFlag = false;

                if (NetOfficeProject.TargetLanguage == TargetLanguage.German)
                    labelCurrentStep.Text = string.Format("Schritt {0} von {1}", GetControlIndex(_currentControl) + 1, _parent.ListControls.Count);
                else
                    labelCurrentStep.Text = string.Format("Step {0} of {1}", GetControlIndex(_currentControl) + 1, _parent.ListControls.Count);

                labelCurrentStep.Tag = new string[] { (GetControlIndex(_currentControl) + 1).ToString(), _parent.ListControls.Count.ToString() };

            }
            catch (Exception exception)
            {
                ErrorDialog dialog = new ErrorDialog(exception, NetOfficeProject.TargetLanguage);
                dialog.ShowDialog();
            }
        }
예제 #4
0
        private void comboBoxLanguage_SelectedIndexChanged(object sender, EventArgs e)
        {
            try
            {
                if (languageChangeFlag)
                    return;

                if (0 == comboBoxLanguage.SelectedIndex)
                    NetOfficeProject.TargetLanguage = TargetLanguage.English;
                else
                    NetOfficeProject.TargetLanguage = TargetLanguage.German;

                Translator.TranslateControls(this, "Dialogs.WizardDialog.txt", NetOfficeProject.TargetLanguage, true);

                labelCaption.Text = _currentControl.Caption;
                labelDescription.Text = _currentControl.Description;
                _currentControl.Translate();
                
                if (TargetLanguage.German == NetOfficeProject.TargetLanguage)
                {
                    this.Text = string.Format("Assistent für {0}", _parent.Name);
                    labelCurrentStep.Text = string.Format("Schritt {0} von {1}", GetControlIndex(_currentControl) + 1, _parent.ListControls.Count);
                }
                else
                {
                    this.Text = string.Format("{0} Assistant", _parent.Name);
                    labelCurrentStep.Text = string.Format("Step {0} of {1}", GetControlIndex(_currentControl) + 1, _parent.ListControls.Count);
                }
                 
                labelCurrentStep.Tag = new string[] { (GetControlIndex(_currentControl) + 1).ToString(), _parent.ListControls.Count.ToString() };

            }
            catch (Exception exception)
            {
                ErrorDialog dialog = new ErrorDialog(exception, NetOfficeProject.TargetLanguage);
                dialog.ShowDialog();
            }
        }
예제 #5
0
 void currentControl_ReadyStateChanged(IWizardControl sender)
 {
     try
     {
         nextButton.Enabled = sender.IsReadyForNextStep;
     }
     catch (Exception exception)
     {
         ErrorDialog dialog = new ErrorDialog(exception, NetOfficeProject.TargetLanguage);
         dialog.ShowDialog();
     }
 }
예제 #6
0
        private void finishButton_Click(object sender, EventArgs e)
        {
            try
            {
                _parent.FinishAction();

                this.DialogResult = DialogResult.OK;
                this.Close();
            }
            catch (Exception exception)
            {
                ErrorDialog dialog = new ErrorDialog(exception, NetOfficeProject.TargetLanguage);
                dialog.ShowDialog();
            }            
        }
예제 #7
0
 private void nextButton_Click(object sender, EventArgs e)
 {
     try
     {
         GoToNextControl();
         nextButton.Focus();
     }
     catch (Exception exception)
     {
         ErrorDialog dialog = new ErrorDialog(exception, NetOfficeProject.TargetLanguage);
         dialog.ShowDialog();
     }
 }
예제 #8
0
 private void backButton_Click(object sender, EventArgs e)
 {
     try
     {
         ReturnToPreviousControl();
         backButton.Focus();
     }
     catch (Exception exception)
     {
         ErrorDialog dialog = new ErrorDialog(exception, NetOfficeProject.TargetLanguage);
         dialog.ShowDialog();
     }
    
 }