public ActionResult EditOperation(string command, string id)
        {
            WindowModule window = new WindowModule
            {
                Width  = 550,
                Height = 600
            };

            if (command == "invoiceinfoAdd")
            {
                window.Loader.Url = Url.Action("InvoiceLst", "Invoice", new { referenceId = id });
                window.Title      = "发票信息";
            }
            else if (command == "PaymentinfoAdd")
            {
                window.Loader.Url = Url.Action("EditView", new { receivePmNo = id, viewname = "PaymentView" });
                window.Title      = "付款信息";
            }
            else
            {
                return(this.Direct());
            }
            window.Render(RenderMode.Auto);
            return(this.Direct());
        }
Example #2
0
        protected override void Draw(GameTime gameTime)
        {
            GraphicsDevice.SetRenderTarget(RenderTarget);
            GraphicsDevice.RasterizerState  = RasterizerState.CullCounterClockwise;
            GraphicsDevice.SamplerStates[0] = SamplerState.PointClamp;
            GraphicsDevice.SamplerStates[1] = SamplerState.PointClamp;

            Mesh.ResetStats();

            SkyModule.Draw(gameTime);
            ChunkModule.Draw(gameTime);
            HighlightModule.Draw(gameTime);
            HudModule.Draw(gameTime);
            ChatModule.Draw(gameTime);
            WindowModule.Draw(gameTime);
            DebugInfoModule.Draw(gameTime);

            _imgui.BeforeLayout(gameTime);
            ImGuiLayout();
            _imgui.AfterLayout();

            GraphicsDevice.SetRenderTarget(null);
            SpriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Opaque);
            SpriteBatch.Draw(RenderTarget, Vector2.Zero, Color.White);
            SpriteBatch.End();

            base.Draw(gameTime);
        }
Example #3
0
        public ActionResult Create()
        {
            WindowModule nwin = new WindowModule();

            nwin.Loader.Url = Url.Action("CreateUser");
            nwin.Render(RenderMode.Auto);
            return(this.Direct());
        }
Example #4
0
        public ActionResult Deatil(string id)
        {
            WindowModule nwin = new WindowModule();

            nwin.Loader.Url = Url.Action("DeatilUser", new { id = id });
            nwin.Render(RenderMode.Auto);
            return(this.Direct());
        }
Example #5
0
        public ActionResult Edits(string id)
        {
            WindowModule newwin = new WindowModule();

            newwin.Loader.Url = Url.Action("Edit", "Checkfunc", new { id = id });
            newwin.Render();
            return(this.Direct());
        }
Example #6
0
        public ActionResult Add()
        {
            WindowModule newwin = new WindowModule();

            newwin.Loader.Url = Url.Action("part", "Checkfunc", new { id = Guid.NewGuid() });
            newwin.Render();
            return(this.Direct());
        }
        public ActionResult Add()
        {
            WindowModule window = new WindowModule {
                Width = 700, Height = 450, Loader = { Url = Url.Action("Create") }
            };

            window.Render(RenderMode.Auto);
            return(this.Direct());
        }
Example #8
0
        public ActionResult Update(string id)
        {
            WindowModule newWindowModule = new WindowModule();

            newWindowModule.Loader.Url = Url.Action("UpdateCheckFlow", new { id = id, winname = newWindowModule.ID });
            newWindowModule.Render(RenderMode.Auto);

            return(this.Direct());
        }
Example #9
0
        public ActionResult Read(string id)
        {
            WindowModule window = new WindowModule {
                Width = 700, Height = 450, Loader = { Url = Url.Action("Detail", new { id = id }) }
            };

            window.Render(RenderMode.Auto);
            return(this.Direct());
        }
        public ActionResult WarehouseOperation(string action, string title, string id)
        {
            WindowModule window = new WindowModule()
            {
                Title = title, Loader = { Url = Url.Action("EditWarehouse", new { actiontype = action, id = id }) }
            };

            window.Render();
            return(this.Direct());
        }
Example #11
0
        /// <summary>
        /// 创建编辑窗口 窗口加载EditView
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public ActionResult EditAction(string id)
        {
            WindowModule nitem = new WindowModule();

            nitem.Loader.Url = Url.Action("EditView", "PaymentApply", new { id = id });
            nitem.Width      = 550;
            nitem.Height     = 600;
            nitem.Title      = "应收款单";
            nitem.Render();
            return(this.Direct());
        }
