public void Show() { NavPage.Show(); ThreadManage.MissionToMain(() => { InputText.Show(); }); }
public void Hide() { NavPage.Hide(); ThreadManage.MissionToMain(() => { InputText.Hide(); }); }
/// <summary> /// Initializes the singleton application object. This is the first line of authored code /// executed, and as such is the logical equivalent of main() or WinMain(). /// </summary> public App() { this.InitializeComponent(); this.Suspending += OnSuspending; ThreadManage.Inital(); ThreadManage.AsyncDelegate(() => { MathF.InitalTabel(); }); ThreadManage.AsyncDelegate(() => { Class.WebClass.Initial(); }); }
protected override void OnLaunched(LaunchActivatedEventArgs e) { #if DEBUG if (System.Diagnostics.Debugger.IsAttached) { this.DebugSettings.EnableFrameRateCounter = true; } #endif //Debug.WriteLine(Colors.LightPink); //Debug.WriteLine(Colors.GhostWhite); var t = FontFamily.XamlAutoFontFamily; double width = Window.Current.Bounds.Width; double height = Window.Current.Bounds.Height; Class.Component.screenX = (float)width; Class.Component.screenY = (float)height; DX.DX_Core.Initial(); Swapchain = new DX.SwapChain(width, height); Main = new Canvas(); Main.Width = width; Main.Height = height; Main.Background = new SolidColorBrush(Colors.DimGray); Window.Current.Content = Main; Main.Children.Add(Swapchain); Window.Current.Activate(); Window.Current.SizeChanged += (o, a) => { double w = Window.Current.Bounds.Width; double h = Window.Current.Bounds.Height; Main.Width = w; Main.Height = h; Class.Component.screenX = (float)w; Class.Component.screenY = (float)h; Swapchain.ReSize(w, h); Class.PageManageEx.ReSize(); }; //delegate sub thread create ui ThreadManage.BindThreadResource(3); ThreadManage.AsyncDelegate(() => { Class.Main.Initial(Swapchain); }); #if phone StatusBar.GetForCurrentView().BackgroundColor = Colors.Black; StatusBar s = StatusBar.GetForCurrentView(); s.BackgroundOpacity = 1; s.ForegroundColor = Colors.White; SystemNavigationManager.GetForCurrentView().BackRequested += OnBackRequested; #endif Window.Current.CoreWindow.KeyUp += KeyUp; }
public void Create(SwapChain p, RawRectangleF m) { m.Top += 36; NavPage.Create(p, m); ThreadManage.MissionToMain(() => { #if phone float y = 0; if (Component.screenX < Component.screenY) { y += 23; } InputText.Create(App.Main, new Thickness(screenX - 240, y, screenX, 0)); #else InputText.Create(App.Main, new Thickness(screenX - 240, 0, screenX, 0)); #endif }); }
private void THreadManage_Click(object sender, EventArgs e) { ThreadManage.Start(); }
private void btnSemaphore_Click(object sender, EventArgs e) { ThreadManage.Semaphore(); }
private void btnMutex_Click(object sender, EventArgs e) { ThreadManage.Mutex(); }
private void btnAutoResetEvnt_Click(object sender, EventArgs e) { ThreadManage.AutoResetEvnt(); }