当前位置: 首页 > news >正文

您的网站对百度设置了ua封禁z怎么解决青岛网站建设公

您的网站对百度设置了ua封禁z怎么解决,青岛网站建设公,建设企业网站有哪些,兰州企业网络推广方法背景 MVVM 是一种软件架构模式#xff0c;用于创建用户界面。它将用户界面#xff08;View#xff09;、业务逻辑#xff08;ViewModel#xff09;和数据模型#xff08;Model#xff09;分离开来#xff0c;以提高代码的可维护性和可测试性。 MainWindow 类是 View用于创建用户界面。它将用户界面View、业务逻辑ViewModel和数据模型Model分离开来以提高代码的可维护性和可测试性。 MainWindow 类是 View视图负责用户界面的呈现和交互它是用户直接看到和操作的部分。 LoginVM 类是 ViewModel视图模型它充当了 View 和 Model 之间的中介处理了视图与数据模型之间的交互逻辑以及用户操作的响应逻辑。 LoginModel 类是 Model模型它包含了应用程序的数据和业务逻辑用于存储和处理用户的身份验证信息。 展示 代码 LoginModel.cs using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks;namespace WpfApp2 {public class LoginModel{private string _UserName;public string UserName{get { return _UserName; }set{_UserName value;}}private string _Password;public string Password{get { return _Password; }set{_Password value;}}} } LoginVM.cs using Sys tem; using System.Collections.Generic; using System.ComponentModel; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Input;namespace WpfApp2 {public class LoginVM : INotifyPropertyChanged{private MainWindow _main;public LoginVM(MainWindow main){_main main;}public event PropertyChangedEventHandler PropertyChanged;private void RaisePropetyChanged(string propertyName){PropertyChangedEventHandler handler PropertyChanged;if (handler ! null){handler(this, new PropertyChangedEventArgs(propertyName));}}private LoginModel _LoginM new LoginModel();public string UserName{get { return _LoginM.UserName; }set{_LoginM.UserName value;RaisePropetyChanged(UserName);}}public string Password{get { return _LoginM.Password; }set{_LoginM.Password value;RaisePropetyChanged(Password);}}/// summary/// 登录方法/// /summaryvoid Loginfunc(){if (UserName wpf Password 666){MessageBox.Show(OK);Index index new Index();index.Show();//想办法拿到mainwindow_main.Hide();}else{MessageBox.Show(输入的用户名或密码不正确);UserName ;Password ;}}bool CanLoginExecute(){return true;}public ICommand LoginAction{get{return new RelayCommand(Loginfunc,CanLoginExecute);}}} } MainWindow.xaml Window x:ClassWpfApp2.MainWindowxmlnshttp://schemas.microsoft.com/winfx/2006/xaml/presentationxmlns:xhttp://schemas.microsoft.com/winfx/2006/xamlxmlns:dhttp://schemas.microsoft.com/expression/blend/2008xmlns:mchttp://schemas.openxmlformats.org/markup-compatibility/2006xmlns:localclr-namespace:WpfApp2mc:IgnorabledTitleMainWindow Height450 Width800GridGrid.RowDefinitionsRowDefinition Heightauto/RowDefinitionRowDefinition Heightauto/RowDefinitionRowDefinition Height1*/RowDefinitionRowDefinition Height9*/RowDefinition/Grid.RowDefinitionsTextBlock Grid.Row0 Grid.Column0 Text上海市-市图书馆 FontSize18 HorizontalAlignmentCenter/TextBlockStackPanel Grid.Row1 Grid.Column0 Background#0078d4TextBlock Text登录 FontSize22 HorizontalAlignmentCenter ForegroundWheat Margin5/TextBlock /StackPanelGrid Grid.Row3 ShowGridLinesFalse HorizontalAlignmentCenterGrid.RowDefinitionsRowDefinition Height30/RowDefinitionRowDefinition Height30/RowDefinitionRowDefinition Height30/RowDefinitionRowDefinition Height30/RowDefinition/Grid.RowDefinitionsGrid.ColumnDefinitions ColumnDefinition Widthauto/ColumnDefinitionColumnDefinition Width200/ColumnDefinition/Grid.ColumnDefinitionsTextBlock Text用户名 Grid.Row0 Grid.Column0 VerticalAlignmentCenter/TextBlockTextBox Text{Binding UserName} Grid.Row0 Grid.Column1 Margin2 /TextBoxTextBlock Text密码 Grid.Row1 Grid.Column0 VerticalAlignmentCenter/TextBlockTextBox Text{Binding Password} Grid.Row1 Grid.Column1 Margin2/TextBoxCheckBox Grid.ColumnSpan2 Content记住密码 Grid.Row2/CheckBoxlocal:CustomButton ButtonCornerRadius5 BackgroundHoverRed BackgroundPressedGreen Foreground#FFFFFF Background#3C7FF8 Grid.Row3 Grid.Column0 Grid.ColumnSpan2 Command{Binding LoginAction} Height30 VerticalAlignmentTop登录/local:CustomButton/Grid/Grid /Window MainWindow.xaml.cs using System; using System.Collections.Generic; using System.ComponentModel; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes;namespace WpfApp2 {/// summary/// MainWindow.xaml 的交互逻辑/// /summarypublic partial class MainWindow : Window{LoginVM loginVM;public MainWindow(){InitializeComponent();loginVM new LoginVM(this);this.DataContext loginVM;}} } RelayCommand.cs using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Input;namespace WpfApp2 {public class RelayCommand : ICommand{/// summary/// 命令是否能够执行/// /summaryreadonly Funcbool _canExecute;/// summary/// 命令需要执行的方法/// /summaryreadonly Action _exexute;public RelayCommand(Action exexute,Funcbool canExecute){_canExecute canExecute;_exexute exexute;}public bool CanExecute(object parameter){if (_canExecute null){return true;}return _canExecute();}public void Execute(object parameter){_exexute();}public event EventHandler CanExecuteChanged{add {if (_canExecute ! null){CommandManager.RequerySuggested value;}}remove{if (_canExecute ! null){CommandManager.RequerySuggested - value;}}}} } 自定义按钮CustomButton App.xaml.cs Application x:ClassWpfApp2.Appxmlnshttp://schemas.microsoft.com/winfx/2006/xaml/presentationxmlns:xhttp://schemas.microsoft.com/winfx/2006/xamlxmlns:localclr-namespace:WpfApp2StartupUriMainWindow.xamlApplication.ResourcesResourceDictionaryResourceDictionary.MergedDictionariesResourceDictionary SourceCustomButtonStyles.xaml/ResourceDictionary/ResourceDictionary.MergedDictionaries/ResourceDictionary/Application.Resources /Application CustomButton.cs using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Media;namespace WpfApp2 {public class CustomButton:Button{//依赖属性public CornerRadius ButtonCornerRadius{get { return (CornerRadius)GetValue(ButtonCornerRadiusProperty); }set { SetValue(ButtonCornerRadiusProperty, value); }}// Using a DependencyProperty as the backing store for ButtonCornerRadius. This enables animation, styling, binding, etc...public static readonly DependencyProperty ButtonCornerRadiusProperty DependencyProperty.Register(ButtonCornerRadius, typeof(CornerRadius), typeof(CustomButton));public Brush BackgroundHover{get { return (Brush)GetValue(BackgroundHoverProperty); }set { SetValue(BackgroundHoverProperty, value); }}// Using a DependencyProperty as the backing store for BackgroundHover. This enables animation, styling, binding, etc...public static readonly DependencyProperty BackgroundHoverProperty DependencyProperty.Register(BackgroundHover, typeof(Brush), typeof(CustomButton));public Brush BackgroundPressed{get { return (Brush)GetValue(BackgroundPressedProperty); }set { SetValue(BackgroundPressedProperty, value); }}// Using a DependencyProperty as the backing store for BackgroundPressed. This enables animation, styling, binding, etc...public static readonly DependencyProperty BackgroundPressedProperty DependencyProperty.Register(BackgroundPressed, typeof(Brush), typeof(CustomButton));} } 数据字典 CustombuttonStyles.xaml ResourceDictionary xmlnshttp://schemas.microsoft.com/winfx/2006/xaml/presentationxmlns:xhttp://schemas.microsoft.com/winfx/2006/xamlxmlns:bbclr-namespace:WpfApp2Style TargetType{x:Type bb:CustomButton}Setter PropertyTemplateSetter.ValueControlTemplate TargetType{x:Type bb:CustomButton}Border x:NamebuttonBorder Background{TemplateBinding Background} CornerRadius{TemplateBinding ButtonCornerRadius}TextBlock Text{TemplateBinding Content} HorizontalAlignment{TemplateBinding HorizontalContentAlignment} VerticalAlignment{TemplateBinding VerticalContentAlignment}/TextBlock/Border!--触发器--ControlTemplate.TriggersTrigger PropertyIsMouseOver ValueTrueSetter TargetNamebuttonBorder PropertyBackground Value{Binding BackgroundHover,RelativeSource{RelativeSource TemplatedParent}}/Setter/TriggerTrigger PropertyIsPressed ValueTrueSetter TargetNamebuttonBorder PropertyBackground Value{Binding BackgroundPressed,RelativeSource{RelativeSource TemplatedParent}}/Setter/Trigger/ControlTemplate.Triggers/ControlTemplate/Setter.Value/Setter/Style /ResourceDictionary
http://www.w-s-a.com/news/915373/

