コード例 #1
0
        public int GetCount()
        {
            ICPagerDao td     = (ICPagerDao)ComponentLocator.Instance().Resolve(key, typeof(ICPagerDao));
            int        result = td.GetCount(this.key, this.condition);

            return(result);
        }
コード例 #2
0
        /// <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;
        }
コード例 #3
0
        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));
        }
コード例 #4
0
ファイル: PlayerVsCpu.cs プロジェクト: celosama/ai-minimax
        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);
        }
コード例 #5
0
ファイル: PlayerVsCpu.cs プロジェクト: celosama/ai-minimax
 private void drawDebug(SpriteBatch spriteBatch)
 {
     foreach (KeyValuePair <Point, Rectangle> boundingBox in boundingBoxes)
     {
         spriteBatch.Draw(ComponentLocator.FindTexture("Reset"), boundingBox.Value, Color.Red);
     }
 }
コード例 #6
0
        /// <summary>
        /// 根据画面输入条件,抽出数据
        /// </summary>
        private void LoadData()
        {
            IAction_Factory ac    = ComponentLocator.Instance().Resolve <IAction_Factory>();
            TFactoryMs      facVo = ac.GetFactoryByCd(this.txtFactory.Text);

            this.SetVoToForm(facVo);
        }
コード例 #7
0
        private void Awake()
        {
            ComponentLocator.Resolve <Updater>().Register(UpdateType.Late, this);
            cachedTransform = transform;

            IsEnabled = target != null;
        }
コード例 #8
0
        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);
        }
コード例 #9
0
        private void CreateFPSCounter()
        {
            var windowsManager = ComponentLocator.Resolve <WindowsManager>();

            windowsManager.CreateWindow <GameLoadingWindow>(GameLoadingWindow.prefabPath, Enums.EnumWindowsLayer.Loading);
            windowsManager.CreateWindow <FPSWindow>(FPSWindow.prefabPath, Enums.EnumWindowsLayer.Special);
        }
コード例 #10
0
        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);
        }
コード例 #11
0
        public void OnClickTest2()
        {
            var windowsManager = ComponentLocator.Resolve <WindowsManager.WindowsManager>();

            windowsManager.CreateWindow <SpaceShipTestWindow>(SpaceShipTestWindow.prefabPath, Enums.EnumWindowsLayer.Main);

            Close();
        }
コード例 #12
0
        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);
        }
コード例 #13
0
 public LocalFileConfigRepository(string namespaceName, ConfigRepository upstream)
 {
     m_namespace  = namespaceName;
     m_configUtil = ComponentLocator.Lookup <ConfigUtil>();
     this.PrepareConfigCacheDir();
     this.SetUpstreamRepository(upstream);
     this.TrySync();
 }
コード例 #14
0
        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));
        }
コード例 #15
0
        private void Start()
        {
            ComponentLocator.Register(this);

            Spaceship = GetComponent <SpaceshipController>();

            EventManager.DispatchEvent(ConstantEventsName.ON_PLAYER_SPACESHIP_CREATE, this);
        }
コード例 #16
0
ファイル: PlayerVsCpu.cs プロジェクト: celosama/ai-minimax
        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);
        }
コード例 #17
0
        public void OnClickTest()
        {
            var windowsManager = ComponentLocator.Resolve <WindowsManager.WindowsManager>();

            windowsManager.CreateWindow <TestShootingWindow>(TestShootingWindow.prefabPath, Enums.EnumWindowsLayer.Main);

            Close();
        }
コード例 #18
0
        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();
        }
コード例 #19
0
        public static IEnumerable <IVocabulary> GetAllVocabularies()
        {
            if (_vocabularies == null)
            {
                _vocabularies = ComponentLocator <IVocabulary> .ImportMany();
            }

            return(_vocabularies.Select(v => v.Value));
        }
コード例 #20
0
        public TFactoryMs GetFactoryByCd(String facCd)
        {
            TFactoryMs     facVo = new TFactoryMs();
            ITFactoryMsDao td    = ComponentLocator.Instance().Resolve <ITFactoryMsDao>();

            facVo = td.getFactoryByCd(facCd);

            return(facVo);
        }
コード例 #21
0
        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();
        }
コード例 #22
0
        public GameplayCameraStandaloneAdapter(bool _enabled) : base(_enabled)
        {
            EventManager.AddEventListener(ConstantEventsName.ON_GAMEPLAY_CAMERA_ENABLE, OnGameplayCameraEnableHandler);

            camera = ComponentLocator.Resolve <GameplayCameraController>();
            if (camera == null)
            {
                SetEnable(false);
            }
        }
コード例 #23
0
        protected override void Awake()
        {
            base.Awake();

            if (component == null)
            {
                component = this;
            }
            ComponentLocator.Register(component);
        }
コード例 #24
0
        private void Awake()
        {
            cachedTransform = transform;

            pitch           = startRotationAngle.x;
            yaw             = startRotationAngle.y;
            currentRotation = startRotationAngle;

            ComponentLocator.Resolve <Updater>().Register(UpdateType.Default, this);
        }
コード例 #25
0
        private void OnGameplayCameraEnableHandler(CustomEvent _event)
        {
            var state = (bool)_event.EventData;

            if (state && camera == null)
            {
                camera = ComponentLocator.Resolve <GameplayCameraController>();
            }

            SetEnable(state);
        }
コード例 #26
0
        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);
            }
        }
コード例 #27
0
        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;
            }
        }
コード例 #28
0
        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);
        }
コード例 #29
0
        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);
        }
コード例 #30
0
        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);
        }