Exemple #1
0
        public void CheckAboutPage()
        {
            var aboutPage = new AboutPage();
            const string TEST_TEXT = "Text which rewrote";

            aboutPage.SaveContent("Some text..");
            aboutPage.SaveContent(TEST_TEXT);

            var sameAboutPage = new AboutPage();
            string actual = sameAboutPage.GetPlainContent();
            Assert.AreEqual(TEST_TEXT, actual);
        }
Exemple #2
0
        public MainPage()
        {
            Page itemsPage, aboutPage = null;

            switch (Device.RuntimePlatform)
            {
            case Device.iOS:
                itemsPage = new NavigationPage(new ItemsPage())
                {
                    Title = "Browse"
                };

                aboutPage = new NavigationPage(new AboutPage())
                {
                    Title = "About"
                };
                itemsPage.Icon = "tab_feed.png";
                aboutPage.Icon = "tab_about.png";
                break;

            default:
                itemsPage = new ItemsPage()
                {
                    Title = "Browse"
                };

                aboutPage = new AboutPage()
                {
                    Title = "About"
                };
                break;
            }

            Children.Add(itemsPage);
            Children.Add(aboutPage);

            Title = Children[0].Title;
        }
Exemple #3
0
        // 初始化所有页面
        public static void InitPages()
        {
            // 创建各个子页面
            PathProjectPage = new PathProjectPage();
            RouteRecordPage = new RouteRecordPage();
            SettingPage     = new SettingPage();
            AboutPage       = new AboutPage();

            // 创建各个子页面的ViewModel
            PathProjectPageViewModel = new PathProjectPageViewModel();
            RouteRecordPageViewModel = new RouteRecordPageViewModel();
            SettingPageViewModel     = new SettingPageViewModel();
            AboutPageViewModel       = new AboutPageViewModel();

            // 设置各个页面的视图模型
            PathProjectPage.DataContext = PathProjectPageViewModel;
            RouteRecordPage.DataContext = RouteRecordPageViewModel;
            SettingPage.DataContext     = SettingPageViewModel;
            AboutPage.DataContext       = AboutPageViewModel;

            // 默认显示线路规划页面
            CurrentPage = PathProjectPage;
            IsPathProjectPageChecked = true;
        }
        void PresentDetailPage(PageType pageType)
        {
            Page page;

            switch (pageType)
            {
            case PageType.Sunrise:
                page = new SunrisePage();
                break;

            case PageType.MoonPhase:
                page = new MoonPhasePage();
                break;

            case PageType.Earth:
                page = new AstronomicalBodyPage(SolarSystemData.Earth);
                break;

            case PageType.Moon:
                page = new AstronomicalBodyPage(SolarSystemData.Moon);
                break;

            case PageType.Sun:
                page = new AstronomicalBodyPage(SolarSystemData.Sun);
                break;

            case PageType.About:
            default:
                page = new AboutPage();
                break;
            }

            Detail = new NavigationPage(page);

            IsPresented = false;
        }
Exemple #5
0
        public void All_Pages_Are_Available()
        {
            Assert.IsTrue(HomePage.IsAt());

            Footer.GoToAbout();
            Assert.IsTrue(AboutPage.IsAt());

            AboutPage.GoToAtomFeed();
            Assert.IsTrue(AtomFeed.IsAt());

            Navigation.GoToRoot();
            Navigation.GoToBlog();
            Assert.IsTrue(HomePage.IsAt());

            Navigation.GoToTrending();
            TrendingPage.IsAt();

            Navigation.GoToArchive();
            Assert.IsTrue(ArchivePage.IsAt());

            Navigation.GoToRoot();
            Navigation.GoToRssFeed();
            Assert.IsTrue(RssFeed.IsAt());
        }
Exemple #6
0
 /// <summary>
 /// Удаляет данные страницы из базы данных
 /// </summary>
 public void Delete()
 {
     try
     {
         if (Content != null)
         {
             using (var statement = connection.Prepare("DELETE FROM AboutPageContent WHERE Id=?"))
             {
                 statement.Bind("Id", Content.Id);
                 statement.Step();
                 aboutPageContent = null;
             }
         }
     }
     catch (SQLiteException e)
     {
         Messages.ShowDatabaseErrorMessage();
         Debug.WriteLine(e.Message);
     }
     catch (Exception e)
     {
         Messages.ShowErrorMessage(e.Message);
     }
 }
Exemple #7
0
        public MainFrm()
        {
            InitializeComponent();

            _connected    = Connected;
            _disconnected = Disconnected;
            _services     = new List <ITanjiService>();
            _toRemoveList = new List <IDataHandler>();
            _dataHandlers = new List <IDataHandler>();

            Connection               = new HConnection();
            Connection.Connected    += Connected;
            Connection.Disconnected += Disconnected;
            Connection.DataOutgoing += DataOutgoing;
            Connection.DataIncoming += DataIncoming;

            AboutPg      = new AboutPage(this, AboutTab);
            ToolboxPg    = new ToolboxPage(this, ToolboxTab);
            InjectionPg  = new InjectionPage(this, InjectionTab);
            ExtensionsPg = new ExtensionsPage(this, ExtensionsTab);
            ConnectionPg = new ConnectionPage(this, ConnectionTab);

            PacketLoggerUI = new PacketLoggerFrm(this);
        }
Exemple #8
0
        public bool UpdateAbout(AboutPage Details, string InsertUser)
        {
            bool rpta = false;

            try
            {
                SqlCon.Open();
                var SqlCmd = new SqlCommand("[adm].[uspAddAboutPage]", SqlCon)
                {
                    CommandType = CommandType.StoredProcedure
                };

                //Insert Parameters
                SqlParameter pHistory = new SqlParameter
                {
                    ParameterName = "@History",
                    SqlDbType     = SqlDbType.VarChar,
                    Value         = Details.History.Trim()
                };
                SqlCmd.Parameters.Add(pHistory);

                SqlParameter pMision = new SqlParameter
                {
                    ParameterName = "@Mision",
                    SqlDbType     = SqlDbType.VarChar,
                    Value         = Details.Mision.Trim()
                };
                SqlCmd.Parameters.Add(pMision);

                SqlParameter pVision = new SqlParameter
                {
                    ParameterName = "@Vision",
                    SqlDbType     = SqlDbType.VarChar,
                    Value         = Details.Vision.Trim()
                };
                SqlCmd.Parameters.Add(pVision);

                SqlParameter pPastors = new SqlParameter
                {
                    ParameterName = "@Pastors",
                    SqlDbType     = SqlDbType.VarChar,
                    Value         = Details.Pastors.Trim()
                };
                SqlCmd.Parameters.Add(pPastors);

                SqlParameter ParInsertUser = new SqlParameter
                {
                    ParameterName = "@InsertUser",
                    SqlDbType     = SqlDbType.VarChar,
                    Size          = 50,
                    Value         = InsertUser
                };
                SqlCmd.Parameters.Add(ParInsertUser);

                //Exec Command
                SqlCmd.ExecuteNonQuery();

                rpta = true;
            }
            catch (Exception ex)
            {
                throw ex;
            }

            if (SqlCon.State == ConnectionState.Open)
            {
                SqlCon.Close();
            }
            return(rpta);
        }
 public void SetUp()
 {
     _aboutPage = new AboutPage(Driver);
 }
Exemple #10
0
        private void btnAbout_Click(object sender, RoutedEventArgs e)
        {
            AboutPage AP = new AboutPage();

            AP.ShowAsWindow();
        }
