Example #1
0
File: ASpy.cs Project: burstas/rmps
        public WSpy(AUserModel userModel)
        {
            _UserModel = userModel as UserModel;

            InitializeComponent();

            this.Icon = Me.Amon.Properties.Resources.Icon;
        }
Example #2
0
 public void Init(UserModel userModel)
 {
 }
Example #3
0
File: ARen.cs Project: burstas/rmps
        private void ARen_Load(object sender, EventArgs e)
        {
            _UserModel = new UserModel();
            _UserModel.Init();

            GvFile.AutoGenerateColumns = false;
            _FileList = new List<TRen>();

            _Renamer = new Renamer();

            GvInfo.AutoGenerateColumns = false;
            LlInfo.Text = "一些文件名中的禁用字符(:|*?\"<>\\/)在命名表达式中的用法:";
            DataTable dt = new DataTable();
            dt.Columns.Add("KeyCode", typeof(string));
            dt.Columns.Add("KeyInfo", typeof(string));
            dt.Rows.Add(":", "数字表达式:从数值1逐步累加");
            dt.Rows.Add(":<a,b,c,d>", "数字表达式:起始值a,步增量b,结果按定长c显示,不足时填充字符d");
            dt.Rows.Add("|", "字符表达式:大写英文字母循环累加");
            dt.Rows.Add("|<abc>", "字符表达式:表示循环计算abc等字符");
            dt.Rows.Add("|<ab:c:def>", "字符表达式:表示循环计算ab、c、def等单词");
            dt.Rows.Add("*", "文件名表达式:引用原文件名");
            dt.Rows.Add("*<ab:c>", "文件名表达式:将文件名中的ab替换为c");
            dt.Rows.Add("?", "扩展名表达式:引用原扩展名");
            dt.Rows.Add("?<ab:c>", "扩展名表达式:将扩展名中的ab替换为c");
            //dt.Rows.Add("\"", "字符表达式:对应位置的单个原有字符");
            dt.Rows.Add("<>", "区间表达式:用于限制以上特殊含义字符的取值空间");
            dt.Rows.Add("/", "正向转义字符,不能单独使用");
            dt.Rows.Add("/:", "转义:使用文件修改时间,默认格式为 yyyyMMddHHmmss");
            dt.Rows.Add("/:<yyyy-MM-dd HH.mm.ss>", "转义:使用文件修改时间,使用指定格式");
            dt.Rows.Add("/|<1,4>", "转义:字符裁剪,从第1个字符开始裁剪掉后续4个字符");
            dt.Rows.Add("/*", "转义:将文件名转换为小写");
            dt.Rows.Add("/?", "转义:将扩展名转换为小写");
            //dt.Rows.Add("/\"", "转义:将原有字符转换为小写");
            dt.Rows.Add("\\", "反向转义字符,不能单独使用");
            dt.Rows.Add("\\:", "转义:使用文件创建时间,默认时间格式为 yyyyMMddHHmmss");
            dt.Rows.Add("\\:<yyyy-MM-dd HH.mm.ss>", "转义:使用文件创建时间,使用指定格式");
            dt.Rows.Add("\\|<1,4>", "转义:字符截取,从第1个字符开始仅保留后续4个字符");
            dt.Rows.Add("\\*", "转义:将文件名转换为大写");
            dt.Rows.Add("\\?", "转义:将扩展名转换为大写");
            //dt.Rows.Add("\\\"", "转义:将原有字符转换为大写");
            GvInfo.DataSource = dt;

            foreach (MRen ren in _UserModel.LoadRules())
            {
                LbRule.Items.Add(ren);
            }

            #region 系统选单
            _XmlMenu = new XmlMenu<ARen>(this, null);
            if (_XmlMenu.Load(Path.Combine(_UserModel.DatHome, ERen.XML_MENU)))
            {
                _XmlMenu.GetStrokes("ARen", this);
                _XmlMenu.GetPopMenu("ARen", PmMenu);
                _XmlMenu.GetPopMenu("ARule", PmRule);
                _XmlMenu.GetPopMenu("AFile", PmFile);
            }
            #endregion
        }
