Пример #1
0
        private void GeneratorLogTypeItemCollection(LogType logtype)
        {
            if (!_cbLogTypeItemInfoDic.ContainsKey(logtype))
            {
                _cbLogTypeItemInfoDic[logtype] = new LogItemInfo
                {
                    CollecetdItemIndex = -1,
                    LogTypeName        = logtype,
                    LogItemPaths       = LogPathSetsMgr.GetInstance(_husInstalledDir).GetlogPathByType(logtype),
                    LogItemStatus      = Status.IsChecked
                };
            }

            _cbLogTypeItemInfoDic[logtype].LogItemStatus = Status.IsChecked;
        }
        private void CheckBox_Checked(object sender, RoutedEventArgs e)
        {
            var logtype = (LogType)((CheckBox)sender).Tag;

            if (!_cbLogTypeItemInfoDic.ContainsKey(logtype))
            {
                _cbLogTypeItemInfoDic[logtype] = new LogItemInfo
                {
                    LogTypeName = logtype,
                    LogItemStatus = Status.IsChecked
                };
            }
            _cbLogTypeItemInfoDic[logtype].LogItemStatus = Status.IsChecked;

            if (logtype.Equals(LogType.LogAll))
            {
                CheckAllUnCheckedBox();
            }
        }
Пример #3
0
        private void CheckBox_Checked(object sender, RoutedEventArgs e)
        {
            var logtype = (LogType)((CheckBox)sender).Tag;
            if (!_cbLogTypeItemInfoDic.ContainsKey(logtype))
            {
                _cbLogTypeItemInfoDic[logtype] = new LogItemInfo
                {
                    CollecetdItemIndex = -1,
                    LogTypeName = logtype,
                    LogItemPaths = LogPathSetsMgr.GetInstance().GetlogPathByType(logtype),
                    LogItemStatus = Status.IsChecked

                };
            }
            _cbLogTypeItemInfoDic[logtype].LogItemStatus = Status.IsChecked;

            if (logtype.Equals(LogType.LogAll))
            {
                CheckAllUnCheckedBox();
            }
        }
        private void StartToCollectLog(LogItemInfo itemInfo)
        {
            //  var fullpath = GetfullPathbyCataGory(itemInfo);
            if (itemInfo.LogItemPaths == null)
            {
                var pathListSets = GetlogPathByType(itemInfo.LogTypeName);
                itemInfo.LogItemPaths = pathListSets;
            }

            if (itemInfo.LogItemPaths.Count > 0)
            {

                var fastzip = new FastZip();
                itemInfo.LogItemPaths.ToList().ForEach(dirpath =>
                {
                    CollectFilesAndZipThem(dirpath);
                    UpdateProgressBar();
                });
            }
            //throw new System.NotImplementedException();
        }