示例#1
0
        private void CreateSampleData()
        {
            var teamPage = new TeamPage()
            {
                CreatedBy     = 1,
                CreatedOn     = DateTime.Now,
                UpdatedBy     = 1,
                UpdatedOn     = DateTime.Now,
                Name          = "SkateMob",
                Description   = "SkateMob members are the #1 skaters in the world!",
                TeamPictureId = 0
            };


            _socialNetworkService.InsertTeamPage(teamPage);


            var groupPage = new GroupPage()
            {
                Name            = "Soldiers",
                Description     = "New and upcoming skaters",
                PayPalDonateUrl = ""
            };

            _socialNetworkService.InsertGroupPage(groupPage);
        }
示例#2
0
        public static GroupPageModel ToModel(this GroupPage groupPage)
        {
            if (groupPage == null)
            {
                return(null);
            }
            var entityModel = new GroupPageModel
            {
                Name           = groupPage.Name,
                OrderNo        = groupPage.OrderNo,
                ParentId       = groupPage.ParentId,
                Icon           = groupPage.Icon ?? "",
                ActionName     = groupPage.ActionName,
                ControllerName = groupPage.ControllerName,
                Active         = groupPage.Active,
                Description    = groupPage.Description,
                Body           = groupPage.Body,
                Level          = groupPage.Level,
                Id             = groupPage.Id,
                UnsignedName   = groupPage.UnsignedName,
                CreateDate     = groupPage.CreateDate,
                CreateBy       = groupPage.CreateBy,
                Url            = groupPage.Url,
                ServiceId      = groupPage.ServiceId,
                IsSystem       = groupPage.IsSystem,
                Version        = groupPage.Version,
                Cover          = groupPage.Cover,
                Style          = groupPage.Style,
                //EntityMedias = groupPage.EntityMedias?.Select(x=>x.ToModel()).ToList()
            };

            return(entityModel);
        }
示例#3
0
        public static void ToModel(this GroupPage groupPage, GroupPageModel entityModel)
        {
            if (entityModel.LanguageId <= 0)
            {
                return;
            }
            var localizedProperties = groupPage.GetLocalizedPropertys(entityModel.LanguageId);
            var localePropertyName  = localizedProperties.FirstOrDefault(x => x.LocaleKey == "Name");

            if (localePropertyName != null)
            {
                entityModel.Name = localePropertyName?.LocaleValue;
            }

            var localePropertyDescription = localizedProperties.FirstOrDefault(x => x.LocaleKey == "Description");

            if (localePropertyDescription != null)
            {
                entityModel.Description = localePropertyDescription?.LocaleValue;
            }

            var localePropertyBody = localizedProperties.FirstOrDefault(x => x.LocaleKey == "Body");

            if (localePropertyBody != null)
            {
                entityModel.Body = localePropertyBody?.LocaleValue;
            }
        }
示例#4
0
        public static GroupPage ToEntity(this GroupPageModel model)
        {
            var module = new GroupPage
            {
                Name           = model.Name,
                OrderNo        = model.OrderNo,
                ParentId       = model.ParentId,
                Icon           = model.Icon ?? "",
                ActionName     = model.ActionName,
                ControllerName = model.ControllerName,
                Active         = model.Active,
                Description    = model.Description,
                Body           = model.Body,
                Level          = model.Level,
                Id             = model.Id,
                UnsignedName   = model.UnsignedName,
                Url            = model.Url,
                ServiceId      = model.ServiceId,
                IsSystem       = model.IsSystem,
                Version        = model.Version,
                Cover          = model.Cover,
                Style          = model.Style,
            };

            return(module);
        }
示例#5
0
        private void EditeGroup_Event(Group group)
        {
            GroupPage grouppage = new GroupPage(group, dbl);

            grouppage.Added_Event += Add_Event;
            GridsFrame.Navigate(grouppage);
        }