Exemple #11
0
        public void Selected(string item)
        {
            switch (item)
            {
            case "Home":
                if (Device.RuntimePlatform == Device.iOS)
                {
                    if (home == null)
                    {
                        home = new NavigationPage(new Home());
                    }
                }
                else
                {
                    if (home == null)
                    {
                        home = new Home();
                    }
                }

                rootPage.Detail = home;
                rootPage.Title  = "Home";
                break;

            case "Trade":
                if (Device.RuntimePlatform == Device.iOS)
                {
                    Trade = new NavigationPage(new TradePage());
                }
                else
                {
                    Trade = new TradePage();
                }
                rootPage.Detail = Trade;
                rootPage.Title  = "Trade";
                break;

            case "MyTrade":
                if (Device.RuntimePlatform == Device.iOS)
                {
                    myTrade = new NavigationPage(new MyTrade());
                }
                else
                {
                    myTrade = new MyTrade();
                }
                rootPage.Detail = myTrade;
                rootPage.Title  = "My Trade";
                break;

            case "Notification":
                if (Device.RuntimePlatform == Device.iOS)
                {
                    Notification = new NavigationPage(new TabView());
                }
                else
                {
                    Notification = new TabView();
                }
                rootPage.Detail = Notification;
                rootPage.Title  = "Notificatin";
                break;

            case "About":
                About = new AboutPage()
                {
                    // BarBackgroundColor = App.BrandColor,
                    ///// BarTextColor = Color.White
                };
                rootPage.Detail = About;
                break;
            }
            ;
            rootPage.IsPresented = false;  // close the slide-out
        }
Exemple #12
0
 public IActionResult UpdateAboutPage([FromBody] AboutPage entity)
 {
     _aboutPageService.Update(entity);
     _logger.LogInformation(" Update : Aboutpage ");
     return(Ok());
 }
