public void ExecuteLoadedInput() 
		{
			try 
			{
                DefaultSettings settings = DefaultSettings.Instance;
				ZeusSimpleLog log = new ZeusSimpleLog();

				OpenFileDialog openFileDialog = new OpenFileDialog();
				openFileDialog.Filter = "Zues Input Files (*.zinp)|*.zinp";
				openFileDialog.FilterIndex = 0;
				openFileDialog.RestoreDirectory = true;
				openFileDialog.Multiselect = true;
				if(openFileDialog.ShowDialog() == DialogResult.OK)
				{
					Cursor.Current = Cursors.WaitCursor;

					foreach (string filename in openFileDialog.FileNames) 
					{
						ZeusSavedInput savedInput = new ZeusSavedInput(filename);
						if (savedInput.Load()) 
						{
							ZeusContext context = new ZeusContext();
							context.Input.AddItems(savedInput.InputData.InputItems);
							context.Log = log;

							ZeusTemplate template = new ZeusTemplate(savedInput.InputData.TemplatePath);
							template.Execute(context, settings.ScriptTimeout, true);

							if (log.HasExceptions) 
							{
								throw log.Exceptions[0];
							}
						}
					}

					Cursor.Current = Cursors.Default;
					MessageBox.Show(this, "Selected files have been executed.");
				}
			}
			catch (Exception ex)
			{
                mdi.ErrorsOccurred(ex);
                //ZeusDisplayError formError = new ZeusDisplayError(ex);
				//formError.SetControlsFromException();			
				//formError.ShowDialog(this);
			}

			Cursor.Current = Cursors.Default;
		}
        public void ExecuteLoadedInput()
        {
            bool overridden = false;
            
            OpenFileDialog openFileDialog = new OpenFileDialog();
            openFileDialog.Filter = "Zues Input Files (*.zinp)|*.zinp";
            openFileDialog.FilterIndex = 0;
            openFileDialog.RestoreDirectory = true;
            openFileDialog.Multiselect = true;
            if (openFileDialog.ShowDialog() == DialogResult.OK)
            {
                ZeusSavedInput savedInput = null;
                ZeusTemplate template = null;
                if (ExecuteTemplateOverride != null)
                {
                    try
                    {
                        foreach (string filename in openFileDialog.FileNames)
                        {
                            savedInput = new ZeusSavedInput(filename);
                            if (savedInput.Load())
                            {
                                template = new ZeusTemplate(savedInput.InputData.TemplatePath);

                                overridden = ExecuteTemplateOverride(TemplateOperations.ExecuteLoadedInput, template, savedInput, _guiHandler);
                                if (!overridden) break;
                            }
                        }
                    }
                    catch (Exception ex)
                    {
                        OnErrorsOccurred(ex);
                    }
                }
                

                if (!overridden)
                {
                    try
                    {
                        ZeusSimpleLog log = new ZeusSimpleLog();
                        DefaultSettings settings = DefaultSettings.Instance;

                        Cursor.Current = Cursors.WaitCursor;

                        foreach (string filename in openFileDialog.FileNames)
                        {
                            savedInput = new ZeusSavedInput(filename);
                            if (savedInput.Load())
                            {
                                ZeusContext context = new ZeusContext();
                                context.Input.AddItems(savedInput.InputData.InputItems);
                                context.Log = log;

                                template = new ZeusTemplate(savedInput.InputData.TemplatePath);
                                template.Execute(context, settings.ScriptTimeout, true);

                                foreach (string filePath in context.Output.SavedFiles)
                                {
                                    this.OnGeneratedFileSaved(filePath);
                                }

                                if (log.HasExceptions)
                                {
                                    throw log.Exceptions[0];
                                }
                            }
                        }

                        Cursor.Current = Cursors.Default;
                        MessageBox.Show(this, "Selected files have been executed.");

                    }
                    catch (Exception ex)
                    {
                        OnErrorsOccurred(ex);
                    }

                    Cursor.Current = Cursors.Default;
                }
            }
        }