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


C# Project.GetProjectPath方法代码示例

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


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

示例1: EditProject

        public static Project EditProject(Project p)
        {
            var p2 = ShowProjectDialog(p);
            if (p2 == null)
            {
                return null;
            }

            p2.SetProjectPath(p.GetProjectPath());
            bool r = SaveProject(p2);
            if (r == false)
            {
                MessageBox.Show("There was an error saving the project, changes will not be made");
                return null;
            }
            return p2;
        }
开发者ID:andreigec,项目名称:Consultant-Plus,代码行数:17,代码来源:controller.cs

示例2: AddPlugin

        /// <summary>
        /// Adds the plugin.
        /// </summary>
        /// <param name="plugin">The plugin.</param>
        /// <param name="project">The project.</param>
        /// <param name="folderName">Name of the folder.</param>
        /// <param name="extensionName">Name of the extension.</param>
        internal void AddPlugin(
            Plugin plugin,
            Project project, 
            string folderName, 
            string extensionName)
        {
            string projectPath = project.GetProjectPath();
            string source = plugin.Source;
            string destination = string.Format(@"{0}\Lib\{1}", projectPath, plugin.FileName);

            //// at this moment we only want ot do the core as this plugin might not be
            //// supported in the ui project.
            if (extensionName == "Core")
            {
                this.AddReference(project, destination, source);
            }
            else
            {
                //// now if we are not the core project we need to add the platform specific assemblies
                //// and the bootstrap item templates!

                string extensionSource = this.GetExtensionSource(folderName, extensionName, source);

                string extensionDestination = this.GetExtensionDestination(folderName, extensionName, destination);

                if (File.Exists(extensionSource))
                {
                    //// if the plugin is supported add in the core library.

                    //// only do if destination file doesnt exist
                    if (File.Exists(destination) == false)
                    {
                        this.AddReference(project, destination, source);
                    }

                    //// only do if extensionDestination file doesnt exist
                    if (File.Exists(extensionDestination) == false)
                    {
                        this.AddReference(project, extensionDestination, extensionSource);
                        this.BuildSourceFile(project, extensionSource, extensionDestination, plugin.FriendlyName);
                    }
                }
            }
        }
开发者ID:slodge,项目名称:NinjaCoderForMvvmCross,代码行数:51,代码来源:PluginsService.cs

示例3: LoadTimesheet

        public static List<Session> LoadTimesheet(Project p)
        {
            var file = FileExtras.LoadFile(GetTimesheetPath(p.GetProjectPath()));
            if (String.IsNullOrEmpty(file))
                return null;

            var sessions = StringExtras.SplitString(file, "\b");
            var ret = new List<Session>();
            foreach (var s in sessions)
            {
                ret.Add((Session)Reflection.DeserialiseObject(typeof(Session), s));
            }
            return ret;
        }
开发者ID:andreigec,项目名称:Consultant-Plus,代码行数:14,代码来源:controller.cs

示例4: SaveTimesheet

        public static void SaveTimesheet(Project p, List<Session> sessions)
        {
            var tp = GetTimesheetPath(p.GetProjectPath());
            if (File.Exists(tp))
            {
                File.Delete(tp);
            }

            String ts = "";
            foreach (var s in sessions)
            {
                ts += Reflection.SerialiseObject(s) + "\b";
            }

            FileExtras.SaveToFile(tp, ts);
        }
开发者ID:andreigec,项目名称:Consultant-Plus,代码行数:16,代码来源:controller.cs

示例5: SaveProject

 public static bool SaveProject(Project p)
 {
     return Reflection.SerialiseObject(p, GetInfoFilePath(p.GetProjectPath()));
 }
开发者ID:andreigec,项目名称:Consultant-Plus,代码行数:4,代码来源:controller.cs


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