1. 优化打开关系工程时,窗口左上角显示工程名,左下角显示工程路径;
2. 工程文件存储文件个数;
This commit is contained in:
@ -84,16 +84,13 @@ namespace mainProgram
|
|||||||
|
|
||||||
private void SetProjectNameAndProjectPath()
|
private void SetProjectNameAndProjectPath()
|
||||||
{
|
{
|
||||||
this.Text = this.Text + "-" + getProjectName();
|
this.Text = this.Text + "-" + mProjectManager.ProjectName;
|
||||||
this.projectPath_toolStripStatusLabel.Text = this.projectPath_toolStripStatusLabel.Text + mProjectManager.ProjectPath;
|
this.projectPath_toolStripStatusLabel.Text = this.projectPath_toolStripStatusLabel.Text + mProjectManager.ProjectPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ClearProjectNameAndProjectPath()
|
private void ClearProjectNameAndProjectPath()
|
||||||
{
|
{
|
||||||
this.Text = this.Text + "-" + getProjectName();
|
int index = this.Text.IndexOf(mProjectManager.ProjectName);
|
||||||
this.projectPath_toolStripStatusLabel.Text = this.projectPath_toolStripStatusLabel.Text + mProjectManager.ProjectPath;
|
|
||||||
|
|
||||||
int index = this.Text.IndexOf(getProjectName());
|
|
||||||
this.Text = this.Text.Substring(0, index - 1);//index - 1:还要加上一个字符“-”
|
this.Text = this.Text.Substring(0, index - 1);//index - 1:还要加上一个字符“-”
|
||||||
|
|
||||||
int index2 = this.projectPath_toolStripStatusLabel.Text.IndexOf(mProjectManager.ProjectPath);
|
int index2 = this.projectPath_toolStripStatusLabel.Text.IndexOf(mProjectManager.ProjectPath);
|
||||||
|
@ -169,14 +169,16 @@ namespace mainProgram
|
|||||||
|
|
||||||
public class ProjectManager
|
public class ProjectManager
|
||||||
{
|
{
|
||||||
public ProjectManager(string xx)
|
public ProjectManager(string projectFile)
|
||||||
{
|
{
|
||||||
string sourceFileName = Path.GetFileName(xx);//获取文件名
|
string sourceFileName = Path.GetFileName(projectFile);//获取文件名
|
||||||
mProjectFile = xx;
|
mProjectFile = projectFile;
|
||||||
mProjectPath = Path.GetDirectoryName(xx);
|
mProjectPath = Path.GetDirectoryName(projectFile);
|
||||||
|
mProjectName = Path.GetFileNameWithoutExtension(projectFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
private string mProjectFile;
|
private string mProjectFile;
|
||||||
|
private string mProjectName;
|
||||||
|
|
||||||
private string mProjectPath;
|
private string mProjectPath;
|
||||||
private string mMetadataPath;
|
private string mMetadataPath;
|
||||||
@ -199,6 +201,18 @@ namespace mainProgram
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public string ProjectName
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return mProjectName;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
mProjectName = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public string MetadataPath
|
public string MetadataPath
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
Reference in New Issue
Block a user