public CategoryForm( Engine engine, Category category  )
    {
      // 
      InitializeComponent();

      // the engine to create new categories.
      _engine = engine;

      // the category we working with.
      GivenCategory = category;
    }
    private string GetRuleDescription(Category category)
    {
      var folder = _categories.FindFolderById(category.FolderId);
      if (null == folder)
      {
        // no action.
        return "n/a";
      }

      // return the pretty name
      return $"Move to folder {folder.Path(true)}";
    }
Exemple #3
0
 protected bool Equals(Category other)
 {
   return string.Equals(Name, other.Name) && Id == other.Id && string.Equals(FolderId, other.FolderId);
 }