Skip to content

Commit 38ee70d

Browse files
committed
create hidden .config file
1 parent 7dd7b2e commit 38ee70d

4 files changed

Lines changed: 7 additions & 21 deletions

File tree

ShellCommand/DataModel/DefaultSetting.cs

Lines changed: 0 additions & 18 deletions
This file was deleted.

ShellCommand/DataModel/DirectoryCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ namespace ShellCommand.DataModel
1313
{
1414
public class DirectoryCommand
1515
{
16-
public string Command { get; set; }
1716
public string Name { get; set; }
17+
public string Command { get; set; }
1818
public string Match { get; set; }
1919
public bool RunAsAdmin { get; set; }
2020
public string Icon { get; set; }

ShellCommand/MenuDefinition/MenuCreator.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,12 @@ public static ToolStripMenuItem GetCreateDirecotyCommandFileMenuItem(string path
6161
var item = new ToolStripMenuItem(Env.CreateFolderSpecificFileText);
6262
item.Click += (sender, args) =>
6363
{
64-
Yaml.SaveYaml(path, DefaultSetting.GetDirectoryCommand());
64+
var o = new DirectoryCommand[]
65+
{
66+
new DirectoryCommand(){ Name = "Custom Command", Command = "cmd" },
67+
};
68+
Yaml.SaveYaml(path, o);
69+
File.SetAttributes(path, FileAttributes.Hidden);
6570
};
6671
item.Image = NativeLoader.GetShell32Icon(70);
6772
return item;

ShellCommand/ShellCommand.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,6 @@
120120
<Generator>MSBuild:Compile</Generator>
121121
<SubType>Designer</SubType>
122122
</ApplicationDefinition>
123-
<Compile Include="DataModel\DefaultSetting.cs" />
124123
<Compile Include="DataModel\GlobalConfig.cs" />
125124
<Compile Include="MenuDefinition\MenuCreator.cs" />
126125
<Compile Include="MenuDefinition\ToolStripItemListExtension.cs" />

0 commit comments

Comments
 (0)