Просмотр исходного кода

RA IMAGE
Add receiving & returns mode.

Ray Zhang 8 лет назад
Родитель
Сommit
9c475c50d5

BIN
RA Image/RA Image.xcodeproj/project.xcworkspace/xcuserdata/ray.xcuserdatad/UserInterfaceState.xcuserstate


+ 2 - 0
RA Image/RA Image/BasicModeViewController.m

@@ -44,6 +44,8 @@
     if (appdelegate.compressFile) {
         [RAUtils message_alert:@"The photos will be compressed" title:@"Attention" controller:self];
     }
+    
+    self.title = self.name;
 }
 -(void) dealloc
 {

+ 7 - 3
RA Image/RA Image/PopModeViewController.m

@@ -30,11 +30,14 @@
     
     [super viewDidLoad];
     
-    self.verify_msg0=@"Piid does not exist";
+    self.verify_msg0=[NSString stringWithFormat:@"%@ does not exist",self.barcodeTitle];
     // Do any additional setup after loading the view.
     
     self.imgBtn.layer.borderColor = [UIColor blackColor].CGColor;
     self.imgBtn.layer.borderWidth = 1.0f;
+    
+    self.barcodeLabel.text = [NSString stringWithFormat:@"%@:",self.barcodeTitle];
+    
 }
 
 - (void)didReceiveMemoryWarning {
@@ -174,11 +177,12 @@
     }
     else
     {
-        if(![RAUtils isNumeric:barcode])
+        if(![RAUtils isNumeric:barcode]&&![self.name isEqualToString:@"Receiving"])
         {
             
+            NSString* msg = [NSString stringWithFormat:@"%@ must be a number",self.barcodeTitle];
             
-                                        [self.view makeToast:@"Piid must be a number" duration:3.0 position:CSToastPositionCenter];
+                                        [self.view makeToast:msg duration:3.0 position:CSToastPositionCenter];
             
             barcode = @"";
         }

+ 4 - 1
RA Image/RA Image/RootViewController.m

@@ -120,6 +120,9 @@ static NSString *kLastMode = @"lastChooseMode";
     if (!enable) {
         cell.contentView.backgroundColor = [UIColor darkGrayColor];
     }
+    else{
+        cell.contentView.backgroundColor = [UIColor whiteColor];
+    }
     
     return cell;
 }
@@ -153,7 +156,7 @@ static NSString *kLastMode = @"lastChooseMode";
         ModelModeViewController *vc = (ModelModeViewController *)[self viewControllerInStoryboard:@"Mode" withId:@"ModelModeViewController"];
         vc.manufacturerList = [mode objectForKey:@"manifacturer"];
         modeVC = vc;
-    }else if ([cell.mode isEqualToString:@"POP"]) {
+    }else if ([cell.mode isEqualToString:@"POP"]||[cell.mode isEqualToString:@"Receiving"]||[cell.mode isEqualToString:@"Returns"]) {
         PopModeViewController *vc = [[UIStoryboard storyboardWithName:@"Mode" bundle:nil] instantiateViewControllerWithIdentifier:@"PopModeViewController"];
         modeVC = vc;
     }