Пример #1
0
 public void CloseProject(bool closeForm)
 {
     OnEditorItemHierarchyChanged();
     this.editorProject.Close(closeForm);
     this.editorProject = null;
     this.editorViewer  = null;
 }
Пример #2
0
        /// <summary>
        /// Call this to perform redo
        /// </summary>
        public void Redo()
        {
            if (EditorProject == null)
            {
                return;
            }

            ActionManager.Instance.Redo();
            EditorViewer.RefreshView();
            OnEditorItemHierarchyChanged();
        }
Пример #3
0
        /// <summary>
        /// Create new project
        /// </summary>
        /// <param name="owner"></param>
        public bool NewProject(Form owner, bool basicForm)
        {
            if (!basicForm)
            {
                NewProjectForm newProj = new NewProjectForm();
                if (DialogResult.OK == newProj.ShowDialog())
                {
                    if (this.EditorProject != null)
                    {
                        this.EditorProject.Close(true);
                    }

                    mainProjectForm    = (MainForm)owner;
                    this.editorProject = new EditorProject();
                    //Set params for project
                    this.EditorProject.ReportPage.Name          = newProj.ProjectName;
                    this.EditorProject.ReportPage.MeasureUnit   = newProj.MeasureUnit;
                    this.EditorProject.ReportPage.WidthInUnits  = newProj.ProjectWidth;
                    this.EditorProject.ReportPage.HeightInUnits = newProj.ProjectHeight;
                    this.EditorProject.ReportPage.Resolution    = newProj.ProjectResolution;
                    this.EditorProject.Title   = newProj.ProjectTitle;
                    this.EditorProject.Author  = newProj.ProjectAuthor;
                    this.EditorProject.Subject = newProj.ProjectSubject;
                    //================================================================
                    this.editorViewer = new EditorViewer(this.editorProject);
                    editorProject.New();
                    editorProject.InitiliazeGUI(owner);
                    //this.EditorProject.FrmReport.Text = newProj.ProjectName + " - " + System.IO.Path.GetFileName(this.ProjectFileName);
                }
                else
                {
                    return(false);
                }
            }
            else
            {
                mainProjectForm    = (MainForm)owner;
                this.editorProject = new EditorProject();
                this.editorViewer  = new EditorViewer(this.editorProject);
                editorProject.New();
                editorProject.InitiliazeGUI(owner);
            }

            projectFileName = "";
            projectSaved    = false;
            this.EditorProject.FrmReport.Text = EditorProject.Name + " - " + System.IO.Path.GetFileName(this.ProjectFileName);
            OnEditorItemHierarchyChanged();
            return(true);
        }
Пример #4
0
        /// <summary>
        /// Create new project
        /// </summary>
        /// <param name="owner"></param>
        public bool NewProject(Form owner, bool basicForm)
        {
            if(!basicForm)
            {
                NewProjectForm newProj = new NewProjectForm();
                if(DialogResult.OK == newProj.ShowDialog())
                {
                    if(this.EditorProject != null)
                    {
                        this.EditorProject.Close(true);
                    }

                    mainProjectForm = (MainForm)owner;
                    this.editorProject = new EditorProject();
                    //Set params for project
                    this.EditorProject.ReportPage.Name = newProj.ProjectName;
                    this.EditorProject.ReportPage.MeasureUnit = newProj.MeasureUnit;
                    this.EditorProject.ReportPage.WidthInUnits = newProj.ProjectWidth;
                    this.EditorProject.ReportPage.HeightInUnits = newProj.ProjectHeight;
                    this.EditorProject.ReportPage.Resolution = newProj.ProjectResolution;
                    this.EditorProject.Title = newProj.ProjectTitle;
                    this.EditorProject.Author = newProj.ProjectAuthor;
                    this.EditorProject.Subject = newProj.ProjectSubject;
                    //================================================================
                    this.editorViewer = new EditorViewer(this.editorProject);
                    editorProject.New();
                    editorProject.InitiliazeGUI(owner);
                    //this.EditorProject.FrmReport.Text = newProj.ProjectName + " - " + System.IO.Path.GetFileName(this.ProjectFileName);
                }else
                {
                    return false;
                }
            }
            else
            {
                mainProjectForm = (MainForm)owner;
                this.editorProject = new EditorProject();
                this.editorViewer = new EditorViewer(this.editorProject);
                editorProject.New();
                editorProject.InitiliazeGUI(owner);
            }

            projectFileName = "";
            projectSaved = false;
            this.EditorProject.FrmReport.Text = EditorProject.Name + " - " + System.IO.Path.GetFileName(this.ProjectFileName);
            OnEditorItemHierarchyChanged();
            return true;
        }
Пример #5
0
 public void CloseProject(bool closeForm)
 {
     OnEditorItemHierarchyChanged();
     this.editorProject.Close(closeForm);
     this.editorProject = null;
     this.editorViewer = null;
 }