// Path: app/src/main/java/org/librepilot/lp2go/uavtalk/UAVTalkMissingObjectException.java
// public class UAVTalkMissingObjectException extends Exception {
//     private int mInstance;
//     private boolean mIsSettings;
//     private String mObjectName;
// 
//     public int getInstance() {
//         return mInstance;
//     }
// 
//     public void setInstance(int instance) {
//         this.mInstance = instance;
//     }
// 
//     public String getObjectname() {
//         return mObjectName;
//     }
// 
//     public void setObjectname(String objectname) {
//         this.mObjectName = objectname;
//     }
// 
//     public boolean isSettings() {
//         return mIsSettings;
//     }
// 
//     public void setIsSettings(boolean isSettings) {
//         this.mIsSettings = isSettings;
//     }
// }
// 
// Path: app/src/main/java/org/librepilot/lp2go/ui/SingleToast.java
// public class SingleToast {
// 
//     private static Toast mToast;
// 
//     public static void show(Context context, String text, int duration) {
//         VisualLog.i("Toast", text);
//         if (mToast != null) {
//             mToast.cancel();
//         }
//         try {
//             mToast = Toast.makeText(context, text, duration);
//         } catch (RuntimeException e) {
//             VisualLog.e("SINGLETOAST", e.getMessage(), e);
//         }
//         mToast.show();
//     }
// 
//     public static void show(Context context, int text, int duration) {
//         VisualLog.i("Toast", context.getString(text));
//         if (mToast != null) {
//             mToast.cancel();
//         }
//         mToast = Toast.makeText(context, text, duration);
//         mToast.show();
//     }
// 
//     public static void show(Context context, String text) {
//         show(context, text, Toast.LENGTH_LONG);
//     }
// }


import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.widget.Toast;
import org.librepilot.lp2go.R;
import org.librepilot.lp2go.uavtalk.UAVTalkMissingObjectException;
import org.librepilot.lp2go.ui.SingleToast;

/*
 * @file   EnumInputAlertDialog.java
 * @author The LibrePilot Project, http://www.librepilot.org Copyright (C) 2016.
 * @see    The GNU Public License (GPL) Version 3
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful, but
 *  WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
 *  or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
 *  for more details.
 *
 *  You should have received a copy of the GNU General Public License along
 *  with this program; if not, write to the Free Software Foundation, Inc.,
 *  59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *
 */

package org.librepilot.lp2go.ui.alertdialog;



public class EnumInputAlertDialog extends InputAlertDialog {

    private int mChoice = -1;

    public EnumInputAlertDialog(Context parent) {
        super(parent);
    }

    public void show() {
        if (mFcDevice == null) {

// Path: app/src/main/java/org/librepilot/lp2go/uavtalk/UAVTalkMissingObjectException.java
// public class UAVTalkMissingObjectException extends Exception {
//     private int mInstance;
//     private boolean mIsSettings;
//     private String mObjectName;
// 
//     public int getInstance() {
//         return mInstance;
//     }
// 
//     public void setInstance(int instance) {
//         this.mInstance = instance;
//     }
// 
//     public String getObjectname() {
//         return mObjectName;
//     }
// 
//     public void setObjectname(String objectname) {
//         this.mObjectName = objectname;
//     }
// 
//     public boolean isSettings() {
//         return mIsSettings;
//     }
// 
//     public void setIsSettings(boolean isSettings) {
//         this.mIsSettings = isSettings;
//     }
// }
// 
// Path: app/src/main/java/org/librepilot/lp2go/ui/SingleToast.java
// public class SingleToast {
// 
//     private static Toast mToast;
// 
//     public static void show(Context context, String text, int duration) {
//         VisualLog.i("Toast", text);
//         if (mToast != null) {
//             mToast.cancel();
//         }
//         try {
//             mToast = Toast.makeText(context, text, duration);
//         } catch (RuntimeException e) {
//             VisualLog.e("SINGLETOAST", e.getMessage(), e);
//         }
//         mToast.show();
//     }
// 
//     public static void show(Context context, int text, int duration) {
//         VisualLog.i("Toast", context.getString(text));
//         if (mToast != null) {
//             mToast.cancel();
//         }
//         mToast = Toast.makeText(context, text, duration);
//         mToast.show();
//     }
// 
//     public static void show(Context context, String text) {
//         show(context, text, Toast.LENGTH_LONG);
//     }
// }


// Path: app/src/main/java/org/librepilot/lp2go/ui/alertdialog/EnumInputAlertDialog.java
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.widget.Toast;
import org.librepilot.lp2go.R;
import org.librepilot.lp2go.uavtalk.UAVTalkMissingObjectException;
import org.librepilot.lp2go.ui.SingleToast;

/*
 * @file   EnumInputAlertDialog.java
 * @author The LibrePilot Project, http://www.librepilot.org Copyright (C) 2016.
 * @see    The GNU Public License (GPL) Version 3
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful, but
 *  WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
 *  or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
 *  for more details.
 *
 *  You should have received a copy of the GNU General Public License along
 *  with this program; if not, write to the Free Software Foundation, Inc.,
 *  59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *
 */

package org.librepilot.lp2go.ui.alertdialog;



public class EnumInputAlertDialog extends InputAlertDialog {

    private int mChoice = -1;

    public EnumInputAlertDialog(Context parent) {
        super(parent);
    }

    public void show() {
        if (mFcDevice == null) {

            SingleToast.show(getContext(), getContext().getString(R.string.NOT_CONNECTED),