示例#6
0
        public ActionResult Group(string date)
        {
            var today = DateTime.Now.AddDays(1).ToString("yyyy-MM-dd");

            if (date != null)
            {
                today = date;
            }
            ViewBag.Date = today;
            DateTime  dtToday  = Convert.ToDateTime(today);            //今天
            DateTime  dtNexDay = Convert.ToDateTime(today).AddDays(1); //明天
            GroupPage model    = new GroupPage();

            model.TotalCount = pg.Groups.Where(w => w.TaskID != "0" && w.Date > dtToday && w.Date < dtNexDay).Count();
            List <GroupItem> gitem = new List <GroupItem>();
            var surplusList        = new List <SurplusItem>();
            var surp = pg.Groups.Where(w => w.TaskID == "0" && w.Date > dtToday && w.Date < dtNexDay).ToList();

            foreach (var s in surp)
            {
                SurplusItem sur = new SurplusItem();
                sur.Surplus = s.SurplusCount;
                var id2 = Convert.ToInt32(s.ProId);
                sur.pro = pg.Products.FirstOrDefault(f => f.Id == id2);
                surplusList.Add(sur);
            }
            model.groupList   = gitem;
            model.surplusList = surplusList;
            return(View(model));
        }
示例#7
0
        private void GroupTextBlock_MouseDown(object sender, MouseButtonEventArgs e)
        {
            GroupPage gp = new GroupPage();

            ContentContainer.Content = gp.Content;
            this.Dispatcher.Invoke(() => {
                gp.GroupDataGrid.Focus();
            });
        }
示例#8
0
        //
        // ──────────────────────────────────────────────────────────────────────────────────
        //   :::::: P U B L I C   F U N C T I O N S : :  :   :    :     :        :          :
        // ──────────────────────────────────────────────────────────────────────────────────
        //

        /// <summary>
        /// Gets the group page for a member of it
        /// </summary>
        /// <param name="caller">The member of the group who wants the group page</param>
        /// <param name="group">The group</param>
        /// <param name="_context">The database context</param>
        /// <returns>The group page</returns>
        /// See <see cref="Areas.GroupManage.Models.GroupPage"/> to know the response structure
        public static GroupPage GetPage(User caller, Group group, ApplicationDBContext _context)
        {
            try
            {
                _context.Entry(group).Collection("users").Load();
                UserGroup callerInGroup = group.users.Where(u => u.userid == caller.id).First();
                _context.Entry(callerInGroup).Reference("role").Load();

                string callerInGroup_role = callerInGroup.role.name;
                string role_group_normal  = RoleManager.getGroupNormal(_context).name;
                string role_group_maker   = RoleManager.getGroupMaker(_context).name;
                string role_group_admin   = RoleManager.getGroupAdmin(_context).name;

                GroupPage page = new GroupPage();
                page.name           = group.name;
                page.dateJoin       = callerInGroup.dateJoin;
                page.dateRole       = callerInGroup.dateRole;
                page.actualCapacity = group.users.ToList().Count();
                page.createDate     = group.dateCreated;
                page.hasPassword    = group.password != null;
                page.weeklyPay      = group.weeklyPay;
                page.maxCapacity    = group.capacity;
                page.bets           = getBets(caller, group, _context);
                page.manageBets     = getManageBets(caller, group, _context);
                page.myBets         = getBetAndUserBets(caller, group, _context, false);
                page.betsHistory    = getBetAndUserBets(caller, group, _context, true);
                page.members        = getMembers(caller.id, callerInGroup_role, group, _context, role_group_normal);
                page.news           = Home.Util.GetNews.getGroupNews(group.id, _context);

                return(page);
            }
            catch (Exception)
            {
                return(new GroupPage {
                    name = "",
                    bets = new List <GroupBet>(),
                    members = new List <GroupMember>(),
                    actualCapacity = 0,
                    createDate = new DateTime(),
                    hasPassword = false,
                    maxCapacity = 0,
                    weeklyPay = 0,
                    dateJoin = new DateTime(),
                    dateRole = new DateTime(),
                    manageBets = new List <BetsManager>(),
                    myBets = new List <EndedFootballBet>(),
                    betsHistory = new List <EndedFootballBet>(),
                    news = new List <NewMessage>()
                });
            }
        }