Example #12
0
        /// <summary>
        /// 创建新建窗口 窗口加载AddView
        /// </summary>
        /// <returns></returns>
        public ActionResult CreateAction()
        {
            WindowModule nitem = new WindowModule();

            nitem.Loader.Url = Url.Action("AddView");
            nitem.Width      = 550;
            nitem.Height     = 600;
            nitem.Title      = "应收款单";
            nitem.Render();
            return(this.Direct());
        }
Example #13
0
        public ActionResult Create(string checkfunc)
        {
            if (db.T_CH_Checkfunc.Find(checkfunc) != null)
            {
                WindowModule win = new WindowModule();
                win.Loader.Url = Url.Action("CreateCheckFlow", "CheckflowManage", new { checkfunc = checkfunc });
                win.Render();
            }

            return(this.Direct());
        }
Example #14
0
        public ActionResult add(string selection)
        {
            WindowModule win = new WindowModule();

            win.Title  = "增加";
            win.Loader = new ComponentLoader()
            {
                Url = Url.Action("CreatePage", new { name = win.ID }), Mode = LoadMode.Frame
            };
            win.Render(true);
            return(this.Direct());
        }
Example #15
0
        public ActionResult edit(string selection)
        {
            WindowModule win = new WindowModule();

            win.Title  = "编辑";
            win.Loader = new ComponentLoader()
            {
                Url = Url.Action("EditPage", new { id = selection, name = win.ID }), Mode = LoadMode.Frame
            };
            win.Render(true);
            return(this.Direct());
        }
Example #16
0
 public ActionResult Expand(string funId, string name, string command)
 {
     if (command == "汇办")
     {
         WindowModule window = new WindowModule()
         {
             Title  = name,
             Loader = { Url = Url.Action("Users", new { funId = funId }) }
         };
         window.Render(RenderMode.Auto);
     }
     return(this.Direct());
 }
Example #17
0
        protected override void Update(GameTime gameTime)
        {
            GameTime = gameTime;

            if (PendingMainThreadActions.TryTake(out var action))
            {
                action();
            }

            var adjusted = Client.World.World.FindBlockPosition(
                new Coordinates3D((int)Client.Position.X, 0, (int)Client.Position.Z), out var chunk);

            if (chunk != null && Client.LoggedIn)
            {
                if (chunk.GetHeight((byte)adjusted.X, (byte)adjusted.Z) != 0)
                {
                    Client.Physics.Update(gameTime.ElapsedGameTime);
                }
            }

            if (NextPhysicsUpdate < DateTime.UtcNow && Client.LoggedIn)
            {
                // NOTE: This is to make the vanilla server send us chunk packets
                // We should eventually make some means of detecting that we're on a vanilla server to enable this
                // It's a waste of bandwidth to do it on a TrueCraft server
                Client.QueuePacket(new PlayerGroundedPacket {
                    OnGround = true
                });
                NextPhysicsUpdate = DateTime.UtcNow.AddMilliseconds(50);
            }

            if (IsActive)
            {
                foreach (var module in InputModules)
                {
                    module.Update(gameTime);
                }
            }

            SkyModule.Update(gameTime);
            ChunkModule.Update(gameTime);
            HighlightModule.Update(gameTime);
            HudModule.Update(gameTime);
            ChatModule.Update(gameTime);
            WindowModule.Update(gameTime);
            DebugInfoModule.Update(gameTime);

            UpdateCamera();

            base.Update(gameTime);
        }
        public ActionResult Opearation(string action)
        {
            string       loderUrl = Url.Action(action);
            WindowModule window   = new WindowModule()
            {
                Title  = action,
                Height = 745,
                Width  = 1092,
                Loader = { Url = loderUrl }
            };

            window.Render(RenderMode.Auto);
            return(this.Direct());
        }
Example #19
0
 public ActionResult Deal(string id, string userid)
 {
     if (id == "null" || userid == "null")
     {
         X.Msg.Alert("页面消息", "未选择任何行").Show();
     }
     else
     {
         WindowModule window = new WindowModule
         {
             Loader = { Url = Url.Action("Attend", new { id = id, userid = userid }) }
         };
         window.Render(RenderMode.Auto);
     }
     return(this.Direct());
 }
