| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117 |
- //
- // ThingsDelValveCompleteViewController.m
- // OneCable
- //
- // Created by nComz on 2017. 3. 23..
- // Copyright © 2017년 ntels. All rights reserved.
- //
- #import "ThingsGeneralDelCompleteViewController.h"
- #import "CustomLabel.h"
- #import "CustomButton.h"
- #import "CustomImageView.h"
- #import "ThingsGeneralDelStartViewController.h"
- #import "MainViewController.h"
- #import "ThingsViewController.h"
- #import "ThingsDetailViewController.h"
- @interface ThingsGeneralDelCompleteViewController ()
- @end
- @implementation ThingsGeneralDelCompleteViewController
- - (void)viewDidLoad {
- [super viewDidLoad];
- [self initUI];
- [self prepareViewDidLoad];
- }
- - (void)initUI {
-
- }
- - (void)prepareViewDidLoad {
-
- NSMutableString *title = [NSMutableString stringWithString:_delDevice.prdName];
- [title appendString:@" 삭제"];
-
- _imgThings.image = [_delDevice imgaeForAddDel];
- _lblManufacturer.text = [_delDevice manufacturerName];
-
-
- _imgThingsSuccess.hidden = !_isSuccess;
- _imgThingsFail.hidden = _isSuccess;
-
- _btnConfirm.hidden = !_isSuccess;
- _viewRetry.hidden = _isSuccess;
-
- if (_isSuccess) {
- [title appendString:@" 성공"];
- } else {
- [title appendString:@" 실패"];
- }
-
- _lblTitle.text = title;
- }
- /*
-
- - (void)finishDeviceDel:(BOOL)isSuccess {
- [self startLoading:NO];
- [self requestExcludeDevice:NO];
- ThingsGeneralDelCompleteViewController *vc = [CommonUtil instantiateViewControllerWithIdentifier:@"ThingsGeneralDelCompleteViewController" storyboardName:@"Things"];
- vc.delDevice = _delDevice;
- vc.isSuccess = isSuccess;
- // vc.addableDevice = _addableDevice;
-
- vc.providesPresentationContextTransitionStyle = YES;
- vc.definesPresentationContext = YES;
-
- [vc setModalPresentationStyle:UIModalPresentationOverCurrentContext];
-
- UIViewController *pvc = self.presentingViewController;
- [self dismissViewControllerAnimated:NO completion:^{//TODO : UI Confirm with Mr.Mo
- [pvc presentViewController:vc animated:YES completion:nil];
- }];
- }
-
- */
- - (IBAction)btnConfirmTouched:(id)sender {
- [self finishDelDevice];
- }
- - (IBAction)btnCancelTouched:(id)sender {
- [self finishDelDevice];
- }
- - (IBAction)btnRetryTouched:(id)sender {
- ThingsGeneralDelStartViewController *vc = [CommonUtil instantiateViewControllerWithIdentifier:@"ThingsGeneralDelStartViewController" storyboardName:@"Things"];
-
- vc.delDevice = _delDevice;
-
- [self showTransparencyModalView:vc];
- }
- -(void)finishDelDevice {
- [self dismissViewControllerAnimated:YES completion:^{
-
- ThingsViewController *vc = [JDFacade facade].mainViewController.tvc;
- if (vc && [vc isKindOfClass:[ThingsViewController class]]) {
- [vc finishDeviveDelete];
- } else {
- ThingsDetailViewController *vc2 = (ThingsDetailViewController *)vc;
- [vc2 finishDeviveDelete];
- }
- }];
- }
- - (void)didReceiveMemoryWarning {
- [super didReceiveMemoryWarning];
-
- }
- @end
|