Example #4
0
 public DataModel(UserModel userModel)
 {
 }
Example #5
0
File: APro.cs Project: burstas/rmps
        public void InitOnce(UserModel userModel)
        {
            _UserModel = userModel;

            //
            // UcDo
            //
            _UcDo = new Me.Amon.Sec.V.Pro.Uc.Do(this);
            _UcDo.Init();
            _UcDo.Location = new System.Drawing.Point(246, 134);
            _UcDo.Name = "UcDo";
            _UcDo.Size = new System.Drawing.Size(240, 102);
            _UcDo.TabIndex = 6;
            Controls.Add(_UcDo);

            //
            // UcDi
            //
            _UcDi = new Me.Amon.Sec.V.Pro.Uc.Di(this);
            _UcDi.Init();
            _UcDi.Location = new System.Drawing.Point(0, 134);
            _UcDi.Name = "UcDi";
            _UcDi.Size = new System.Drawing.Size(240, 102);
            _UcDi.TabIndex = 5;
            Controls.Add(_UcDi);

            //
            // UcUk
            //
            _UcUk = new Me.Amon.Sec.V.Pro.Uc.Uk(this);
            _UcUk.Init();
            _UcUk.Location = new System.Drawing.Point(246, 26);
            _UcUk.Name = "UcUk";
            _UcUk.Size = new System.Drawing.Size(240, 102);
            _UcUk.TabIndex = 4;
            Controls.Add(_UcUk);

            //
            // UcCm
            //
            _UcCm = new Me.Amon.Sec.V.Pro.Uc.Cm(this);
            _UcCm.Init();
            _UcCm.Location = new System.Drawing.Point(0, 26);
            _UcCm.Name = "UcCm";
            _UcCm.Size = new System.Drawing.Size(240, 102);
            _UcCm.TabIndex = 3;
            Controls.Add(_UcCm);

            //
            // CbKey
            //
            CbKey.Items.Add(new Items { K = "0", V = "请选择" });
            CbKey.Items.Add(new Items { K = ESec.DIR_ENCRYPT, V = "加密" });
            CbKey.Items.Add(new Items { K = ESec.DIR_DECRYPT, V = "解密" });
            CbKey.SelectedIndex = 0;
            CbKey.Visible = false;

            //
            // CbOpt
            //
            CbOpt.Items.Add(new Items { K = "0", V = "请选择" });
            CbOpt.Items.Add(new Items { K = ESec.OPT_DIGEST, V = "散列算法" });
            //CbOpt.Items.Add(new Item { K = IData.OPT_RANDKEY, V = "随机口令" });
            CbOpt.Items.Add(new Items { K = ESec.OPT_WRAPPER, V = "掩码算法" });
            CbOpt.Items.Add(new Items { K = ESec.OPT_SCRYPTO, V = "块对称算法" });
            CbOpt.Items.Add(new Items { K = ESec.OPT_SSTREAM, V = "流对称算法" });
            //CbOpt.Items.Add(new Item { K = IData.OPT_ACRYPTO, V = "非对称算法" });
            //CbOpt.Items.Add(new Item { K = IData.OPT_TXT2IMG, V = "图文转换" });
            CbOpt.SelectedIndex = 0;
        }
Example #6
0
        public void Init(UserModel userModel)
        {
            _DbPath = Path.Combine(userModel.DatHome, CApp.FILE_DB);

            if (!File.Exists(_DbPath))
            {
                DbInit();
            }
        }
Example #7
0
 public void Init(UserModel userModel)
 {
     _UserModel = userModel;
     _DbPath = Path.Combine(userModel.DatHome, CApp.FILE_DB);
 }