protected override void OnInitialized(EventArgs e) { MainForm = new MainForm(TestSections.Get(TestAssemblies)); base.OnInitialized(e); /** * Debug.WriteLine("Starting test..."); * const int count = 1000; * var sw = new Stopwatch(); * sw.Start(); * for (int i = 0; i < count; i++) * { * new Sections.Serialization.Xaml.Test(); * } * sw.Stop(); * Debug.WriteLine("Time: {0}", sw.Elapsed); * /**/ // show the main form MainForm.Show(); #if NETSTANDARD2_0 // var elapsedTime = DateTime.UtcNow - Process.GetCurrentProcess().StartTime.ToUniversalTime(); // Log.Write(this, $"Startup time: {elapsedTime}"); #endif }
public MainForm(IEnumerable <Section> topNodes = null) { Title = "Test Application"; Style = "main"; topNodes = topNodes ?? TestSections.Get(); //SectionList = new SectionListGridView(topNodes); //SectionList = new SectionListTreeView(topNodes); if (Platform.IsAndroid) { SectionList = new SectionListGridView(topNodes); } else { SectionList = new SectionListTreeGridView(topNodes); } this.Icon = TestIcons.TestIcon; if (Platform.IsDesktop) { ClientSize = new Size(900, 650); } //Opacity = 0.5; Content = MainContent(); CreateMenuToolBar(); }
public MainForm(IEnumerable <Section> topNodes = null) { Title = string.Format("Test Application [{0}]", Platform.ID); Style = "main"; MinimumSize = new Size(400, 400); topNodes = topNodes ?? TestSections.Get(TestApplication.DefaultTestAssemblies()); //SectionList = new SectionListGridView(topNodes); //SectionList = new SectionListTreeView(topNodes); if (Platform.IsAndroid) { SectionList = new SectionListGridView(topNodes); } else { SectionList = new SectionListTreeGridView(topNodes); } this.Icon = TestIcons.TestIcon; if (Platform.IsDesktop) { ClientSize = new Size(900, 650); } //Opacity = 0.5; Content = MainContent(); CreateMenuToolBar(); }
public MainForm(IEnumerable <Section> topNodes = null) { var bitness = EtoEnvironment.Is64BitProcess ? "64bit" : "32bit"; var runtime = RuntimeInformation.FrameworkDescription ?? (EtoEnvironment.Platform.IsMono ? "Mono" : EtoEnvironment.Platform.IsNetCore ? ".NET Core" : ".NET"); var platform = EtoEnvironment.Platform.IsWindows ? EtoEnvironment.Platform.IsWinRT ? "WinRT" : "Windows" : EtoEnvironment.Platform.IsMac ? "Mac" : EtoEnvironment.Platform.IsLinux ? "Linux" : EtoEnvironment.Platform.IsUnix ? "Unix" : "Unknown"; Title = $"Test Application [{Platform.ID}, {bitness}, {runtime}, {platform}]"; Style = "main"; MinimumSize = new Size(400, 400); topNodes = topNodes ?? TestSections.Get(TestApplication.DefaultTestAssemblies()); var nodes = topNodes.ToList(); if (Platform.IsAndroid) { SectionList = new SectionListGridView(nodes); } else { SectionList = new SectionListTreeGridView(nodes); } SectionList.SelectedItemChanged += SectionList_SelectedItemChanged; this.Icon = TestIcons.TestIcon; if (Platform.IsDesktop) { ClientSize = new Size(900, 650); } //Opacity = 0.5; Content = MainContent(); CreateMenuToolBar(); if (TestApplication.Settings.SaveInitialSection && InitialSection == null) { InitialSection = TestApplication.Settings.InitialSection; } if (InitialSection != null) { SectionList.SelectedItem = nodes.SelectMany(r => r).OfType <ISection>().FirstOrDefault(r => r.Text == InitialSection); } }
protected override void OnInitialized(EventArgs e) { MainForm = new MainForm(TestSections.Get(TestAssemblies)); base.OnInitialized(e); /* * int count = 100000; * var start = DateTime.Now; * for (int i = 0; i < count; i++) * { * new Button(); * } * var end = DateTime.Now; * Debug.WriteLine("Time: {0}", end - start); */ // show the main form MainForm.Show(); }
protected override void OnInitialized(EventArgs e) { MainForm = new MainForm(TestSections.Get(TestAssemblies)); base.OnInitialized(e); /** * Debug.WriteLine("Starting test..."); * const int count = 1000; * var sw = new Stopwatch(); * sw.Start(); * for (int i = 0; i < count; i++) * { * new Sections.Serialization.Xaml.Test(); * } * sw.Stop(); * Debug.WriteLine("Time: {0}", sw.Elapsed); * /**/ // show the main form MainForm.Show(); }
public MainForm(IEnumerable <Section> topNodes = null) { Title = string.Format("Test Application [{0}, {1} {2}, {3}]", Platform.ID, EtoEnvironment.Is64BitProcess ? "64bit" : "32bit", EtoEnvironment.Platform.IsMono ? "Mono" : ".NET", EtoEnvironment.Platform.IsWindows ? EtoEnvironment.Platform.IsWinRT ? "WinRT" : "Windows" : EtoEnvironment.Platform.IsMac ? "Mac" : EtoEnvironment.Platform.IsLinux ? "Linux" : EtoEnvironment.Platform.IsUnix ? "Unix" : "Unknown"); Style = "main"; MinimumSize = new Size(400, 400); topNodes = topNodes ?? TestSections.Get(TestApplication.DefaultTestAssemblies()); //SectionList = new SectionListGridView(topNodes); //SectionList = new SectionListTreeView(topNodes); if (Platform.IsAndroid) { SectionList = new SectionListGridView(topNodes); } else { SectionList = new SectionListTreeGridView(topNodes); } this.Icon = TestIcons.TestIcon; if (Platform.IsDesktop) { ClientSize = new Size(900, 650); } //Opacity = 0.5; Content = MainContent(); CreateMenuToolBar(); }