Exemple #13
0
 public void UpdateAbout(AboutPage aboutPage)
 {
     var result = _aboutManagement.EditAboutPage(aboutPage);
 }
        public override void BuildPaths()
        {
            var location = this.GetType();

            VirtualRoot.AddCmdPath <ShowDialogWindowCommand>(action: message => {
                UIThread.Execute(() => {
                    DialogWindow.ShowSoftDialog(new DialogWindowViewModel(message: message.Message, title: message.Title, onYes: message.OnYes, icon: message.Icon));
                });
            }, location: location);
            VirtualRoot.AddCmdPath <ShowCalcCommand>(action: message => {
                UIThread.Execute(() => {
                    Calc.ShowWindow(message.CoinVm);
                });
            }, location: location);
            VirtualRoot.AddCmdPath <ShowLocalIpsCommand>(action: message => {
                UIThread.Execute(() => {
                    MinerClientUcs.LocalIpConfig.ShowWindow();
                });
            }, location: location);
            VirtualRoot.AddCmdPath <ShowAboutPageCommand>(action: message => {
                UIThread.Execute(() => {
                    AboutPage.ShowWindow();
                });
            }, location: location);
            VirtualRoot.AddCmdPath <ShowKernelOutputPageCommand>(action: message => {
                UIThread.Execute(() => {
                    KernelOutputPage.ShowWindow(message.SelectedKernelOutputVm);
                });
            }, location: location);
            VirtualRoot.AddCmdPath <ShowKernelInputPageCommand>(action: message => {
                UIThread.Execute(() => {
                    KernelInputPage.ShowWindow();
                });
            }, location: location);
            VirtualRoot.AddCmdPath <ShowTagBrandCommand>(action: message => {
                if (NTMinerContext.IsBrandSpecified)
                {
                    return;
                }
                UIThread.Execute(() => {
                    BrandTag.ShowWindow();
                });
            }, location: location);
            VirtualRoot.AddCmdPath <ShowCoinPageCommand>(action: message => {
                UIThread.Execute(() => {
                    CoinPage.ShowWindow(message.CurrentCoin, message.TabType);
                });
            }, location: location);
            VirtualRoot.AddCmdPath <ShowCoinGroupsCommand>(action: message => {
                UIThread.Execute(() => {
                    CoinGroupPage.ShowWindow();
                });
            }, location: location);
            VirtualRoot.AddCmdPath <ShowSysDicPageCommand>(action: message => {
                UIThread.Execute(() => {
                    SysDicPage.ShowWindow();
                });
            }, location: location);
            VirtualRoot.AddCmdPath <ShowVirtualMemoryCommand>(action: message => {
                UIThread.Execute(() => {
                    MinerClientUcs.VirtualMemory.ShowWindow();
                });
            }, location: location);
            VirtualRoot.AddCmdPath <ShowRestartWindowsCommand>(action: message => {
                UIThread.Execute(() => {
                    RestartWindows.ShowDialog(new RestartWindowsViewModel(message.CountDownSeconds));
                });
            }, location: location);
            VirtualRoot.AddCmdPath <ShowNotificationSampleCommand>(action: message => {
                UIThread.Execute(() => {
                    NotificationSample.ShowWindow();
                });
            }, location: location);
            VirtualRoot.AddCmdPath <ShowPropertyCommand>(action: message => {
                UIThread.Execute(() => {
                    Property.ShowWindow();
                });
            }, location: location);
            VirtualRoot.AddCmdPath <ShowMessagePathIdsCommand>(action: message => {
                UIThread.Execute(() => {
                    MessagePathIds.ShowWindow();
                });
            }, location: location);
            VirtualRoot.AddCmdPath <ShowKernelsWindowCommand>(action: message => {
                UIThread.Execute(() => {
                    KernelsWindow.ShowWindow();
                });
            }, location: location);
            VirtualRoot.AddCmdPath <ShowKernelDownloaderCommand>(action: message => {
                UIThread.Execute(() => {
                    KernelDownloading.ShowWindow(message.KernelId, message.DownloadComplete);
                });
            }, location: location);
            VirtualRoot.AddCmdPath <EditEnvironmentVariableCommand>(action: message => {
                UIThread.Execute(() => {
                    EnvironmentVariableEdit.ShowWindow(message.CoinKernelVm, message.EnvironmentVariable);
                });
            }, location: location);
            VirtualRoot.AddCmdPath <EditInputSegmentCommand>(action: message => {
                UIThread.Execute(() => {
                    InputSegmentEdit.ShowWindow(message.CoinKernelVm, message.Segment);
                });
            }, location: location);
            VirtualRoot.AddCmdPath <EditCoinKernelCommand>(action: message => {
                UIThread.Execute(() => {
                    CoinKernelEdit.ShowWindow(message.FormType, message.Source);
                });
            }, location: location);
            VirtualRoot.AddCmdPath <EditCoinCommand>(action: message => {
                UIThread.Execute(() => {
                    CoinEdit.ShowWindow(message.FormType, message.Source);
                });
            }, location: location);
            VirtualRoot.AddCmdPath <ShowSpeedChartsCommand>(action: message => {
                UIThread.Execute(() => {
                    SpeedCharts.ShowWindow(message.GpuSpeedVm);
                });
            }, location: location);
            VirtualRoot.AddCmdPath <ShowFileWriterPageCommand>(action: message => {
                UIThread.Execute(() => {
                    FileWriterPage.ShowWindow();
                });
            }, location: location);
            VirtualRoot.AddCmdPath <EditFileWriterCommand>(action: message => {
                UIThread.Execute(() => {
                    FileWriterEdit.ShowWindow(message.FormType, message.Source);
                });
            }, location: location);
            VirtualRoot.AddCmdPath <ShowFragmentWriterPageCommand>(action: message => {
                UIThread.Execute(() => {
                    FragmentWriterPage.ShowWindow();
                });
            }, location: location);
            VirtualRoot.AddCmdPath <EditFragmentWriterCommand>(action: message => {
                UIThread.Execute(() => {
                    FragmentWriterEdit.ShowWindow(message.FormType, message.Source);
                });
            }, location: location);
            VirtualRoot.AddCmdPath <EditGroupCommand>(action: message => {
                UIThread.Execute(() => {
                    GroupEdit.ShowWindow(message.FormType, message.Source);
                });
            }, location: location);
            VirtualRoot.AddCmdPath <EditServerMessageCommand>(action: message => {
                UIThread.Execute(() => {
                    ServerMessageEdit.ShowWindow(message.FormType, message.Source);
                });
            }, location: location);
            VirtualRoot.AddCmdPath <EditKernelInputCommand>(action: message => {
                UIThread.Execute(() => {
                    KernelInputEdit.ShowWindow(message.FormType, message.Source);
                });
            }, location: location);
            VirtualRoot.AddCmdPath <EditKernelOutputKeywordCommand>(action: message => {
                UIThread.Execute(() => {
                    KernelOutputKeywordEdit.ShowWindow(message.FormType, message.Source);
                });
            }, location: location);
            VirtualRoot.AddCmdPath <EditKernelOutputTranslaterCommand>(action: message => {
                UIThread.Execute(() => {
                    KernelOutputTranslaterEdit.ShowWindow(message.FormType, message.Source);
                });
            }, location: location);
            VirtualRoot.AddCmdPath <EditKernelOutputCommand>(action: message => {
                UIThread.Execute(() => {
                    KernelOutputEdit.ShowWindow(message.FormType, message.Source);
                });
            }, location: location);
            VirtualRoot.AddCmdPath <ShowPackagesWindowCommand>(action: message => {
                UIThread.Execute(() => {
                    PackagesWindow.ShowWindow();
                });
            }, location: location);
            VirtualRoot.AddCmdPath <EditKernelCommand>(action: message => {
                UIThread.Execute(() => {
                    KernelEdit.ShowWindow(message.FormType, message.Source);
                });
            }, location: location);
            VirtualRoot.AddCmdPath <EditPackageCommand>(action: message => {
                UIThread.Execute(() => {
                    PackageEdit.ShowWindow(message.FormType, message.Source);
                });
            }, location: location);
            VirtualRoot.AddCmdPath <EditPoolKernelCommand>(action: message => {
                UIThread.Execute(() => {
                    PoolKernelEdit.ShowWindow(message.FormType, message.Source);
                });
            }, location: location);
            VirtualRoot.AddCmdPath <EditPoolCommand>(action: message => {
                UIThread.Execute(() => {
                    PoolEdit.ShowWindow(message.FormType, message.Source);
                });
            }, location: location);
            VirtualRoot.AddCmdPath <EditSysDicItemCommand>(action: message => {
                UIThread.Execute(() => {
                    SysDicItemEdit.ShowWindow(message.FormType, message.Source);
                });
            }, location: location);
            VirtualRoot.AddCmdPath <EditSysDicCommand>(action: message => {
                UIThread.Execute(() => {
                    SysDicEdit.ShowWindow(message.FormType, message.Source);
                });
            }, location: location);
            VirtualRoot.AddCmdPath <ShowKernelOutputKeywordsCommand>(action: message => {
                UIThread.Execute(() => {
                    KernelOutputKeywords.ShowWindow();
                });
            }, location: location);
            VirtualRoot.AddCmdPath <ShowSignUpPageCommand>(action: message => {
                UIThread.Execute(() => {
                    SignUpPage.ShowWindow();
                });
            }, location: location);
            VirtualRoot.AddCmdPath <EditWalletCommand>(action: message => {
                UIThread.Execute(() => {
                    WalletEdit.ShowWindow(message.FormType, message.Source);
                });
            }, location: location);

            #region MinerStudio
            VirtualRoot.AddCmdPath <ShowQQGroupQrCodeCommand>(action: message => {
                UIThread.Execute(() => {
                    MinerStudioUcs.QQGroupQrCode.ShowWindow();
                });
            }, location: location);
            VirtualRoot.AddCmdPath <ShowCalcConfigCommand>(action: message => {
                UIThread.Execute(() => {
                    MinerStudioUcs.CalcConfig.ShowWindow();
                });
            }, location: location);
            VirtualRoot.AddCmdPath <ShowMinerClientsWindowCommand>(action: message => {
                UIThread.Execute(() => {
                    MinerStudioViews.MinerClientsWindow.ShowWindow(message.IsToggle);
                });
            }, location: location);
            VirtualRoot.AddCmdPath <ShowNTMinerUpdaterConfigCommand>(action: message => {
                UIThread.Execute(() => {
                    MinerStudioUcs.NTMinerUpdaterConfig.ShowWindow();
                });
            }, location: location);
            VirtualRoot.AddCmdPath <ShowMinerClientFinderConfigCommand>(action: message => {
                UIThread.Execute(() => {
                    MinerStudioUcs.MinerClientFinderConfig.ShowWindow();
                });
            }, location: location);
            VirtualRoot.AddCmdPath <ShowChartsWindowCommand>(action: message => {
                UIThread.Execute(() => {
                    MinerStudioViews.ChartsWindow.ShowWindow();
                });
            }, location: location);
            VirtualRoot.AddCmdPath <ShowOverClockDataPageCommand>(action: message => {
                UIThread.Execute(() => {
                    MinerStudioUcs.OverClockDataPage.ShowWindow();
                });
            }, location: location);
            VirtualRoot.AddCmdPath <ShowMinerStudioVirtualMemoryCommand>(action: message => {
                UIThread.Execute(() => {
                    MinerStudioUcs.VirtualMemory.ShowWindow(message.Vm);
                });
            }, location: location);
            VirtualRoot.AddCmdPath <ShowMinerStudioLocalIpsCommand>(action: message => {
                UIThread.Execute(() => {
                    MinerStudioUcs.LocalIpConfig.ShowWindow(message.Vm);
                });
            }, location: location);
            VirtualRoot.AddCmdPath <ShowNTMinerWalletPageCommand>(action: message => {
                UIThread.Execute(() => {
                    MinerStudioUcs.NTMinerWalletPage.ShowWindow();
                });
            }, location: location);
            VirtualRoot.AddCmdPath <ShowUserPageCommand>(action: message => {
                UIThread.Execute(() => {
                    MinerStudioUcs.UserPage.ShowWindow();
                });
            }, location: location);
            VirtualRoot.AddCmdPath <ShowGpuNamePageCommand>(action: message => {
                UIThread.Execute(() => {
                    MinerStudioUcs.GpuNameCounts.ShowWindow();
                });
            }, location: location);
            VirtualRoot.AddCmdPath <ShowChangePassword>(action: message => {
                UIThread.Execute(() => {
                    MinerStudioUcs.ChangePassword.ShowWindow();
                });
            }, location: location);
            VirtualRoot.AddCmdPath <ShowWsServerNodePageCommand>(action: message => {
                UIThread.Execute(() => {
                    MinerStudioUcs.WsServerNodePage.ShowWindow();
                });
            }, location: location);
            VirtualRoot.AddCmdPath <ShowRemoteDesktopLoginDialogCommand>(action: message => {
                UIThread.Execute(() => {
                    MinerStudioUcs.RemoteDesktopLogin.ShowWindow(message.Vm);
                });
            }, location: location);
            VirtualRoot.AddCmdPath <ShowMinerClientSettingCommand>(action: message => {
                UIThread.Execute(() => {
                    MinerStudioUcs.MinerClientSetting.ShowWindow(message.Vm);
                });
            }, location: location);
            VirtualRoot.AddCmdPath <ShowMinerNamesSeterCommand>(action: message => {
                UIThread.Execute(() => {
                    MinerStudioUcs.MinerNamesSeter.ShowWindow(message.Vm);
                });
            }, location: location);
            VirtualRoot.AddCmdPath <ShowGpuProfilesPageCommand>(action: message => {
                UIThread.Execute(() => {
                    MinerStudioUcs.GpuProfilesPage.ShowWindow(message.MinerClientsWindowVm);
                });
            }, location: location);
            VirtualRoot.AddCmdPath <ShowMinerClientAddCommand>(action: message => {
                UIThread.Execute(() => {
                    MinerStudioUcs.MinerClientAdd.ShowWindow();
                });
            }, location: location);
            VirtualRoot.AddCmdPath <EditMinerGroupCommand>(action: message => {
                UIThread.Execute(() => {
                    MinerStudioUcs.MinerGroupEdit.ShowWindow(message.FormType, message.Source);
                });
            }, location: location);
            VirtualRoot.AddCmdPath <EditNTMinerWalletCommand>(action: message => {
                UIThread.Execute(() => {
                    MinerStudioUcs.NTMinerWalletEdit.ShowWindow(message.FormType, message.Source);
                });
            }, location: location);
            VirtualRoot.AddCmdPath <EditMineWorkCommand>(action: message => {
                UIThread.Execute(() => {
                    MinerStudioUcs.MineWorkEdit.ShowWindow(message.FormType, message.Source);
                });
            }, location: location);
            VirtualRoot.AddCmdPath <EditOverClockDataCommand>(action: message => {
                UIThread.Execute(() => {
                    MinerStudioUcs.OverClockDataEdit.ShowWindow(message.FormType, message.Source);
                });
            }, location: location);
            VirtualRoot.AddCmdPath <EditColumnsShowCommand>(action: message => {
                UIThread.Execute(() => {
                    MinerStudioUcs.ColumnsShowEdit.ShowWindow(message.Source);
                });
            }, location: location);
            #endregion
        }
