/// <summary>
        /// 获取材料详情
        /// </summary>
        /// <returns></returns>
        public ActionResult MaterialInfo(MeetingSearch search)
        {
            ResourcesView view = new ResourcesView();

            try
            {
                view.TitleModel                  = new TitleViewModel();
                view.TitleModel.Title            = "材料详情";
                view.TitleModel.TopTitle         = "材料详情";
                view.TitleModel.RerurnButton     = "/MeetingInfo/Index?MeetingId=" + search.MeetingId;
                view.TitleModel.RerurnHomeButton = "/Home/Index?pageindex=" + 1;

                List <mMeetingResources> listModel = iresources.GetResourcesList(search.MeetingId, UserSession.UserId);
                view.Text = listModel.Where(m => m.ResourcesType == ".txt" || m.ResourcesType == ".doc" || m.ResourcesType == ".docx").ToList();
                view.Vide = listModel;
                foreach (var item in view.Text)
                {
                    view.Vide.Remove(item);
                }

                ViewBag.TitleViewModel = view.TitleModel;
            }
            catch (Exception)
            {
                throw;
            }

            return(View(view));
        }
예제 #2
0
        private void ShowResourcesCommandExecuted()
        {
            RaisePropertyChanged("DisableParentWindow");

            var window = new ResourcesView(_event.Date);

            window.ShowDialog();

            RaisePropertyChanged("EnableParentWindow");
        }
예제 #3
0
        public ResourcesScreen(LauncherWindow game) : base(game)
        {
            game.Window.Mouse.Move       += MouseMove;
            game.Window.Mouse.ButtonDown += MouseButtonDown;

            textFont = new Font(game.FontName, 16, FontStyle.Bold);
            infoFont = new Font(game.FontName, 14, FontStyle.Regular);
            view     = new ResourcesView(game);
            widgets  = view.widgets;
        }
예제 #4
0
 public ResourcesScreen(LauncherWindow game) : base(game)
 {
     view    = new ResourcesView(game);
     widgets = view.widgets;
 }
예제 #5
0
        public Dictionary <string, object> InitUser(IDbConnection connection, ClaimsPrincipal pricipalUser, IServiceProvider resolver)
        {
            if (pricipalUser == null)
            {
                throw new NullReferenceException(nameof(pricipalUser));
            }
            var allianceService   = resolver.GetService <IAllianceService>();
            var sectorService     = resolver.GetService <IGSectorsService>();
            var estateListService = resolver.GetService <IEstateListService>();
            var systemService     = resolver.GetService <ISystemService>();
            var localizer         = resolver.GetService <ILocalizerService>();

            var tmpUser = _gameUserService.GetCurrentGameUser(connection, pricipalUser);

            if (tmpUser == null)
            {
                throw new NullReferenceException(nameof(tmpUser));
            }
            var gameUser      = _gameUserService.UpdateUserOnlineStatus(connection, tmpUser, true);
            var userChest     = _storeService.GetChestUser(connection, gameUser.Id);
            var balanceData   = (UchBalanceCcData)userChest.ActivatedItemsView[ProductTypeIds.Cc].Data;
            var up            = (UchPremiumData)userChest.ActivatedItemsView[ProductTypeIds.Premium].Data;
            var userPremiumWm = new UserPremiumWorkModel(up.Premium);

            var motherData = _mothershipService.GetMother(connection, gameUser.Id);
            var mother     =
                _synchronizer.UserMothership(connection, motherData, userPremiumWm, _mothershipService, _motherJumpService);

            var planetsData = _detailPlanetService.GetUserPlanets(connection, gameUser.Id);

            if (planetsData != null && planetsData.Any())
            {
                planetsData = _synchronizer.UserPlanets(connection, planetsData, userPremiumWm, _detailPlanetService);
            }
            _synchronizer.RunUserTasks(connection, gameUser.Id);

            var sectors      = sectorService.GetInitSectors(connection);
            var allianceUser = allianceService.GetAllianceUserByUserId(connection, gameUser.Id);
            var alliance     = allianceService.Initial(connection, allianceUser, _gameUserService);
            var personalInfo =
                _gameUserService.GetUserPlanshetProfile(connection, allianceUser.UserId, allianceUser.AllianceId, alliance, true);
            // обновляет пользователя в дб обект юзер обновляет по ссылке
            var myAlliance     = (TabMyAllianceOut)alliance.Bodys[1].TemplateData;
            var connectionUser = _gameUserService.SetConnectionUser(connection, gameUser, allianceUser, myAlliance.Name);
            //btns
            var units = HangarUnitsOut.EmptyHangar();
            var keys  = units.Keys.ToList();

            var systemGeometry = systemService.GetSystemGeometryViewData(connection, mother.StartSystemId);
            var motherEstates  = GetMotherEstate(connection, gameUser, userPremiumWm, mother, false);

            var toggleBtns = new List <IButtonsView>
            {
                ButtonsView.HangarToggle()
            };

            var leftNavBtns = new List <IButtonsView>
            {
                ButtonsView.LefMenuNavAlliance(),
                ButtonsView.LefMenuNavConfederation(),
                ButtonsView.LefMenuNavJournal(),
                ButtonsView.LefMenuNavChannels()
            };
            var mapControllBtns = MapInfoService.MapControllButtons(_localizer);
            var hangarBtns      = keys.Select(key => units[key]).Select(ButtonsView.HangarListBtns).ToList();
            //var storageModel = new StorageResources();
            //storageModel.InitializeField();

            var btns = new Dictionary <string, IReadOnlyList <IButtonsView> >
            {
                { "toggleBtns", toggleBtns },
                { "leftNavBtns", leftNavBtns },
                { "mapControllBtns", mapControllBtns },
                { "hangarBtns", hangarBtns }
            };
            var alianceNames = allianceService.GetAllianceNames(connection, false);


            var result = new Dictionary <string, object>
            {
                { localizer.TranslationKey, localizer.GetGameTranslate() },
                { ResourcesView.ViewKey, ResourcesView.GetInitList(balanceData.BalanceCc.Quantity) },
                { MapTypes.Sector.ToString(), sectors },
                { ButtonsView.BaseBtnsKey, btns },
                //todo data incorrect

                { UchView.ViewKey, userChest },
                { EstateItemOut.ViewKey, estateListService.GetList(connection, gameUser.Id) },
                { ConnectionUser.ViewKey, connectionUser },

                { alliance.UniqueId, alliance },
                { UserProfileInfo.AvatarViewKey, personalInfo },
                { EstateViewKey, motherEstates },
                { AllianceOut.AllianceNamesKey, alianceNames },
                { Planetoids.ViewKey, systemGeometry }
            };

            return(result);
        }
예제 #6
0
 private void NavigateToResourcesCommandExecuted()
 {
     WindowContent = new ResourcesView();
 }
예제 #7
0
 void Start()
 {
     resourcesView = GetComponent <ResourcesView>();
 }
예제 #8
0
 void Start()
 {
     resourcesView = GetComponent<ResourcesView>();
 }