コード例 #1
0
 public void Show()
 {
     NavPage.Show();
     ThreadManage.MissionToMain(() => {
         InputText.Show();
     });
 }
コード例 #2
0
 public void Hide()
 {
     NavPage.Hide();
     ThreadManage.MissionToMain(() => {
         InputText.Hide();
     });
 }
コード例 #3
0
 /// <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(); });
 }
コード例 #4
0
        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;
        }
コード例 #5
0
        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
            });
        }
コード例 #6
0
ファイル: Form1.cs プロジェクト: alibouziane/MathsTestProject
 private void THreadManage_Click(object sender, EventArgs e)
 {
     ThreadManage.Start();
 }
コード例 #7
0
ファイル: Form1.cs プロジェクト: alibouziane/MathsTestProject
 private void btnSemaphore_Click(object sender, EventArgs e)
 {
     ThreadManage.Semaphore();
 }
コード例 #8
0
ファイル: Form1.cs プロジェクト: alibouziane/MathsTestProject
 private void btnMutex_Click(object sender, EventArgs e)
 {
     ThreadManage.Mutex();
 }
コード例 #9
0
ファイル: Form1.cs プロジェクト: alibouziane/MathsTestProject
 private void btnAutoResetEvnt_Click(object sender, EventArgs e)
 {
     ThreadManage.AutoResetEvnt();
 }