Exemple #15
0
        public MSProApp()
        {
            Version = "1.1";

            StatusPage       = (StatusPage)FreshPageModelResolver.ResolvePageModel <StatusViewModel>();
            StatusPage.Title = Translation.GetString("Status");
            StatusVM         = (StatusViewModel)StatusPage.BindingContext;

            CountriesPage       = (CountriesPage)FreshPageModelResolver.ResolvePageModel <CountriesViewModel>();
            CountriesPage.Title = Translation.GetString("Countries");
            CountriesVM         = (CountriesViewModel)CountriesPage.BindingContext;

            CitiesPage       = (CitiesPage)FreshPageModelResolver.ResolvePageModel <CitiesViewModel>();
            CitiesPage.Title = Translation.GetString("Cities");
            CitiesVM         = (CitiesViewModel)CitiesPage.BindingContext;

            TorLogPage       = (TorLogPage)FreshPageModelResolver.ResolvePageModel <TorLogViewModel>();
            TorLogPage.Title = Translation.GetString("Tor log");
            TorLogVM         = (TorLogViewModel)TorLogPage.BindingContext;

            SettingsPage       = (SettingsPage)FreshPageModelResolver.ResolvePageModel <SettingsViewModel>();
            SettingsPage.Title = Translation.GetString("Settings");
            SettingsVM         = (SettingsViewModel)SettingsPage.BindingContext;

            AboutPage       = (AboutPage)FreshPageModelResolver.ResolvePageModel <AboutViewModel>();
            AboutPage.Title = Translation.GetString("About");
            AboutVM         = (AboutViewModel)AboutPage.BindingContext;

            ProxyTips = new TabbedPage();
            ProxyTipsWifiPage wfPage = (ProxyTipsWifiPage)FreshPageModelResolver.ResolvePageModel <ProxyTipsWifiViewModel>();

            wfPage.Title = Translation.GetString("Wi-Fi");
            PTWFVM       = (ProxyTipsWifiViewModel)wfPage.BindingContext;

            ProxyTipsAPNPage apnPage = (ProxyTipsAPNPage)FreshPageModelResolver.ResolvePageModel <ProxyTipsAPNViewModel>();

            apnPage.Title = Translation.GetString("APN");
            PTAPNVM       = (ProxyTipsAPNViewModel)apnPage.BindingContext;
            ProxyTips.Children.Add(wfPage);
            ProxyTips.Children.Add(apnPage);

            MainPage = new NavigationPage(StatusPage);

            MessagingCenter.Subscribe <MSProApp, string>(this, "TorOutput", (sender, arg) =>
            {
                if (arg.CompareTo(System.String.Empty) != 0)
                {
                    TorLogVM.TorLog.Add(arg);
                    MessagingCenter.Send <StatusViewModel, string>(StatusVM, "NewLoadMessage", arg);
                }
                if (arg.IndexOf("[err]") != -1)
                {
                    //error!
                }
                if (arg.IndexOf("100%") != -1)
                {
                    Task tc = Task.Run(() =>
                    {
                        Tor.Connect();
                    });
                    tc.Wait();
                    MessagingCenter.Send <StatusPage>((StatusPage)StatusVM.CurrentPage, "BootstrappFinished");
                }
            });
            MessagingCenter.Subscribe <MSProApp>(this, "Start", (sender) =>
            {
                OnStart();
            });
        }