示例#9
0
        public IHttpActionResult PostGroup(TeamPageGroupModel model)
        {
            if (!ModelState.IsValid || model == null || model.TeamPageId == 0)
            {
                return(Response(new { Success = false, Message = "Invalid data" }));
            }

            //check if the team page exists? and if it does, is the person creating the group has the authority
            var teamPage = _teamPageService.Get(model.TeamPageId);

            if (teamPage == null)
            {
                return(NotFound());
            }
            var currentUser = ApplicationContext.Current.CurrentUser;

            //check if the page exists or not & the person deleting actually owns the resource
            if (currentUser != null && teamPage.CreatedBy != currentUser.Id && !currentUser.IsAdministrator())
            {
                return(Response(new {
                    Success = false,
                    Message = "Unauthorized"
                }));
            }

            //ok, so we are good to save the group
            var group = new GroupPage()
            {
                TeamPageId      = model.TeamPageId,
                Name            = model.Name,
                Description     = model.Description,
                PayPalDonateUrl = model.PayPalDonateUrl,
                DisplayOrder    = model.DisplayOrder,
                IsDefault       = model.IsDefault,
                DateCreated     = DateTime.UtcNow,
                DateUpdated     = DateTime.UtcNow
            };

            _teamPageGroupService.Insert(group);
            return(Response(new {
                Success = true,
                Id = group.Id
            }));
        }
示例#10
0
        public static TeamPageGroupPublicModel ToModel(this GroupPage groupPage)
        {
            var groupModel = new TeamPageGroupPublicModel()
            {
                CreatedOnUtc    = groupPage.DateCreated,
                CreatedOn       = DateTimeHelper.GetDateInUserTimeZone(groupPage.DateCreated, DateTimeKind.Utc, ApplicationContext.Current.CurrentUser),
                UpdatedOnUtc    = groupPage.DateUpdated,
                UpdatedOn       = DateTimeHelper.GetDateInUserTimeZone(groupPage.DateUpdated, DateTimeKind.Utc, ApplicationContext.Current.CurrentUser),
                Id              = groupPage.Id,
                DisplayOrder    = groupPage.DisplayOrder,
                IsDefault       = groupPage.IsDefault,
                PaypalDonateUrl = groupPage.PayPalDonateUrl,
                TeamPageId      = groupPage.TeamPageId,
                Name            = groupPage.Name,
                Description     = groupPage.Description,
                GroupMembers    = new List <UserResponseModel>()
            };

            return(groupModel);
        }
示例#11
0
        public static GroupPageModel ToModel(this GroupPage groupPage, int languageId)
        {
            if (groupPage == null)
            {
                return(null);
            }
            var model = groupPage.ToModel();

            if (languageId <= 0)
            {
                return(model);
            }
            var localizedProperties = groupPage.GetLocalizedPropertys(languageId);
            var localePropertyName  = localizedProperties.FirstOrDefault(x => x.LocaleKey == "Name");

            if (localePropertyName != null)
            {
                model.Name = localePropertyName?.LocaleValue;
            }

            var localePropertyDescription = localizedProperties.FirstOrDefault(x => x.LocaleKey == "Description");

            if (localePropertyDescription != null)
            {
                model.Description = localePropertyDescription?.LocaleValue;
            }

            var localePropertyBody = localizedProperties.FirstOrDefault(x => x.LocaleKey == "Body");

            if (localePropertyBody != null)
            {
                model.Body = localePropertyBody?.LocaleValue;
            }

            return(model);
        }
