Exemplo n.º 1
0
        public AuthUl(AuthAc authAc, AUserModel userModel)
        {
            _AuthAc = authAc;
            _UserModel = userModel;

            InitializeComponent();
        }
Exemplo n.º 2
0
        public SignAc(Main main, AUserModel userModel)
        {
            _Main = main;
            _UserModel = userModel;

            InitializeComponent();
        }
Exemplo n.º 3
0
        public AuthCa(AUserModel userModel)
        {
            _UserModel = userModel;

            InitializeComponent();

            this.Icon = Me.Amon.Properties.Resources.Icon;
        }
Exemplo n.º 4
0
        public SignFk(SignAc signAc, AUserModel userModel)
        {
            _SignAc = signAc;
            _UserModel = userModel;

            InitializeComponent();

            //_SignAc.ShowTips(null, "");
        }
Exemplo n.º 5
0
Arquivo: WPwd.cs Projeto: burstas/rmps
        public WPwd(Main main, AUserModel userModel)
        {
            _Main = main;
            _UserModel = userModel as UserModel;

            InitializeComponent();

            CheckForIllegalCrossThreadCalls = false;
            this.Icon = Me.Amon.Properties.Resources.Icon;
        }
Exemplo n.º 6
0
        public SignUl(SignAc signAc, AUserModel userModel)
        {
            _SignAc = signAc;
            _UserModel = userModel;

            InitializeComponent();

            TbPath.Text = Path.Combine(_UserModel.SysHome, CApp.DIR_DATA);
            _SignAc.ShowTips(BtPath, "选择目录");
        }
Exemplo n.º 7
0
        public SignIn(SignAc signAc, AUserModel userModel)
        {
            _SignAc = signAc;
            _UserModel = userModel;

            InitializeComponent();

            _SignAc.ShowTips(PbSignUp, "用户注册");
            _SignAc.ShowTips(PbSignFk, "找回口令");
        }
Exemplo n.º 8
0
        private void ExportWPwdCat(AUserModel userModel, XmlWriterSettings setting)
        {
            string file = Path.Combine(userModel.DatHome, "WPwd-Cat.xml");
            StreamWriter stream = new StreamWriter(file);
            using (XmlWriter writer = XmlWriter.Create(stream, setting))
            {
                writer.WriteStartElement("Amon");

                writer.WriteElementString("App", "WPwd");
                writer.WriteElementString("Ver", "1");

                writer.WriteStartElement("Cats");
                foreach (Cat cat in _DataModel.ListCat(CApp.IAPP_WPWD, ""))
                {
                    cat.ToXml(writer);
                }
                writer.WriteEndElement();

                writer.WriteEndElement();
            }
            stream.Close();
        }
