示例#1
0
        private void Application_Startup(object sender, StartupEventArgs e)
        {
            CreateNotifyIcon();

            CreateClientId();

            //devlepment
            new MainWindow().Show();

            // new TestExpender().Show();
            //Navigation();
            currentCompany = new Company()
            {
                id   = ConfigurationHelper.GetConfig(ConfigItemName.companyId.ToString()),
                name = ConfigurationHelper.GetConfig(ConfigItemName.companyName.ToString()),
            };
            currentUser = new User()
            {
                id                  = GetClientId(),
                name                = "陈龙飞",
                company             = currentCompany.name,
                affiliatedCompanyId = currentCompany.id
            };
            currentYard = YardModel.GetById(MyHelper.ConfigurationHelper.GetConfig(ConfigItemName.yardId.ToString()));
            //Scanner Gun
            StartKeyBoardHook();

            //UI线程未捕获异常处理事件(UI主线程)
            this.DispatcherUnhandledException += App_DispatcherUnhandledException;
            //非UI线程未捕获异常处理事件(例如自己创建的一个子线程)
            AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
            //Task线程内未捕获异常处理事件
            TaskScheduler.UnobservedTaskException += TaskScheduler_UnobservedTaskException;
        }
        private void ShowReceivedYard()
        {
            List <Yard> list = YardModel.GetListByCompanyId(receiverCompany.id);

            if (list.Count > 0)
            {
                this.ReceiverYardCb.ItemsSource   = list;
                this.ReceiverYardCb.SelectedIndex = 0;
            }
        }
        /// <summary>
        ///  获取和显示发货的货场
        /// </summary>
        private void ShowSendYard()
        {
            List <Yard> list = YardModel.GetListByCompanyId(sendCompany.id);

            if (list.Count > 0)
            {
                this.SendYardCb.ItemsSource   = list;
                this.SendYardCb.SelectedIndex = 0;
            }
        }
示例#4
0
        // receive yard

        private void ShowReceiveYard(String companyid)
        {
            List <Yard> list = YardModel.GetListByCompanyId(companyid);

            if (list.Count > 0)
            {
                this.receiveYandCB.ItemsSource   = list;
                this.receiveYandCB.SelectedIndex = 0;
            }
        }