Exemple #1
0
        /// <summary>
        /// 构造方法
        /// </summary>
        /// <param name="filePath">.apk或.keystore或.jks文件路径</param>
        /// <param name="type">类型(Constant常量)</param>
        public BrowseCertForm(string filePath, int type)
        {
            InitializeComponent();

            mFilePath = filePath;
            mType     = type;

            if (mType == Constants.TYPE_APK_FILE)
            {
                this.Text = "查看APK签名信息";
                string msg = BrowseCertBLL.BrowseCert(mFilePath, this);
                Log(msg);
            }
            else if (mType == Constants.TYPE_CERT_FILE)
            {
                this.Text = "查看签名库信息";
            }
        }
Exemple #2
0
 private void BrowseCertForm_Shown(object sender, EventArgs e)
 {
     if (mType == Constants.TYPE_CERT_FILE)
     {
         Console.WriteLine("文件路径 " + mFilePath);
         EnterPwdForm form = new EnterPwdForm();
         DialogResult dr   = form.ShowDialog();
         if (dr == DialogResult.OK)
         {
             Console.WriteLine("密码 " + form.Pwd);
             string msg = BrowseCertBLL.BrowseCert(mFilePath, form.Pwd, this);
             Console.WriteLine("msg " + msg);
             Log(msg);
         }
         else
         {
             this.Dispose();
             this.Close();
         }
     }
 }