Exemplo n.º 1
0
        private void btnModifyZipResourceLoc_Click(object sender, EventArgs e)
        {
            frmRelativeFileFolderBrowser resourceLocEditor = new frmRelativeFileFolderBrowser();
            string rootDir = null;

            if (controller.ResourceConfig.ResourceRootDir.StartsWith(".") &&
                !controller.ResourceConfig.ResourceRootDir.StartsWith(".."))
            {
                rootDir = controller.ResourceConfig.ResourceRootDir.Substring(1);
            }
            else
            {
                if (controller.ResourceConfig.ResourceRootDir.StartsWith(".."))
                {
                    rootDir = controller.ResourceConfig.ResourceRootDir.Substring(2);
                }
                else
                {
                    rootDir = controller.ResourceConfig.ResourceRootDir;
                }
            }
            resourceLocEditor.InitFullPath = Environment.CurrentDirectory + "\\" + rootDir;
            resourceLocEditor.ShowType     = ShowType.ShowFile;
            resourceLocEditor.ShowDialog();
        }
Exemplo n.º 2
0
        private void btnModifyFileSystemResourceLoc_Click(object sender, EventArgs e)
        {
            frmRelativeFileFolderBrowser resourceLocEditor = new frmRelativeFileFolderBrowser();
            string rootDir = null;

            if (controller.ResourceConfig.ResourceRootDir.StartsWith(".") &&
                !controller.ResourceConfig.ResourceRootDir.StartsWith(".."))
            {
                rootDir = controller.ResourceConfig.ResourceRootDir.Substring(1);
            }
            else
            {
                if (controller.ResourceConfig.ResourceRootDir.StartsWith(".."))
                {
                    rootDir = controller.ResourceConfig.ResourceRootDir.Substring(2);
                }
                else
                {
                    rootDir = controller.ResourceConfig.ResourceRootDir;
                }
            }
            resourceLocEditor.ShowType = ShowType.ShowFolder;
            if (resourceLocEditor.ShowDialog() == DialogResult.OK)
            {
                controller.ResourceConfig.FileSystemResources.Add(resourceLocEditor.RelativePath);
            }
        }