RulesRegisterViewController.h 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. //
  2. // RulesRegisterViewController.h
  3. // kneet
  4. //
  5. // Created by Jason Lee on 3/19/15.
  6. // Copyright (c) 2015 ntels. All rights reserved.
  7. //
  8. #import "JDViewController.h"
  9. @class RuleModel;
  10. @class RuleDetailModel;
  11. @class PredefinedRuleDetailModel;
  12. @class RulesCreateTableViewCell;
  13. @class CustomButton;
  14. @class CustomTextField;
  15. @class CustomTextField2;
  16. @interface RulesRegisterViewController : JDViewController
  17. #pragma mark - Properties
  18. @property (strong, nonatomic) RuleModel *tmpPredRule;
  19. @property (strong, nonatomic) RuleDetailModel *tmpRuleDetail;
  20. @property (strong, nonatomic) PredefinedRuleDetailModel *tmpPredRuleDetail;
  21. @property (weak, nonatomic) IBOutlet UITableView *tableView;
  22. @property (weak, nonatomic) IBOutlet CustomButton *btnComplete;
  23. @property (weak, nonatomic) IBOutlet CustomButton *btnCancel;
  24. #pragma mark - Instance Methods
  25. - (void)addItem:(ItemModel *)item;
  26. - (void)setPredefinedRuleDetail:(PredefinedRuleDetailModel *)predefinedRuleDetail;
  27. - (void)matchRuleDetailWithPredefinedRuleDeatil:(PredefinedRuleDetailModel *)predRuleDetail;
  28. + (ModeModel *)mode:(NSString *)modeId;
  29. + (void)setSubItemsFromItem:(NSArray<ItemModel> *)items;
  30. + (void)appendItem:(NSMutableArray<ItemModel> *)items withPredefinedRuleItems:(NSArray<ItemModel> *)predItems isRuleMode:(BOOL)isRuleMode;
  31. + (CGFloat)heightForSubItems:(ItemModel *)item isTrigger:(BOOL)isTrigger;
  32. + (void)fillCell:(RulesCreateTableViewCell *)cell item:(ItemModel *)item isTrigger:(BOOL)isTrigger;
  33. - (void)btnDeleteSubItemsTouched:(id)sender;
  34. - (IBAction)btnCompleteRuleTouched:(id)sender;
  35. - (IBAction)btnCancelRuleTouched:(id)sender;
  36. @end
  37. @class CustomImageView;
  38. @class CustomLabel;
  39. @class CustomTextView;
  40. @interface RulesCreateHeaderTableViewCell : UITableViewCell
  41. @property (weak, nonatomic) IBOutlet CustomImageView *imgvTop;
  42. @property (weak, nonatomic) IBOutlet CustomLabel *lblHeaderTitle;
  43. @property (weak, nonatomic) IBOutlet NSLayoutConstraint *constraintHeaderTitleTop;
  44. @end
  45. @interface RulesCreateTableViewCell : UITableViewCell
  46. @property (weak, nonatomic) NSIndexPath *indexPath;
  47. @property (weak, nonatomic) IBOutlet CustomImageView *imgvItem;
  48. @property (weak, nonatomic) IBOutlet CustomLabel *lblItemName;
  49. @property (weak, nonatomic) IBOutlet CustomLabel *lblSubItems;
  50. @property (weak, nonatomic) IBOutlet CustomImageView *imgvBg;
  51. @property (weak, nonatomic) IBOutlet NSLayoutConstraint *constraintImgvBgHeight;
  52. @property (weak, nonatomic) IBOutlet UIView *lineview;
  53. @property (weak, nonatomic) IBOutlet CustomButton *btnDeleteSubItems;
  54. @property (weak, nonatomic) IBOutlet NSLayoutConstraint *constraintTitleLabelRight;
  55. - (IBAction)btnDeleteSubItemsTouched:(id)sender;
  56. @end
  57. @interface RulesCreateTitleTableViewCell : UITableViewCell
  58. @property (weak, nonatomic) IBOutlet CustomImageView *imgvItem;
  59. @property (weak, nonatomic) IBOutlet CustomLabel *lblRuleTitle;
  60. @property (weak, nonatomic) IBOutlet CustomTextField2 *txtRuleTitle;
  61. @end