/// <summary>
        /// 点击了确定按钮
        /// </summary>
        private void DoOKCommond()
        {
            if (!File.Exists(SelectedFileName))
            {
                MessageBox.ShowDialogErrorMsg("请先选择文件!");
                return;
            }
            EnumOSType selectPlatform = _dicOSType[SelectedPlatform];

            if (selectPlatform == EnumOSType.None)
            {
                MessageBox.ShowDialogErrorMsg("请先选择系统类型!");
                return;
            }

            _selectedFile = new LocalFileDevice()
            {
                IsDirectory = false, PathName = SelectedFileName
            };
            if (selectPlatform == EnumOSType.YunOS)
            {
                selectPlatform = EnumOSType.Android;
            }
            _selectedFile.OSType = selectPlatform;
            if (_dicFlshType.ContainsKey(selectPlatform))       //如果是山寨机,则设置芯片类型和设备类型
            {
                _selectedFile.CottageFlshType = _dicFlshType[selectPlatform].Item1;
                _selectedFile.CottageDevType  = _dicFlshType[selectPlatform].Item2;
            }
            base.DialogResult = true;
            base.CloseView();
        }
Ejemplo n.º 2
0
 public static IList <PluginFeatureMathchResult> TryFeatureMathch(string path, EnumOSType ostype, string appName)
 {
     try
     {
         return(Features.Where(f => f.OSType == ostype && f.AppName == appName).Select((f) => f.TryMathch(path) ?? Error).ToList());
     }
     catch (Exception ex)
     {
         LoggerManagerSingle.Instance.Error(string.Format("特征匹配错误,错误信息:{0}", ex));
         return(null);
     }
 }