Пример #1
0
        public void Init(IQFrameworkContainer container)
        {
            var frameworkData    = mPackageDatas.Find(packageData => packageData.Name == "Framework");
            var frameworkVersion = string.Format("QFramework:{0}", frameworkData.Version);

            mEGORootLayout = new VerticalLayout();


            var frameworkInfoLayout = new HorizontalLayout("box")
                                      .AddTo(mEGORootLayout);

            new EGO.Framework.LabelView(frameworkVersion)
            .Width(150)
            .FontBold()
            .FontSize(12)
            .AddTo(frameworkInfoLayout);

            new ToggleView(LocaleText.VersionCheck, VersionCheck)
//                .FontSize(12)
//                .FontBold()
            .AddTo(frameworkInfoLayout)
            .Toggle.Bind(newValue => VersionCheck = newValue);

            new ToolbarView(ToolbarIndex)
            .Menus(ToolbarNames.ToList())
            .AddTo(mEGORootLayout)
            .Index.Bind(newIndex => ToolbarIndex = newIndex);


            new HeaderView()
            .AddTo(mEGORootLayout);

            var packageList = new VerticalLayout("box")
                              .AddTo(mEGORootLayout);

            var scroll = new ScrollLayout()
                         .Height(240)
                         .AddTo(packageList);

            new EGO.Framework.SpaceView(2).AddTo(scroll);

            mOnToolbarIndexChanged = () =>
            {
                scroll.Clear();

                foreach (var packageData in SelectedPackageType)
                {
                    new EGO.Framework.SpaceView(2).AddTo(scroll);
                    new PackageView(packageData).AddTo(scroll);
                }
            };

            foreach (var packageData in SelectedPackageType)
            {
                new EGO.Framework.SpaceView(2).AddTo(scroll);
                new PackageView(packageData).AddTo(scroll);
            }
        }
Пример #2
0
        void OnRefresh(QF.PackageKit.State state)
        {
            mRootLayout = new VerticalLayout();

            var treeNode = new TreeNode(true, LocaleText.FrameworkPackages).AddTo(mRootLayout);

            var verticalLayout = new VerticalLayout("box");

            treeNode.Add2Spread(verticalLayout);

            new ToolbarView(ToolbarIndex)
            .Menus(ToolbarNames.ToList())
            .AddTo(verticalLayout)
            .Index.Bind(newIndex => ToolbarIndex = newIndex);


            new HeaderView()
            .AddTo(verticalLayout);

            var packageList = new VerticalLayout("box")
                              .AddTo(verticalLayout);

            var scroll = new ScrollLayout()
                         .Height(240)
                         .AddTo(packageList);

            new SpaceView(2).AddTo(scroll);

            mOnToolbarIndexChanged = () =>
            {
                scroll.Clear();

                foreach (var packageData in SelectedPackageType(state.PackageDatas))
                {
                    new SpaceView(2).AddTo(scroll);
                    new PackageView(packageData).AddTo(scroll);
                }
            };

            foreach (var packageData in SelectedPackageType(state.PackageDatas))
            {
                new SpaceView(2).AddTo(scroll);
                new PackageView(packageData).AddTo(scroll);
            }
        }
Пример #3
0
        public void Init(IQFrameworkContainer container)
        {
            PackageKitModel.Subject
            .StartWith(PackageKitModel.State)
            .Subscribe(state =>
            {
//                    var frameworkData = PackageInfosRequestCache.Get().PackageDatas.Find(packageData => packageData.Name == "Framework");
//                    var frameworkVersion = string.Format("QFramework:{0}", frameworkData.Version);

                mRootLayout = new VerticalLayout();

                var treeNode = new TreeNode(true, LocaleText.FrameworkPackages).AddTo(mRootLayout);


                var verticalLayout = new VerticalLayout("box");


                treeNode.Add2Spread(verticalLayout);

//                    var frameworkInfoLayout = new HorizontalLayout("box")
//                        .AddTo(mEGORootLayout);

//                    new EGO.Framework.LabelView(frameworkVersion)
//                        .Width(150)
//                        .FontBold()
//                        .FontSize(12)
//                        .AddTo(frameworkInfoLayout);

//                    new ToggleView(LocaleText.VersionCheck, state.VersionCheck)
//                        .AddTo(frameworkInfoLayout)
//                        .Toggle
//                        .Bind(newValue => state.VersionCheck = newValue);

                new ToolbarView(ToolbarIndex)
                .Menus(ToolbarNames.ToList())
                .AddTo(verticalLayout)
                .Index.Bind(newIndex => ToolbarIndex = newIndex);


                new HeaderView()
                .AddTo(verticalLayout);

                var packageList = new VerticalLayout("box")
                                  .AddTo(verticalLayout);

                var scroll = new ScrollLayout()
                             .Height(240)
                             .AddTo(packageList);

                new EGO.Framework.SpaceView(2).AddTo(scroll);

                mOnToolbarIndexChanged = () =>
                {
                    scroll.Clear();

                    foreach (var packageData in SelectedPackageType(state.PackageDatas))
                    {
                        new EGO.Framework.SpaceView(2).AddTo(scroll);
                        new PackageView(packageData).AddTo(scroll);
                    }
                };

                foreach (var packageData in SelectedPackageType(state.PackageDatas))
                {
                    new EGO.Framework.SpaceView(2).AddTo(scroll);
                    new PackageView(packageData).AddTo(scroll);
                }
            });
        }