Exemple #1
0
        internal static App UnlockTo(string[] args)
        {
            App app = null;

            if (Path.GetExtension(args[1]) == ".nlk" && NLockTemplateOperations.IsNLock(args[1]) > 0)
            {
                app = new App(new MainForm(OperationModes.Unlockto, args[1]));
            }
            else
            {
                MessageBox.Show(Resources.Not_a_valid_NLock_File___ + Path.GetFileName(args[1]));
            }
            return(app);
        }
Exemple #2
0
 internal static void UnlockTo(string[] args)
 {
     Logger.Debug("");
     if (Path.GetExtension(args[1]) == ".nlk" && NLockTemplateOperations.IsNLock(args[1]) > 0)
     {
         var thread = new Thread(() => ThreadUnlockTo(args));
         thread.TrySetApartmentState(ApartmentState.STA);
         thread.Start();
     }
     else
     {
         MessageBox.Show(Resources.Not_a_valid_NLock_File___ + Path.GetFileName(args[1]));
     }
 }
Exemple #3
0
        internal static App UnlockHere(string[] args)
        {
            //TODO :  Check the header content and add a CRC
            App app = null;

            if (Path.GetExtension(args[1]) == ".nlk" && NLockTemplateOperations.IsNLock(args[1]) > 0)
            {
                app = new App(new MainForm(OperationModes.Unlockhere, args[1]));
                app.Activate();
                app.FocusMe();
            }
            else
            {
                MessageBox.Show(Resources.Not_a_valid_NLock_File___ + Path.GetFileName(args[1]));
            }
            return(app);
        }