Exemple #16
0
        protected override void OnStart()
        {
            //xlarge screens are at least 960dp x 720dp
            //large screens are at least 640dp x 480dp
            //normal screens are at least 470dp x 320dp
            //small screens are at least 426dp x 320dp

            float dens = DependencyService.Get <IDisplaySize>().GetDensity();
            int   wd = DependencyService.Get <IDisplaySize>().GetWidthDiP();
            int   hd = DependencyService.Get <IDisplaySize>().GetHeightDiP();
            int   bigger, smaller;

            if (wd > hd) //landscape
            {
                bigger  = wd;
                smaller = hd;
            }
            else //portrait
            {
                bigger  = hd;
                smaller = wd;
            }

            if (Device.Idiom == TargetIdiom.Tablet)
            {
                if (smaller >= 500 && smaller < 700) //SW500
                {
                    StatusPageSW500 sp = new StatusPageSW500();
                    sp.Title = Translation.GetString("Status");
                    FreshMvvm.FreshPageModelResolver.BindingPageModel(null, sp, StatusVM);
                    MainPage = new NavigationPage(sp);

                    TorLogPageSW500 tlp = new TorLogPageSW500();
                    tlp.Title = Translation.GetString("Tor log");
                    FreshMvvm.FreshPageModelResolver.BindingPageModel(null, tlp, TorLogVM);

                    CountriesPageSW500 cap = new CountriesPageSW500();
                    cap.Title = Translation.GetString("Countries");
                    FreshMvvm.FreshPageModelResolver.BindingPageModel(null, cap, CountriesVM);

                    CitiesPageSW500 cip = new CitiesPageSW500();
                    cip.Title = Translation.GetString("Cities");
                    FreshMvvm.FreshPageModelResolver.BindingPageModel(null, cip, CitiesVM);
                }
            }

            if (Device.Idiom == TargetIdiom.Phone)
            {
                if (smaller >= 500) //SW500
                {
                    StatusPageSW500 sp = new StatusPageSW500();
                    sp.Title = Translation.GetString("Status");
                    FreshMvvm.FreshPageModelResolver.BindingPageModel(null, sp, StatusVM);
                    MainPage = new NavigationPage(sp);

                    TorLogPageSW500 tlp = new TorLogPageSW500();
                    tlp.Title = Translation.GetString("Tor log");
                    FreshMvvm.FreshPageModelResolver.BindingPageModel(null, tlp, TorLogVM);

                    CountriesPageSW500 cap = new CountriesPageSW500();
                    cap.Title = Translation.GetString("Countries");
                    FreshMvvm.FreshPageModelResolver.BindingPageModel(null, cap, CountriesVM);

                    CitiesPageSW500 cip = new CitiesPageSW500();
                    cip.Title = Translation.GetString("Cities");
                    FreshMvvm.FreshPageModelResolver.BindingPageModel(null, cip, CitiesVM);

                    AboutPage ap = new AboutPage();
                    ap.Title = Translation.GetString("About");
                    FreshMvvm.FreshPageModelResolver.BindingPageModel(null, ap, AboutVM);
                }
                else
                {
                    if (smaller >= 400) //SW400
                    {
                        if (wd > hd)
                        {
                            StatusPagePhoneL       = new StatusPageSW400();
                            StatusPagePhoneL.Title = Translation.GetString("Status");
                            FreshMvvm.FreshPageModelResolver.BindingPageModel(null, StatusPagePhoneL, StatusVM);
                            Application.Current.MainPage.Navigation.PopAsync();
                            MainPage = new NavigationPage(StatusPagePhoneL);
                            StatusPagePhoneL.DisplayPosition = DisplayPos.Landscape;
                        }
                        else
                        {
                            /*
                             * StatusPagePhoneP = new StatusPageSW400p();
                             * StatusPagePhoneP.Title = Translation.GetString("Status");
                             * FreshMvvm.FreshPageModelResolver.BindingPageModel(null, StatusPagePhoneP, StatusVM);
                             * Application.Current.MainPage.Navigation.PopAsync();
                             * MainPage = new NavigationPage(StatusPagePhoneP);
                             * StatusPagePhoneP.DisplayPosition = DisplayPos.Portrait;
                             */
                            var tabbedNavigation = new FreshTabbedNavigationContainer();

                            StatusPageSW400p tab1 = new StatusPageSW400p();
                            FreshMvvm.FreshPageModelResolver.BindingPageModel(null, tab1, StatusVM);

                            tabbedNavigation.AddTab()
                            tabbedNavigation.AddTab <CountriesViewModel>("Countries", null);
                            MainPage = tabbedNavigation;
                        }

                        TorLogPageSW400 tlp = new TorLogPageSW400();
                        tlp.Title = Translation.GetString("Tor log");
                        FreshMvvm.FreshPageModelResolver.BindingPageModel(null, tlp, TorLogVM);

                        CountriesPageSW400 cap = new CountriesPageSW400();
                        cap.Title = Translation.GetString("Countries");
                        FreshMvvm.FreshPageModelResolver.BindingPageModel(null, cap, CountriesVM);

                        CitiesPageSW400 cip = new CitiesPageSW400();
                        cip.Title = Translation.GetString("Cities");
                        FreshMvvm.FreshPageModelResolver.BindingPageModel(null, cip, CitiesVM);

                        AboutPageSW400 ap = new AboutPageSW400();
                        ap.Title = Translation.GetString("About");
                        FreshMvvm.FreshPageModelResolver.BindingPageModel(null, ap, AboutVM);
                    }
                    else
                    {
                        if (smaller >= 300) //SW300
                        {
                            if (wd > hd)
                            {
                                StatusPagePhoneL       = new StatusPageSW300();
                                StatusPagePhoneL.Title = Translation.GetString("Status");
                                FreshMvvm.FreshPageModelResolver.BindingPageModel(null, StatusPagePhoneL, StatusVM);
                                Application.Current.MainPage.Navigation.PopAsync();
                                MainPage = new NavigationPage(StatusPagePhoneL);
                                StatusPagePhoneL.DisplayPosition = DisplayPos.Landscape;
                            }
                            else
                            {
                                /*
                                 * StatusPagePhoneP = new StatusPageSW300p();
                                 * StatusPagePhoneP.Title = Translation.GetString("Status");
                                 * FreshMvvm.FreshPageModelResolver.BindingPageModel(null, StatusPagePhoneP, StatusVM);
                                 * Application.Current.MainPage.Navigation.PopAsync();
                                 */
                                var tabbedNavigation = new FreshTabbedNavigationContainer();
                                tabbedNavigation.AddTab <StatusViewModel>("Status", null);
                                tabbedNavigation.AddTab <CountriesViewModel>("Countries", null);
                                MainPage = tabbedNavigation;
                                //MainPage = new NavigationPage(StatusPagePhoneP);
                                //StatusPagePhoneP.DisplayPosition = DisplayPos.Portrait;
                            }

                            /*
                             * StatusPageSW300 sp = new StatusPageSW300();
                             * sp.Title = Translation.GetString("Status");
                             * FreshMvvm.FreshPageModelResolver.BindingPageModel(null, sp, StatusVM);
                             * MainPage = new NavigationPage(sp);*/

                            TorLogPageSW300 tlp = new TorLogPageSW300();
                            tlp.Title = Translation.GetString("Tor log");
                            FreshMvvm.FreshPageModelResolver.BindingPageModel(null, tlp, TorLogVM);

                            CountriesPageSW300 cap = new CountriesPageSW300();
                            cap.Title = Translation.GetString("Countries");
                            FreshMvvm.FreshPageModelResolver.BindingPageModel(null, cap, CountriesVM);

                            CitiesPageSW300 cip = new CitiesPageSW300();
                            cip.Title = Translation.GetString("Cities");
                            FreshMvvm.FreshPageModelResolver.BindingPageModel(null, cip, CitiesVM);

                            AboutPageSW300 ap = new AboutPageSW300();
                            ap.Title = Translation.GetString("About");
                            FreshMvvm.FreshPageModelResolver.BindingPageModel(null, ap, AboutVM);
                        }
                        else //small (< 300) SW200
                        {
                            //
                        }
                    }
                }
            }
            if (Device.Idiom != TargetIdiom.Tablet && Device.Idiom != TargetIdiom.Phone) //something strange
            {
                if (smaller < 700)
                {
                    if (smaller >= 500) //SW500
                    {
                        StatusPageSW500 sp = new StatusPageSW500();
                        sp.Title = Translation.GetString("Status");
                        FreshMvvm.FreshPageModelResolver.BindingPageModel(null, sp, StatusVM);
                        MainPage = new NavigationPage(sp);

                        TorLogPageSW500 tlp = new TorLogPageSW500();
                        tlp.Title = Translation.GetString("Tor log");
                        FreshMvvm.FreshPageModelResolver.BindingPageModel(null, tlp, TorLogVM);

                        CountriesPageSW500 cap = new CountriesPageSW500();
                        cap.Title = Translation.GetString("Countries");
                        FreshMvvm.FreshPageModelResolver.BindingPageModel(null, cap, CountriesVM);

                        CitiesPageSW500 cip = new CitiesPageSW500();
                        cip.Title = Translation.GetString("Cities");
                        FreshMvvm.FreshPageModelResolver.BindingPageModel(null, cip, CitiesVM);
                    }
                    else
                    {
                        if (smaller >= 400) //SW400
                        {
                            if (wd > hd)
                            {
                                StatusPagePhoneL       = new StatusPageSW400();
                                StatusPagePhoneL.Title = Translation.GetString("Status");
                                FreshMvvm.FreshPageModelResolver.BindingPageModel(null, StatusPagePhoneL, StatusVM);
                                Application.Current.MainPage.Navigation.PopAsync();
                                MainPage = new NavigationPage(StatusPagePhoneL);
                                StatusPagePhoneL.DisplayPosition = DisplayPos.Landscape;
                            }
                            else
                            {
                                StatusPagePhoneP       = new StatusPageSW400p();
                                StatusPagePhoneP.Title = Translation.GetString("Status");
                                FreshMvvm.FreshPageModelResolver.BindingPageModel(null, StatusPagePhoneP, StatusVM);
                                Application.Current.MainPage.Navigation.PopAsync();
                                MainPage = new NavigationPage(StatusPagePhoneP);
                                StatusPagePhoneP.DisplayPosition = DisplayPos.Portrait;
                            }

                            TorLogPageSW400 tlp = new TorLogPageSW400();
                            tlp.Title = Translation.GetString("Tor log");
                            FreshMvvm.FreshPageModelResolver.BindingPageModel(null, tlp, TorLogVM);

                            CountriesPageSW400 cap = new CountriesPageSW400();
                            cap.Title = Translation.GetString("Countries");
                            FreshMvvm.FreshPageModelResolver.BindingPageModel(null, cap, CountriesVM);

                            CitiesPageSW400 cip = new CitiesPageSW400();
                            cip.Title = Translation.GetString("Cities");
                            FreshMvvm.FreshPageModelResolver.BindingPageModel(null, cip, CitiesVM);

                            AboutPageSW400 ap = new AboutPageSW400();
                            ap.Title = Translation.GetString("About");
                            FreshMvvm.FreshPageModelResolver.BindingPageModel(null, ap, AboutVM);
                        }
                        else
                        {
                            if (smaller >= 300) //SW300
                            {
                                if (wd > hd)
                                {
                                    StatusPagePhoneL       = new StatusPageSW300();
                                    StatusPagePhoneL.Title = Translation.GetString("Status");
                                    FreshMvvm.FreshPageModelResolver.BindingPageModel(null, StatusPagePhoneL, StatusVM);
                                    Application.Current.MainPage.Navigation.PopAsync();
                                    MainPage = new NavigationPage(StatusPagePhoneL);
                                    StatusPagePhoneL.DisplayPosition = DisplayPos.Landscape;
                                }
                                else
                                {
                                    StatusPagePhoneP       = new StatusPageSW300p();
                                    StatusPagePhoneP.Title = Translation.GetString("Status");
                                    FreshMvvm.FreshPageModelResolver.BindingPageModel(null, StatusPagePhoneP, StatusVM);
                                    Application.Current.MainPage.Navigation.PopAsync();
                                    MainPage = new NavigationPage(StatusPagePhoneP);
                                    StatusPagePhoneP.DisplayPosition = DisplayPos.Portrait;
                                }

                                /*
                                 * StatusPageSW300 sp = new StatusPageSW300();
                                 * sp.Title = Translation.GetString("Status");
                                 * FreshMvvm.FreshPageModelResolver.BindingPageModel(null, sp, StatusVM);
                                 * MainPage = new NavigationPage(sp);*/

                                TorLogPageSW300 tlp = new TorLogPageSW300();
                                tlp.Title = Translation.GetString("Tor log");
                                FreshMvvm.FreshPageModelResolver.BindingPageModel(null, tlp, TorLogVM);

                                CountriesPageSW300 cap = new CountriesPageSW300();
                                cap.Title = Translation.GetString("Countries");
                                FreshMvvm.FreshPageModelResolver.BindingPageModel(null, cap, CountriesVM);

                                CitiesPageSW300 cip = new CitiesPageSW300();
                                cip.Title = Translation.GetString("Cities");
                                FreshMvvm.FreshPageModelResolver.BindingPageModel(null, cip, CitiesVM);

                                AboutPageSW300 ap = new AboutPageSW300();
                                ap.Title = Translation.GetString("About");
                                FreshMvvm.FreshPageModelResolver.BindingPageModel(null, ap, AboutVM);
                            }
                            else //small (< 300) SW200
                            {
                                //
                            }
                        }
                    }
                }
            }
        }
		public StudioView(Action<IHTMLElement, Action<ISaveAction>> AddSaveButton)
		{
			Content.style.position = IStyle.PositionEnum.absolute;
			Content.style.left = "0px";
			Content.style.right = "0px";
			Content.style.top = "0px";
			Content.style.bottom = "0px";

			new TwentyTenWorkspace().ToBackground(Content.style, true);

			var WorkspaceHeader = default(IHTMLSpan);

			@"jsc-solutions.net studio".ToDocumentTitle().With(
				title =>
				{
					WorkspaceHeader = new IHTMLSpan { innerText = title };

					WorkspaceHeader.AttachTo(Content);
					WorkspaceHeader.style.SetLocation(16, 8);
					WorkspaceHeader.style.color = Color.White;

					// http://www.quirksmode.org/css/textshadow.html
					WorkspaceHeader.style.textShadow = "#808080 4px 2px 2px";

				}
			);

			// em + px :)
			var Workspace0 = new IHTMLDiv().With(
				div =>
				{
					div.style.position = IStyle.PositionEnum.absolute;
					div.style.left = "0px";
					div.style.right = "0px";
					div.style.bottom = "0px";
					div.style.top = "3em";
				}
			).AttachTo(Content);

			// workspace contains the split views
			var Workspace = new IHTMLDiv().With(
				div =>
				{
					div.style.position = IStyle.PositionEnum.absolute;
					div.style.left = "6px";
					div.style.right = "6px";
					div.style.bottom = "6px";
					div.style.top = "6px";
				}
			).AttachTo(Workspace0);

			// in this project we wont be having toolbox or toolbar yet

			Action<HorizontalSplit> ApplyStyle =
				t =>
				{
					t.Split.Splitter.style.backgroundColor = Color.None;
					t.SplitImageContainer.Orphanize();
					t.SplitArea.Target.style.borderLeft = "0";
					t.SplitArea.Target.style.borderRight = "0";
					t.SplitArea.Target.style.width = "6px";
					t.SplitArea.Target.style.Opacity = 0.7;

					// should we obselete JSColor already?
					t.SelectionColor = JSColor.Black;
				};

			var EditorTreeSplit = new HorizontalSplit
			{
				Minimum = 0,
				Maximum = 1,
				Value = 0.7,
			};

			EditorTreeSplit.With(ApplyStyle);

			EditorTreeSplit.Split.Splitter.style.backgroundColor = Color.None;

			var Viewer = new SolutionDocumentViewer();
			SolutionDocumentViewerTab AboutTab = "About";
			Viewer.Add(AboutTab);
			AboutTab.TabElement.style.Float = IStyle.FloatEnum.right;

			SolutionDocumentViewerTab File1 = "File1";
			Viewer.Add(File1);

			var File1Content = new IHTMLDiv();

			// location + design

			File1Content.style.left = "0px";
			File1Content.style.top = "1em";
			File1Content.style.right = "0px";
			File1Content.style.bottom = "1em";
			File1Content.style.position = IStyle.PositionEnum.absolute;


			var File1View = new SolutionFileView();

			File1View.Container.style.left = "0px";
			File1View.Container.style.top = "0px";
			File1View.Container.style.right = "0px";
			File1View.Container.style.bottom = "0px";
			File1View.Container.style.position = IStyle.PositionEnum.absolute;

			File1Content.ReplaceContentWith(File1View.Container);

			var sln = new SolutionBuilder();

			var _Solution = new TreeNode(VistaTreeNodePage.Create);


			var _Project = _Solution.Add();

			var About = new AboutPage();

			Action UpdateFile1Text =
				delegate
				{

					if (File1View.File != null)
					{
						File1.Text = File1View.File.Name.SkipUntilIfAny("/");
					}
					else
					{
						File1.Text = sln.Name;
					}


				};
			Action Update =
				delegate
				{
					sln.Name = About.ProjectName.value;

					UpdateFile1Text();

					_Project.Clear();
					UpdateTree(sln, File1View, _Solution, _Project);
				};

			File1View.FileChanged +=
				delegate
				{
					if (File1View.File.Name.EndsWith(".htm"))
					{
						File1Content.style.top = "0px";
						File1Content.style.bottom = "1em";
						// show the design/source buttons
					}
					else if (File1View.File.Name.EndsWith(sln.Language.CodeFileExtension))
					{
						File1Content.style.top = "1em";
						File1Content.style.bottom = "0px";
						// show type outline / member
					}

					UpdateFile1Text();

					File1.Activate();
				};

			AddSaveButton(WorkspaceHeader, i => Save = i);

			About.ProjectName.value = sln.Name;
			About.ProjectName.onchange +=
				delegate
				{
					Update();
				};


			AboutTab.Activated +=
				delegate
				{
					// our about page has dynamic size..
					Viewer.Content.ReplaceContentWith(About.Container);
				};

			File1.Activated +=
				delegate
				{
				

					// our about page has dynamic size..
					Viewer.Content.ReplaceContentWith(File1Content);
				};

			AboutTab.Activate();

			EditorTreeSplit.Split.LeftContainer = Viewer.Container;

			var SolutionExplorer = new SolutionDockWindowPage();

			SolutionExplorer.HeaderText.innerText = "Solution Explorer";
			SolutionExplorer.Content.style.backgroundColor = Color.White;
			SolutionExplorer.Content.style.padding = "2px";
			SolutionExplorer.Content.ReplaceContentWith(_Solution.Container);

			_Solution.Container.style.overflow = IStyle.OverflowEnum.auto;
			_Solution.Container.style.height = "100%";
			_Solution.Container.style.backgroundColor = Color.White;

			EditorTreeSplit.Split.RightContainer = SolutionExplorer.Container;

			EditorTreeSplit.Container.AttachTo(Workspace);


			Update();

			new Rules(File1View, sln, Update);
		}
 public bool UpdateAboutPage(AboutPage Details, string InsertUser)
 {
     return(ADAL.UpdateAbout(Details, InsertUser));
 }
