// Use this for initialization void Start() { instance = this; mainCam = Camera.main; controller.MenuButtonClicked += (sender, e) => { isActive = !isActive; }; controller.PadTouched += (sender, e) => { optionHalo.gameObject.SetActive(true); }; controller.PadUntouched += (sender, e) => { optionHalo.gameObject.SetActive(false); if (optionSelected != null) { optionSelected.image.color = Color.white; optionSelected = null; } }; controller.PadClicked += (sender, e) => { if (optionSelected != null) { optionSelected.image.color = Color.red; } }; controller.PadUnclicked += onOptionClicked; }
void updateOptionMenu() { Vector2 haloPos = new Vector2(controller.controllerState.rAxis0.x, controller.controllerState.rAxis0.y); optionHalo.rectTransform.localPosition = haloPos * (optionDistance + 0.5f); var newSelected = optionBtns[Mathf.FloorToInt(((Mathf.Atan2(haloPos.y, haloPos.x) + optionRadian / 2 + 2 * Mathf.PI) % (2 * Mathf.PI)) / optionRadian)]; if (optionSelected != null && newSelected != optionSelected) { optionSelected.image.color = Color.white; } optionSelected = newSelected; optionSelected.image.color = Color.green; }
/// <summary> /// Metodo para agregar los dataBind al formulario /// </summary> protected override void EstablecerDataBind() { //Se enlaza el option button para Gmail OptionBtn oBGmail = (SAPbouiCOM.OptionBtn)Formulario.Items.Item("rbGmail").Specific; oBGmail.DataBind.SetBound(true, "", "rbG"); //Se enlaza el option button para Outlook OptionBtn oBOutlook = (SAPbouiCOM.OptionBtn)Formulario.Items.Item("rbOutlook").Specific; oBOutlook.DataBind.SetBound(true, "", "rbO"); //Se agrupa los optionButton oBOutlook.GroupWith("rbGmail"); //Se enlaza el campo de texto EditText txtCorreo = (SAPbouiCOM.EditText)Formulario.Items.Item("txtCorreo").Specific; txtCorreo.DataBind.SetBound(true, "", "udsCor"); }
/// <summary> /// Metodo para llenar los campos de texto y los radio buttons /// </summary> /// <param name="comp"></param> private void LlenarDatos() { ManteUdoCorreos mantenimiento = new ManteUdoCorreos(); Correo correo = mantenimiento.Consultar(); if (correo != null) { EditText txtCorreo = (EditText)Formulario.Items.Item("txtCorreo").Specific; txtCorreo.Value = correo.Cuenta; if (correo.Opcion.Equals("0")) { OptionBtn oBGmail = (OptionBtn)Formulario.Items.Item("rbGmail").Specific; oBGmail.Selected = true; } else { OptionBtn oBOutlook = (OptionBtn)Formulario.Items.Item("rbOutlook").Specific; oBOutlook.Selected = true; } } }
/// <summary> /// 폼(Form)의 아이템들(Items)에 연결이 필요한 데이타소스(DataSource) 형식을 정의합니다. /// </summary> private void Act2_DataSourcesBinding() { // '// ADD YOUR ACTION CODE HERE ... #region DataSources oForm.DataSources.DataTables.Add("grd"); #endregion #region DataBind FN.SetDataBind(oForm, "edtREQYM1", "edtREQYM1", BoDataType.dt_SHORT_TEXT); FN.SetDataBind(oForm, "edtREQYM2", "edtREQYM2", BoDataType.dt_SHORT_TEXT); FN.SetDataBind(oForm, "edtREADCD1", "edtREADCD1", BoDataType.dt_SHORT_TEXT); FN.SetDataBind(oForm, "edtREADCD2", "edtREADCD2", BoDataType.dt_SHORT_TEXT); FN.SetDataBind(oForm, "optAll", "optSTATUS", BoDataType.dt_SHORT_TEXT); FN.SetDataBind(oForm, "optClose", "optSTATUS", BoDataType.dt_SHORT_TEXT); FN.SetDataBind(oForm, "optOpen", "optSTATUS", BoDataType.dt_SHORT_TEXT); #endregion #region OptionBtn //FN.SetOptionBtn(ref oForm, "optForw(F),optBack(B)", "optForw"); SAPbouiCOM.OptionBtn[] oOpt = new OptionBtn[3]; oOpt[0] = (SAPbouiCOM.OptionBtn)oForm.Items.Item("optAll").Specific; oOpt[1] = (SAPbouiCOM.OptionBtn)oForm.Items.Item("optClose").Specific; oOpt[2] = (SAPbouiCOM.OptionBtn)oForm.Items.Item("optOpen").Specific; oOpt[1].GroupWith("optAll"); oOpt[2].GroupWith("optAll"); oOpt[0].ValOn = statusTypes.All.ToString(); oOpt[1].ValOn = statusTypes.Close.ToString(); oOpt[2].ValOn = statusTypes.Open.ToString(); #endregion }
/// <summary> /// 폼(Form)의 아이템들(Items)에 연결이 필요한 데이타소스(DataSource) 형식을 정의합니다. /// </summary> private void Act2_DataSourcesBinding() { // '// ADD YOUR ACTION CODE HERE ... #region DataSources oForm.DataSources.DBDataSources.Add("@KIS_SO0020M_HRD"); oForm.DataSources.DataTables.Add("grd"); oForm.DataSources.UserDataSources.Add("CHK", BoDataType.dt_SHORT_TEXT); #endregion #region DataBind FN.SetDataBind(oForm, "cboPAPERTP", "cboPAPERTP", BoDataType.dt_SHORT_TEXT); FN.SetDataBind(oForm, "cboSINGBN", "cboSINGBN", BoDataType.dt_SHORT_TEXT); FN.SetDataBind(oForm, "edtSINDT1", "edtSINDT1", BoDataType.dt_DATE); FN.SetDataBind(oForm, "edtSINDT2", "edtSINDT2", BoDataType.dt_DATE); FN.SetDataBind(oForm, "optAll", "optSTATUS", BoDataType.dt_SHORT_TEXT); FN.SetDataBind(oForm, "optClose", "optSTATUS", BoDataType.dt_SHORT_TEXT); FN.SetDataBind(oForm, "optOpen", "optSTATUS", BoDataType.dt_SHORT_TEXT); #endregion #region OptionBtn //FN.SetOptionBtn(ref oForm, "optForw(F),optBack(B)", "optForw"); SAPbouiCOM.OptionBtn[] oOpt = new OptionBtn[3]; oOpt[0] = (SAPbouiCOM.OptionBtn)oForm.Items.Item("optAll").Specific; oOpt[1] = (SAPbouiCOM.OptionBtn)oForm.Items.Item("optClose").Specific; oOpt[2] = (SAPbouiCOM.OptionBtn)oForm.Items.Item("optOpen").Specific; oOpt[1].GroupWith("optAll"); oOpt[2].GroupWith("optAll"); oOpt[0].ValOn = statusTypes.All.ToString(); oOpt[1].ValOn = statusTypes.Close.ToString(); oOpt[2].ValOn = statusTypes.Open.ToString(); #endregion #region ComboBox // 지종 oComboBox = (SAPbouiCOM.ComboBox)oForm.Items.Item("cboPAPERTP").Specific; //string sql = FN.GetSQL("KIS_SF0360A_001"); string sql = string.Format(" SELECT U_SMLCD, U_SMLNM FROM [@KIS_AD00201] WHERE Code = {0} AND U_USEYN = 'Y' ", FN.SetSingleQuotes("SO01")); FN.QComboBind(ref oComboBox, sql, FN.Enum_WholeTp.m_Space, null); // 신청구분 oComboBox = (SAPbouiCOM.ComboBox)oForm.Items.Item("cboSINGBN").Specific; //string sql = FN.GetSQL("KIS_SF0360A_001"); sql = string.Format(" SELECT U_SMLCD, U_SMLNM FROM [@KIS_AD00201] WHERE Code = {0} AND U_USEYN = 'Y' ", FN.SetSingleQuotes("SO02")); FN.QComboBind(ref oComboBox, sql, FN.Enum_WholeTp.m_Space, null); #endregion }
/// <summary> /// 폼(Form)의 아이템들(Items)에 연결이 필요한 데이타소스(DataSource) 형식을 정의합니다. /// </summary> private void Act2_DataSourcesBinding() { // '// ADD YOUR ACTION CODE HERE ... #region DataSources oForm.DataSources.DataTables.Add("grd"); oForm.DataSources.UserDataSources.Add("pFormUID", BoDataType.dt_SHORT_TEXT, 254); oForm.DataSources.UserDataSources.Add("popupID", BoDataType.dt_LONG_TEXT); #endregion #region DataBind FN.SetDataBind(oForm, "cboSIDO", "cboSIDO", BoDataType.dt_SHORT_TEXT); FN.SetDataBind(oForm, "cboGUGUN", "cboGUGUN", BoDataType.dt_SHORT_TEXT); FN.SetDataBind(oForm, "edtZIPCODE", "edtZIPCODE", BoDataType.dt_SHORT_TEXT); FN.SetDataBind(oForm, "edtADDR", "edtADDR", BoDataType.dt_SHORT_TEXT); FN.SetDataBind(oForm, "opt0", "opt", BoDataType.dt_SHORT_TEXT); FN.SetDataBind(oForm, "opt1", "opt", BoDataType.dt_SHORT_TEXT); #endregion #region OptionBtn //FN.SetOptionBtn(ref oForm, "optForw(F),optBack(B)", "optForw"); SAPbouiCOM.OptionBtn[] oOpt = new OptionBtn[2]; oOpt[0] = (SAPbouiCOM.OptionBtn)oForm.Items.Item("opt0").Specific; oOpt[1] = (SAPbouiCOM.OptionBtn)oForm.Items.Item("opt1").Specific; oOpt[1].GroupWith("opt0"); oOpt[0].ValOn = ((int)SO_COMMON_HRD.ZipCodeTypes.Numberoflot).ToString(); oOpt[1].ValOn = ((int)SO_COMMON_HRD.ZipCodeTypes.Road).ToString(); #endregion #region ComboBox // 시도 oComboBox = (SAPbouiCOM.ComboBox)oForm.Items.Item("cboSIDO").Specific; string sql = string.Format(" SELECT U_CD, U_SMLNM FROM [@KIS_AD00201] WHERE Code = '{0}' AND U_USEYN = 'Y' ", "SO90"); ////string sql = FN.GetSQL("KIS_SF0360A_001"); FN.QComboBind(ref oComboBox, sql, FN.Enum_WholeTp.m_Nothing, null); // 구군 oComboBox = (SAPbouiCOM.ComboBox)oForm.Items.Item("cboGUGUN").Specific; sql = string.Format(" SELECT U_CD, U_SMLNM FROM [@KIS_AD00201] WHERE Code = '{0}' AND U_RMK1 = '{1}' AND U_USEYN = 'Y' ", "SO91", FN.GetItemValue(ref oForm, "cboSIDO")); FN.QComboBind(ref oComboBox, sql, FN.Enum_WholeTp.m_Space, null); #endregion }