Exemple #1
0
        private void DoExecuteUtility()
        {
            SetStatusWorking();
            EnableDisableEditableControls(false);
            try
            {
                utilLaunchParams execparams = GatherParameters();
                string           args       = "\"" + execparams.inputPath + "\" \"" + execparams.outputPath + "\"";

                if (execparams.nbslots != 0)
                {
                    args = "-n " + execparams.nbslots + " " + args;
                }

                if (execparams.outimgt == utilLaunchParams.outImgTy.BMP)
                {
                    args = "-bmp " + args;
                }
                else if (execparams.outimgt == utilLaunchParams.outImgTy.RAW)
                {
                    args = "-raw " + args;
                }

                //
                FrontendCommon.UtilityLauncher myUtility = new FrontendCommon.UtilityLauncher(this, KAOMADO_EXE);

                if (myUtility.StartUtil(args))
                {
                    myUtility.WaitUntilFinished();
                }

                if (myUtility.GetReturnCode() == 0)
                {
                    SetStatusSuccess();
                }
                else
                {
                    SetStatusFailure();
                }
            }
            catch (Exception e)
            {
                MessageBox.Show(this, e.Message, "Exception!", MessageBoxButtons.OK, MessageBoxIcon.Error);
                SetStatusFailure();
            }
            EnableDisableEditableControls(true);
            timerResetStatus.Start();
        }
Exemple #2
0
        private void DoExecuteUtility()
        {
            SetStatusWorking();
            EnableDisableEditableControls(false);
            try
            {
                utilitylaunchparams execparams = GatherParameters();
                string args = "\"" + execparams.inputpath + "\" \"" + execparams.outputPath + "\"";

                if (execparams.foffset != 0)
                {
                    args = "-a " + execparams.foffset + " " + args;
                }

                FrontendCommon.UtilityLauncher myUtility = new FrontendCommon.UtilityLauncher(this, PPMD_PFU_NAME);

                if (myUtility.StartUtil(args))
                {
                    myUtility.WaitUntilFinished();
                }

                if (myUtility.GetReturnCode() == 0)
                {
                    SetStatusSuccess();
                }
                else
                {
                    SetStatusFailure();
                }
            }
            catch (Exception e)
            {
                MessageBox.Show(this, e.Message, "Exception!", MessageBoxButtons.OK, MessageBoxIcon.Error);
                SetStatusFailure();
            }
            EnableDisableEditableControls(true);
            timerResetStatus.Start();
        }