Esempio n. 1
0
        internal void Dispose()
        {
            LoggedIn = false;

            socket.Dispose();
            socket = null;

            guid      = Guid.Empty;
            name      = null;
            orgname   = null;
            version   = null;
            region    = null;
            message   = null;
            avatar    = null;
            orgavatar = null;
            localip   = null;
            nodeip    = null;

            counters.Clear();
            counters = null;

            ignored.Clear();
            ignored = null;

            extended_props.Clear();
            extended_props = null;
        }
Esempio n. 2
0
        private void SaveOrderNo_OnClick(object sender, RoutedEventArgs e)
        {
            SaveModel();
            var orders = ((OrderRepo)Repo).LoadOrders(JobCardId);

            ModelList.Clear();
            ModelList.AddAll(orders);
        }
Esempio n. 3
0
        private void On_Enter_Key_Up(object sender, KeyEventArgs e)
        {
            if (e.Key != Key.Enter)
            {
                return;
            }
            SaveModel();
            var orders = ((OrderRepo)Repo).LoadOrders(JobCardId);

            ModelList.Clear();
            ModelList.AddAll(orders);
        }
Esempio n. 4
0
        protected override async Task OnLoadStateAsync(LoadStateEventArgs e)
        {
            _loadState = e;
            _viewModelsLoaded.Clear();
            await base.OnLoadStateAsync(e);

            // Subsequent navigations to a page that uses a CollectionViewModelBase might already have an initialized page and thus not fire the appropriate
            // event on the already loaded first view. This check is to manually pass the load state event to the current in focuse ViewModel.
            if (e.NavigationEventArgs.NavigationMode == NavigationMode.New && e.IsViewInitialized)
            {
                await this.SetCurrentAsync(this.CurrentViewModel);
            }
        }
Esempio n. 5
0
        /// <summary>
        /// 加载所有
        /// </summary>
        /// <param name="user_tyepe"></param>
        public void LoadAllModels(int user_tyepe = -1)
        {
            ModelList.Clear();
            List <SystemUser> users = new List <SystemUser>();

            if (user_tyepe > 0)
            {
                users = userService.QueryableToList(x => x.id > 0 && x.user_type == user_tyepe);
            }
            else
            {
                users = userService.QueryableToList(x => x.id > 0);
            }
            foreach (var item in users)
            {
                ModelList.Add(item);
            }
        }
Esempio n. 6
0
        private void MainForm_FormClosed(object sender, FormClosedEventArgs e)
        {
            foreach (var item in ModelList)
            {
                item.Stop();
            }

            ModelList.Clear();
            ModelList = null;

            foreach (var viewer in _videoViewerList)
            {
                viewer.Stop();
                viewer.Dispose();
            }

            _videoViewerList.Clear();
            _videoViewerList = null;
        }
Esempio n. 7
0
        public void LoadAllInfos()
        {
            ModelTrees.Clear();
            ModelList.Clear();
            var list = _productParameterService.QueryableToList(x => x.id > 0).OrderBy(x => x.product_name).ToList();

            if (list != null && list.Count > 0)
            {
                foreach (var item in list)
                {
                    ModelList.Add(item);
                    AddTreeNode(item);
                }
                EditModel = list[0];
            }
            else
            {
                EditModel = new ProductParameter();
            }
        }
Esempio n. 8
0
        public bool IsCheckingMyFirewall(IPEndPoint endpoint)
        {
            if (!FirewallOpen)
            {
                lock (myfirewalltests) {
                    TestingFirewall = !myfirewalltests.Contains((s) => s.ExternalIp.Equals(endpoint.Address));

                    if (!TestingFirewall)
                    {
                        FirewallOpen = true;
                        myfirewalltests.Clear();
                    }
                }

                return(FirewallOpen);
            }
            else
            {
                return(false);
            }
        }
Esempio n. 9
0
 public void LoadAllInfos()
 {
     ModelList.Clear();
     SelectedModel = _taskOrderService.QueryableToEntity(x => x.id > 0);
 }