相关文章:

  • 锦州做网站的公司百度seo搜索营销新视角
  • 做画册找什么网站海南建设工程股份有限公司网站
  • 网站机房建设有助于网站备案
  • 北辰苏州网站建设抖音代运营投诉平台
  • 安徽住房与城乡建设部网站如何新建站点
  • 企业网站开发的感想网站开发公司所需投入资源
  • 如何拿网站后台账号wordpress 电影下载站源码
  • 公司网站建设方案书安卓应用市场免费下载安装
  • phpmysql网站设计建设好一个网站需要
  • 自己做的网站能被别人看到吗idea怎么做网页
  • 燕莎网站建设互联网排名前十的公司2021
  • 微软云怎么做网站微商城和小程序区别
  • 哈尔滨建站的系统网站到首页排名
  • 运动网站开发的需求分析南通市住房和城乡建设局网站
  • 佘山做网站谷歌云做网站
  • 免费发布信息网站大全666做p2p网站费用
  • 北京 网站建设咨询顾问公司网络公司有几家
  • 设计类网站如何用ps做网站首页
  • 品牌网站建设的关键事项设计网有哪些
  • 网站没收录徐州建设工程审图中心网站
  • 网站建设记账做什么科目erp系统有哪些软件
  • 泰拳图片做网站用哪里有做空包网站的
  • 查外链网站重庆做网站微信的公司
  • 有没有外包活的网站如何做网站快捷键的元素
  • 公司网站赏析网站制作2019趋势
  • 企业进行网站建设的方式有( )推广引流违法吗
  • 按营销型网站要求重做网站 费用点金网站建设
  • 深圳做网站互联网服务
  • 网站sem托管wordpress安装无法连接数据库
  • 深圳网站建设开发公司哪家好微信小程序商家入口