示例#12
0
 public override void Link()
 {
     VirtualRoot.Window <ShowDialogWindowCommand>(LogEnum.DevConsole,
                                                  action: message => {
         UIThread.Execute(() => {
             DialogWindow.ShowDialog(message: message.Message, title: message.Title, onYes: message.OnYes, icon: message.Icon);
         });
     });
     VirtualRoot.Window <ShowQQGroupQrCodeCommand>(LogEnum.DevConsole,
                                                   action: message => {
         UIThread.Execute(() => {
             QQGroupQrCode.ShowWindow();
         });
     });
     VirtualRoot.Window <ShowCalcCommand>(LogEnum.DevConsole,
                                          action: message => {
         UIThread.Execute(() => {
             Calc.ShowWindow(message.CoinVm);
         });
     });
     VirtualRoot.Window <ShowFileDownloaderCommand>(LogEnum.DevConsole,
                                                    action: message => {
         UIThread.Execute(() => {
             FileDownloader.ShowWindow(message.DownloadFileUrl, message.FileTitle, message.DownloadComplete);
         });
     });
     VirtualRoot.Window <ShowAboutPageCommand>(LogEnum.DevConsole,
                                               action: message => {
         UIThread.Execute(() => {
             AboutPage.ShowWindow();
         });
     });
     VirtualRoot.Window <ShowKernelOutputPageCommand>(LogEnum.DevConsole,
                                                      action: message => {
         UIThread.Execute(() => {
             KernelOutputPage.ShowWindow(message.SelectedKernelOutputVm);
         });
     });
     VirtualRoot.Window <ShowKernelInputPageCommand>(LogEnum.DevConsole,
                                                     action: message => {
         UIThread.Execute(() => {
             KernelInputPage.ShowWindow();
         });
     });
     VirtualRoot.Window <ShowGroupPageCommand>(LogEnum.DevConsole,
                                               action: message => {
         UIThread.Execute(() => {
             GroupPage.ShowWindow();
         });
     });
     VirtualRoot.Window <ShowSysDicPageCommand>(LogEnum.DevConsole,
                                                action: message => {
         UIThread.Execute(() => {
             SysDicPage.ShowWindow();
         });
     });
     VirtualRoot.Window <ShowVirtualMemoryCommand>(LogEnum.DevConsole,
                                                   action: message => {
         UIThread.Execute(() => {
             VirtualMemory.ShowWindow();
         });
     });
     VirtualRoot.Window <ShowRestartWindowsCommand>(LogEnum.DevConsole,
                                                    action: message => {
         UIThread.Execute(() => {
             RestartWindows.ShowDialog();
         });
     });
     VirtualRoot.Window <ShowNotificationSampleCommand>(LogEnum.DevConsole,
                                                        action: message => {
         UIThread.Execute(() => {
             NotificationSample.ShowWindow();
         });
     });
     VirtualRoot.Window <ShowOuterPropertyCommand>(LogEnum.DevConsole,
                                                   action: message => {
         UIThread.Execute(() => {
             OuterProperty.ShowWindow();
         });
     });
     VirtualRoot.Window <ShowInnerPropertyCommand>(LogEnum.DevConsole,
                                                   action: message => {
         UIThread.Execute(() => {
             InnerProperty.ShowWindow();
         });
     });
     VirtualRoot.Window <ShowUserPageCommand>(LogEnum.DevConsole,
                                              action: message => {
         UIThread.Execute(() => {
             UserPage.ShowWindow();
         });
     });
     VirtualRoot.Window <ShowKernelDownloaderCommand>(LogEnum.DevConsole,
                                                      action: message => {
         UIThread.Execute(() => {
             KernelDownloading.ShowWindow(message.KernelId, message.DownloadComplete);
         });
     });
     VirtualRoot.Window <EnvironmentVariableEditCommand>(LogEnum.DevConsole,
                                                         action: message => {
         UIThread.Execute(() => {
             EnvironmentVariableEdit.ShowWindow(message.CoinKernelVm, message.EnvironmentVariable);
         });
     });
     VirtualRoot.Window <InputSegmentEditCommand>(LogEnum.DevConsole,
                                                  action: message => {
         UIThread.Execute(() => {
             InputSegmentEdit.ShowWindow(message.CoinKernelVm, message.Segment);
         });
     });
     VirtualRoot.Window <CoinKernelEditCommand>(LogEnum.DevConsole,
                                                action: message => {
         UIThread.Execute(() => {
             CoinKernelEdit.ShowWindow(message.FormType, message.Source);
         });
     });
     VirtualRoot.Window <CoinEditCommand>(LogEnum.DevConsole,
                                          action: message => {
         UIThread.Execute(() => {
             CoinEdit.ShowWindow(message.FormType, message.Source);
         });
     });
     VirtualRoot.Window <ShowContainerWindowCommand>(LogEnum.DevConsole,
                                                     action: message => {
         UIThread.Execute(() => {
             ContainerWindow window = ContainerWindow.GetWindow(message.Vm);
             window?.ShowWindow();
         });
     });
     VirtualRoot.Window <GroupEditCommand>(LogEnum.DevConsole,
                                           action: message => {
         UIThread.Execute(() => {
             GroupEdit.ShowWindow(message.FormType, message.Source);
         });
     });
     VirtualRoot.Window <KernelInputEditCommand>(LogEnum.DevConsole,
                                                 action: message => {
         UIThread.Execute(() => {
             KernelInputEdit.ShowWindow(message.FormType, message.Source);
         });
     });
     VirtualRoot.Window <KernelOutputFilterEditCommand>(LogEnum.DevConsole,
                                                        action: message => {
         UIThread.Execute(() => {
             KernelOutputFilterEdit.ShowWindow(message.FormType, message.Source);
         });
     });
     VirtualRoot.Window <KernelOutputTranslaterEditCommand>(LogEnum.DevConsole,
                                                            action: message => {
         UIThread.Execute(() => {
             KernelOutputTranslaterEdit.ShowWindow(message.FormType, message.Source);
         });
     });
     VirtualRoot.Window <KernelOutputEditCommand>(LogEnum.DevConsole,
                                                  action: message => {
         UIThread.Execute(() => {
             KernelOutputEdit.ShowWindow(message.FormType, message.Source);
         });
     });
     VirtualRoot.Window <ShowPackagesWindowCommand>(LogEnum.DevConsole,
                                                    action: message => {
         UIThread.Execute(() => {
             PackagesWindow.ShowWindow();
         });
     });
     VirtualRoot.Window <KernelEditCommand>(LogEnum.DevConsole,
                                            action: message => {
         UIThread.Execute(() => {
             KernelEdit.ShowWindow(message.FormType, message.Source);
         });
     });
     VirtualRoot.Window <ShowLogColorCommand>(LogEnum.DevConsole,
                                              action: message => {
         UIThread.Execute(() => {
             LogColor.ShowWindow();
         });
     });
     VirtualRoot.Window <ShowGpuProfilesPageCommand>(LogEnum.DevConsole,
                                                     action: message => {
         UIThread.Execute(() => {
             GpuProfilesPage.ShowWindow(message.MinerClientsWindowVm);
         });
     });
     VirtualRoot.Window <PackageEditCommand>(LogEnum.DevConsole,
                                             action: message => {
         UIThread.Execute(() => {
             PackageEdit.ShowWindow(message.FormType, message.Source);
         });
     });
     VirtualRoot.Window <PoolKernelEditCommand>(LogEnum.DevConsole,
                                                action: message => {
         UIThread.Execute(() => {
             PoolKernelEdit.ShowWindow(message.FormType, message.Source);
         });
     });
     VirtualRoot.Window <PoolEditCommand>(LogEnum.DevConsole,
                                          action: message => {
         UIThread.Execute(() => {
             PoolEdit.ShowWindow(message.FormType, message.Source);
         });
     });
     VirtualRoot.Window <SysDicItemEditCommand>(LogEnum.DevConsole,
                                                action: message => {
         UIThread.Execute(() => {
             SysDicItemEdit.ShowWindow(message.FormType, message.Source);
         });
     });
     VirtualRoot.Window <SysDicEditCommand>(LogEnum.DevConsole,
                                            action: message => {
         UIThread.Execute(() => {
             SysDicEdit.ShowWindow(message.FormType, message.Source);
         });
     });
     VirtualRoot.Window <UserEditCommand>(LogEnum.DevConsole,
                                          action: message => {
         UIThread.Execute(() => {
             UserEdit.ShowWindow(message.FormType, message.Source);
         });
     });
     VirtualRoot.Window <WalletEditCommand>(LogEnum.DevConsole,
                                            action: message => {
         UIThread.Execute(() => {
             WalletEdit.ShowWindow(message.FormType, message.Source);
         });
     });
 }
