public int GetCount() { ICPagerDao td = (ICPagerDao)ComponentLocator.Instance().Resolve(key, typeof(ICPagerDao)); int result = td.GetCount(this.key, this.condition); return(result); }
/// <summary> /// 查询按钮按下 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void ruleInquiry_CustomValidationMethod(object sender, CustomValidationEventArgs e) { this.Cursor = Cursors.WaitCursor; CardVo cardvo = new CardVo(); cardvo.IFacCd = this.atxtFactoryCd.Text; cardvo.IDispItemCd = this.atxtDispItemCd.Text; cardvo.IDispItemRev = this.atxtDispItemRev.Text; cardvo.IDlCd = this.atxtCustomerCd.Text; cardvo.IDrwNo = this.txtDrwNo.Text; cardvo.IItemCls = this.clsddlItemCls.Selectedvalue; cardvo.IItemType = this.atxtItemType.Text; cardvo.IMakerCd = this.atxtMakerCd.Text; cardvo.IMntCls = this.clsddlMntCls.Selectedvalue; cardvo.IModel = this.txtModel.Text; cardvo.IQryMtrl = this.txtQryMtrl.Text; cardvo.ISeiban = this.txtSeiban.Text; cardvo.ISpec = this.txtSpec.Text; IAction_MaterialSearch action = ComponentLocator.Instance().Resolve <IAction_MaterialSearch>(); int count = action.GetPmMsDetail(this.FrmMaterialSearch_pagerGridView1, cardvo); if (count == 0) { e.IsValid = false; } else { e.IsValid = true; } this.Cursor = Cursors.Default; }
protected override void LoadContent() { spriteBatch = new SpriteBatch(GraphicsDevice); font = Content.Load <SpriteFont>("arial"); texX = Content.Load <Texture2D>("X"); texO = Content.Load <Texture2D>("O"); texReset = Content.Load <Texture2D>("Reset"); lineTex = new Texture2D(GraphicsDevice, 1, 1); lineTex.SetData <Color>( new Color[] { Color.Black } ); textures = new Dictionary <string, Texture2D>() { { "X", texX }, { "O", texO }, { "Reset", texReset }, { "Line", lineTex } }; ComponentLocator.RegisterTextures(textures); ComponentLocator.RegisterSpriteFonts(new Dictionary <string, SpriteFont>() { { "arial", font } }); ComponentLocator.RegisterGraphicsDeviceManager(graphics); stateManager.ChangeState(new MainMenu(stateManager)); }
public void Draw(SpriteBatch spriteBatch, GameTime gameTime) { if (!board.IsGameOver()) { spriteBatch.DrawString(ComponentLocator.FindFont("arial"), "Current Turn: " + GetPlayerTurnText(), new Vector2(10, 10), Color.White); } else { string text = ""; if (board.GetGameState() == Board.State.Draw) { text = "Draw"; } else if (board.GetGameState() == Board.State.PlayerXWins) { text = "Player X Wins"; } else if (board.GetGameState() == Board.State.PlayerOWins) { text = "Player O Wins"; } Point textSize = ComponentLocator.FindFont("arial").MeasureString(text).ToPoint(); Point position = new Point(screenCenter.X, screenCenter.Y) - textSize / new Point(2, 2) + new Point(0, -150); spriteBatch.DrawString(ComponentLocator.FindFont("arial"), text, position.ToVector2(), Color.White); } drawLines(spriteBatch); drawBoard(spriteBatch, board); spriteBatch.Draw(ComponentLocator.FindTexture("Reset"), reset, Color.White); //drawDebug(spriteBatch); }
private void drawDebug(SpriteBatch spriteBatch) { foreach (KeyValuePair <Point, Rectangle> boundingBox in boundingBoxes) { spriteBatch.Draw(ComponentLocator.FindTexture("Reset"), boundingBox.Value, Color.Red); } }
/// <summary> /// 根据画面输入条件,抽出数据 /// </summary> private void LoadData() { IAction_Factory ac = ComponentLocator.Instance().Resolve <IAction_Factory>(); TFactoryMs facVo = ac.GetFactoryByCd(this.txtFactory.Text); this.SetVoToForm(facVo); }
private void Awake() { ComponentLocator.Resolve <Updater>().Register(UpdateType.Late, this); cachedTransform = transform; IsEnabled = target != null; }
public IList <FunctionAllVo> GetCatalogFunctionByUserId(string userid) { IList <FunctionAllVo> functionallvolist = new List <FunctionAllVo>(); ICCatalogFunctionNoARDao dao = ComponentLocator.Instance().Resolve <ICCatalogFunctionNoARDao>(); IList <CCatalogFunctionNoAR> catalogfunctionlist = dao.GetCatalogFunctionByUserId(LangUtils.GetCurrentLanguage(), userid); int oldcatalogid = -1; foreach (CCatalogFunctionNoAR vo in catalogfunctionlist) { if (vo.Catalogid != oldcatalogid) { FunctionAllVo allvo = new FunctionAllVo(); allvo.Catalogid = vo.Catalogid; allvo.Catalogimage = vo.Catalogimage; allvo.Catalogname = vo.Catalogname; IList <FunctionVo> funclist = new List <FunctionVo>(); allvo.Functionlist = funclist; functionallvolist.Add(allvo); oldcatalogid = vo.Catalogid; } FunctionVo fvo = new FunctionVo(); fvo.Catalogid = vo.Catalogid; fvo.Functionid = vo.Functionid; fvo.Functionimage = vo.Functionimage; fvo.Functionindex = vo.Functionindex; fvo.Functionname = vo.Functionname; fvo.Functionpath = vo.Functionpath; functionallvolist[functionallvolist.Count - 1].Functionlist.Add(fvo); } return(functionallvolist); }
private void CreateFPSCounter() { var windowsManager = ComponentLocator.Resolve <WindowsManager>(); windowsManager.CreateWindow <GameLoadingWindow>(GameLoadingWindow.prefabPath, Enums.EnumWindowsLayer.Loading); windowsManager.CreateWindow <FPSWindow>(FPSWindow.prefabPath, Enums.EnumWindowsLayer.Special); }
public Boolean SaveDataToStp(String strMode, TFactoryMs facVo) { Boolean rtnValue = true; LoginUserInfoVo uservo = (LoginUserInfoVo)SessionUtils.GetSession(SessionUtils.COMMON_LOGIN_USER_INFO); TFcConditionStp facStp = new TFcConditionStp(); PropertiesCopier.CopyProperties(facVo, facStp); facStp.Id.IJournalNo = 10001; facStp.Id.ICompanyCd = facVo.ICompanyCd; facStp.IPrcsCls = CommonUtil.GET_I_PRCS_CLS(strMode); facStp.IUserId = uservo.Userid; facStp.IPrcsDate = DateTime.Now; facStp.IPrcsTime = DateTime.Now.ToShortTimeString(); facStp.IUpdCls = "0"; facStp.IConditionCd = "000001"; //facStp.IDlCurrCd = card.C4_DL_CURR_CD;//取引通貨 facStp.IDelWhInCd = ""; facStp.IDelWhOutCd = ""; facStp.IRjtWhCd = ""; facStp.INonAllocLocation = ""; facStp.IOsWhCd = ""; facStp.IInspectonLocation = ""; facStp.IPlanCycCls = CommonUtil.NullToSpace(facStp.IPlanCycCls); facStp.IWkTime = CommonUtil.NullToZero(facStp.IWkTime); facStp.IPoCreateCls = CommonUtil.NullToSpace(facStp.IPoCreateCls); facStp.ISalesCls = CommonUtil.NullToSpace(facStp.ISalesCls); facStp.IPoSlcCls = CommonUtil.NullToSpace(facStp.IPoSlcCls); facStp.IMrpCls = CommonUtil.NullToSpace(facStp.IMrpCls); facStp.ILinkFlg = CommonUtil.NullToSpace(facStp.ILinkFlg); facStp.IShipInvCls = CommonUtil.NullToSpace(facStp.IShipInvCls); facStp.IAcpInvCls = CommonUtil.NullToSpace(facStp.IAcpInvCls); facStp.IAmtRecalcCls = CommonUtil.NullToSpace(facStp.IAmtRecalcCls); facStp.IReserve1 = null; facStp.IReserve2 = null; facStp.IReserve3 = null; facStp.ISys1Cls = " "; facStp.ISys2Cls = " "; facStp.ISys3Cls = " "; facStp.IUsr1Cls = " "; facStp.IUsr2Cls = " "; facStp.IUsr3Cls = " "; facStp.IInqItem = null; //facStp.IObjectId = card.C4_OBJECT_ID;//オブジェクトID??? //facStp.IEntryDate = ServerFunction.GetDateTime();//登録日 //facStp.IUpdDate = ServerFunction.GetDateTime();//更新日 facStp.IEntryDate = DateTime.Now; facStp.IUpdDate = DateTime.Now; //facStp.IPgId = PE002201PgInfo._PROGRAM_ID; ;//プログラムID //facStp.IUpdTimestamp = wk_upd_timestamp;//更新タイムスタンプ ITFcConditionStpDao td = ComponentLocator.Instance().Resolve <ITFcConditionStpDao>(); rtnValue = td.Insert(facStp); rtnValue = true; return(rtnValue); }
public void OnClickTest2() { var windowsManager = ComponentLocator.Resolve <WindowsManager.WindowsManager>(); windowsManager.CreateWindow <SpaceShipTestWindow>(SpaceShipTestWindow.prefabPath, Enums.EnumWindowsLayer.Main); Close(); }
public DataSet GetDataSet() { ICPagerDao td = (ICPagerDao)ComponentLocator.Instance().Resolve(key, typeof(ICPagerDao)); DataSet ds = td.GetDataSet(this.key, this.condition, this.pagerSize, (this.currentPage - 1)); _ds = ds; return(ds); }
public LocalFileConfigRepository(string namespaceName, ConfigRepository upstream) { m_namespace = namespaceName; m_configUtil = ComponentLocator.Lookup <ConfigUtil>(); this.PrepareConfigCacheDir(); this.SetUpstreamRepository(upstream); this.TrySync(); }
public static bool NavigateToTextView(IServiceContainer services, IVsTextView vsTextView, int start, int length) { var adapterService = ComponentLocator <IVsEditorAdaptersFactoryService> .Import(services.GetService <ICompositionService>()); var textView = adapterService?.GetWpfTextView(vsTextView); return(textView != null && NavigateToTextView(services, textView, start, length)); }
private void Start() { ComponentLocator.Register(this); Spaceship = GetComponent <SpaceshipController>(); EventManager.DispatchEvent(ConstantEventsName.ON_PLAYER_SPACESHIP_CREATE, this); }
public void Enter() { GraphicsDeviceManager graphics = ComponentLocator.FindGraphicsDeviceManager(); screenCenter = new Point(graphics.PreferredBackBufferWidth / 2, graphics.PreferredBackBufferHeight / 2); reset = new Rectangle(screenCenter.X * 2 - 128, screenCenter.Y * 2 - 128, 64, 64); }
public void OnClickTest() { var windowsManager = ComponentLocator.Resolve <WindowsManager.WindowsManager>(); windowsManager.CreateWindow <TestShootingWindow>(TestShootingWindow.prefabPath, Enums.EnumWindowsLayer.Main); Close(); }
private void doSearch() { IAction_CodeRefWarehouse ac = ComponentLocator.Instance().Resolve <IAction_CodeRefWarehouse>(); DataSet ds = ac.GetWarehouseDataSet(this.facCd, this.strWhere, this.txtWHCd.Text, this.txtWHDesc.Text); this.dataGridView1.DataSource = ds; this.dataGridView1.DataMember = "CCodeRefWarehouse"; SetColumnsAlias(); }
public static IEnumerable <IVocabulary> GetAllVocabularies() { if (_vocabularies == null) { _vocabularies = ComponentLocator <IVocabulary> .ImportMany(); } return(_vocabularies.Select(v => v.Value)); }
public TFactoryMs GetFactoryByCd(String facCd) { TFactoryMs facVo = new TFactoryMs(); ITFactoryMsDao td = ComponentLocator.Instance().Resolve <ITFactoryMsDao>(); facVo = td.getFactoryByCd(facCd); return(facVo); }
private void doSearch() { IAction_CodeRefSection ac = ComponentLocator.Instance().Resolve <IAction_CodeRefSection>(); DataSet ds = ac.GetSectionDataSet(companyCd, this.txtSecCd.Text, this.txtSecDesc.Text); this.dataGridView1.DataSource = ds; this.dataGridView1.DataMember = "CCodeRefSection"; SetColumnsAlias(); }
public GameplayCameraStandaloneAdapter(bool _enabled) : base(_enabled) { EventManager.AddEventListener(ConstantEventsName.ON_GAMEPLAY_CAMERA_ENABLE, OnGameplayCameraEnableHandler); camera = ComponentLocator.Resolve <GameplayCameraController>(); if (camera == null) { SetEnable(false); } }
protected override void Awake() { base.Awake(); if (component == null) { component = this; } ComponentLocator.Register(component); }
private void Awake() { cachedTransform = transform; pitch = startRotationAngle.x; yaw = startRotationAngle.y; currentRotation = startRotationAngle; ComponentLocator.Resolve <Updater>().Register(UpdateType.Default, this); }
private void OnGameplayCameraEnableHandler(CustomEvent _event) { var state = (bool)_event.EventData; if (state && camera == null) { camera = ComponentLocator.Resolve <GameplayCameraController>(); } SetEnable(state); }
public SpaceshipControlEditorAdapter(bool _enabled) : base(_enabled) { EventManager.AddEventListener(ConstantEventsName.ON_PLAYER_SPACESHIP_CREATE, OnPlayerSpaceshipCreateHandler); EventManager.AddEventListener(ConstantEventsName.ON_PLAYER_SPACESHIP_DESTROY, OnPlayerSpaceshipDestroyHandler); playerSpaceship = ComponentLocator.Resolve <PlayerSpaceship>(); if (playerSpaceship == null) { SetEnable(false); } }
private void FormatItem(int start) { IEnumerable <Lazy <IEditorFormatter> > providers = ComponentLocator <IEditorFormatter> .ImportMany(); foreach (var locator in providers) { Span span = new Span(start, 1); locator.Value.FormatRange(_view, _view.TextBuffer, span); break; } }
public static ISuggestedActionsSource FromViewAndBuffer(ITextView textView, ITextBuffer textBuffer) { var suggestedActionsSource = ServiceManager.GetService <RSuggestedActionSource>(textView); if (suggestedActionsSource == null) { IEnumerable <IRSuggestedActionProvider> suggestedActionProviders = ComponentLocator <IRSuggestedActionProvider> .ImportMany().Select(p => p.Value); suggestedActionsSource = new RSuggestedActionSource(textView, textBuffer, suggestedActionProviders); } return(suggestedActionsSource); }
public DataSet GetClsDetailDataSet(string clsCd) { ICClsDetailNoARDao d = ComponentLocator.Instance().Resolve <ICClsDetailNoARDao>(); IList <CClsDetailNoAR> list = d.GetClsDetailList(LangUtils.GetCurrentLanguage(), clsCd); DataTable dt = DataTableUtils.ToDataTable(list); dt.TableName = "CClsDetailNoAR"; DataSet ds = new DataSet(); ds.Tables.Add(dt); return(ds); }
public DataSet GetTradeForMaterialDataSet(string companyCd, string dlCd, string dlDesc) { ICCodeRefTradeForMaterialNoARDao d = ComponentLocator.Instance().Resolve <ICCodeRefTradeForMaterialNoARDao>(); IList <CCodeRefTradeForMaterialNoAR> list = d.GetCodeRefTradeForMaterial(LangUtils.GetCurrentLanguage(), companyCd, dlCd, dlDesc); DataTable dt = DataTableUtils.ToDataTable(list); dt.TableName = "CCodeRefTradeForMaterial"; DataSet ds = new DataSet(); ds.Tables.Add(dt); return(ds); }