Exemple #19
0
        public void SortedPersonList(string SortType)
        {
            bool isSorted = AboutPage.SortDisplayedImages(SortType);

            Assert.IsTrue(isSorted, "Person List Not Sorted correctly as : " + SortType);
        }
Exemple #20
0
        public App()
        {
            InitializeComponent();

            MainPage = new AboutPage();
        }
Exemple #21
0
 public void FilterByName(string PersonName)
 {
     AboutPage.SearchByNameOnly(PersonName);
     Assert.IsTrue(AboutPage.IsAtByName(PersonName), "Failed to Find User");
 }
        public void NavigationBarIsVisible_OnAboutPage()
        {
            AboutPage aboutPage = _navigationBar.On_AboutPage();

            aboutPage.NavigationBarIsVisible_Assertion();
        }
Exemple #23
0
 public void FilterByDepartment(string DepartmentName)
 {
     AboutPage.FilterByDepartment(DepartmentName);
     Assert.AreEqual(PageUtilities.GetRecordCount(), PageUtilities.GetPeopleDisplayedcount(), "Record count mismatch");
 }
Exemple #24
0
 public static void InitNewsPageElements(IWebDriver driver, AboutPage newsPage)
 {
     newsPage.MainBlock = driver.FindElement(By.Id("AboutPage"));
 }
