public AuthUl(AuthAc authAc, AUserModel userModel) { _AuthAc = authAc; _UserModel = userModel; InitializeComponent(); }
public SignAc(Main main, AUserModel userModel) { _Main = main; _UserModel = userModel; InitializeComponent(); }
public AuthCa(AUserModel userModel) { _UserModel = userModel; InitializeComponent(); this.Icon = Me.Amon.Properties.Resources.Icon; }
public SignFk(SignAc signAc, AUserModel userModel) { _SignAc = signAc; _UserModel = userModel; InitializeComponent(); //_SignAc.ShowTips(null, ""); }
public WPwd(Main main, AUserModel userModel) { _Main = main; _UserModel = userModel as UserModel; InitializeComponent(); CheckForIllegalCrossThreadCalls = false; this.Icon = Me.Amon.Properties.Resources.Icon; }
public SignUl(SignAc signAc, AUserModel userModel) { _SignAc = signAc; _UserModel = userModel; InitializeComponent(); TbPath.Text = Path.Combine(_UserModel.SysHome, CApp.DIR_DATA); _SignAc.ShowTips(BtPath, "选择目录"); }
public SignIn(SignAc signAc, AUserModel userModel) { _SignAc = signAc; _UserModel = userModel; InitializeComponent(); _SignAc.ShowTips(PbSignUp, "用户注册"); _SignAc.ShowTips(PbSignFk, "找回口令"); }
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(); }
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; }
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; }
/// <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(); }
public void Import(AUserModel userModel) { XmlReaderSettings setting = new XmlReaderSettings { IgnoreWhitespace = true }; ImportWPwdDir(userModel, setting); }
public void Export(AUserModel userModel) { XmlWriterSettings setting = new XmlWriterSettings { Indent = true }; ExportWPwdCat(userModel, setting); }
public void Init(AUserModel userModel) { _DbPath = Path.Combine(userModel.DatHome, CApp.FILE_DB); if (!File.Exists(_DbPath)) { Directory.CreateDirectory(Path.GetDirectoryName(_DbPath)); DbInit(); } }
public SkinModel(AUserModel userModel) { _UserModel = userModel; }
public IApp CreateApp(AUserModel userModel) { Main.LogInfo("创建新实例:" + Id); return null; }
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(); }
public static void Export(AUserModel userModel) { }
public WBar(AUserModel userModel) { InitializeComponent(); this.Icon = Me.Amon.Properties.Resources.Icon; }
public void Init(AUserModel userModel) { }
/// <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(); }
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(); }
public Reset(AUserModel userModel) { _UserModel = userModel; InitializeComponent(); }
public ADataModel(AUserModel userModel) { _UserModel = userModel; }
public void DbInit(AUserModel userModel) { _DbPath = Path.Combine(userModel.DatHome, CApp.FILE_DB); if (!File.Exists(_DbPath)) { DbInit(); } }