Ejemplo n.º 1
0
        /// <summary>
        /// Processes a new file that is created or opened by the user
        /// </summary>
        /// <param name="path">The path of the file that was created or opened by the user</param>
        /// <param name="overwriteExisting">True if the file at the given path should be overwritten</param>
        public void ProcessNewFile(string path, bool overwriteExisting = false)
        {
            if (overwriteExisting == true && File.Exists(path))
            {
                File.Delete(path);
            }

            var newDesign = DesignController.CreateDesign(path);

            DisplayController.CreateDesignTab(newDesign);
            MainWindow.AddNavTreeNode(newDesign.FileName);
            LoadDisplay(DisplayType.EDIT);
        }