Exemple #25
0
 public void FilterByNameAndDepartment(string Department, string Person)
 {
     AboutPage.FilterByDepartment(Department);
     AboutPage.SearchByNameOnly(Person);
     Assert.IsTrue(AboutPage.IsAtByName(Person), "Failed to Find " + Person + " in Department : " + Department);
 }
Exemple #26
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);
         });
     });
 }
Exemple #27
0
 /// <summary>
 /// Сохраняет данные страницы в базу данных
 /// </summary>
 /// <param name="aboutPage">Объект для сохранения</param>
 public void Insert(AboutPage aboutPage)
 {
     try
     {
         string query = @"INSERT INTO AboutPageContent(   
                 Id,
                 Image1_1,
                 Image1_2,
                 Image1_3,
                 Image1_4,
                 TextHeader,
                 TextContent,
                 YouTubeId1,
                 TextContent2,
                 Image2_1,
                 Image2_2,
                 YouTubeId2,
                 AdressHeader,
                 AdressText,
                 ContactHeader,
                 ContactText,
                 PhoneHeader,
                 PhoneText,
                 SocialLinkVk,
                 SocialLinkTw,
                 SocialLinkInst,
                 SocialLinkFb,
                 SocialLinkYb,
                 MapX,
                 MapY,
                 Utd
             ) 
             VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
         using (var statement = connection.Prepare(query))
         {
             statement.Bind(1, 42);
             statement.Bind(2, aboutPage.Image1);
             statement.Bind(3, aboutPage.Image2);
             statement.Bind(4, aboutPage.Image3);
             statement.Bind(5, aboutPage.Image4);
             statement.Bind(6, aboutPage.TextHeader);
             statement.Bind(7, aboutPage.TextContent);
             statement.Bind(8, aboutPage.YouTubeId1);
             statement.Bind(9, aboutPage.TextContent2);
             statement.Bind(10, aboutPage.Image5);
             statement.Bind(11, aboutPage.Image6);
             statement.Bind(12, aboutPage.YouTubeId2);
             statement.Bind(13, aboutPage.AdressHeader);
             statement.Bind(14, aboutPage.AdressText);
             statement.Bind(15, aboutPage.ContactHeader);
             statement.Bind(16, aboutPage.ContactText);
             statement.Bind(17, aboutPage.PhoneHeader);
             statement.Bind(18, aboutPage.PhoneText);
             statement.Bind(19, aboutPage.SocialLinkVk);
             statement.Bind(20, aboutPage.SocialLinkTw);
             statement.Bind(21, aboutPage.SocialLinkInst);
             statement.Bind(22, aboutPage.SocialLinkFb);
             statement.Bind(23, aboutPage.SocialLinkYb);
             statement.Bind(24, aboutPage.MapX);
             statement.Bind(25, aboutPage.MapY);
             statement.Bind(26, aboutPage.Utd.Ticks);
             statement.Step();
         }
     }
     catch (SQLiteException e)
     {
         Messages.ShowDatabaseErrorMessage();
         Debug.WriteLine(e.Message);
     }
     catch (Exception e)
     {
         Messages.ShowErrorMessage(e.Message);
     }
 }
Exemple #28
0
        public AboutViewModel(AboutPage aboutPage)
        {
            _aboutPage = aboutPage;

            Title = "About";
        }
Exemple #29
0
 /// <summary>
 /// Обновляет данные страницы в базу данных
 /// </summary>
 public void UpdatePageContent(AboutPage aboutPage)
 {
     try
     {
         string query = @"
             UPDATE AboutPageContent Set 
                 Image1_1=?,
                 Image1_2=?,
                 Image1_3=?,
                 Image1_4=?,
                 TextHeader=?,
                 TextContent=?,
                 YouTubeId1=?,
                 TextContent2=?,
                 Image2_1=?,
                 Image2_2=?,
                 YouTubeId2=?,
                 AdressHeader=?,
                 AdressText=?,
                 ContactHeader=?,
                 ContactText=?,
                 PhoneHeader=?,
                 PhoneText=?,
                 SocialLinkVk=?,
                 SocialLinkTw=?,
                 SocialLinkInst=?,
                 SocialLinkFb=?,
                 SocialLinkYb=?,
                 MapX=?,
                 MapY=?,
                 Utd=?
             WHERE Id=42 ";
         using (var statement = connection.Prepare(query))
         {
             statement.Bind(1, aboutPage.Image1);
             statement.Bind(2, aboutPage.Image2);
             statement.Bind(3, aboutPage.Image3);
             statement.Bind(4, aboutPage.Image4);
             statement.Bind(5, aboutPage.TextHeader);
             statement.Bind(6, aboutPage.TextContent);
             statement.Bind(7, aboutPage.YouTubeId1);
             statement.Bind(8, aboutPage.TextContent2);
             statement.Bind(9, aboutPage.Image5);
             statement.Bind(10, aboutPage.Image6);
             statement.Bind(11, aboutPage.YouTubeId2);
             statement.Bind(12, aboutPage.AdressHeader);
             statement.Bind(13, aboutPage.AdressText);
             statement.Bind(14, aboutPage.ContactHeader);
             statement.Bind(15, aboutPage.ContactText);
             statement.Bind(16, aboutPage.PhoneHeader);
             statement.Bind(17, aboutPage.PhoneText);
             statement.Bind(18, aboutPage.SocialLinkVk);
             statement.Bind(19, aboutPage.SocialLinkTw);
             statement.Bind(20, aboutPage.SocialLinkInst);
             statement.Bind(21, aboutPage.SocialLinkFb);
             statement.Bind(22, aboutPage.SocialLinkYb);
             statement.Bind(23, aboutPage.MapX);
             statement.Bind(24, aboutPage.MapY);
             statement.Bind(25, aboutPage.Utd.Ticks);
             statement.Step();
         }
         aboutPageContent = aboutPage;
     }
     catch (SQLiteException e)
     {
         Messages.ShowDatabaseErrorMessage();
         Debug.WriteLine(e.Message);
     }
     catch (Exception e)
     {
         Messages.ShowErrorMessage(e.Message);
     }
 }
Exemple #30
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);
         });
     });
 }
        public void FooterIsVisible_OnAboutPage()
        {
            AboutPage aboutPage = _footer.On_AboutPage();

            aboutPage.FooterIsVisible_Assertion();
        }
