public string AutoStart(AutoStartType type, string bindName) { if (this.Exists(bindName) == false) { return("Bind with name `" + bindName + "` doesn't exists!"); } var item = this.GetItemByName(bindName); if (type == AutoStartType.Add) { item.autostart = true; } else if (type == AutoStartType.Remove) { item.autostart = false; } this.Save(); if (type == AutoStartType.Add) { this.screen.AddLine("Bind `" + bindName + "` added to autostart."); } else if (type == AutoStartType.Remove) { this.screen.AddLine("Bind `" + bindName + "` removed from autostart."); } return(string.Empty); }
public string AutoStart(AutoStartType type, string bindName) { if (this.Exists(bindName) == false) { return "Bind with name `" + bindName + "` doesn't exists!"; } var item = this.GetItemByName(bindName); if (type == AutoStartType.Add) { item.autostart = true; } else if (type == AutoStartType.Remove) { item.autostart = false; } this.Save(); if (type == AutoStartType.Add) { this.screen.AddLine("Bind `" + bindName + "` added to autostart."); } else if (type == AutoStartType.Remove) { this.screen.AddLine("Bind `" + bindName + "` removed from autostart."); } return string.Empty; }