Fixed bug in new-account, added error dialogs.
authorJimmy Christensen <dusted@dusted.dk>
Mon, 11 Aug 2014 15:54:34 +0000 (17:54 +0200)
committerJimmy Christensen <dusted@dusted.dk>
Mon, 11 Aug 2014 15:54:34 +0000 (17:54 +0200)
src/fkgui/FkActionEventListener.java
src/fkgui/FkManager.java
src/fkgui/MainWin.java
src/fkgui/Messages.java
src/fkgui/NewAccountDialog.java
src/fkgui/SerialWorker.java
src/fkgui/TriggerDialog.java
src/fkgui/messages.properties
src/fkgui/messages_da.properties

index 67fca94..b7d0740 100644 (file)
@@ -18,6 +18,6 @@ public interface FkActionEventListener {
                        action=act;
                }
        }
-       public enum FkActionEventType { ACTION_ABORTED, ACTION_OKAY, ACTION_ERROR, ACTION_WAITING, ACTION_WORKING };
+       public enum FkActionEventType { ACTION_ABORTED, ACTION_OKAY, ACTION_ERROR, ACTION_WAITING, ACTION_WORKING, STATE_ERROR };
        public void fkActionEvent( FkActionEvent event );
 }
index 8655d64..80d202a 100644 (file)
@@ -2,8 +2,13 @@ package fkgui;
 
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
+import java.util.Collection;
+import java.util.Collections;
 import java.util.Comparator;
 import java.util.Vector;
+
+import jssc.SerialPort;
+
 import org.eclipse.swt.widgets.Display;
 
 import fkgui.FkActionEventListener.FkActionEvent;
@@ -12,7 +17,9 @@ import fkgui.FkActionEventListener.FkActionEventType;
 public class FkManager implements ActionListener {
        private static FkManager instance = null;
        private SerialWorker com = null;
-
+       static final char ENTER_KEY = (char)13;
+       static final char PAUSE_CODE = (char)23; 
+       static final char SPACE_KEY = (char)32;
        private Comparator<Account> sortMethod = null;
        
        public class Account
@@ -73,6 +80,47 @@ public class FkManager implements ActionListener {
                }
        }
        