Exemple #32
0
        public void Register()
        {
            Handle.GET("/bodved/partials/aboutpage", () =>
            {
                var page = new AboutPage();
                return(page);
            });

            Handle.GET("/bodved/partials/PPs", () =>
            {
                var page = new PPsPage();
                //page.PPs.Data = Db.SQL<PP>("SELECT r FROM PP r order by r.RnkIdx");

                //var top = Db.SQL<long>("select COUNT(r) from PP r").FirstOrDefault();
                //var aktif = Db.SQL<long>("select count(r) from PP r where r.IsRun = ?", true).FirstOrDefault();
                //page.PPs.Data = Db.SQL<PP>("SELECT r FROM PP r order by r.Ad");

                page.Data = null;
                return(page);
            });

            Handle.GET("/bodved/partials/DDs", () =>
            {
                var page = new DDsPage();
                //page.DDs.Data = Db.SQL<DD>("SELECT r FROM DD r order by r.Dnm DESC");
                page.Data = null;
                return(page);
            });

            Handle.GET("/bodved/partials/PPRDs/{?}", (int dnm) =>
            {
                var page        = new PPRDsPage();
                page.Dnm        = dnm;
                DD DD           = Db.SQL <DD>("select r from DD r where r.Dnm = ?", dnm).FirstOrDefault();
                page.Hdr        = $"{DD.Ad} ► Oyuncular";
                page.PPRDs.Data = Db.SQL <PPRD>("SELECT r FROM PPRD r where r.Dnm = ? order by r.RnkIdx", dnm);

                //page.Data = null;
                return(page);
            });


            Handle.GET("/bodved/partials/CCs/{?}", (int dnm) =>
            {
                var page      = new CCsPage();
                page.CCs.Data = Db.SQL <CC>("SELECT r FROM CC r where r.Dnm = ? order by r.Idx", dnm);
                //page.Data = null;
                return(page);
            });

            Handle.GET("/bodved/partials/CTs/{?}", (ulong cc) =>
            {
                var page      = new CTsPage();
                CC CC         = Db.FromId <CC>(cc);
                page.CCoNo    = (long)CC.CCoNo;
                page.Hdr      = $"{CC.Ad} ► Takım Puanları";
                page.CTs.Data = Db.SQL <CT>("SELECT r FROM CT r WHERE r.CC = ? order by r.Idx", CC);
                return(page);
            });

            Handle.GET("/bodved/partials/CFs/{?}", (ulong cc) =>
            {
                var page   = new CFsPage();
                page.CCoNo = (long)cc;
                page.Data  = null;
                return(page);
            });

            Handle.GET("/bodved/partials/CTPs/{?}", (ulong ct) =>
            {
                var page = new CTPsPage();

                //CT CT = Db.FromId<CT>(ct);
                //page.Hdr = $"{CT.CC.Ad} ► {CT.Ad} ► Takım Oyuncuları";
                //page.CTPs.Data = Db.SQL<CTP>("SELECT r FROM CTP r WHERE r.CT = ? order by r.RnkBas DESC, r.PP.Ad", CT);

                page.CToNo = (long)ct;
                page.Data  = null;
                return(page);
            });

            Handle.GET("/bodved/partials/CurEvents", () =>
            {
                var page  = new CurEventsPage();
                page.Data = null;
                return(page);
            });


            Handle.GET("/bodved/partials/CC2CETs/{?}", (ulong cc) =>
            {
                var page   = new CC2CETsPage();
                page.CCoNo = (long)cc;
                page.Data  = null;
                return(page);
            });

            // CC2CETs kullaniliyor
            Handle.GET("/bodved/partials/CETs/{?}", (ulong cc) =>
            {
                var page       = new CETsPage();
                CC CC          = Db.FromId <CC>(cc);
                page.Hdr       = $"{CC.Ad} ► Takım Fikstür";
                page.CETs.Data = Db.SQL <CET>("SELECT r FROM CET r WHERE r.CC = ? order by r.Trh", CC);
                return(page);
            });

            Handle.GET("/bodved/partials/CEFs/{?}", (ulong cc) =>
            {
                var page       = new CEFsPage();
                CC CC          = Db.FromId <CC>(cc);
                page.Hdr       = $"{CC.Ad} ► Ferdi Fikstür";
                page.CEFs.Data = Db.SQL <CEF>("SELECT r FROM CEF r WHERE r.CC = ? order by r.Trh, r.HPP.Ad, r.GPP.Ad", CC);
                return(page);
            });

            Handle.GET("/bodved/partials/CF2CEFs/{?}/{?}", (ulong cc, ulong pp) =>
            {
                var page       = new CF2CEFsPage();
                page.CCoNo     = (long)cc;
                page.PPoNo     = (long)pp;
                CC CC          = Db.FromId <CC>(cc);
                PP PP          = Db.FromId <PP>(pp);
                page.Hdr       = $"{CC.Ad} ► {PP.Ad} ► Fikstür";
                page.CEFs.Data = Db.SQL <CEF>("SELECT r FROM CEF r WHERE r.CC = ? and (r.HPP = ? or r.GPP = ?) order by r.Trh, r.HPP.Ad, r.GPP.Ad", CC, PP, PP);
                return(page);
            });

            Handle.GET("/bodved/partials/CET2CETXs/{?}/{?}", (ulong cetono, ulong ctono) =>
            {
                var page = new CET2CETXsPage();

                CET cet     = Db.FromId <CET>(cetono);
                page.Hdr    = $"{cet.CC.Ad} ► {cet.Trh:dd.MM.yy} ► Sıralama";
                page.CEToNo = (long)cetono;
                page.Data   = null;

                /*
                 * CET cet = Db.FromId<CET>(cetono);
                 * CT ct = Db.FromId<CT>(ctono);
                 *
                 * page.Hdr = $"{cet.CC.Ad} ► {ct.Ad} {cet.Trh:dd.MM.yy} ► Sıralama";
                 * page.CEToNo = (long)cetono;
                 * page.CToNo = (long)ctono;
                 * page.Data = null;
                 *
                 * page.CET.Data = cet;
                 */
                //page.CETXs.Data = Db.SQL<CETX>("SELECT r FROM CETX r WHERE r.CET = ? and r.CT = ? order by r.Idx", cet, ct);

                return(page);
            });

            Handle.GET("/bodved/partials/CET2MACs/{?}", (ulong cet) =>
            {
                var page = new CET2MACsPage();
                CET CET  = Db.FromId <CET>(cet);

                page.Hdr = $"{CET.CC.Ad} ► Takım Maçları ► {CET.Trh:dd.MM.yy}";

                page.CET.Data   = CET;
                page.Sngls.Data = Db.SQL <MAC>("SELECT r FROM MAC r WHERE r.CEB = ? and r.SoD = ? order by r.Idx", CET, "S");
                page.Dbls.Data  = Db.SQL <MAC>("SELECT r FROM MAC r WHERE r.CEB = ? and r.SoD = ? order by r.Idx", CET, "D");
                return(page);
            });

            Handle.GET("/bodved/partials/CET2MACsInp/{?}", (ulong cet) =>
            {
                var page = new CET2MACsInpPage();
                CET CET  = Db.FromId <CET>(cet);

                page.CEToNo = (long)cet;
                page.Hdr    = $"{CET.CC.Ad} ► Takım Maçları ► {CET.Trh:dd.MM.yy}";
                page.Data   = null;
                //page.CET.Data = CET;
                //page.Sngls.Data = Db.SQL<MAC>("SELECT r FROM MAC r WHERE r.CEB = ? and r.SoD = ? order by r.Idx", CET, "S");
                //page.Dbls.Data = Db.SQL<MAC>("SELECT r FROM MAC r WHERE r.CEB = ? and r.SoD = ? order by r.Idx", CET, "D");
                return(page);
            });

            Handle.GET("/bodved/partials/CEF2MACs/{?}", (ulong cef) =>
            {
                var page = new CEF2MACsPage();
                CEF CEF  = Db.FromId <CEF>(cef);

                page.Hdr = $"{CEF.CC.Ad} ► Ferdi Maçları ► {CEF.Trh:dd.MM.yy}";

                page.CEF.Data   = CEF;
                page.Sngls.Data = Db.SQL <MAC>("SELECT r FROM MAC r WHERE r.CEB = ? order by r.Idx", CEF);
                return(page);
            });

            Handle.GET("/bodved/partials/PP2MACs/{?}", (ulong pp) =>
            {
                var page   = new PP2MACsPage();
                page.PPoNo = (long)pp;
                page.Data  = null;
                return(page);
            });

            Handle.GET("/bodved/partials/PP2PPRDs/{?}", (ulong pp) =>
            {
                var page        = new PP2PPRDsPage();
                PP PP           = Db.FromId <PP>(pp);
                page.Hdr        = $"{PP.Ad} ► Dönem Bilgileri";
                page.PPRDs.Data = Db.SQL <PPRD>("select r from PPRD r where r.PP = ? order by r.Dnm DESC", PP);
                return(page);
            });

            Handle.GET("/bodved/partials/CT2CETs/{?}", (long ct) =>
            {
                var page   = new CT2CETsPage();
                page.CToNo = ct;
                page.Data  = null;
                return(page);
            });
        }
 //"Help -> About" menu item
 private void menu_HelpAboutMenuItem_Click(object sender, EventArgs e)
 {
     AboutPage a = new AboutPage();
     a.StartPosition = FormStartPosition.CenterParent;
     a.ShowDialog();
 }