// Use this for initialization void Start() { if (this.GetComponent <AudioSource>() != null) { audio = this.GetComponent <AudioSource>(); } scene = this.GetComponent <SceneManagement>(); fade = GameObject.Find("FadePanel").GetComponent <FadeScript>(); if (SceneManager.GetActiveScene().name == "SelectScene") { menu = GameObject.Find("SelectSceneObj").GetComponent <MenuEvent>(); enter = GameObject.Find("SelectSceneObj").GetComponent <CancelScript>(); //select = GameObject.Find("P1Image").GetComponent<CharacterSelect>(); //select2 = GameObject.Find("P2Image").GetComponent<CharacterSelect>(); } if (SceneManager.GetActiveScene().name == "PlayMenuScene") { datare = GameObject.Find("GameSystem").GetComponent <DataRetention>(); } if (SceneManager.GetActiveScene().name == "PlayScene" || SceneManager.GetActiveScene().name == "PlayMenuScene") { sys = GameObject.Find("GameSystem").GetComponent <PlayMenuSystem>(); } if (SceneManager.GetActiveScene().name == "PlayMenuScene") { sys = GameObject.Find("PlayMenuSystemObj").GetComponent <PlayMenuSystem>(); } //Debug.Log("sys:" + sys); //Debug.Log("datare:" + datare); sceneFlagMenu = false; }
public static void CatchMenuEvent(ref MenuEvent pVal, out bool bubbleEvent) { bubbleEvent = true; try { if (pVal.BeforeAction) { if (MenuClick_Before != null) { MenuClick_Before(ref pVal, ref bubbleEvent); } } else { if (MenuClick_After != null) { MenuClick_After(ref pVal, ref bubbleEvent); } } } catch (Exception ex) { B1Exception.throwException("Erro evento de Menu:", ex); } }
private void MenuClickFilterBefore(ref MenuEvent pVal, ref bool bubbleEvent) { if (this.menuUid.Contains(pVal.MenuUID)) { MenuClick_Before(ref pVal, ref bubbleEvent); } }
private void LoadInternalPane(MenuEvent details) { if (details.Command == null) { return; } try { Framework.EventBus.Publish(new PanelEvent(this)); if (details.Command == "errorPane") { this.errorPane.Show(this.dockManager); this.errorPane.Activate(); } else if (details.Command == "outputPane") { this.outputPane.Show(this.dockManager); this.outputPane.Activate(); } } catch (Exception error) { Framework.EventBus.Publish(error); } }
public void TriggerMenuEvent() { MenuEvent evt = Events.MenuEvent; evt.MenuEventAction = MenuEventAction; EventManager.Broadcast(evt); }
private void DispatchForm(MenuEventAttribute menuEvent, ref MenuEvent pVal, out bool BubbleEvent) { BubbleEvent = true; // Prevent event from running twice. if (!pVal.BeforeAction) { return; } try { var obj = ContainerManager.Container.Resolve(menuEvent.OriginalType); if (obj is FormBase || obj is DoverFormBase) { Logger.Debug(DebugString.Format(Messages.MenuDispatchInfo, pVal.MenuUID, menuEvent.OriginalType)); var method = menuEvent.OriginalType.GetMethod("Show"); method.Invoke(obj, null); } else if (menuEvent.OriginalMethod != null && menuEvent.OriginalMethod.GetGenericArguments().Count() == 0) { Logger.Debug(DebugString.Format(Messages.MenuDispatchInfo, pVal.MenuUID, menuEvent.OriginalMethod)); menuEvent.OriginalMethod.Invoke(obj, null); } else { Logger.Debug(DebugString.Format(Messages.FileMissing, menuEvent.OriginalType, "?")); } } catch (Exception e) { Logger.Error(String.Format(Messages.MenuDispatchError, pVal.MenuUID, e.Message), e); } }
public void MenuEventAction() { if (MenuEvent != null) { MenuEvent.Invoke(); } }
public void SBO_Application_MenuEvent(ref MenuEvent oMenuEvent, SAPbobsCOM.Company sbo_company, ref Application sbo_application, out bool bBubbleEvent, string sessionId) { bBubbleEvent = true; if (oMenuEvent.BeforeAction) { switch (oMenuEvent.MenuUID) { case MenuPlugin.MenuUID: frm.FormLoad(ref oMenuEvent, sbo_company, ref sbo_application, out bBubbleEvent, sessionId); break; case "1292": frm.MenuEventHandler(ref oMenuEvent, sbo_company, ref sbo_application, out bBubbleEvent, sessionId); break; case "1293": frm.MenuEventHandler(ref oMenuEvent, sbo_company, ref sbo_application, out bBubbleEvent, sessionId); break; default: break; } } else { } }
}//fin FormEvent public new void MenuEvent(ref MenuEvent pVal, ref Boolean BubbleEvent) { //Int32 Entry; base.MenuEvent(ref pVal, ref BubbleEvent); try { //1281 Buscar; //1282 Crear //1284 cancelar; //1285 Restablecer; //1286 Cerrar; //1288 Registro siguiente; //1289 Registro anterior; //1290 Primer Registro; //1291 Ultimo Registro; if ((pVal.MenuUID != "") && (pVal.BeforeAction == false)) { if ((pVal.MenuUID == "1288") || (pVal.MenuUID == "1289") || (pVal.MenuUID == "1290") || (pVal.MenuUID == "1291")) { } } if ((pVal.MenuUID == "1282") || (pVal.MenuUID == "1281")) { } } catch (Exception e) { FSBOApp.MessageBox(e.Message + " ** Trace: " + e.StackTrace, 1, "Ok", "", ""); OutLog("MenuEvent: " + e.Message + " ** Trace: " + e.StackTrace); } }//fin MenuEvent
private static void Application_MenuEvent(ref MenuEvent pVal, out bool bubbleEvent) { bubbleEvent = true; if (pVal.BeforeAction) { return; } var menuId = pVal.MenuUID; var menuEvent = AddonMenuEvents.FirstOrDefault(e => e.MenuId == menuId); if (menuEvent == null) { return; } if (menuEvent.ThreadedAction) { var thread = new Thread(() => menuEvent.Action()) { Name = menuEvent.MenuId, IsBackground = true }; thread.SetApartmentState(ApartmentState.STA); thread.Start(); } else { menuEvent.Action(); } }
void Start() { //Resourcesからモデルを拝借 aoiModel = (GameObject)Resources.Load("Model/Aoi"); hikariModel = (GameObject)Resources.Load("Model/Hikari"); xionModel = (GameObject)Resources.Load("Model/Xion"); chloeModel = (GameObject)Resources.Load("Model/Chloe"); shiroganeModel = (GameObject)Resources.Load("Model/Shirogane"); mariModel = (GameObject)Resources.Load("Model/Mari"); frame1 = GameObject.FindGameObjectWithTag("frame1"); frame2 = GameObject.FindGameObjectWithTag("frame2"); start = GameObject.Find("StartImage").GetComponent <StartGameAnime>(); gameData = GameObject.Find("GameSystem").GetComponent <DataRetention>(); sceneFlag1 = true; sceneFlag2 = true; controlFlag1P = true; controlFlag2P = true; stayFlag = true; rect = GetComponent <RectTransform>(); menuFlag = GameObject.Find("SelectSceneObj").GetComponent <MenuEvent>(); enter = GameObject.Find("SelectSceneObj").GetComponent <CancelScript>(); controlFlag = true; player_One = GameObject.FindGameObjectWithTag("icon1"); player_Two = GameObject.FindGameObjectWithTag("icon2"); // オフセット値をアイコンのサイズの半分で設定 offset = new Vector2(rect.sizeDelta.x / 2f, rect.sizeDelta.y / 2f); if (controller > 0) { controllerName = Input.GetJoystickNames()[controller - 1]; } pvcController = 0; }
private void LogEvent(MenuEvent e) { if (e.LoggingLevel <= LoggingLevel) { Debug.Log(e.Description); } }
public virtual void ET_OnAfterMenuClick(MenuEvent pVal) { oForm.Freeze(true); this.Act1_FormInit(); oForm.Freeze(false); // ADD YOUR ACTION CODE HERE ... }
protected void OnDestroy() { GameOverEvent.UnregisterListener(GameOver); GameWonEvent.UnregisterListener(GameWon); GameStartEvent.UnregisterListener(GameStart); MenuEvent.UnregisterListener(Menu); }
private void OApplication_MenuEvent(ref MenuEvent pVal, out bool BubbleEvent) { BubbleEvent = true; if ((pVal.MenuUID.Equals("menu02")) & (!pVal.BeforeAction)) { oApplication.MessageBox("Meu sub menu foi clicado!", 1, "", "OK", ""); try { oForm = oApplication.Forms.Item("myMenuForm"); oApplication.MessageBox("O formulário ja existe", 1, "OK", "", ""); } catch { oForm = null; oForm = oApplication.Forms.Add("MyMenuForm", BoFormTypes.ft_Sizable, -1); oForm.Title = "Novo Sub Menu Item"; oForm.Left = 400; oForm.Top = 100; oForm.Visible = true; addMenuItemsToForm(oForm); } } else if ((pVal.MenuUID.Equals("menuGoTo1")) & (!pVal.BeforeAction)) { oApplication.MessageBox("Menu GoTo1 foi clicado", 1, "OK", "", ""); } else if ((pVal.MenuUID.Equals("menuGoTo2")) & (!pVal.BeforeAction)) { oApplication.MessageBox("Menu GoTo2 foi clicado", 1, "OK", "", ""); } }
public WeatherPage(IEventAggregator eventAggregator) { InitializeComponent(); _menuEvent = eventAggregator.GetEvent <MenuEvent>(); _menuEvent.Subscribe(OpenCloseMenu); }
void _menuManager_Added(object sender, MenuEvent e) { ToolStripItemCollection collection = GetMenuCollection(e.At); if (collection == null) { ToolStripItem[] coll = mainMenu.Items.Find(e.Name, true); if (coll.Length == 1) { (coll.FirstOrDefault() as ToolStripMenuItem).DropDownItems.Add(e.Item); } } else { if (e.Insert) { collection.Insert(e.Index, e.Item); } else { collection.Add(e.Item); } Util.Sort(collection); } }
/// <summary> /// Handler for this componets menu entries /// Forwards the event to the message bus for subscribers interest /// </summary> /// <param name = "sender">The menu item that was clicked</param> /// <param name = "e">The event details</param> private void ModulesToolbarsItemClick(object sender, RoutedEventArgs e) { Framework.Panels.AddSideComponent(this.GetSidebarControl(), this.GetComponentSideBarName(), this.GetIcon()); var eventDetails = new MenuEvent(sender, "new"); Framework.EventBus.Publish(eventDetails); }
public virtual void ET_OnAfterMenuClick(MenuEvent pVal) { oForm = B1Connections.theAppl.Forms.Item(formuid); oForm.Freeze(true); this.Act1_FormInit(oForm); oForm.Freeze(false); // ADD YOUR ACTION CODE HERE ... }
public void PushOpenMenuToStack(MenuEvent newMenu) { // If new open menu level is same within menu stack, pop old one and push again. (Reset) if (menuEscStack.Count != 0 && menuEscStack.Peek().CheckMenuLevelSame(newMenu)) { menuEscStack.Pop(); } menuEscStack.Push(newMenu); }
public bool CheckMenuLevelSame(MenuEvent newMenu) { if (newMenu.menuLevel.mainLevel == menuLevel.mainLevel && newMenu.menuLevel.subLevel == menuLevel.subLevel) { return(true); } return(false); }
public virtual void oApplication_MenuEvent(ref MenuEvent pVal, out bool BubbleEvent) { BubbleEvent = true; try { if (oForm == null || oApplication.Forms.ActiveForm.UniqueID != oForm.UniqueID) { isActiveForm = false; } else { isActiveForm = true; } BubbleEvent = true; if (pVal.BeforeAction) { if (pVal.MenuUID == "5890") { if (activeMatrixId != "") { updateFormSetting(activeMatrixId); } } } else { if (pVal.MenuUID == "1282" && isActiveForm) { AddNewRecord(); } if (pVal.MenuUID == "1288" && isActiveForm) { getNextRecord(); } if (pVal.MenuUID == "1289" && isActiveForm) { getPreviouRecord(); } if (pVal.MenuUID == "1290" && isActiveForm) { getFirstRecord(); } if (pVal.MenuUID == "1291" && isActiveForm) { getLastRecord(); } if (pVal.MenuUID == "1281" && isActiveForm) { FindRecordMode(); } } } catch (Exception ex) { } }
}//fin FormDataEvent public new void MenuEvent(ref MenuEvent pVal, ref Boolean BubbleEvent) { SAPbouiCOM.ComboBox oCombo; SAPbouiCOM.EditText oEditText; base.MenuEvent(ref pVal, ref BubbleEvent); try { //1281 Buscar; //1282 Crear //1284 cancelar; //1285 Restablecer; //1286 Cerrar; //1288 Registro siguiente; //1289 Registro anterior; //1290 Primer Registro; //1291 Ultimo Registro; if ((pVal.MenuUID != "") && (pVal.BeforeAction == false)) { if (pVal.MenuUID == "1282") { oCombo = (ComboBox)(oForm.Items.Item("TipoDoc").Specific); oCombo.Select("01", BoSearchKey.psk_ByValue); oEditText = (EditText)(oForm.Items.Item("FDesde").Specific); oEditText.Value = "";// DateTime.Now.ToString("yyyyMMdd"); oEditText = (EditText)(oForm.Items.Item("FHasta").Specific); oEditText.Value = ""; // DateTime.Now.ToString("yyyyMMdd"); oEditText = (EditText)(oForm.Items.Item("Serie").Specific); oEditText.Value = ""; oEditText = (EditText)(oForm.Items.Item("CDesde").Specific); oEditText.Value = ""; oEditText = (EditText)(oForm.Items.Item("CHasta").Specific); oEditText.Value = ""; oForm.Items.Item("btnBuscar").Enabled = true; } if ((pVal.MenuUID == "1281") || (pVal.MenuUID == "1284") || (pVal.MenuUID == "1285") || (pVal.MenuUID == "1286") || (pVal.MenuUID == "1288") || (pVal.MenuUID == "1289") || (pVal.MenuUID == "1290") || (pVal.MenuUID == "1291")) { oForm.Items.Item("btnBuscar").Enabled = false; } } } catch (Exception e) { FSBOApp.MessageBox(e.Message + " ** Trace: " + e.StackTrace, 1, "Ok", "", ""); OutLog("MenuEvent: " + e.Message + " ** Trace: " + e.StackTrace); } }//fin MenuEvent
/// <summary> /// Takes the exit menu item click events and publishes it to subscribers /// </summary> /// <param name = "sender">The object that raised the event</param> /// <param name = "e">The event arguments</param> private void MenuItemExitClick(object sender, RoutedEventArgs e) { try { var eventDetails = new MenuEvent(sender, "exit"); Framework.EventBus.Publish(eventDetails); } catch (Exception error) { Framework.EventBus.Publish(error); } }
private void OApplication_MenuEvent(ref MenuEvent pVal, out bool BubbleEvent) { BubbleEvent = true; if (pVal.BeforeAction) { oApplication.SetStatusBarMessage("Menu Item: " + pVal.MenuUID + "Before", SAPbouiCOM.BoMessageTime.bmt_Long, true); } else { oApplication.SetStatusBarMessage("Menu Item:" + pVal.MenuUID + ", Depois", SAPbouiCOM.BoMessageTime.bmt_Long, true); } }
void CreateConfirmationWindow(MenuEvent window_event) { GameObject cam = GameObject.FindGameObjectWithTag("MainCamera"); Vector3 position = new Vector3(cam.transform.position.x, cam.transform.position.y, -1); confirmation_window = (GameObject)Instantiate(confirmation_window_reference, position, Quaternion.identity); confirmation_window.SendMessage("SetWindow", window_event); confirmation_window.transform.parent = transform; last_screen = screen; screen = Screen.Confirmation; }
public void SBO_Application_MenuEvent(ref MenuEvent oMenuEvent, SAPbobsCOM.Company sbo_company, ref Application sbo_application, out bool bBubbleEvent, string sessionId) { bBubbleEvent = true; if (oMenuEvent.BeforeAction) { switch (oMenuEvent.MenuUID) { case MenuPlugin.MenuUID: break; } } }
/// <summary> /// Catch menu button pressed /// </summary> /// <param name="pVal"></param> /// <param name="BubbleEvent"></param> private void Application_MenuEvent(ref MenuEvent pVal, out bool BubbleEvent) { BubbleEvent = true; if (pVal.BeforeAction == true) { Application.SetStatusBarMessage("Menu item: " + pVal.MenuUID + " sent an event BEFORE SAP Business One processes it.", BoMessageTime.bmt_Long, true); // BubbleEvent = False } else { Application.SetStatusBarMessage("Menu item: " + pVal.MenuUID + " sent an event AFTER SAP Business One processes it.", BoMessageTime.bmt_Long, true); } }
protected void Awake() { button = GetComponent <Button>(); if (button == null) { Debug.LogError($"{name} does not have an attached button component!"); } // Register listeners PauseEvent.RegisterListener(GamePaused); MenuEvent.RegisterListener(Menu); }
internal static void MenuEventHandler(ref MenuEvent oMenuEvent, SAPbobsCOM.Company sbo_company, ref Application sbo_application, out bool bBubbleEvent, string sessionId) { bBubbleEvent = true; if (!oMenuEvent.BeforeAction) { Form oForm; try { oForm = sbo_application.Forms.ActiveForm as Form; } catch { return; } if (oForm.TypeEx == pluginForm.FormType) { switch (oMenuEvent.MenuUID) { case SAPMenu.New: try { oForm.Freeze(true); } catch (Exception e) { sbo_application.MessageBox(e.Message); } finally { oForm.Freeze(false); } break; case SAPMenu.Find: try { oForm.Freeze(true); } catch (Exception e) { sbo_application.MessageBox(e.Message); } finally { oForm.Freeze(false); } break; case UserMenu.DeleteRow: try { oForm.Freeze(true); Menus Menus = sbo_application.Menus; if (Menus.Exists(UserMenu.DeleteRow)) { Menus.RemoveEx(UserMenu.DeleteRow); } } catch (Exception e) { sbo_application.MessageBox(e.Message); } finally { oForm.Freeze(false); } break; } } } }
public virtual void ET_AFDataMenu_Add(MenuEvent pVal) { oForm = B1Connections.theAppl.Forms.ActiveForm; // ADD YOUR ACTION CODE HERE ... try { SetAddedDefualtFormat(); } catch (Exception ex) { B1Connections.theAppl.StatusBar.SetText(ex.Message, BoMessageTime.bmt_Short, BoStatusBarMessageType.smt_Error); } }
protected void Awake() { button = GetComponent <Button>(); if (button == null) { Debug.LogError($"{name}: unable to find button component!"); } // Register listeners GameStartEvent.RegisterListener(GameStart); GameOverEvent.RegisterListener(GameOver); MenuEvent.RegisterListener(Menu); }
/// <summary> /// Delete row in Fix Discount /// </summary> public void MenuEvent_FixDiscDel(ref MenuEvent pVal, ref bool bubbleEvent) { if (pVal.BeforeAction == true) { Form oForm = oSBOApplication.Forms.ActiveForm; if (oForm.TypeEx == "FIXDISC") { try { oForm.Freeze(true); string mtxName = string.Empty; string dataSource = string.Empty; switch (oForm.ActiveItem) { case "mt_1": mtxName = "mt_1"; dataSource = "@SOL_FIXDISC_D1"; break; case "mt_2": mtxName = "mt_2"; dataSource = "@SOL_FIXDISC_D2"; break; } Matrix oMtx = oForm.Items.Item(mtxName).Specific; oMtx.FlushToDataSource(); try { oMtx.DeleteRow(GeneralVariables.iDelRow); } catch (Exception ex) { } for (int i = 1; i <= oMtx.RowCount; i++) { oMtx.Columns.Item("#").Cells.Item(i).Specific.value = i; } RefreshMatrix(oForm, mtxName, dataSource); Utils.releaseObject(oMtx); } catch (Exception ex) { oSBOApplication.MessageBox(ex.Message); } finally { oForm.Freeze(false); Utils.releaseObject(oForm); } } } }
internal void sapApp_MenuEvent(ref MenuEvent pVal, out bool BubbleEvent) { BubbleEvent = true; List<MenuEventAttribute> events; menuEvents.TryGetValue(pVal.MenuUID, out events); if (events != null) { foreach (var e in events) { DispatchForm(e, ref pVal, out BubbleEvent); } } }
public virtual bool ET_BFDataMenu_Remove(MenuEvent pVal) { oForm = B1Connections.theAppl.Forms.ActiveForm; // ADD YOUR ACTION CODE HERE ... // 입금내역 있으면 지로청구 자료 삭제 불가 return DeleteDoc(oForm); //return true; }
public virtual void ET_AF_SUB_BASEDOC(MenuEvent pVal) { // ADD YOUR ACTION CODE HERE ... oForm = B1Connections.theAppl.Forms.ActiveForm; //try //{ // string ObjectType = oForm.DataSources.UserDataSources.Item("ObjectType").ValueEx; // string BaseEntry = oForm.DataSources.UserDataSources.Item("BaseEntry").ValueEx; // if (ObjectType == "KIS_BT0040") // { // LoadSubForm(oForm, "KIS_BT0030", BaseEntry); // } //} //catch (Exception ex) //{ // B1Connections.theAppl.StatusBar.SetText(ex.Message, BoMessageTime.bmt_Short, BoStatusBarMessageType.smt_Error); //} }
public virtual void ET_AF_SUB_TARGETDOC(MenuEvent pVal) { oForm = B1Connections.theAppl.Forms.ActiveForm; // ADD YOUR ACTION CODE HERE ... try { int oMatrixRow = oMatrix.GetNextSelectedRow(); string U_TTYPE = ((SAPbouiCOM.EditText)oMatrix.GetCellSpecific("U_TTYPE", oMatrixRow)).Value.Trim();//대상문서 string U_TENTRY = ((SAPbouiCOM.EditText)oMatrix.GetCellSpecific("U_TENTRY", oMatrixRow)).Value.Trim();//대상문서 switch (U_TTYPE) { case "KIS_SD0050_HRD": LoadSubForm(oForm, U_TTYPE, U_TENTRY); break; default: break; } } catch (Exception ex) { B1Connections.theAppl.StatusBar.SetText(ex.Message, BoMessageTime.bmt_Short, BoStatusBarMessageType.smt_Error); } }
public virtual bool ET_BFDataMenu_Find(MenuEvent pVal) { oForm = B1Connections.theAppl.Forms.ActiveForm; // ADD YOUR ACTION CODE HERE ... FN.SetUserDateSource_Clear(ref oForm); return true; }
public virtual void ET_AFRowDataMenu_Delete(MenuEvent pVal) { oForm = B1Connections.theAppl.Forms.ActiveForm; // ADD YOUR ACTION CODE HERE ... oForm.Freeze(true); try { /*빈 라인 삭제*/ FN.SetMatrixDeleteRow(ref oForm, ref oMatrix); /*행추가*/ SetMatrixAddRow(FN.RowSelectMode.None); /*삭제후 다시 문서 총계*/ SetMatrixCalc_Sum(); if (oForm.Mode == BoFormMode.fm_OK_MODE) oForm.Mode = BoFormMode.fm_UPDATE_MODE; } catch (Exception ex) { B1Connections.theAppl.StatusBar.SetText(ex.Message, SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error); ; } finally { oForm.Freeze(false); } }
public virtual bool ET_BFRowDataMenu_Delete(MenuEvent pVal) { oForm = B1Connections.theAppl.Forms.ActiveForm; // ADD YOUR ACTION CODE HERE ... //oDB_M = oForm.DataSources.DBDataSources.Item("@KIS_SO0420T_HRD"); string strSTATUS = oForm.DataSources.UserDataSources.Item("U_STATUS").Value; if (strSTATUS == "R") return false; else { oForm.EnableMenu(SO.MenuProperty.DeleteRow, false); return true; } }
public virtual void ET_AFRowDataMenu_Add(MenuEvent pVal) { oForm = B1Connections.theAppl.Forms.ActiveForm; // ADD YOUR ACTION CODE HERE ... oMatrix = (SAPbouiCOM.Matrix)oForm.Items.Item("mtx").Specific; oDB_1 = (SAPbouiCOM.DBDataSource)oForm.DataSources.DBDataSources.Item("@KIS_FI00101_HRD"); FN.SetMatrixAddRow(ref oForm, ref oMatrix, ref oDB_1, FN.RowSelectMode.SelectedLine, "U_PRCCD"); }
public virtual bool ET_BFDataMenu_Remove(MenuEvent pVal) { oForm = B1Connections.theAppl.Forms.ActiveForm; // ADD YOUR ACTION CODE HERE ... if (GetBefore_Remove_Validation() == false) { return false; } return true; }
///<summary> /// Show menu, supply member if member information /// should be shown above menu. /// </summary> public void ShowMenu(MenuEvent menuId, Model.Member member) { Menu menu = _baseMenu.GetSubMenu((int)menuId); // true Menu for menuId exists. if(menu != null) { _currentMenu = menu; System.Console.Clear(); if (member != null) { PrintHeader("Member Information"); PrintMemberInfo(member); System.Console.WriteLine(); } PrintHeader(menu.Header); foreach (View.MenuItem i in menu.GetItems()) { System.Console.WriteLine("{0}. {1}", menu.GetListIndex(i), i.Title); } } }
public virtual void ET_AFRowDataMenu_Delete(MenuEvent pVal) { oForm = B1Connections.theAppl.Forms.ActiveForm; // ADD YOUR ACTION CODE HERE ... try { oMatrix = (SAPbouiCOM.Matrix)oForm.Items.Item(gSelMtx).Specific; oForm.Freeze(true); oMatrix.AddRow(1, -1); int i = oMatrix.VisualRowCount; oMatrix.DeleteRow(i); oMatrix.FlushToDataSource(); if (gSelMtx == "mtx1_DUMY") { gDeliverySelect = -1; // 1. 삭제된뒤 DataTable의 Index값을 다시 설정한다. SetDataTableReIndexing_Deliver(); // 2. 다시 DataTable 기준으로 화면에 조회한다. FindData(oForm); } else { // 1. 삭제된뒤 DataTable의 Index값을 다시 설정한다. SetDataTableReIndexing_Call(); // 2. 다시 DataTable 기준으로 화면에 조회한다. FindSubData(oForm, GetSelectedMatrixRowIndex(oForm)); } oForm.Freeze(false); } catch (Exception) { throw; } }
public virtual void ET_AFDataMenu_Add(MenuEvent pVal) { oForm = B1Connections.theAppl.Forms.ActiveForm; // ADD YOUR ACTION CODE HERE ... SetDefultMasterData(oForm); }
public virtual void ET_AFRowDataMenu_Add(MenuEvent pVal) { oForm = B1Connections.theAppl.Forms.ActiveForm; // ADD YOUR ACTION CODE HERE ... string strCode = string.Empty; string strDELIVCD = string.Empty; if (gSelMtx == "mtx1_DUMY") { oMatrix = (SAPbouiCOM.Matrix)oForm.Items.Item(gSelMtx).Specific; oDB1_Z = (SAPbouiCOM.DBDataSource)oForm.DataSources.DBDataSources.Item("@KIS_SO00301Z_HRD"); // 배달코드 생성 strDELIVCD = GetMaxDelivCode(oForm); // SystemDataTable에 행 추가하고 추가된 Index값을 리턴받는다. int index = AddRowDataTable_DELIVER(oForm, strDELIVCD); SetMatrixAddRow(ref oForm, ref oMatrix, ref oDB1_Z, index.ToString(), strDELIVCD, "U_DELVCD"); } else { // 배달리스트에서 선택된 라인의 배달코드 oMatrix = (SAPbouiCOM.Matrix)oForm.Items.Item("mtx1_DUMY").Specific; int iSelectIndex = oMatrix.GetNextSelectedRow(0, BoOrderType.ot_RowOrder); strDELIVCD = FN.GetMatirxCellValue(ref oMatrix, "U_DELVCD", iSelectIndex); oDB2_Z = (SAPbouiCOM.DBDataSource)oForm.DataSources.DBDataSources.Item("@KIS_SO00302Z_HRD"); // SystemDataTable에 행 추가하고 추가된 Index값을 리턴받는다. int index = AddRowDataTable_CALL(oForm, strDELIVCD); oMatrix = (SAPbouiCOM.Matrix)oForm.Items.Item("mtx2_DUMY").Specific; SetMatrixAddRow(ref oForm, ref oMatrix, ref oDB2_Z, index.ToString(), strDELIVCD, "U_DELVCD"); // 상담리스트에 행추가하고 선택된 행의 Index 값을 가져와서 선택된 행의 수정여부를 수정한다. iSelectIndex = oMatrix.GetNextSelectedRow(0, BoOrderType.ot_RowOrder); oMatrix.CommonSetting.SetCellEditable(iSelectIndex, gCallTp_IDX, true);// 콜유형 oMatrix.CommonSetting.SetCellEditable(iSelectIndex, gComment_IDX, true);// 접수내용 } B1Connections.theAppl.StatusBar.SetText(pVal.MenuUID.ToString(), SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_None); }
public virtual void ET_AFDataMenu_Find(MenuEvent pVal) { oForm = B1Connections.theAppl.Forms.ActiveForm; // ADD YOUR ACTION CODE HERE ... SetStatic_ClearCaption(); }
public virtual void ET_AFRowDataMenu_Delete(MenuEvent pVal) { oForm = B1Connections.theAppl.Forms.ActiveForm; // ADD YOUR ACTION CODE HERE ... try { oMatrix = (SAPbouiCOM.Matrix)oForm.Items.Item("mtx").Specific; oForm.Freeze(true); oMatrix.AddRow(1, -1); int i = oMatrix.VisualRowCount; oMatrix.DeleteRow(i); oMatrix.FlushToDataSource(); oForm.Freeze(false); } catch (Exception) { throw; } }
public virtual bool ET_BFPrint_Preview(MenuEvent pVal) { oForm = B1Connections.theAppl.Forms.ActiveForm; // ADD YOUR ACTION CODE HERE ... try { Thread PrintThread = new Thread(PrintView); PrintThread.SetApartmentState(ApartmentState.STA); // 작업자 스레드를 시작합니다. PrintThread.Start(); // 작업자 스레드가 활성화될 때까지 반복합니다. while (!PrintThread.IsAlive) ; // 해당 개체의 스레드가 종료될 때까지 Join 메서드를 // 사용하여 현재 스레드를 중단시킵니다. PrintThread.Join(); } catch (Exception ex) { System.Windows.Forms.MessageBox.Show(ex.Message); } return false; }
public virtual void ET_AFDataMenu_Add(MenuEvent pVal) { oForm = B1Connections.theAppl.Forms.ActiveForm; // ADD YOUR ACTION CODE HERE ... oDB_M = oForm.DataSources.DBDataSources.Item("@KIS_FI0010M_HRD"); oDB_1 = oForm.DataSources.DBDataSources.Item("@KIS_FI00101_HRD"); string strNowDate = B1Connections.diCompany.GetCompanyDate().ToShortDateString(); strNowDate = FN.SetDateFormatToDB(strNowDate, FN.eDateType.p_YYYYMMDD); oDB_M.SetValue("U_DOCDATE", 0, strNowDate.Replace(".", "")); oDB_M.SetValue("U_USERID", 0, B1Connections.theAppl.Company.UserName); oComboBox = oForm.Items.Item("cboYYYY").Specific; oComboBox.Select(FN.Left(strNowDate, 4), BoSearchKey.psk_ByValue); oComboBox = oForm.Items.Item("cboTYPE").Specific; oComboBox.Select(0, BoSearchKey.psk_Index); }
public virtual void ET_AFDataMenu_Add(MenuEvent pVal) { oForm = B1Connections.theAppl.Forms.ActiveForm; // ADD YOUR ACTION CODE HERE ... // 입금계좌번호 oForm.Items.Item("edtBNKACCT").Specific.value = FN.GetRecordsetValue("SELECT AcctCode FROM OACT WHERE AcctCode = '11101285'"); oForm.Items.Item("edtBNKATNM").Specific.value = FN.GetRecordsetValue("SELECT AcctName FROM OACT WHERE AcctCode = '11101285'"); }
public virtual void ET_AFDataMenu_Remove(MenuEvent pVal) { oForm = B1Connections.theAppl.Forms.ActiveForm; // ADD YOUR ACTION CODE HERE ... if (oForm.Mode != BoFormMode.fm_OK_MODE) oForm.Mode = BoFormMode.fm_OK_MODE; }
public virtual bool ET_BFRowDataMenu_Add(MenuEvent pVal) { oForm = B1Connections.theAppl.Forms.ActiveForm; bool rtnValue = true; if (gSelMtx == "mtx1_DUMY") { } else { // 배송리스트가 추가된 내역이 있으면 int iCount = 0; var query = from c in gDs.Tables[oForm.UniqueID + "_Deliver"].AsEnumerable() where c.Field<string>("ROWSTATE") == "I" select new { }; iCount = query.Count(); if (iCount > 0) { rtnValue = false; B1Connections.theAppl.StatusBar.SetText("배송리스트에 추가된 내역이 존재 합니다. 갱신후 상담내용을 수정해주세요.! ", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error); } oMatrix = (SAPbouiCOM.Matrix)oForm.Items.Item("mtx1_DUMY").Specific; int iSelectIndex = oMatrix.GetNextSelectedRow(0, BoOrderType.ot_RowOrder); string strDELIVCD = FN.GetMatirxCellValue(ref oMatrix, "U_DELVCD", iSelectIndex); if ((string.IsNullOrEmpty(strDELIVCD)) || sFindTY == "") { rtnValue = false; B1Connections.theAppl.StatusBar.SetText("배송리스트를 선택해주세요! ", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error); } } return rtnValue; }
public virtual bool ET_BFDataMenu_Remove(MenuEvent pVal) { oForm = B1Connections.theAppl.Forms.ActiveForm; // ADD YOUR ACTION CODE HERE ... // 분개 생성시 삭제 불가(역분개시엔 가능) if ((oForm.Items.Item("edtJDTDOC").Specific.value != "") && (oForm.Items.Item("edtRJDTDOC").Specific.value == "")) { B1Connections.theAppl.StatusBar.SetText("해당문서가 사용중이라 삭제할수 없습니다.", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error); return false; } return true; }
public virtual bool ET_BFRowDataMenu_Delete(MenuEvent pVal) { oForm = B1Connections.theAppl.Forms.ActiveForm; // ADD YOUR ACTION CODE HERE ... try { oMatrix = (SAPbouiCOM.Matrix)oForm.Items.Item(gSelMtx).Specific; string strIndex = FN.GetMatirxCellValue(ref oMatrix, "U_IDX", gRowIdx); //string strLineID = gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[int.Parse(strIndex)]["LINEID"].ToString(); string strDeliveryCode = FN.GetMatirxCellValue(ref oMatrix, "U_DELVCD", gRowIdx); int idx = int.Parse(strIndex); if (gSelMtx == "mtx1_DUMY") { //// 메인삭제전 상담이력을 삭제한다. if (DeleteMatrixRows_CALL(strDeliveryCode)) { // 1. DataTable 에서 행삭제 gDs.Tables[oForm.UniqueID + "_Deliver"].Rows.RemoveAt(idx); oMatrix = (SAPbouiCOM.Matrix)oForm.Items.Item("mtx1_ORIG").Specific; if (oMatrix.VisualRowCount > idx) { //ExportDataSetToFiles(); // 화면단에서 행추가한건에대해서 원본메트릭스에서 삭제하지 않는다. // 2. 원본 데이터 삭제 oMatrix.DeleteRow(idx + 1); oMatrix.FlushToDataSource(); } // 3. 구독부수 재계산하고 적용한다. SetSumNumberOfCofies(oForm); } else return false; } else { oMatrix = (SAPbouiCOM.Matrix)oForm.Items.Item("mtx2_ORIG").Specific; // 1. DataTable 에서 행삭제 gDs.Tables[oForm.UniqueID + "_Call"].Rows.RemoveAt(idx); if (oMatrix.VisualRowCount > idx) { // 2. 원본 데이터 삭제 oMatrix.DeleteRow(idx + 1); oMatrix.FlushToDataSource(); } } } catch (Exception) { throw; } return true; }
public virtual void ET_AFDataMenu_Remove(MenuEvent pVal) { oForm = B1Connections.theAppl.Forms.ActiveForm; // ADD YOUR ACTION CODE HERE ... }
public virtual bool ET_BFDataMenu_Remove(MenuEvent pVal) { oForm = B1Connections.theAppl.Forms.ActiveForm; // ADD YOUR ACTION CODE HERE ... try { if (B1Connections.theAppl.MessageBox(" 독자코드 전체를 삭제하시겠습니까? ", 1, "예", "아니오", "") != 1) { return false; } oDB_M = oForm.DataSources.DBDataSources.Item("@KIS_SO0030M_HRD"); if (SO.SO_COMMON_HRD.Authority == SO.SO_COMMON_HRD.AuthorityType.H_Manager) { if (!oDB_M.GetValue("Code", 0).Trim().StartsWith("H")) { B1Connections.theAppl.StatusBar.SetText("삭제 권한이 없습니다.", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error); return false; } } else if (SO.SO_COMMON_HRD.Authority == SO.SO_COMMON_HRD.AuthorityType.J_Manager) { if (!oDB_M.GetValue("Code", 0).Trim().StartsWith("J")) { B1Connections.theAppl.StatusBar.SetText("삭제 권한이 없습니다.", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error); return false; } } else { B1Connections.theAppl.StatusBar.SetText("삭제 권한이 없습니다.", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error); return false; } string strExists = FN.GetRecordsetValue(string.Format(" SELECT COUNT(1) FROM [@KIS_SO01401_HRD] WHERE U_READCD = '{0}' ", oDB_M.GetValue("Code", 0).Trim())); if (int.Parse(strExists) > 0) { B1Connections.theAppl.StatusBar.SetText("트랜젝션이 발생한 데이터는 삭제 할 수 없습니다.", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error); return false; } } catch (Exception) { throw; } return true; }
public virtual void ET_AFRowDataMenu_Delete(MenuEvent pVal) { oForm = B1Connections.theAppl.Forms.ActiveForm; // ADD YOUR ACTION CODE HERE ... oMatrix.FlushToDataSource(); oMatrix.LoadFromDataSource(); }
public virtual bool ET_BFMenuClick(MenuEvent pVal) { // ADD YOUR ACTION CODE HERE ... return this.LoadForm(); }
public void ShowInputInfo(MenuEvent action, Model.Member member) { if(member != null) { System.Console.Clear(); PrintHeader("Member Information"); PrintMemberInfo(member); } System.Console.WriteLine(); switch(action) { case MenuEvent.AddNewMember: PrintHeader("Add new Member"); break; case MenuEvent.MemberInfoMenu: PrintHeader("View Member Info"); break; case MenuEvent.EditMemberName: PrintHeader("Edit Member"); break; case MenuEvent.AddBoat: PrintHeader("Add new Boat"); break; case MenuEvent.EditBoatMenu: case MenuEvent.EditBoatLength: case MenuEvent.EditBoatModel: PrintHeader("Edit Boat"); break; case MenuEvent.DeleteBoat: PrintHeader("Delete Boat"); break; case MenuEvent.DeleteMember: PrintHeader("Delete Member"); break; } }