/// <summary>
 /// DBConversion.xaml 的视图模型
 /// </summary>
 public DBConversionViewModel()
 {
     //应用程序标题
     Title = "数据库转换工具";
     //设置软件图标
     MainAppLargeIcon = ImageHelper.ByteArrayToImageSource(MainImage.GetImageByteArray("AppLargeIcon"));
 }
示例#2
0
 /// <summary>
 /// Encryption.xaml 的视图模型
 /// </summary>
 public EncryptionViewModel()
 {
     //应用程序标题
     Title = "加密解密工具";
     //设置软件图标
     MainAppLargeIcon = ImageHelper.ByteArrayToImageSource(MainImage.GetImageByteArray("AppLargeIcon"));
 }
示例#3
0
 /// <summary>
 /// FileSharing.xaml 的视图模型
 /// </summary>
 public FileSharingViewModel()
 {
     //应用程序标题
     Title = "文件共享工具";
     //设置软件图标
     MainAppLargeIcon = ImageHelper.ByteArrayToImageSource(MainImage.GetImageByteArray("AppLargeIcon"));
 }
示例#4
0
 /// <summary>
 /// RegistrationTool.xaml 的视图模型
 /// </summary>
 public RegistrationToolViewModel()
 {
     //应用程序标题
     Title = "注册工具";
     //设置软件图标
     MainAppLargeIcon = ImageHelper.ByteArrayToImageSource(MainImage.GetImageByteArray("AppLargeIcon"));
 }
示例#5
0
 /// <summary>
 /// FileSharingSettings.xaml 的视图模型
 /// </summary>
 public FileSharingSettingsViewModel()
 {
     //应用程序标题
     Title = "文件共享设置";
     //设置软件图标
     MainAppLargeIcon = ImageHelper.ByteArrayToImageSource(MainImage.GetImageByteArray("AppLargeIcon"));
     //初始化数据
     SetSharingIndex = 0;
 }
示例#6
0
 /// <summary>
 /// QRCode.xaml 的视图模型
 /// </summary>
 public QRCodeViewModel()
 {
     //应用程序标题
     Title = "生成二维码工具";
     //设置软件图标
     MainAppLargeIcon = ImageHelper.ByteArrayToImageSource(MainImage.GetImageByteArray("AppLargeIcon"));
     //默认不使用LOGO
     BISExistenceLogo = false;
     //设置初始二维码LOGO
     QRCodeLogo = ImageHelper.ByteArrayToImageSource(MainImage.GetImageByteArray("QRCodeLogo"));
 }
示例#7
0
 /// <summary>
 /// DBConnection.xaml 的视图模型
 /// </summary>
 /// <param name="eventAggregator">Defines an interface to get instances of an event type.</param>
 /// <param name="strDataBaseName">数据库名称 SqlServer/Oracle/MySql/Access/SQLite</param>
 public DBConnectionViewModel(IEventAggregator eventAggregator, string strDataBaseName)
 {
     //委托Load方法
     LoadedCommand = new DelegateCommand <Window>(Window_Loaded);
     //应用程序标题
     Title = "连接数据库";
     //设置软件图标
     MainAppLargeIcon = ImageHelper.ByteArrayToImageSource(MainImage.GetImageByteArray("AppLargeIcon"));
     //赋值全局变量数据库名称
     this.strDataBaseName = strDataBaseName;
     //赋值全局变量消息机制
     this.eventAggregator = eventAggregator;
     //初始化控件
     if (strDataBaseName.Equals(TypeProcessing.DataBase.SqlServer.ToString()))
     {
         DisplaySqlServer = Visibility.Visible;
         DisplayOracle    = Visibility.Hidden;
         DisplayMySql     = Visibility.Hidden;
         DisplayAccess    = Visibility.Hidden;
         DisplaySQLite    = Visibility.Hidden;
     }
     else if (strDataBaseName.Equals(TypeProcessing.DataBase.Oracle.ToString()))
     {
         DisplaySqlServer = Visibility.Hidden;
         DisplayOracle    = Visibility.Visible;
         DisplayMySql     = Visibility.Hidden;
         DisplayAccess    = Visibility.Hidden;
         DisplaySQLite    = Visibility.Hidden;
     }
     else if (strDataBaseName.Equals(TypeProcessing.DataBase.MySql.ToString()))
     {
         DisplaySqlServer = Visibility.Hidden;
         DisplayOracle    = Visibility.Hidden;
         DisplayMySql     = Visibility.Visible;
         DisplayAccess    = Visibility.Hidden;
         DisplaySQLite    = Visibility.Hidden;
     }
     else if (strDataBaseName.Equals(TypeProcessing.DataBase.Access.ToString()))
     {
         DisplaySqlServer = Visibility.Hidden;
         DisplayOracle    = Visibility.Hidden;
         DisplayMySql     = Visibility.Hidden;
         DisplayAccess    = Visibility.Visible;
         DisplaySQLite    = Visibility.Hidden;
     }
     else if (strDataBaseName.Equals(TypeProcessing.DataBase.SQLite.ToString()))
     {
         DisplaySqlServer = Visibility.Hidden;
         DisplayOracle    = Visibility.Hidden;
         DisplayMySql     = Visibility.Hidden;
         DisplayAccess    = Visibility.Hidden;
         DisplaySQLite    = Visibility.Visible;
     }
 }
示例#8
0
 /// <summary>
 /// FileSharingSettings.xaml 的视图模型
 /// </summary>
 /// <param name="mySelectedElement">选中数据</param>
 public FileSharingSettingsViewModel(DataRowView mySelectedElement)
 {
     //应用程序标题
     Title = "文件共享设置";
     //设置软件图标
     MainAppLargeIcon = ImageHelper.ByteArrayToImageSource(MainImage.GetImageByteArray("AppLargeIcon"));
     //赋值选中数据
     this.SelectedItemRow = mySelectedElement;
     //初始化数据
     SetSharingIndex = 0;
     StrSharingPath  = mySelectedElement.Row["path"].ToString();
     StrSharingName  = mySelectedElement.Row["name"].ToString();
     SetSharingValue = mySelectedElement.Row["permissions"].ToString();
 }
 /// <summary>
 /// RecognitionQRCode.xaml 的视图模型
 /// </summary>
 public RecognitionQRCodeViewModel()
 {
     //委托Load方法
     LoadedCommand = new DelegateCommand <Window>(Window_Loaded);
     //应用程序标题
     Title = "识别二维码";
     //设置软件图标
     MainAppLargeIcon = ImageHelper.ByteArrayToImageSource(MainImage.GetImageByteArray("AppLargeIcon"));
     //关闭按钮图片
     QRCodeClose = ImageHelper.ByteArrayToImageSource(MainImage.GetImageByteArray("QRCodeClose"));
     //FPS默认为60
     TextFPS = "60";
     //识别二维码按钮
     RecognitionBtn = "识别二维码";
 }