Пример #1
0
        public Login()
        {
            MouseTool.ShowLoading();
            App.IsChangeWindow         = false;
            this.WindowStartupLocation = WindowStartupLocation.CenterScreen;
            InitializeComponent();

            // Disables inking in the WPF application and enables us to track touch events to properly trigger the touch keyboard
            InkInputHelper.DisableWPFTabletSupport();

            this.Loaded  += Login_Loaded;
            this.Closing += (sender, e) =>
            {
                if (App.IsChangeWindow == false)
                {
                    App.CopyLog();
                    //關閉應用程式
                    Application.Current.Shutdown();
                    //關閉處理序
                    Environment.Exit(0);
                }
            };
            //InitSelectDB();
            //InitUI();
            //InitEvent();

            //for test
            //NetworkTool.GetNetWork();
        }
Пример #2
0
        public MainWindow()
        {
            if (!new ClassSync.isRun().isRun_())
            {
                InitializeComponent();

                //    xProduct.ItemsSource = Class.ClassProducts.listProducts;
                //      xProduct.ItemFilter += (searchText, obj) =>
                //            (searchText.Length > 1) && (obj as Class.ClassProducts.product).Name.IndexOf(searchText.ToUpper()) != -1;

                new ClassSync().SyncAll();
                gridLoad("b", ClassGridGroup.grid);
                gridLoad("a", ClassGridGroup.gridLeft);
                gridLoad("e", ClassGridGroup.gridRigthBottom);
                Loaded += MainWindow_Loaded;
                InkInputHelper.DisableWPFTabletSupport();
            }
        }