Esempio n. 1
0
        /// <summary>
        ///
        /// </summary>
        private bool CheckCurrent()
        {
            String errormsg = String.Empty;

            try
            {
                if (PluginBase.CurrentProject != null)
                {
                    String filename = PluginBase.CurrentProject.ProjectPath;
                    ProjectManager.Projects.ProjectReader reader = new ProjectManager.Projects.ProjectReader(filename, new AS3Project(filename));
                    currentProject = reader.ReadProject();
                }
                else
                {
                    MessageBox.Show(TextHelper.GetString("Info.ProjectNotOpen"), PluginCore.Localization.TextHelper.GetString("FlashDevelop.Title.ConfirmDialog"), MessageBoxButtons.OK);
                    return(false);
                }
            }
            catch (Exception e)
            {
                errormsg = e.Message + System.Environment.NewLine;
            }
            if (currentProject.Language != "as3")
            {
                errormsg += TextHelper.GetString("Info.LanguageNotAS3") + System.Environment.NewLine;
            }
            // TODO move this outside
            if (currentProject.TestMovieBehavior == TestMovieBehavior.NewTab || currentProject.TestMovieBehavior == TestMovieBehavior.NewWindow)
            {
                errormsg += TextHelper.GetString("Info.CannotDebugActiveXPlayer") + System.Environment.NewLine;
            }
            if (errormsg != String.Empty)
            {
                throw new Exception(errormsg);
            }

            return(true);
        }
Esempio n. 2
0
        /// <summary>
        /// 
        /// </summary>
        private bool CheckCurrent()
        {
            try
            {
                IProject project = PluginBase.CurrentProject;
                if (project == null || !project.EnableInteractiveDebugger) return false;
                ProjectReader reader = new ProjectReader(project.ProjectPath, new AS3Project(project.ProjectPath));
                currentProject = reader.ReadProject();
                // Give a console warning for non external player...
                if (currentProject.TestMovieBehavior == TestMovieBehavior.NewTab || currentProject.TestMovieBehavior == TestMovieBehavior.NewWindow)
                {
                    TraceManager.Add(TextHelper.GetString("Info.CannotDebugActiveXPlayer"));
					return false;
                }
            }
            catch (Exception e) 
            { 
                ErrorManager.ShowError(e);
                return false;
            }
			return true;
        }
Esempio n. 3
0
        /// <summary>
        /// 
        /// </summary>
        private bool CheckCurrent()
        {
            String errormsg = String.Empty;
            try
            {
				if (PluginBase.CurrentProject != null)
				{
					String filename = PluginBase.CurrentProject.ProjectPath;
					ProjectManager.Projects.ProjectReader reader = new ProjectManager.Projects.ProjectReader(filename, new AS3Project(filename));
					currentProject = reader.ReadProject();
				}
				else
				{
					MessageBox.Show(TextHelper.GetString("Info.ProjectNotOpen"), PluginCore.Localization.TextHelper.GetString("FlashDevelop.Title.ConfirmDialog"), MessageBoxButtons.OK);
					return false;
				}
            }
            catch (Exception e)
            {
                errormsg = e.Message + System.Environment.NewLine;
            }
            if (currentProject.Language != "as3")
            {
                errormsg += TextHelper.GetString("Info.LanguageNotAS3") + System.Environment.NewLine;
            }
            // TODO move this outside
            if (currentProject.TestMovieBehavior == TestMovieBehavior.NewTab || currentProject.TestMovieBehavior == TestMovieBehavior.NewWindow)
            {
                errormsg += TextHelper.GetString("Info.CannotDebugActiveXPlayer") + System.Environment.NewLine;
            }
            if (errormsg != String.Empty)
				throw new Exception(errormsg);

			return true;
        }