Exemplo n.º 1
0
 private void NewProject()
 {
     Project = new DnaProject();
     Project.Init();
     projectFileName = "";
     Text            = "[New Project]";
 }
Exemplo n.º 2
0
        public MainForm()
        {
            InitializeComponent();

            Project = new DnaProject();
            Project.Init();

            Project.Settings.Scale = trackBarScale.Value;
            comboBoxAnimSaveFormat.SelectedIndex = 2;
        }
Exemplo n.º 3
0
        public MainForm()
        {
            InitializeComponent();

            Project = new DnaProject();
            Project.Init();

            Project.Settings.Scale = trackBarScale.Value;
            comboBoxAnimSaveFormat.SelectedIndex = 2;
        }
Exemplo n.º 4
0
        public static void Serialize(DnaProject project, string fileName)
        {
            if (fileName == null)
                return;

            //try
            //{
                XmlSerializer serializer = new XmlSerializer(project.GetType());
                using (FileStream writer = new FileStream(fileName, FileMode.Create))
                {
                    serializer.Serialize(writer, project);
                }
            //}
            //catch (Exception ex) { ; }
        }
Exemplo n.º 5
0
        private void OpenProject()
        {
            Stop();

            string     fileName = FileUtil.GetOpenFileName(FileUtil.ProjectExtension);
            DnaProject project  = Serializer.DeserializeDnaProject(fileName);

            if (project != null)
            {
                Project = project;

                if (!string.IsNullOrEmpty(Project.ImagePath))
                {
                    OpenImage(Project.ImagePath);
                }

                if (Project.Drawing != null)
                {
                    if (currentDrawing == null)
                    {
                        currentDrawing = new DnaDrawing();
                    }

                    lock (currentDrawing)
                    {
                        currentDrawing = Project.Drawing;
                        guiDrawing     = currentDrawing.Clone();
                    }
                }
                ActivateProjectSettings();

                ResetProjectLevels();
                RepaintCanvas();

                projectFileName = fileName;
            }

            SetTitleBar();
        }
Exemplo n.º 6
0
 public Stats(DnaProject project)
 {
     this.project = project;
 }
Exemplo n.º 7
0
        private void OpenProject()
        {
            Stop();

            string fileName = FileUtil.GetOpenFileName(FileUtil.ProjectExtension);
            DnaProject project = Serializer.DeserializeDnaProject(fileName);

            if (project != null)
            {
                Project = project;

                if (!string.IsNullOrEmpty(Project.ImagePath))
                    OpenImage(Project.ImagePath);

                if (Project.Drawing != null)
                {
                    if (currentDrawing == null)
                        currentDrawing = new DnaDrawing();

                    lock (currentDrawing)
                    {
                        currentDrawing = Project.Drawing;
                        guiDrawing = currentDrawing.Clone();
                    }
                }
                ActivateProjectSettings();

                ResetProjectLevels();
                RepaintCanvas();

                projectFileName = fileName;
            }

            SetTitleBar();
        }
Exemplo n.º 8
0
 private void NewProject()
 {
     Project = new DnaProject();
     Project.Init();
     projectFileName = "";
     Text = "[New Project]";
 }