Exemple #1
0
        public override void Init()
        {
            Logger.LogInfo("I'm InjectLogin Plugin,I'm made in CHINA");
            Logger.LogInfo("Add User Type \"Inject\" to User Login Pane");
            LoginUserType usertype = new LoginUserType();


            usertype.HaveGUI   = "true";
            usertype.LoginText = "外置登录";
            var icon = new PackIcon()
            {
                Width = double.NaN, Height = double.NaN, Kind = PackIconKind.AccountReactivateOutline
            };

            usertype.Icon = icon;
            usertype.user = new InjectUser();
            usertype.AllowedLoginPanel = new LoginPane();
            UserTypeManager.AddUserType(usertype);
            Logger.LogInfo("Added");
            EventHelper.OnWindowLoaded += (object s, EventArgs e) =>
            {
                ColorHelper.BingdingBackgroundedForegoundToControl(icon);
            };
            Logger.LogInfo("Binded Color");
        }