Example #20
0
        public ActionResult Expand(string roleid, string command, string description)
        {
            if (command == "查看")
            {
                return(this.RedirectToAction("authority", new { roleid = roleid }));
            }

            if (command == "更改组成员")
            {
                WindowModule window = new WindowModule {
                    Loader = { Url = Url.Action("Users", new { roleid = roleid }) }, Title = description
                };
                window.Render(RenderMode.Auto);
            }
            return(this.Direct());
        }
        public ActionResult Read(string id)
        {
            if (id == "null")
            {
                X.Msg.Alert("页面消息", "请选择一条记录!").Show();
            }
            else
            {
                WindowModule window = new WindowModule {
                    Width = 900, Height = 700, Loader = { Url = Url.Action("Detail", new { id = id }) }
                };
                window.Render(RenderMode.Auto);
            }

            return(this.Direct());
        }
Example #22
0
        public ActionResult PaymentApply(string id, string command)
        {
            WindowModule nwin = new WindowModule
            {
                Width  = 550,
                Height = 600,
                Title  = command == "Invoice" ? "发票信息" : "收款信息",
                Loader =
                {
                    Url =
                        command == "Invoice"
                                                        ? Url.Action("InvoiceLst", "Invoice", new { referenceId= id                                                                                         })
                                                        : Url.Action("EditView", "PaymentApply", new { id= id                                                                                         })
                }
            };

            nwin.Render(RenderMode.Auto);
            return(this.Direct());
        }
Example #23
0
        protected override void Initialize()
        {
            InputModules = new List<IGameplayModule>();
            GraphicalModules = new List<IGameplayModule>();

            base.Initialize(); // (calls LoadContent)

            Camera = new Camera(GraphicsDevice.Viewport.AspectRatio, 70.0f, 0.1f, 1000.0f);
            UpdateCamera();

            White1x1 = new Texture2D(GraphicsDevice, 1, 1);
            White1x1.SetData<Color>(new[] { Color.White });

            Audio = new AudioManager();
            Audio.LoadDefaultPacks(Content);

            SkyModule = new SkyModule(this);
            ChunkModule = new ChunkModule(this);
            DebugInfoModule = new DebugInfoModule(this, Pixel);
            ChatModule = new ChatModule(this, Pixel);
            var hud = new HUDModule(this, Pixel);
            var windowModule = new WindowModule(this, Pixel);

            GraphicalModules.Add(SkyModule);
            GraphicalModules.Add(ChunkModule);
            GraphicalModules.Add(new HighlightModule(this));
            GraphicalModules.Add(hud);
            GraphicalModules.Add(ChatModule);
            GraphicalModules.Add(windowModule);
            GraphicalModules.Add(DebugInfoModule);

            InputModules.Add(windowModule);
            InputModules.Add(DebugInfoModule);
            InputModules.Add(ChatModule);
            InputModules.Add(new HUDModule(this, Pixel));
            InputModules.Add(ControlModule = new PlayerControlModule(this));

            Client.PropertyChanged += HandleClientPropertyChanged;
            Client.Connect(EndPoint);

            BlockProvider.BlockRepository = BlockRepository;
            var itemRepository = new ItemRepository();
            itemRepository.DiscoverItemProviders();
            ItemRepository = itemRepository;
            BlockProvider.ItemRepository = ItemRepository;

            IconRenderer.CreateBlocks(this, BlockRepository);

            var centerX = GraphicsDevice.Viewport.Width / 2;
            var centerY = GraphicsDevice.Viewport.Height / 2;
            Mouse.SetPosition(centerX, centerY);

            MouseComponent.Scroll += OnMouseComponentScroll;
            MouseComponent.Move += OnMouseComponentMove;
            MouseComponent.ButtonDown += OnMouseComponentButtonDown;
            MouseComponent.ButtonUp += OnMouseComponentButtonUp;
            KeyboardComponent.KeyDown += OnKeyboardKeyDown;
            KeyboardComponent.KeyUp += OnKeyboardKeyUp;
            GamePadComponent.ButtonDown += OnGamePadButtonDown;
            GamePadComponent.ButtonUp += OnGamePadButtonUp;

            CreateRenderTarget();
            SpriteBatch = new SpriteBatch(GraphicsDevice);
            ThreadID = Thread.CurrentThread.ManagedThreadId;
        }