当前位置: 首页>>代码示例>>C#>>正文


C# System.Windows.Forms.FolderBrowserDialog.Reset方法代码示例

本文整理汇总了C#中System.Windows.Forms.FolderBrowserDialog.Reset方法的典型用法代码示例。如果您正苦于以下问题:C# System.Windows.Forms.FolderBrowserDialog.Reset方法的具体用法?C# System.Windows.Forms.FolderBrowserDialog.Reset怎么用?C# System.Windows.Forms.FolderBrowserDialog.Reset使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Windows.Forms.FolderBrowserDialog的用法示例。


在下文中一共展示了System.Windows.Forms.FolderBrowserDialog.Reset方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: import_event_handler

        private void import_event_handler(object sender, RoutedEventArgs e)
        {
            string _targetPath="test";
            string _current_android_prj;
            System.Windows.Forms.FolderBrowserDialog Dialog = new System.Windows.Forms.FolderBrowserDialog();
            while (Dialog.ShowDialog() != System.Windows.Forms.DialogResult.OK)
            {
                if((Dialog.ShowDialog() == System.Windows.Forms.DialogResult.Cancel)){
                    return ;
                }
                Dialog.Reset();               
            }

            _targetPath = Dialog.SelectedPath;
            Directory.CreateDirectory(_targetPath);
            _current_android_prj= myViewModel.CurrentDirectory.Path+"\\"+_targetPath.Split(new char[] {'\\'}).Last();
            DirInfo.DirectoryCopy(_targetPath, _current_android_prj, true);
            

            MessageBoxResult result1;
            string projectName = myViewModel.current_projectName;
            string meniPath = myViewModel.CurrentDirectory.Path + "\\" + _targetPath.Split(new char[] { '\\' }).Last() + "\\AndroidManifest.xml";
            if (!File.Exists(meniPath))
            {
                result1 = MessageBox.Show("menifest가 존재하지 않습니다.", "오류");
                return;
            }
            XmlDocument xmlDoc = new XmlDocument();
            xmlDoc.Load(meniPath);
            XmlNode node = xmlDoc.DocumentElement;

            string applicationMenyPath = Environment.GetEnvironmentVariable("USERPROFILE") + "\\MisengWorkSpace\\basicMissengProject\\config\\applicationMeny.xml";
            XmlDocument applicationMenyDoc = new XmlDocument();
            applicationMenyDoc.Load(applicationMenyPath);
            XmlNode subNode = applicationMenyDoc.DocumentElement;
            XmlNode newNode = xmlDoc.ImportNode(subNode, true);
            int count = newNode.ChildNodes.Count;
            foreach (XmlNode node1 in node.ChildNodes)
            {
                if (node1.Name == "application")
                {
                    for (int i = 0; i < 5; i++)
                    {
                        node1.AppendChild(newNode.ChildNodes[0]);
                    }
                    break;
                }
            }
            string userPermissionPath = Environment.GetEnvironmentVariable("USERPROFILE") + "\\MisengWorkSpace\\basicMissengProject\\config\\userPermission.xml";
            applicationMenyDoc = new XmlDocument();
            applicationMenyDoc.Load(userPermissionPath);
            subNode = applicationMenyDoc.DocumentElement;
            newNode = xmlDoc.ImportNode(subNode, true);

            for (int i = 0; i < 6; i++)
            {
                node.AppendChild(newNode.ChildNodes[0]);
            }

            xmlDoc.Save(meniPath);

            
            string basicMissengPrj = Environment.GetEnvironmentVariable("USERPROFILE") + "\\MisengWorkSpace\\basicMissengProject";
            string packageName = javaChange(_current_android_prj+"\\src");
            DirInfo.DirectoryCopy(basicMissengPrj + "\\androidSrc", _current_android_prj+"\\src", true);
            settingSAP(packageName, _current_android_prj+"\\src");
            addSourceToJava(_current_android_prj + "\\src\\", packageName);
            DirInfo.DirectoryCopy(basicMissengPrj + "\\androidLibs", _current_android_prj + "\\libs", true);
            DirInfo.DirectoryCopy(basicMissengPrj + "\\androidRes", _current_android_prj + "\\res", true);
            myViewModel.FileTreeVM.UpDateFileExplorerViewModel();
        }
开发者ID:KimDongWan,项目名称:Miseng,代码行数:71,代码来源:FileSystemTree.xaml.cs


注:本文中的System.Windows.Forms.FolderBrowserDialog.Reset方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。