public ChooseFromList() { AppHelper.SetApplication(ref this.oApplication); this.oForm = UIHelper.CriarForm(this.oApplication, SAPbouiCOM.BoFormBorderStyle.fbs_Fixed, "CFL1", "CFL1", 150, 350, true, 0, "Exemplo de Choose From List"); UserDataSourceHelper.AddUserDataSource(this.oForm, "EditDS", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 254); UserDataSourceHelper.AddUserDataSource(this.oForm, "EditDSN", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 254); AddChooseFromList(); this.oEditTxt = UIHelper.AddEditTextAoFormulario(this.oForm, "EditTxt", 120, 0, 90, 0, "StaticTxt", false, 0, 0); this.oEditTxtN = UIHelper.AddEditTextAoFormulario(this.oForm, "EditTxtN", 120, 0, 105, 0, "EditTxt", false, 0, 0); this.oStaticTxt = UIHelper.AddStaticTextAoFormulario(this.oForm, "StaticTxt", 10, 0, 90, 0, "Cliente"); this.oStaticExplain = UIHelper.AddStaticTextAoFormulario(this.oForm, "Explain", 10, 200, 10, 0, "São dois choosen From List Aqui no Formulário"); this.oStaticExplain1 = UIHelper.AddStaticTextAoFormulario(this.oForm, "Explain1", 10, 300, 25, 0, "Um deles é ativado pressionando TAB no Edit Text..."); this.oStaticExplain2 = UIHelper.AddStaticTextAoFormulario(this.oForm, "Explain2", 10, 300, 40, 0, "Somente é mostrado quando o Parceiro de Negócios é Cleinte..."); this.oStaticExplain3 = UIHelper.AddStaticTextAoFormulario(this.oForm, "Explain3", 10, 300, 55, 0, "O Outro Choose From List é ativado pelo Botão..."); this.oStaticExplain4 = UIHelper.AddStaticTextAoFormulario(this.oForm, "Explain4", 10, 300, 70, 0, "Mostra todos os parceiros de negocios ...."); string sImagem = System.Windows.Forms.Application.StartupPath + @"\CFL.BMP";; this.oButton = UIHelper.AddBotaoImagemAoFormulario(this.oForm, "Button", 199, 20, 88, 20, sImagem); this.oEditTxt.DataBind.SetBound(true, "", "EditDS"); this.oEditTxtN.DataBind.SetBound(true, "", "EditDSN"); this.oEditTxt.ChooseFromListUID = "CFL1"; this.oButton.ChooseFromListUID = "CFL2"; this.oApplication.ItemEvent += OApplication_ItemEvent; this.oForm.Visible = true; }
public frmPeriodoContabilAtual() { AppHelper.SetApplication(ref this.oApplication); this.oForm = UIHelper.CriarForm(this.oApplication, SAPbouiCOM.BoFormBorderStyle.fbs_Sizable, "InfoPer", "Infoper", 0, 0, true, 0, "Periodo Contabil Atual", 70, 150, 0, 0); this.oEditInformacoes = UIHelper.AddEditTextAoFormulario(this.oForm, "EditInfo", 10, 100, 10, 0, "", false, 0, 0); this.oButtonOK = UIHelper.AddBotaoAoFormulario(this.oForm, "1", 10, 65, 25, 19, "Ok", false); this.oEditInformacoes.Value = oApplication.Company.CurrentPeriod.ToString(); this.oForm.Visible = true; }
public RightClick() { AppHelper.SetApplication(ref this.oApplication); AddMenu(); this.oForm = UIHelper.CriarForm(this.oApplication, SAPbouiCOM.BoFormBorderStyle.fbs_Sizable, "RClick", "RClick", 0, 0, true, 0, "Exemplo de Click no botão direito", 150, 400, 0, 0); this.oEditTxt = UIHelper.AddEditTextAoFormulario(this.oForm, "EditTxt", 170, 0, 90, 0, "", false, 0, 0); this.oExpTxt1 = UIHelper.AddStaticTextAoFormulario(this.oForm, "ExpTxt1", 10, 350, 90, 0, "Click Direito No Text Box", "EditTxt"); this.oExpTxt2 = UIHelper.AddStaticTextAoFormulario(this.oForm, "ExpTxt2", 10, 350, 35, 0, "Click Direito no Text Box , 2 menus adcionar irão aparecer..", "EditTxt"); this.oExpTxt3 = UIHelper.AddStaticTextAoFormulario(this.oForm, "ExpTxt3", 10, 350, 50, 0, "No menu de dados e no botão direto sempre aparecem no Menu de dados..", "EditTxt"); this.oExpTxt4 = UIHelper.AddStaticTextAoFormulario(this.oForm, "ExpTxt4", 10, 350, 65, 0, "Somente com o botão direito sobre a caixa de teste é que o menu aparece sobre a caixa de Texto..", "EditTxt"); oApplication.MenuEvent += OApplication_MenuEvent; //oApplication.ItemEvent += OApplication_ItemEvent; oApplication.RightClickEvent += OApplication_RightClickEvent; this.oForm.Visible = true; }
public Picker() { AppHelper.SetApplication(ref this.oApplication); this.oForm = UIHelper.CriarForm(this.oApplication, SAPbouiCOM.BoFormBorderStyle.fbs_Fixed, "PickerForm", "PickerForm", 150, 350, true, 0, "Exemplo de Selecionador", 0, 0, 100, 400); UserDataSourceHelper.AddUserDataSource(this.oForm, "DateDS", SAPbouiCOM.BoDataType.dt_DATE, 254); UserDataSourceHelper.AddUserDataSource(this.oForm, "CalcDS", SAPbouiCOM.BoDataType.dt_PRICE, 254); UserDataSourceHelper.AddUserDataSource(this.oForm, "CLFDS", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 254); AddChooseFromList(); this.oForm.Visible = true; this.oForm.Freeze(true); this.oStaticHead = UIHelper.AddStaticTextAoFormulario(this.oForm, "StaticHead", 7, 350, 8, 44, "São 3 exemplos de selecionar Informações", "EditDate"); this.oEditDate = UIHelper.AddEditTextAoFormulario(this.oForm, "EditDate", 157, 80, 65, 14, "", false, 0, 0); this.oEditDate.DataBind.SetBound(true, "", "DateDS"); this.oStaticDate = UIHelper.AddStaticTextAoFormulario(this.oForm, "StaticDate", 7, 148, 65, 14, "Data:", "EditDate"); this.oEditPrice = UIHelper.AddEditTextAoFormulario(this.oForm, "EditPrice", 157, 80, 46, 14, "", false, 0, 0); this.oEditPrice.DataBind.SetBound(true, "", "CalcDS"); this.oStaticPrice = UIHelper.AddStaticTextAoFormulario(this.oForm, "StatPrice", 7, 148, 46, 14, "Preço:", "EditPrice"); this.oEditCLF = UIHelper.AddEditTextAoFormulario(this.oForm, "EditCLF", 157, 80, 85, 14, "", false, 0, 0); this.oEditCLF.DataBind.SetBound(true, "", "CLFDS"); this.oEditCLF.ChooseFromListUID = "CFL1"; this.oStaticCLF = UIHelper.AddStaticTextAoFormulario(this.oForm, "oStaticCLF", 7, 148, 85, 14, "CLF:", "EditCLF"); this.oApplication.ItemEvent += OApplication_ItemEvent; this.oForm.Freeze(false); }
private void CriarFormulario() { SAPbouiCOM.Item oItem = null; //SAPbouiCOM.Button oButton = null; SAPbouiCOM.StaticText oStaticText = null; SAPbouiCOM.ComboBox oComboBox = null; SAPbouiCOM.EditText oEditText = null; try { this.oForm = this.oApplication.Forms.Add("frmStatusBar", BoFormTypes.ft_Fixed, -1); } catch (COMException ex) { //if (ex.ErrorCode == -7010) //{ // this.oForm = this.oApplication.Forms.Add("frmStatusBar"); //} //else //{ System.Windows.Forms.MessageBox.Show( ex.Message , "Erro" , System.Windows.Forms.MessageBoxButtons.OK , System.Windows.Forms.MessageBoxIcon.Error ); System.Environment.Exit(0); //} } ConfiguraForm( "Exemplo Status Bar" , 400 , 350 , 100 , 80 ); //add botao ok this.oButtonOK = UIHelper.AddBotaoAoFormulario(this.oForm, "1", 6, 65, 53, 19, "OK"); this.oButtonMenssagem = UIHelper.AddBotaoAoFormulario(this.oForm, "BTN_STATUS", 90, 150, 53, 19, "Mostrar Mensagem"); this.oItemRect = UIHelper.AddRectAoFormulario(this.oForm, "Rect1", 0, 344, 1, 45); this.oComboBoxTypeMessage = UIHelper.AddComboBoxAoFormulario(this.oForm, "ComboBox1", 157, 163, 24, 14); this.oEditTextMessage = UIHelper.AddEditTextAoFormulario(this.oForm, "edtMessage", 157, 163, 8, 14); this.oStaticTextMensagem = UIHelper.AddStaticTextAoFormulario(this.oForm, "st01", 7, 148, 8, 14, "Mensagem de texto:", "edtMessage"); this.oStaticTextTipoMensagem = UIHelper.AddStaticTextAoFormulario(this.oForm, "st02", 7, 148, 8, 14, "Mensagem de texto:", "ComboBox1"); this.AddDataSources(); this.oComboBoxTypeMessage.ValidValues.Add(Convert.ToString(BoStatusBarMessageType.smt_Warning), "Warning"); this.oComboBoxTypeMessage.ValidValues.Add(Convert.ToString(BoStatusBarMessageType.smt_Error), "Error"); this.oComboBoxTypeMessage.ValidValues.Add(Convert.ToString(BoStatusBarMessageType.smt_None), "None"); this.oComboBoxTypeMessage.ValidValues.Add(Convert.ToString(BoStatusBarMessageType.smt_Success), "Sucess"); this.oComboBoxTypeMessage.Select(0, BoSearchKey.psk_Index); }