Exemplo n.º 9
0
        public void Init(AUserModel userModel)
        {
            _UdcList = new List<Udc>();
            _UdcList.Add(new Udc { Id = "aucs000000000001", Name = "仅数字", Tips = "仅数字", Data = "0123456789" });
            _UdcList.Add(new Udc { Id = "aucs000000000002", Name = "大写字母", Tips = "大写字母", Data = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" });
            _UdcList.Add(new Udc { Id = "aucs000000000003", Name = "小写字母", Tips = "小写字母", Data = "abcdefghijklmnopqrstuvwxyz" });
            _UdcList.Add(new Udc { Id = "aucs000000000004", Name = "大小写字母", Tips = "大小写字母", Data = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" });
            _UdcList.Add(new Udc { Id = "aucs000000000005", Name = "数字及字母", Tips = "数字及字母", Data = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" });
            _UdcList.Add(new Udc { Id = "aucs000000000006", Name = "可输入英文符号", Tips = "可输入英文符号", Data = "!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~" });
            //foreach (Udc udc in userModel.DBA.ListUdc())
            //{
            //    _UdcList.Add(udc);
            //}
            foreach (Udc item in _UdcList)
            {
                if (item.Id == _UdcKey)
                {
                    Default = item;
                }
            }

            Modified = 0x7FFFFFFF;
        }
Exemplo n.º 10
0
Arquivo: TApp.cs Projeto: burstas/rmps
        public IApp CreateApp(AUserModel userModel)
        {
            Main.LogInfo("创建新实例:" + Id);

            switch ((Id ?? "").ToLower())
            {
                case CApp.IAPP_WBAR:
                    App = new Bar.WBar(userModel);
                    break;
                case CApp.IAPP_WICO:
                    App = new Ico.WIco(userModel);
                    break;
                case CApp.IAPP_WIMG:
                    App = new Img.WImg(userModel);
                    break;
                case CApp.IAPP_WSPY:
                    //App = new Spy.ASpy(userModel);
                    break;
                default:
                    break;
            }

            return App;
        }
Exemplo n.º 11
0
        /// <summary>
        /// 类别
        /// </summary>
        /// <param name="userModel"></param>
        /// <param name="setting"></param>
        private void ImportWPwdCat(AUserModel userModel, XmlReaderSettings setting)
        {
            string file = Path.Combine(userModel.DatHome, "WPwd-Cat.xml");
            if (!File.Exists(file))
            {
                return;
            }

            StreamReader stream = new StreamReader(file);
            using (XmlReader reader = XmlReader.Create(stream, setting))
            {
                Cat cat;
                while (reader.Name == "Cat" || reader.ReadToFollowing("Cat"))
                {
                    cat = new Cat();
                    if (!cat.FromXml(reader))
                    {
                        continue;
                    }
                    _DataModel.DeleteVcs(cat);
                    _DataModel.SaveVcs(cat);
                }
            }
            stream.Close();
        }
Exemplo n.º 12
0
 public void Import(AUserModel userModel)
 {
     XmlReaderSettings setting = new XmlReaderSettings { IgnoreWhitespace = true };
     ImportWPwdDir(userModel, setting);
 }
Exemplo n.º 13
0
 public void Export(AUserModel userModel)
 {
     XmlWriterSettings setting = new XmlWriterSettings { Indent = true };
     ExportWPwdCat(userModel, setting);
 }
Exemplo n.º 14
0
        public void Init(AUserModel userModel)
        {
            _DbPath = Path.Combine(userModel.DatHome, CApp.FILE_DB);

            if (!File.Exists(_DbPath))
            {
                Directory.CreateDirectory(Path.GetDirectoryName(_DbPath));
                DbInit();
            }
        }
Exemplo n.º 15
0
 public SkinModel(AUserModel userModel)
 {
     _UserModel = userModel;
 }
Exemplo n.º 16
0
Arquivo: TApp.cs Projeto: burstas/rmps
        public IApp CreateApp(AUserModel userModel)
        {
            Main.LogInfo("创建新实例:" + Id);

            return null;
        }
Exemplo n.º 17
0
Arquivo: Main.cs Projeto: burstas/rmps
        private void Main_Load(object sender, EventArgs e)
        {
            Icon = Me.Amon.Properties.Resources.Icon;

            _UserModel = new Pwd.M.UserModel();
            //_UserModel = new Pcs.M.UserModel();
            _UserModel.Init();

            // 系统日志
            string logFile = Path.Combine(_UserModel.SysHome, CApp.FILE_LOG);
            if (File.Exists(logFile))
            {
                _Writer = new StreamWriter(logFile, true, Encoding.UTF8);
                _Writer.AutoFlush = true;
                _Writer.WriteLine(string.Format("============{0}============", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")));
            }

            ShowUser();
        }
Exemplo n.º 18
0
 public static void Export(AUserModel userModel)
 {
 }
Exemplo n.º 19
0
Arquivo: WBar.cs Projeto: burstas/rmps
        public WBar(AUserModel userModel)
        {
            InitializeComponent();

            this.Icon = Me.Amon.Properties.Resources.Icon;
        }
Exemplo n.º 20
0
 public void Init(AUserModel userModel)
 {
 }
Exemplo n.º 21
0
        /// <summary>
        /// 目录
        /// </summary>
        /// <param name="userModel"></param>
        /// <param name="setting"></param>
        private void ImportWPwdDir(AUserModel userModel, XmlReaderSettings setting)
        {
            string file = Path.Combine(userModel.DatHome, "WPwd-Dir.xml");
            if (!File.Exists(file))
            {
                return;
            }

            StreamReader stream = new StreamReader(file);
            using (XmlReader reader = XmlReader.Create(stream, setting))
            {
                Dir dir;
                while (reader.Name == "Dir" || reader.ReadToFollowing("Dir"))
                {
                    dir = new Dir();
                    if (!dir.FromXml(reader))
                    {
                        continue;
                    }
                    _DataModel.DeleteVcs(dir);
                    _DataModel.SaveVcs(dir);
                }
            }
            stream.Close();
        }
Exemplo n.º 22
0
        private void ImportWPwdLib(AUserModel userModel, XmlReaderSettings setting)
        {
            string file = Path.Combine(userModel.DatHome, "WPwd-Lib.xml");
            if (File.Exists(file))
            {
                return;
            }

            StreamReader stream = new StreamReader(file);
            using (XmlReader reader = XmlReader.Create(stream, setting))
            {
                Lib header;
                while (reader.Name == "Lib" || reader.ReadToFollowing("Lib"))
                {
                    header = new Lib();
                    if (!header.FromXml(reader))
                    {
                        continue;
                    }
                    _DataModel.DeleteVcs(header);
                    _DataModel.SaveVcs(header);
                }
            }
            stream.Close();
        }
Exemplo n.º 23
0
        public Reset(AUserModel userModel)
        {
            _UserModel = userModel;

            InitializeComponent();
        }
Exemplo n.º 24
0
 public ADataModel(AUserModel userModel)
 {
     _UserModel = userModel;
 }
Exemplo n.º 25
0
        public void DbInit(AUserModel userModel)
        {
            _DbPath = Path.Combine(userModel.DatHome, CApp.FILE_DB);

            if (!File.Exists(_DbPath))
            {
                DbInit();
            }
        }