	private boolean Save()
	{
		if(this._location == null)
			this._location = new FrontendLocation();
		this._location.Name = this.GetName();
		this._location.Address = this.GetAddress();
		this._location.Port = this.GetPort();
		AlertDialog.Builder builder = new AlertDialog.Builder(this);
		builder.setTitle(R.string.error_input_str);
		builder.setNeutralButton(R.string.ok_str, new DialogInterface.OnClickListener(){
			public void onClick(DialogInterface dialog, int which) {
			}});
		if(this._location.Name == null)
		{
			builder.setMessage(R.string.error_invalid_name_str);
			builder.show();
		}
		else if(this._location.Address == null)
		{
			builder.setMessage(R.string.error_invalid_address_str);
			builder.show();
		}
		else
		{
			if(this._location.Port <= 0)
				this._location.Port = MythCom.DEFAULT_MYTH_PORT;
			LocationDbAdapter adapter = new LocationDbAdapter(this);
			adapter.open();
			if(this._location.ID == -1)
			{
				this._location.ID = (int) adapter.createFrontendLocation(this._location.Name, this._location.Address, this._location.Port);
			}
			else
			{
				return adapter.updateFrontendLocation(this._location.ID, this._location.Name, this._location.Address, this._location.Port);
			}
			adapter.close();
			return true;
		}
		return false;
	}

	private boolean Save()
	{
		if(this._location == null)
			this._location = new FrontendLocation();
		this._location.Name = this.GetName();
		this._location.Address = this.GetAddress();
		this._location.Port = this.GetPort();
		AlertDialog.Builder builder = new AlertDialog.Builder(this);
		builder.setTitle(R.string.error_input_str);
		builder.setNeutralButton(R.string.ok_str, new DialogInterface.OnClickListener(){
			public void onClick(DialogInterface dialog, int which) {
			}});
		if(this._location.Name.trim().equals(""))
		{
			builder.setMessage(R.string.error_invalid_name_str);
			builder.show();
		}
		else if(this._location.Address.trim().equals(""))
		{
			builder.setMessage(R.string.error_invalid_address_str);
			builder.show();
		}
		else
		{
			if(this._location.Port <= 0)
				this._location.Port = MythCom.DEFAULT_MYTH_PORT;
			LocationDbAdapter adapter = new LocationDbAdapter(this);
			adapter.open();
			if(this._location.ID == -1)
			{
				this._location.ID = (int) adapter.createFrontendLocation(this._location.Name, this._location.Address, this._location.Port);
			}
			else
			{
				return adapter.updateFrontendLocation(this._location.ID, this._location.Name, this._location.Address, this._location.Port);
			}
			adapter.close();
			return true;
		}
		return false;
	}