示例#13
0
 public override void Link()
 {
     VirtualRoot.BuildCmdPath <ShowDialogWindowCommand>(action: message => {
         UIThread.Execute(() => {
             DialogWindow.ShowDialog(new DialogWindowViewModel(message: message.Message, title: message.Title, onYes: message.OnYes, icon: message.Icon));
         });
     });
     VirtualRoot.BuildCmdPath <ShowQQGroupQrCodeCommand>(action: message => {
         UIThread.Execute(() => {
             QQGroupQrCode.ShowWindow();
         });
     });
     VirtualRoot.BuildCmdPath <ShowCalcCommand>(action: message => {
         UIThread.Execute(() => {
             Calc.ShowWindow(message.CoinVm);
         });
     });
     VirtualRoot.BuildCmdPath <ShowLocalIpsCommand>(action: message => {
         UIThread.Execute(() => {
             LocalIpConfig.ShowWindow();
         });
     });
     VirtualRoot.BuildCmdPath <ShowEthNoDevFeeCommand>(action: message => {
         UIThread.Execute(() => {
             EthNoDevFeeEdit.ShowWindow();
         });
     });
     VirtualRoot.BuildCmdPath <ShowCalcConfigCommand>(action: message => {
         UIThread.Execute(() => {
             CalcConfig.ShowWindow();
         });
     });
     VirtualRoot.BuildCmdPath <ShowMinerClientsWindowCommand>(action: message => {
         UIThread.Execute(() => {
             MinerClientsWindow.ShowWindow();
         });
     });
     VirtualRoot.BuildCmdPath <ShowNTMinerUpdaterConfigCommand>(action: message => {
         UIThread.Execute(() => {
             NTMinerUpdaterConfig.ShowWindow();
         });
     });
     VirtualRoot.BuildCmdPath <ShowAboutPageCommand>(action: message => {
         UIThread.Execute(() => {
             AboutPage.ShowWindow();
         });
     });
     VirtualRoot.BuildCmdPath <ShowKernelOutputPageCommand>(action: message => {
         UIThread.Execute(() => {
             KernelOutputPage.ShowWindow(message.SelectedKernelOutputVm);
         });
     });
     VirtualRoot.BuildCmdPath <ShowKernelInputPageCommand>(action: message => {
         UIThread.Execute(() => {
             KernelInputPage.ShowWindow();
         });
     });
     VirtualRoot.BuildCmdPath <ShowTagBrandCommand>(action: message => {
         if (NTMinerRoot.IsBrandSpecified)
         {
             return;
         }
         BrandTag.ShowWindow();
     });
     VirtualRoot.BuildCmdPath <ShowCoinPageCommand>(action: message => {
         UIThread.Execute(() => {
             CoinPage.ShowWindow(message.CurrentCoin, message.TabType);
         });
     });
     VirtualRoot.BuildCmdPath <ShowGroupPageCommand>(action: message => {
         UIThread.Execute(() => {
             GroupPage.ShowWindow();
         });
     });
     VirtualRoot.BuildCmdPath <ShowSysDicPageCommand>(action: message => {
         UIThread.Execute(() => {
             SysDicPage.ShowWindow();
         });
     });
     VirtualRoot.BuildCmdPath <ShowVirtualMemoryCommand>(action: message => {
         UIThread.Execute(() => {
             VirtualMemory.ShowWindow();
         });
     });
     VirtualRoot.BuildCmdPath <ShowRestartWindowsCommand>(action: message => {
         UIThread.Execute(() => {
             RestartWindows.ShowDialog();
         });
     });
     VirtualRoot.BuildCmdPath <ShowNotificationSampleCommand>(action: message => {
         UIThread.Execute(() => {
             NotificationSample.ShowWindow();
         });
     });
     VirtualRoot.BuildCmdPath <ShowPropertyCommand>(action: message => {
         UIThread.Execute(() => {
             Property.ShowWindow();
         });
     });
     VirtualRoot.BuildCmdPath <ShowChartsWindowCommand>(action: message => {
         UIThread.Execute(() => {
             ChartsWindow.ShowWindow();
         });
     });
     VirtualRoot.BuildCmdPath <ShowOverClockDataPageCommand>(action: message => {
         UIThread.Execute(() => {
             OverClockDataPage.ShowWindow();
         });
     });
     VirtualRoot.BuildCmdPath <ShowNTMinerWalletPageCommand>(action: message => {
         UIThread.Execute(() => {
             NTMinerWalletPage.ShowWindow();
         });
     });
     VirtualRoot.BuildCmdPath <ShowMessagePathIdsCommand>(action: message => {
         UIThread.Execute(() => {
             MessagePathIds.ShowWindow();
         });
     });
     VirtualRoot.BuildCmdPath <ShowUserPageCommand>(action: message => {
         UIThread.Execute(() => {
             UserPage.ShowWindow();
         });
     });
     VirtualRoot.BuildCmdPath <ShowRemoteDesktopLoginDialogCommand>(action: message => {
         RemoteDesktopLogin.ShowWindow(message.Vm);
     });
     VirtualRoot.BuildCmdPath <ShowKernelsWindowCommand>(action: message => {
         UIThread.Execute(() => {
             KernelsWindow.ShowWindow();
         });
     });
     VirtualRoot.BuildCmdPath <ShowKernelDownloaderCommand>(action: message => {
         UIThread.Execute(() => {
             KernelDownloading.ShowWindow(message.KernelId, message.DownloadComplete);
         });
     });
     VirtualRoot.BuildCmdPath <EnvironmentVariableEditCommand>(action: message => {
         UIThread.Execute(() => {
             EnvironmentVariableEdit.ShowWindow(message.CoinKernelVm, message.EnvironmentVariable);
         });
     });
     VirtualRoot.BuildCmdPath <InputSegmentEditCommand>(action: message => {
         UIThread.Execute(() => {
             InputSegmentEdit.ShowWindow(message.CoinKernelVm, message.Segment);
         });
     });
     VirtualRoot.BuildCmdPath <CoinKernelEditCommand>(action: message => {
         UIThread.Execute(() => {
             CoinKernelEdit.ShowWindow(message.FormType, message.Source);
         });
     });
     VirtualRoot.BuildCmdPath <CoinEditCommand>(action: message => {
         UIThread.Execute(() => {
             CoinEdit.ShowWindow(message.FormType, message.Source);
         });
     });
     VirtualRoot.BuildCmdPath <ColumnsShowEditCommand>(action: message => {
         UIThread.Execute(() => {
             ColumnsShowEdit.ShowWindow(message.FormType, message.Source);
         });
     });
     VirtualRoot.BuildCmdPath <ShowContainerWindowCommand>(action: message => {
         UIThread.Execute(() => {
             ContainerWindow window = ContainerWindow.GetWindow(message.Vm);
             window?.ShowWindow();
         });
     });
     VirtualRoot.BuildCmdPath <ShowSpeedChartsCommand>(action: message => {
         UIThread.Execute(() => {
             SpeedCharts.ShowWindow(message.GpuSpeedVm);
         });
     });
     VirtualRoot.BuildCmdPath <ShowFileWriterPageCommand>(action: message => {
         UIThread.Execute(() => {
             FileWriterPage.ShowWindow();
         });
     });
     VirtualRoot.BuildCmdPath <FileWriterEditCommand>(action: message => {
         UIThread.Execute(() => {
             FileWriterEdit.ShowWindow(message.FormType, message.Source);
         });
     });
     VirtualRoot.BuildCmdPath <ShowFragmentWriterPageCommand>(action: message => {
         UIThread.Execute(() => {
             FragmentWriterPage.ShowWindow();
         });
     });
     VirtualRoot.BuildCmdPath <FragmentWriterEditCommand>(action: message => {
         UIThread.Execute(() => {
             FragmentWriterEdit.ShowWindow(message.FormType, message.Source);
         });
     });
     VirtualRoot.BuildCmdPath <GroupEditCommand>(action: message => {
         UIThread.Execute(() => {
             GroupEdit.ShowWindow(message.FormType, message.Source);
         });
     });
     VirtualRoot.BuildCmdPath <KernelInputEditCommand>(action: message => {
         UIThread.Execute(() => {
             KernelInputEdit.ShowWindow(message.FormType, message.Source);
         });
     });
     VirtualRoot.BuildCmdPath <KernelOutputFilterEditCommand>(action: message => {
         UIThread.Execute(() => {
             KernelOutputFilterEdit.ShowWindow(message.FormType, message.Source);
         });
     });
     VirtualRoot.BuildCmdPath <KernelOutputTranslaterEditCommand>(action: message => {
         UIThread.Execute(() => {
             KernelOutputTranslaterEdit.ShowWindow(message.FormType, message.Source);
         });
     });
     VirtualRoot.BuildCmdPath <KernelOutputEditCommand>(action: message => {
         UIThread.Execute(() => {
             KernelOutputEdit.ShowWindow(message.FormType, message.Source);
         });
     });
     VirtualRoot.BuildCmdPath <ShowPackagesWindowCommand>(action: message => {
         UIThread.Execute(() => {
             PackagesWindow.ShowWindow();
         });
     });
     VirtualRoot.BuildCmdPath <KernelEditCommand>(action: message => {
         UIThread.Execute(() => {
             KernelEdit.ShowWindow(message.FormType, message.Source);
         });
     });
     VirtualRoot.BuildCmdPath <ShowLogColorCommand>(action: message => {
         UIThread.Execute(() => {
             LogColor.ShowWindow();
         });
     });
     VirtualRoot.BuildCmdPath <ShowMinerClientSettingCommand>(action: message => {
         UIThread.Execute(() => {
             MinerClientSetting.ShowWindow(message.Vm);
         });
     });
     VirtualRoot.BuildCmdPath <ShowMinerNamesSeterCommand>(action: message => {
         UIThread.Execute(() => {
             MinerNamesSeter.ShowWindow(message.Vm);
         });
     });
     VirtualRoot.BuildCmdPath <ShowGpuProfilesPageCommand>(action: message => {
         UIThread.Execute(() => {
             GpuProfilesPage.ShowWindow(message.MinerClientsWindowVm);
         });
     });
     VirtualRoot.BuildCmdPath <ShowMinerClientAddCommand>(action: message => {
         UIThread.Execute(() => {
             MinerClientAdd.ShowWindow();
         });
     });
     VirtualRoot.BuildCmdPath <MinerGroupEditCommand>(action: message => {
         UIThread.Execute(() => {
             MinerGroupEdit.ShowWindow(message.FormType, message.Source);
         });
     });
     VirtualRoot.BuildCmdPath <NTMinerWalletEditCommand>(action: message => {
         UIThread.Execute(() => {
             NTMinerWalletEdit.ShowWindow(message.FormType, message.Source);
         });
     });
     VirtualRoot.BuildCmdPath <MineWorkEditCommand>(action: message => {
         UIThread.Execute(() => {
             MineWorkEdit.ShowWindow(message.FormType, message.Source);
         });
     });
     VirtualRoot.BuildCmdPath <OverClockDataEditCommand>(action: message => {
         UIThread.Execute(() => {
             OverClockDataEdit.ShowWindow(message.FormType, message.Source);
         });
     });
     VirtualRoot.BuildCmdPath <PackageEditCommand>(action: message => {
         UIThread.Execute(() => {
             PackageEdit.ShowWindow(message.FormType, message.Source);
         });
     });
     VirtualRoot.BuildCmdPath <PoolKernelEditCommand>(action: message => {
         UIThread.Execute(() => {
             PoolKernelEdit.ShowWindow(message.FormType, message.Source);
         });
     });
     VirtualRoot.BuildCmdPath <PoolEditCommand>(action: message => {
         UIThread.Execute(() => {
             PoolEdit.ShowWindow(message.FormType, message.Source);
         });
     });
     VirtualRoot.BuildCmdPath <ShowControlCenterHostConfigCommand>(action: message => {
         UIThread.Execute(() => {
             ControlCenterHostConfig.ShowWindow();
         });
     });
     VirtualRoot.BuildCmdPath <SysDicItemEditCommand>(action: message => {
         UIThread.Execute(() => {
             SysDicItemEdit.ShowWindow(message.FormType, message.Source);
         });
     });
     VirtualRoot.BuildCmdPath <SysDicEditCommand>(action: message => {
         UIThread.Execute(() => {
             SysDicEdit.ShowWindow(message.FormType, message.Source);
         });
     });
     VirtualRoot.BuildCmdPath <UserEditCommand>(action: message => {
         UIThread.Execute(() => {
             UserEdit.ShowWindow(message.FormType, message.Source);
         });
     });
     VirtualRoot.BuildCmdPath <WalletEditCommand>(action: message => {
         UIThread.Execute(() => {
             WalletEdit.ShowWindow(message.FormType, message.Source);
         });
     });
 }
        public App()
        {
            InitializeComponent();

            MainPage = new GroupPage();
        }
示例#15
0
 public void InsertGroupPage(GroupPage groupPage)
 {
     _groupPageRepository.Insert(groupPage);
 }
        private void CreateSampleData()
        {
            var teamPage = new TeamPage()
            {
                CreatedBy = 1,
                CreatedOn = DateTime.Now,
                UpdatedBy = 1,
                UpdatedOn = DateTime.Now,
                Name = "SkateMob",
                Description = "SkateMob members are the #1 skaters in the world!",
                TeamPictureUrl = ""

            };

            _socialNetworkService.InsertTeamPage(teamPage);

            var groupPage = new GroupPage()
            {
                Name = "Soldiers",
                Description = "New and upcoming skaters",
                PayPalDonateUrl = ""

            };

            _socialNetworkService.InsertGroupPage(groupPage);
        }