Skip to content

Commit

Permalink
create hidden .config file
Browse files Browse the repository at this point in the history
  • Loading branch information
XUJINKAI committed Oct 19, 2019
1 parent 7dd7b2e commit 38ee70d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 21 deletions.
18 changes: 0 additions & 18 deletions ShellCommand/DataModel/DefaultSetting.cs

This file was deleted.

2 changes: 1 addition & 1 deletion ShellCommand/DataModel/DirectoryCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ namespace ShellCommand.DataModel
{
public class DirectoryCommand
{
public string Command { get; set; }
public string Name { get; set; }
public string Command { get; set; }
public string Match { get; set; }
public bool RunAsAdmin { get; set; }
public string Icon { get; set; }
Expand Down
7 changes: 6 additions & 1 deletion ShellCommand/MenuDefinition/MenuCreator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,12 @@ public static ToolStripMenuItem GetCreateDirecotyCommandFileMenuItem(string path
var item = new ToolStripMenuItem(Env.CreateFolderSpecificFileText);
item.Click += (sender, args) =>
{
Yaml.SaveYaml(path, DefaultSetting.GetDirectoryCommand());
var o = new DirectoryCommand[]
{
new DirectoryCommand(){ Name = "Custom Command", Command = "cmd" },
};
Yaml.SaveYaml(path, o);
File.SetAttributes(path, FileAttributes.Hidden);
};
item.Image = NativeLoader.GetShell32Icon(70);
return item;
Expand Down
1 change: 0 additions & 1 deletion ShellCommand/ShellCommand.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</ApplicationDefinition>
<Compile Include="DataModel\DefaultSetting.cs" />
<Compile Include="DataModel\GlobalConfig.cs" />
<Compile Include="MenuDefinition\MenuCreator.cs" />
<Compile Include="MenuDefinition\ToolStripItemListExtension.cs" />
Expand Down

0 comments on commit 38ee70d

Please sign in to comment.