+       
+       private Boolean checkState()
+       {
+
+               int t=0;
+               String msg="";
+               Boolean stateOk=false;
+
+               try {
+                       com.serialPort.writeByte((byte)SPACE_KEY);
+                       while( t < 100 )
+                       {
+                               t++;
+                               Thread.sleep(5);
+                               
+                               if( com.serialPort.getInputBufferBytesCount() > 0 )
+                               {
+                                       msg += com.serialPort.readString();
+                                       if( msg.endsWith("\r\n>") )
+                                       {
+                                               stateOk=true;
+                                               msg="";
+                                               break;
+                                       }
+                               }
+                               
+                       }
+               
+               } catch(Exception e)
+               {
+                       stateOk=false;
+               }
+               flushSerial();
+               if( !stateOk )
+               {
+                       return(false);
+               }
+               return(true);
+               
+       }
+       
        private class TrigTask implements Runnable
        {
                private Account acc;
@@ -88,25 +136,32 @@ public class FkManager implements ActionListener {
                @Override
                public void run() {
                        
-                       flushSerial();
+                       int t=0;
+                       String msg = "";
+
+
+                       try {
                        
-                       if(action != '%' )
-                       {
-                               try
+                               //First check that we get a prompt
+                               if( !checkState() )
                                {
-                                       
-                                       if( action == 'd' || action == 'o' )
-                                       {
-                                               com.serialPort.writeByte((byte)'x');
-                                       }
-                                       com.serialPort.writeByte((byte)action);
-                               } catch( Exception ex )
+                                       Display.getDefault().asyncExec( new FkActionEventMsg(delegate, FkActionEventListener.FkActionEventType.STATE_ERROR, "EXCEPTION",acc,action) );
+                                       return;
+                               }
+
+                               //if it's not '%' we need to type which action.
+                               if(action != '%' )
                                {
-                                       ex.printStackTrace();
+       
+                                               
+                                               if( action == 'd' || action == 'o' )
+                                               {
+                                                       com.serialPort.writeByte((byte)'x');
+                                               }
+                                               com.serialPort.writeByte((byte)action);
+       
                                }
-                       }
                        
-                       try {
                                com.serialPort.writeBytes(acc.num.toLowerCase().getBytes());
                
                                if( action == 'd' || action == 'o' )
@@ -114,25 +169,14 @@ public class FkManager implements ActionListener {
                                        com.serialPort.writeByte((byte)'y');
                                }                               
                                
-                               try {
-                                       Thread.sleep(200);
-                               } catch (InterruptedException e1) {
-                                       // TODO Auto-generated catch block
-                                       e1.printStackTrace();
-                               }
-                               
-                               int t=0;
+                               Thread.sleep(200);
 
-                               String msg = "";
+                               
+                               t=0;
                                while( t < 1200 )
                                {
                                        t++;
-                                       try {
-                                               Thread.sleep(50);
-                                       } catch (InterruptedException e) {
-                                               // TODO Auto-generated catch block
-                                               e.printStackTrace();
-                                       }
+                                       Thread.sleep(50);
                                        if( com.serialPort.getInputBufferBytesCount() > 0 )
                                        {
                                                msg += com.serialPort.readString();
@@ -156,7 +200,6 @@ public class FkManager implements ActionListener {
                                Display.getDefault().asyncExec( new FkActionEventMsg(delegate, FkActionEventListener.FkActionEventType.ACTION_ERROR, msg,acc,action) );
 
                        } catch (Exception e1) {
-                               // TODO Auto-generated catch block
                                System.out.println("TrigTask Exception:");
                                e1.printStackTrace();
                                Display.getDefault().asyncExec( new FkActionEventMsg(delegate, FkActionEventListener.FkActionEventType.ACTION_ERROR, "EXCEPTION",acc,action) );
@@ -198,7 +241,7 @@ public class FkManager implements ActionListener {
        {
                list.addElement( new Account(num,name) );
                
-               list.sort( sortMethod );
+               Collections.sort(list, sortMethod);
        }
        
        public void listClear()
@@ -264,8 +307,15 @@ public class FkManager implements ActionListener {
                @Override
                public void run() {
                        System.out.println("NewAccountTask run");
+                       Boolean noTimeOut = false;
 
-                       flushSerial();
+                       //First check that we get a prompt
+                       if( !checkState() )
+                       {
+                               Display.getDefault().asyncExec( new FkActionEventMsg(delegate, FkActionEventListener.FkActionEventType.STATE_ERROR, "EXCEPTION",acc,'A') );
+                               return;
+                       }
+                       
                        String data="";
                        int timeOut;
                        try {                   
@@ -300,40 +350,84 @@ public class FkManager implements ActionListener {
 
                                        for(int p=0; p < seq.length();p++)
                                        {
-                                               
+
                                                if( com.serialPort.getOutputBufferBytesCount() > 1 )
                                                {
-                                                       Thread.sleep(50);
+                                                       Thread.sleep(100);
+                                                       System.out.println("[SLEEP]");
                                                } else {
-                                                       com.serialPort.writeByte( (byte)seq.charAt(p) );
-                                                       Thread.sleep(5);
+                                                       if( seq.charAt(p) == PAUSE_CODE)
+                                                       {
+                                                               Thread.sleep(100);
+                                                               System.out.println("[DELAY]");
+                                                       } else {
+                                                               if( seq.charAt(p) == ENTER_KEY )
+                                                               {
+                                                                       System.out.println( "[ENTER]" );
+                                                               } else {
+                                                                       System.out.println( "Type from pos ("+p+"):" + seq.charAt(p));
+                                                               }
+       
+                                                               com.serialPort.writeByte( (byte)seq.charAt(p) );
+                                                               Thread.sleep(5);
+                                                       }
                                                        
                                                }
-                                               System.out.println( "Type:" + seq.charAt(p));
-                                               while( com.serialPort.getInputBufferBytesCount() > 0 )
+                                               
+                                               if(  com.serialPort.getInputBufferBytesCount() > 0 )
                                                {
-                                                       String in = com.serialPort.readString();
-                                                       data += in;
-                                                       System.out.println("Read:" + in);
+                                                       System.out.print("Reading "+com.serialPort.getInputBufferBytesCount()+ " bytes: ");
+                                                       data="";
+                                                       while( com.serialPort.getInputBufferBytesCount() > 0 )
+                                                       {
+                                                               String in = com.serialPort.readString();
+                                                               data += in;
+                                                               
+                                                       }
+                                                       if( data.contains("[generate]") )
+                                                       {
+                                                               noTimeOut=true;
+                                                               System.out.println("1: noTimeOut");
+                                                       }                                                       
+                                                       System.out.println(data);
                                                }
-                                       }
-                                       System.out.println("All chars typed, waiting for [done]");
+                                       }//While typing
+                                       System.out.println("All chars typed, waiting for [save entry ");
+                                       
+                                       int step=0;
                                        
                                        timeOut = 30000;
-                                       while( timeOut > 0 )
+                                       while( timeOut > 0 || noTimeOut )
                                        {
-                                               timeOut -= 50;
-                                               Thread.sleep(50);
+                                               
                                                if( com.serialPort.getInputBufferBytesCount() > 0 )
                                                {
                                                        String in = com.serialPort.readString();
-                                                       System.out.println("Read>"+in);
+                                                       //System.out.println("Read>"+in);
                                                        data += in;
-                                                       if( data.contains("[done]") )
+                                                       System.out.println("Data:"+data);
+                                                       
+                                                       //Check for abort first, in that case, we don't want to do anything.
+                                                       if( data.contains("[abort]") )
+                                                       {
+                                                               Display.getDefault().asyncExec( new FkActionEventMsg(delegate, FkActionEventListener.FkActionEventType.ACTION_ABORTED, "ERROR:"+data,null,'A') );
+                                                               return;
+                                                       }
+                                                       
+                                                       //If we're generating a password, we don't want to timeout
+                                                       if( data.contains("[generate]") )
+                                                       {
+                                                               noTimeOut=true;
+                                                               System.out.println("2: noTimeOut");
+                                                               
+                                                       }
+                                                       
+                                                       //If we're at step0 and have the saveentry string and there's a ] after it, we're good to fetch the account number.
+                                                       if( step==0 && data.contains("[save entry ") && (data.lastIndexOf(']') > data.lastIndexOf("[save entry ")) )
                                                        {
                                                                int begin = data.lastIndexOf("[save entry ")+12;
                                                                String subStr = data.substring(begin);
-                                                               int end = subStr.indexOf("]");
+                                                               int end = subStr.indexOf(']');
                                                                subStr = subStr.substring(0,end);
                                                                if( subStr.length()==1)
                                                                {
@@ -342,24 +436,30 @@ public class FkManager implements ActionListener {
                                                                acc.num = subStr;
                                                                listAddAcc( acc.num, acc.name);
                                                                System.out.println("Account: "+acc.num+" " + acc.name);
-                                                               Display.getDefault().asyncExec( new FkActionEventMsg(delegate, FkActionEventListener.FkActionEventType.ACTION_OKAY, "DONE:"+data,acc,'A') );
-                                                               break;
-                                                       } else if( data.contains("[abort]") )
+                                                               
+                                                               //Cut data, so that the [done] step1 looks for will not be the one after [generate].
+                                                               data = data.substring(begin+end);
+                                                               
+                                                               System.out.println("Found [save entry, looking for done.");
+                                                               step++;
+                                                       }
+                                                       
+                                                       if( step==1 && data.contains("[done]") )
                                                        {
-                                                               Display.getDefault().asyncExec( new FkActionEventMsg(delegate, FkActionEventListener.FkActionEventType.ACTION_ABORTED, "ERROR:"+data,null,'A') );
-                                                               break;
+                                                               System.out.println("Found [done] in: {"+data+"}");
+                                                               Display.getDefault().asyncExec( new FkActionEventMsg(delegate, FkActionEventListener.FkActionEventType.ACTION_OKAY, "DONE:"+data,acc,'A') );
+                                                               return;
                                                        }
+
+                                               } else {
+                                                       Thread.sleep(50);
+                                                       timeOut -= 50;
                                                }
-                                       }
-                                       if(timeOut < 1)
-                                       {
-                                               Display.getDefault().asyncExec( new FkActionEventMsg(delegate, FkActionEventListener.FkActionEventType.ACTION_ABORTED, "TIMEOUT1:"+data,null,'A') );
-                                       }
-                               } else {
-                                       Display.getDefault().asyncExec( new FkActionEventMsg(delegate, FkActionEventListener.FkActionEventType.ACTION_ABORTED, "TIMEOUT2:"+data,null,'A') );
-                               }
-                               
+                                       } //While !timeout 
+                               } //If !timeout
                                
+                               Display.getDefault().asyncExec( new FkActionEventMsg(delegate, FkActionEventListener.FkActionEventType.ACTION_ABORTED, "TIMEOUT:"+data,null,'A') );
+
                        } catch (Exception e) {
                                Display.getDefault().asyncExec( new FkActionEventMsg(delegate, FkActionEventListener.FkActionEventType.ACTION_ERROR, "EXCEPTION",null,'A') );
                        }
@@ -371,15 +471,18 @@ public class FkManager implements ActionListener {
 
        private void flushSerial() {
                try {
-               Thread.sleep(10);
-               
-               while( com.serialPort.getInputBufferBytesCount()!=0 )
-               {
-                       System.out.println("Flushed "+com.serialPort.getInputBufferBytesCount()+" bytes >>>" + com.serialPort.readString() + "<<<");
-               }
+                       Thread.sleep(10);
+                       com.serialPort.purgePort(SerialPort.PURGE_RXCLEAR | SerialPort.PURGE_TXCLEAR);
+                       
+                       System.out.println("Flushed "+com.serialPort.getInputBufferBytesCount()+" bytes.");
+                       while( com.serialPort.getInputBufferBytesCount() > 0 )
+                       {
+                               com.serialPort.readBytes();
+                       }
+                       
                } catch(Exception e)
                {
-                       
+                       System.out.println("FkManager flushSerial Exception:"+e.getMessage() );
                }
                
        }       
@@ -389,47 +492,60 @@ public class FkManager implements ActionListener {
                        String autoPassSpecials, String strPassword, Boolean seperatorTab,
                        FkActionEventListener delegate) {
                        
-                       String seq = new String();
+                       StringBuilder sb = new StringBuilder(256);
+               
+                       
                        
-                       seq += strAccountName;
-                       seq += (char)13;
-                       seq     += strUserName;
-                       seq += (char)13;
+                       sb.append(strAccountName);
+                       sb.append(ENTER_KEY);
+                       sb.append(PAUSE_CODE);
+                       sb.append(strUserName);
+                       sb.append(ENTER_KEY);
+                       sb.append(PAUSE_CODE);
                        
                        if( autoPassword )
                        {
-                               seq += '2';
-                               seq += autoPassLen;
-                               seq += (char)13;
+                               sb.append('2'); //Select automatic password
+                               sb.append(PAUSE_CODE);
+                               sb.append(autoPassLen);
+                               sb.append(ENTER_KEY);
+
+                               
                                if( autoPassAllSpecials )
                                {
-                                       seq += '1';
+                                       sb.append('1'); //Allow all characters
                                } else {
                                        if( autoPassSpecials.length() > 0 )
                                        {
-                                               seq += '2';
-                                               seq += autoPassSpecials;
-                                               seq += (char)13;
+                                               sb.append('2'); //Allow only characters specified below
+                                               sb.append(PAUSE_CODE);
+                                               sb.append(autoPassSpecials);
+                                               sb.append(ENTER_KEY);
                                        } else {
-                                               seq += '3';
+                                               sb.append('3'); // Allow no special characters
                                        }
                                }
                        } else {
                                //Manual entered password
-                               seq += '1';
-                               seq += strPassword;
-                               seq += (char)13;
+                               sb.append('1'); // Select manual password
+                               sb.append(PAUSE_CODE);
+                               sb.append(strPassword);
+                               sb.append(ENTER_KEY);
                        }
                        
+                       sb.append(PAUSE_CODE);
+
                        //Tab/Enter sep
                        if( seperatorTab )
                        {
-                               seq += '1';
+                               sb.append('1'); //Select tab seperator
                        } else {
-                               seq += '2';
+                               sb.append('2'); //Select enter seperator
                        }
                        
-                       //System.out.println("Seq ["+seq+"]");
+                       String seq = sb.toString();
+                       
+                       System.out.println("Seq ["+seq.replace(PAUSE_CODE, 'ø').replace(ENTER_KEY, 'å')+"]");
                        
                        NewAccountTask newTask = new NewAccountTask(seq, delegate, strAccountName);
                        new Thread(newTask).start();                    
@@ -445,7 +561,7 @@ public class FkManager implements ActionListener {
                }
                if(list != null )
                {
-                       list.sort(sortMethod);
+                       Collections.sort(list, sortMethod);
                }
        }
 
index e0d3cd1..3e97ca3 100644 (file)
@@ -595,16 +595,17 @@ public class MainWin implements ConsoleMsg, UpdateCheckResultListener {
                        }
                });
                FormData fd_btnNewAccoount = new FormData();
-               fd_btnNewAccoount.bottom = new FormAttachment(100, -6);
                fd_btnNewAccoount.right = new FormAttachment(100, -10);
                btnNewAccoount.setLayoutData(fd_btnNewAccoount);
                btnNewAccoount.setText(Messages.MainWin_47);
                
                lblNumFree = new Label(cmpAccounts, SWT.NONE);
+               fd_btnNewAccoount.top = new FormAttachment(lblNumFree, -35);
+               fd_btnNewAccoount.bottom = new FormAttachment(lblNumFree, 0, SWT.BOTTOM);
                lblNumFree.setText("Hello World!"); //$NON-NLS-1$
                
                FormData fd_lblNumFree = new FormData();
-               fd_lblNumFree.bottom = new FormAttachment(btnNewAccoount, 0, SWT.BOTTOM);
+               fd_lblNumFree.bottom = new FormAttachment(100, -6);
                fd_lblNumFree.right = new FormAttachment(0, 133);
                lblNumFree.setLayoutData(fd_lblNumFree);
                
@@ -620,9 +621,9 @@ public class MainWin implements ConsoleMsg, UpdateCheckResultListener {
                fd_btnNewAccoount.left = new FormAttachment(btnActivateAccount, 6);
                btnActivateAccount.setImage(SWTResourceManager.getImage(MainWin.class, "/fkgui/gfx/lightbulb.png")); //$NON-NLS-1$
                FormData fd_btnActivateAccount = new FormData();
+               fd_btnActivateAccount.top = new FormAttachment(btnNewAccoount, 0, SWT.TOP);
+               fd_btnActivateAccount.bottom = new FormAttachment(100, -10);
                fd_btnActivateAccount.right = new FormAttachment(100, -169);
-               fd_btnActivateAccount.top = new FormAttachment(0, 546);
-               fd_btnActivateAccount.bottom = new FormAttachment(100, -6);
                btnActivateAccount.setLayoutData(fd_btnActivateAccount);
                fd_lstAccounts.top = new FormAttachment(0, 10);
                fd_lstAccounts.left = new FormAttachment(0, 10);
index a82feb6..8c5af1a 100644 (file)
@@ -31,6 +31,8 @@ public class Messages extends NLS {
        public static String MainWin_54;
        public static String MainWin_7;
        public static String MainWin_8;
+       public static String NewAccountDialog_0;
+       public static String NewAccountDialog_1;
        public static String NewAccountDialog_10;
        public static String NewAccountDialog_11;
        public static String NewAccountDialog_12;
@@ -41,6 +43,7 @@ public class Messages extends NLS {
        public static String NewAccountDialog_17;
        public static String NewAccountDialog_18;
        public static String NewAccountDialog_19;
+       public static String NewAccountDialog_2;
        public static String NewAccountDialog_20;
        public static String NewAccountDialog_21;
        public static String NewAccountDialog_22;
@@ -133,9 +136,11 @@ public class Messages extends NLS {
        public static String TriggerDialog_4;
        public static String TriggerDialog_40;
        public static String TriggerDialog_41;
+       public static String TriggerDialog_5;
        public static String TriggerDialog_6;
        public static String TriggerDialog_7;
        public static String TriggerDialog_8;
+       public static String TriggerDialog_9;
        public static String MainWin_btnByAccountId_text;
        static {
                // initialize resource bundle
index c7c9658..bd94741 100644 (file)
@@ -19,6 +19,7 @@ import org.eclipse.swt.events.ModifyListener;
 import org.eclipse.swt.events.SelectionAdapter;
 import org.eclipse.swt.events.SelectionEvent;
 import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Point;
 import org.eclipse.swt.widgets.Spinner;
 
 public class NewAccountDialog extends Dialog implements FkActionEventListener {
@@ -87,6 +88,15 @@ public class NewAccountDialog extends Dialog implements FkActionEventListener {
         */
        public Object open() {
                createContents();
+               Point p = getParent().getSize();
+               p.x /= 2;
+               p.y /= 2;
+               p.x -= shlNewAccount.getSize().x/2;
+               p.y -= shlNewAccount.getSize().y/2;
+               p.x += getParent().getLocation().x;
+               p.y += getParent().getLocation().y;
+               shlNewAccount.setLocation( p );
+
                
                shlNewAccount.open();
                shlNewAccount.layout();
@@ -845,7 +855,7 @@ public class NewAccountDialog extends Dialog implements FkActionEventListener {
                {
                        composite.dispose();
                }
-               System.out.println(curPage);
+               //System.out.println(curPage);
                
                switch(curPage)
                {
@@ -914,7 +924,6 @@ public class NewAccountDialog extends Dialog implements FkActionEventListener {
                        break;
                case ACTION_ERROR:
                        txtBUSYMSG.setText(Messages.NewAccountDialog_58);
-
                        dialog = new MessageBox(shlNewAccount, SWT.ICON_ERROR);
                        dialog.setText(Messages.NewAccountDialog_59);
                        dialog.setMessage(Messages.NewAccountDialog_60);
@@ -936,6 +945,15 @@ public class NewAccountDialog extends Dialog implements FkActionEventListener {
                        txtBUSYMSG.setText(Messages.NewAccountDialog_65);
                        animation.setVisible(false);
                        break;
+               case STATE_ERROR:
+                       txtBUSYMSG.setText(Messages.NewAccountDialog_0);
+                       dialog = new MessageBox(shlNewAccount, SWT.ICON_ERROR);
+                       dialog.setText(Messages.NewAccountDialog_1);
+                       dialog.setMessage(Messages.NewAccountDialog_2);
+                       dialog.open();
+                       closeSelf=true;
+                       break;
+
                }
                
                if( !shlNewAccount.isDisposed() && closeSelf )
index 13307ec..7ebc929 100644 (file)
@@ -295,6 +295,11 @@ public class SerialWorker extends javax.swing.SwingWorker<Void, String> implemen
                
                System.out.println("Event!" + event.getEventType() ); //$NON-NLS-1$
 
+               if( event.isRXCHAR() )
+               {
+                       System.out.print("{char}");
+               }
+               
                if(event.isBREAK())
                {
                        if(state!=SerialState.Disconnected)
index 8f47bf0..cb0108e 100644 (file)
@@ -244,6 +244,11 @@ public class TriggerDialog extends Dialog implements FkActionEventListener {
        public void fkActionEvent(FkActionEvent event) {
                MessageBox dialog;
                
+               if( shell.isDisposed() )
+               {
+                       return;
+               }
+               
                if( permitCountdownDialog != null && !permitCountdownDialog.shell.isDisposed() )
                {
                        permitCountdownDialog.shell.close();
@@ -251,6 +256,12 @@ public class TriggerDialog extends Dialog implements FkActionEventListener {
                
                switch(event.type)
                {
+               case STATE_ERROR:
+                       dialog = new MessageBox(shell, SWT.ICON_WARNING | SWT.OK);
+                       dialog.setText(Messages.TriggerDialog_5);
+                       dialog.setMessage(Messages.TriggerDialog_9);
+                       dialog.open();                  
+               break;
                case ACTION_ABORTED:
                        dialog = new MessageBox(shell, SWT.ICON_WARNING | SWT.OK);
                        dialog.setText(event.acc.name);
@@ -297,13 +308,10 @@ public class TriggerDialog extends Dialog implements FkActionEventListener {
                                        
                                } );
                        }
-                       
-                       if( !shell.isDisposed() )
-                       {
-                               shell.close();
-                       }                       
+                       shell.close();
                        break;
-               }
+               } //Switch
+               
 
 
                
index a3d376a..67124c1 100644 (file)
@@ -28,6 +28,9 @@ MainWin_54=There's a new version of FinalKey GUI available.\nGo to http\://cyber
 MainWin_7=Show FinalKey
 MainWin_8=Hide FinalKey
 MainWin_btnByAccountId_text=By account id
+NewAccountDialog_0=ERROR: FinalKey not ready.
+NewAccountDialog_1=Account not created.
+NewAccountDialog_2=Press and hold FinalKey Switch until it stops blinking.
 NewAccountDialog_10=Next up\: Setting a safe password\!\nYou have two options\: Manually enter a password or to\nhave The Final Key generate a strong and random password,\nit is strongly recommended to let The Final Key generate a\nrandom password, select the longest that is allowed by the service.
 NewAccountDialog_11=Automatic
 NewAccountDialog_12=Manual Entry
@@ -130,6 +133,8 @@ TriggerDialog_39=Account information
 TriggerDialog_4=Focus username field and press FinalKey Switch.\nPress and hold to cancel.
 TriggerDialog_40=Account deleted
 TriggerDialog_41=\ has been erased.
+TriggerDialog_5=State error.
 TriggerDialog_6=Username + Password
 TriggerDialog_7=\: Ready with username
 TriggerDialog_8=Focus username field and press FinalKey Switch.\nPress and hold to cancel.
+TriggerDialog_9=FinalKey is not ready for this action, press and hold FinalKey switch until it stops blinking, then try again.
index 49c558b..24050e4 100644 (file)
@@ -25,6 +25,9 @@ MainWin_54=En ny version af softwaren kan nu hentes.\nG
 MainWin_7=Vis FinalKey
 MainWin_8=Skjul FinalKey
 MainWin_btnByAccountId_text=Efter kontoid
+NewAccountDialog_0=Fejl: FinalKey er ikke klar.
+NewAccountDialog_1=Konto blev ikke oprettet.
+NewAccountDialog_2=Hold FinalKey Knap inde indtil FinalKey stopper med at blinke.
 NewAccountDialog_10=Næste trin: Lav en sikker kode\!\nDu har to muligheder: Indtast selv en kode\neller lad Final Key lave en sikker kode automatisk,\ndet anbefales at lade Final Key lave tilfældig kode.
 NewAccountDialog_11=Automatisk
 NewAccountDialog_12=Indtast selv
@@ -127,6 +130,8 @@ TriggerDialog_39=Konto oplysninger
 TriggerDialog_4=Set cursor i brugernavn feltet og tryk på FinalKey Knap\nHold den inde for at fortryde.
 TriggerDialog_40=Konto slettet
 TriggerDialog_41=\ er blevet slettet.
+TriggerDialog_5=FinalKey ikke klar!
 TriggerDialog_6=Brugernavn + Kode
 TriggerDialog_7=: Klar med brugernavn
 TriggerDialog_8=Set cursor i brugernavn feltet og tryk på FinalKey Knap\nHold den inde for at fortryde.
+TriggerDialog_9=FinalKey er ikke klar til at udføre handlingen. Tryk på FinalKey knap indtil den stopper med at blinke.
\ No newline at end of file