update
This commit is contained in:
parent
b6788f4a37
commit
7753c11327
269
.htm
Normal file
269
.htm
Normal file
@ -0,0 +1,269 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<!-- saved from url=(0014)about:internet -->
|
||||||
|
<html xmlns:msxsl="urn:schemas-microsoft-com:xslt"><head><meta content="en-us" http-equiv="Content-Language" /><meta content="text/html; charset=utf-16" http-equiv="Content-Type" /><title _locID="ConversionReport0">
|
||||||
|
迁移报告
|
||||||
|
</title><style>
|
||||||
|
/* Body style, for the entire document */
|
||||||
|
body
|
||||||
|
{
|
||||||
|
background: #F3F3F4;
|
||||||
|
color: #1E1E1F;
|
||||||
|
font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Header1 style, used for the main title */
|
||||||
|
h1
|
||||||
|
{
|
||||||
|
padding: 10px 0px 10px 10px;
|
||||||
|
font-size: 21pt;
|
||||||
|
background-color: #E2E2E2;
|
||||||
|
border-bottom: 1px #C1C1C2 solid;
|
||||||
|
color: #201F20;
|
||||||
|
margin: 0;
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Header2 style, used for "Overview" and other sections */
|
||||||
|
h2
|
||||||
|
{
|
||||||
|
font-size: 18pt;
|
||||||
|
font-weight: normal;
|
||||||
|
padding: 15px 0 5px 0;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Header3 style, used for sub-sections, such as project name */
|
||||||
|
h3
|
||||||
|
{
|
||||||
|
font-weight: normal;
|
||||||
|
font-size: 15pt;
|
||||||
|
margin: 0;
|
||||||
|
padding: 15px 0 5px 0;
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Color all hyperlinks one color */
|
||||||
|
a
|
||||||
|
{
|
||||||
|
color: #1382CE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Table styles */
|
||||||
|
table
|
||||||
|
{
|
||||||
|
border-spacing: 0 0;
|
||||||
|
border-collapse: collapse;
|
||||||
|
font-size: 10pt;
|
||||||
|
}
|
||||||
|
|
||||||
|
table th
|
||||||
|
{
|
||||||
|
background: #E7E7E8;
|
||||||
|
text-align: left;
|
||||||
|
text-decoration: none;
|
||||||
|
font-weight: normal;
|
||||||
|
padding: 3px 6px 3px 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
table td
|
||||||
|
{
|
||||||
|
vertical-align: top;
|
||||||
|
padding: 3px 6px 5px 5px;
|
||||||
|
margin: 0px;
|
||||||
|
border: 1px solid #E7E7E8;
|
||||||
|
background: #F7F7F8;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Local link is a style for hyperlinks that link to file:/// content, there are lots so color them as 'normal' text until the user mouse overs */
|
||||||
|
.localLink
|
||||||
|
{
|
||||||
|
color: #1E1E1F;
|
||||||
|
background: #EEEEED;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.localLink:hover
|
||||||
|
{
|
||||||
|
color: #1382CE;
|
||||||
|
background: #FFFF99;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Center text, used in the over views cells that contain message level counts */
|
||||||
|
.textCentered
|
||||||
|
{
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* The message cells in message tables should take up all avaliable space */
|
||||||
|
.messageCell
|
||||||
|
{
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Padding around the content after the h1 */
|
||||||
|
#content
|
||||||
|
{
|
||||||
|
padding: 0px 12px 12px 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* The overview table expands to width, with a max width of 97% */
|
||||||
|
#overview table
|
||||||
|
{
|
||||||
|
width: auto;
|
||||||
|
max-width: 75%;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* The messages tables are always 97% width */
|
||||||
|
#messages table
|
||||||
|
{
|
||||||
|
width: 97%;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* All Icons */
|
||||||
|
.IconSuccessEncoded, .IconInfoEncoded, .IconWarningEncoded, .IconErrorEncoded
|
||||||
|
{
|
||||||
|
min-width:18px;
|
||||||
|
min-height:18px;
|
||||||
|
background-repeat:no-repeat;
|
||||||
|
background-position:center;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Success icon encoded */
|
||||||
|
.IconSuccessEncoded
|
||||||
|
{
|
||||||
|
/* Note: Do not delete the comment below. It is used to verify the correctness of the encoded image resource below before the product is released */
|
||||||
|
/* [---XsltValidateInternal-Base64EncodedImage:IconSuccess#Begin#background-image: url(data:image/png;base64,#Separator#);#End#] */
|
||||||
|
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAA7EAAAOxAGVKw4bAAABcElEQVR4Xq2TsUsCURzHv15g8ZJcBWlyiYYgCIWcb9DFRRwMW5TA2c0/QEFwFkxxUQdxVlBwCYWOi6IhWgQhBLHJUCkhLr/BW8S7gvrAg+N+v8/v+x68Z8MGy+XSCyABQAXgBgHGALoASkIIDWSLeLBetdHryMjd5IxQPWT4rn1c/P7+xxp72Cs9m5SZ0Bq2vPnbPFafK2zDvmNHypdC0BPkLlQhxJsCAhQoZwdZU5mwxh720qGo8MzTxTTKZDPCx2HoVzp6lz0Q9tKhyx0kGs8Ny+TkWRKk8lCROwEduhyg9l/6lunOPSfmH3NUH6uQ0KHLAe7JYvJjevm+DAMGJHToKtigE+vwvIidxLamb8IBY9e+C5LiXREkfho3TSd06HJA13/oh6T51MTsfQbHrsMynQ5dDihFjiK8JJAU9AKIWTp76dCVN7HWHrajmUEGvyF9nkbAE6gLIS7kTUyuf2gscLoJrElZo/Mvj+nPz/kLTmfnEwP3tB0AAAAASUVORK5CYII=);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Information icon encoded */
|
||||||
|
.IconInfoEncoded
|
||||||
|
{
|
||||||
|
/* Note: Do not delete the comment below. It is used to verify the correctness of the encoded image resource below before the product is released */
|
||||||
|
/* [---XsltValidateInternal-Base64EncodedImage:IconInformation#Begin#background-image: url(data:image/png;base64,#Separator#);#End#] */
|
||||||
|
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABHElEQVR4Xs2TsUoDQRRF7wwoziokjZUKadInhdhukR9YP8DMX1hYW+QvdsXa/QHBbcXC7W0CamWTQnclFutceIQJwwaWNLlwm5k5d94M76mmaeCrrmsLYOocY12FcxZFUeozCqKqqgYA8uevv1H6VuPxcwlfk5N92KHBxfFeCSAxxswlYAW/Xr989x/mv9gkhtyMDhcAxgzRsp7flj8B/HF1RsMXq+NZMkopaHe7lbKxQUEIGbKsYNoGn969060hZBkQex/W8oRQwsQaW2o3Ago2SVcJUzAgY3N0lTCZZm+zPS8HB51gMmS1DEYyOz9acKO1D8JWTlafKIMxdhvlfdyT94Vv5h7P8Ky7nQzACmhvKq3zk3PjW9asz9D/1oigecsioooAAAAASUVORK5CYII=);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Warning icon encoded */
|
||||||
|
.IconWarningEncoded
|
||||||
|
{
|
||||||
|
/* Note: Do not delete the comment below. It is used to verify the correctness of the encoded image resource below before the product is released */
|
||||||
|
/* [---XsltValidateInternal-Base64EncodedImage:IconWarning#Begin#background-image: url(data:image/png;base64,#Separator#);#End#] */
|
||||||
|
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAAx0lEQVR4XpWSMQ7CMAxFf4xAyBMLCxMrO8dhaBcuwdCJS3RJBw7SA/QGTCxdWJgiQYWKXJWKIXHIlyw5lqr34tQgEOdcBsCOx5yZK3hCCKdYXneQkh4pEfqzLfu+wVDSyyzFoJjfz9NB+pAF+eizx2Vruts0k15mPgvS6GYvpVtQhB61IB/dk6AF6fS4Ben0uIX5odtFe8Q/eW1KvFeH4e8khT6+gm5B+t3juyDt7n0jpe+CANTd+oTUjN/U3yVaABnSUjFz/gFq44JaVSCXeQAAAABJRU5ErkJggg==);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Error icon encoded */
|
||||||
|
.IconErrorEncoded
|
||||||
|
{
|
||||||
|
/* Note: Do not delete the comment below. It is used to verify the correctness of the encoded image resource below before the product is released */
|
||||||
|
/* [---XsltValidateInternal-Base64EncodedImage:IconError#Begin#background-image: url(data:image/png;base64,#Separator#);#End#] */
|
||||||
|
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABQElEQVR4XqWTvUoEQRCE6wYPZUA80AfwAQz23uCMjA7MDRQEIzPBVEyNTQUFIw00vcQTTMzuAh/AxEQQT8HF/3G/oGGnEUGuoNnd6qoZuqltyKEsyzVJq5I6rnUp6SjGeGhESikzzlc1eL7opfuVbrqbU1Zw9NCgtQMaZpY0eNnaaL2fHusvTK5vKu7sjSS1Y4y3QUA6K3e3Mau5UFDyMP7tYF9o8cAHZv68vipoIJg971PZIZ5HiwdvYGGvFVFHmGmZ2MxwmQYPXubPl9Up0tfoMQGetXd6mRbvhBw+boZ6WF7Mbv1+GsHRk0fQmPAH1GfmZirbCfDJ61tw3Px8/8pZsPAG4jlVhcPgZ7adwNWBB68lkRQWFiTgFlbnLY3DGGM7izIJIyT/jjIvEJw6fdJTc6krDzh6aMwMP9bvDH4ADSsa9uSWVJkAAAAASUVORK5CYII=);
|
||||||
|
}
|
||||||
|
</style><script type="text/javascript" language="javascript">
|
||||||
|
|
||||||
|
// Startup
|
||||||
|
// Hook up the the loaded event for the document/window, to linkify the document content
|
||||||
|
var startupFunction = function() { linkifyElement("messages"); };
|
||||||
|
|
||||||
|
if(window.attachEvent)
|
||||||
|
{
|
||||||
|
window.attachEvent('onload', startupFunction);
|
||||||
|
}
|
||||||
|
else if (window.addEventListener)
|
||||||
|
{
|
||||||
|
window.addEventListener('load', startupFunction, false);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
document.addEventListener('load', startupFunction, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Toggles the visibility of table rows with the specified name
|
||||||
|
function toggleTableRowsByName(name)
|
||||||
|
{
|
||||||
|
var allRows = document.getElementsByTagName('tr');
|
||||||
|
for (i=0; i < allRows.length; i++)
|
||||||
|
{
|
||||||
|
var currentName = allRows[i].getAttribute('name');
|
||||||
|
if(!!currentName && currentName.indexOf(name) == 0)
|
||||||
|
{
|
||||||
|
var isVisible = allRows[i].style.display == '';
|
||||||
|
isVisible ? allRows[i].style.display = 'none' : allRows[i].style.display = '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function scrollToFirstVisibleRow(name)
|
||||||
|
{
|
||||||
|
var allRows = document.getElementsByTagName('tr');
|
||||||
|
for (i=0; i < allRows.length; i++)
|
||||||
|
{
|
||||||
|
var currentName = allRows[i].getAttribute('name');
|
||||||
|
var isVisible = allRows[i].style.display == '';
|
||||||
|
if(!!currentName && currentName.indexOf(name) == 0 && isVisible)
|
||||||
|
{
|
||||||
|
allRows[i].scrollIntoView(true);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Linkifies the specified text content, replaces candidate links with html links
|
||||||
|
function linkify(text)
|
||||||
|
{
|
||||||
|
if(!text || 0 === text.length)
|
||||||
|
{
|
||||||
|
return text;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Find http, https and ftp links and replace them with hyper links
|
||||||
|
var urlLink = /(http|https|ftp)\:\/\/[a-zA-Z0-9\-\.]+(:[a-zA-Z0-9]*)?\/?([a-zA-Z0-9\-\._\?\,\/\\\+&%\$#\=~;\{\}])*/gi;
|
||||||
|
|
||||||
|
return text.replace(urlLink, '<a href="$&">$&</a>') ;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Linkifies the specified element by ID
|
||||||
|
function linkifyElement(id)
|
||||||
|
{
|
||||||
|
var element = document.getElementById(id);
|
||||||
|
if(!!element)
|
||||||
|
{
|
||||||
|
element.innerHTML = linkify(element.innerHTML);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function ToggleMessageVisibility(projectName)
|
||||||
|
{
|
||||||
|
if(!projectName || 0 === projectName.length)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
toggleTableRowsByName("MessageRowClass" + projectName);
|
||||||
|
toggleTableRowsByName('MessageRowHeaderShow' + projectName);
|
||||||
|
toggleTableRowsByName('MessageRowHeaderHide' + projectName);
|
||||||
|
}
|
||||||
|
|
||||||
|
function ScrollToFirstVisibleMessage(projectName)
|
||||||
|
{
|
||||||
|
if(!projectName || 0 === projectName.length)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// First try the 'Show messages' row
|
||||||
|
if(!scrollToFirstVisibleRow('MessageRowHeaderShow' + projectName))
|
||||||
|
{
|
||||||
|
// Failed to find a visible row for 'Show messages', try an actual message row
|
||||||
|
scrollToFirstVisibleRow('MessageRowClass' + projectName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script></head><body><h1 _locID="ConversionReport">
|
||||||
|
迁移报告 - </h1><div id="content"><h2 _locID="OverviewTitle">概述</h2><div id="overview"><table><tr><th></th><th _locID="ProjectTableHeader">项目</th><th _locID="PathTableHeader">路径</th><th _locID="ErrorsTableHeader">错误</th><th _locID="WarningsTableHeader">警告</th><th _locID="MessagesTableHeader">消息</th></tr><tr><td class="IconErrorEncoded" /><td><strong><a href="#Setup">Setup</a></strong></td><td>..\Setup\Setup.vdproj</td><td class="textCentered"><a href="#SetupError">1</a></td><td class="textCentered"><a>0</a></td><td class="textCentered"><a href="#">0</a></td></tr><tr><td class="IconSuccessEncoded" /><td><strong><a href="#VideoConcat">VideoConcat</a></strong></td><td>VideoConcat.csproj</td><td class="textCentered"><a>0</a></td><td class="textCentered"><a>0</a></td><td class="textCentered"><a href="#">0</a></td></tr></table></div><h2 _locID="SolutionAndProjectsTitle">解决方案和项目</h2><div id="messages"><a name="Setup" /><h3>Setup</h3><table><tr id="SetupHeaderRow"><th></th><th class="messageCell" _locID="MessageTableHeader">消息</th></tr><tr name="ErrorRowClassSetup"><td class="IconErrorEncoded"><a name="SetupError" /></td><td class="messageCell"><strong>..\Setup\Setup.vdproj:
|
||||||
|
</strong><span>找不到此项目类型所基于的应用程序。有关更多信息,请尝试此链接: 54435603-dbb4-11d2-8724-00a0c9a8b90c</span></td></tr></table><a name="VideoConcat" /><h3>VideoConcat</h3><table><tr id="VideoConcatHeaderRow"><th></th><th class="messageCell" _locID="MessageTableHeader">消息</th></tr><tr><td class="IconInfoEncoded" /><td class="messageCell" _locID="NoMessagesRow">VideoConcat 未记录任何消息。
|
||||||
|
</td></tr></table></div></div></body></html>
|
||||||
76
Helpers/PasswordBoxHelper.cs
Normal file
76
Helpers/PasswordBoxHelper.cs
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
// PasswordBoxHelper.cs
|
||||||
|
using System.Windows;
|
||||||
|
using System.Windows.Controls;
|
||||||
|
|
||||||
|
namespace VideoConcat.Helpers
|
||||||
|
{
|
||||||
|
public static class PasswordBoxHelper
|
||||||
|
{
|
||||||
|
public static readonly DependencyProperty BoundPasswordProperty =
|
||||||
|
DependencyProperty.RegisterAttached("BoundPassword", typeof(string), typeof(PasswordBoxHelper),
|
||||||
|
new PropertyMetadata(string.Empty, OnBoundPasswordChanged));
|
||||||
|
|
||||||
|
public static readonly DependencyProperty BindPasswordProperty =
|
||||||
|
DependencyProperty.RegisterAttached("BindPassword", typeof(bool), typeof(PasswordBoxHelper),
|
||||||
|
new PropertyMetadata(false, OnBindPasswordChanged));
|
||||||
|
|
||||||
|
public static string GetBoundPassword(DependencyObject dp)
|
||||||
|
{
|
||||||
|
return (string)dp.GetValue(BoundPasswordProperty);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void SetBoundPassword(DependencyObject dp, string value)
|
||||||
|
{
|
||||||
|
dp.SetValue(BoundPasswordProperty, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static bool GetBindPassword(DependencyObject dp)
|
||||||
|
{
|
||||||
|
return (bool)dp.GetValue(BindPasswordProperty);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void SetBindPassword(DependencyObject dp, bool value)
|
||||||
|
{
|
||||||
|
dp.SetValue(BindPasswordProperty, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void OnBoundPasswordChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
||||||
|
{
|
||||||
|
if (d is PasswordBox passwordBox)
|
||||||
|
{
|
||||||
|
passwordBox.Password = (string)e.NewValue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void OnBindPasswordChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
||||||
|
{
|
||||||
|
if (d is not PasswordBox passwordBox)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((bool)e.OldValue)
|
||||||
|
{
|
||||||
|
passwordBox.PasswordChanged -= PasswordChanged;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((bool)e.NewValue)
|
||||||
|
{
|
||||||
|
passwordBox.PasswordChanged += PasswordChanged;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void PasswordChanged(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
if (sender is PasswordBox passwordBox)
|
||||||
|
{
|
||||||
|
var boundPassword = GetBoundPassword(passwordBox);
|
||||||
|
if (passwordBox.Password != boundPassword)
|
||||||
|
{
|
||||||
|
SetBoundPassword(passwordBox, passwordBox.Password);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,12 +1,6 @@
|
|||||||
using System;
|
namespace VideoConcat.Models
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace VideoConcat.Models
|
|
||||||
{
|
{
|
||||||
internal class MainWindowModel
|
public class MainWindowModel
|
||||||
{
|
{
|
||||||
public string? Username { get; set; }
|
public string? Username { get; set; }
|
||||||
public string? Password { get; set; }
|
public string? Password { get; set; }
|
||||||
|
|||||||
@ -11,9 +11,9 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.4.0" />
|
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.4.0" />
|
||||||
<PackageReference Include="log4net" Version="3.0.2" />
|
<PackageReference Include="log4net" Version="3.0.3" />
|
||||||
<PackageReference Include="MaterialDesignXaml.DialogsHelper" Version="1.0.4" />
|
<PackageReference Include="MaterialDesignXaml.DialogsHelper" Version="1.0.4" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.1" />
|
<PackageReference Include="Microsoft.Extensions.Logging" Version="9.0.0" />
|
||||||
<PackageReference Include="WPFDevelopers" Version="0.0.0.1" />
|
<PackageReference Include="WPFDevelopers" Version="0.0.0.1" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|||||||
@ -5,8 +5,6 @@ VisualStudioVersion = 17.11.35327.3
|
|||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "VideoConcat", "VideoConcat.csproj", "{2FF5691C-3184-4B68-944B-C704E64C4E4E}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "VideoConcat", "VideoConcat.csproj", "{2FF5691C-3184-4B68-944B-C704E64C4E4E}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{54435603-DBB4-11D2-8724-00A0C9A8B90C}") = "Setup", "..\Setup\Setup.vdproj", "{7EE4FDA6-076F-494D-89C5-B3735A89875F}"
|
|
||||||
EndProject
|
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
Debug|Any CPU = Debug|Any CPU
|
||||||
@ -17,8 +15,6 @@ Global
|
|||||||
{2FF5691C-3184-4B68-944B-C704E64C4E4E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{2FF5691C-3184-4B68-944B-C704E64C4E4E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{2FF5691C-3184-4B68-944B-C704E64C4E4E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{2FF5691C-3184-4B68-944B-C704E64C4E4E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{2FF5691C-3184-4B68-944B-C704E64C4E4E}.Release|Any CPU.Build.0 = Release|Any CPU
|
{2FF5691C-3184-4B68-944B-C704E64C4E4E}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{7EE4FDA6-076F-494D-89C5-B3735A89875F}.Debug|Any CPU.ActiveCfg = Debug
|
|
||||||
{7EE4FDA6-076F-494D-89C5-B3735A89875F}.Release|Any CPU.ActiveCfg = Release
|
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
|
|||||||
@ -1,30 +1,45 @@
|
|||||||
using CommunityToolkit.Mvvm.ComponentModel;
|
using CommunityToolkit.Mvvm.ComponentModel;
|
||||||
using CommunityToolkit.Mvvm.Input;
|
using CommunityToolkit.Mvvm.Input;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
|
using VideoConcat.Models;
|
||||||
|
|
||||||
namespace VideoConcat.ViewModels
|
namespace VideoConcat.ViewModels
|
||||||
{
|
{
|
||||||
public partial class MainWindowViewModel : ObservableObject
|
public partial class MainWindowViewModel : ObservableObject
|
||||||
{
|
{
|
||||||
private string? _username;
|
private readonly MainWindowModel _mainWindow = new();
|
||||||
private string? _password;
|
|
||||||
|
|
||||||
public string Username
|
public string Username
|
||||||
{
|
{
|
||||||
get => _username ?? "";
|
get => _mainWindow.Username ?? "";
|
||||||
set => SetProperty(ref _username, value);
|
set
|
||||||
|
{
|
||||||
|
if (_mainWindow.Username != value)
|
||||||
|
{
|
||||||
|
_mainWindow.Username = value;
|
||||||
|
OnPropertyChanged(nameof(Username));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public string Password
|
public string Password
|
||||||
{
|
{
|
||||||
get => _password ?? "";
|
get => _mainWindow.Password ?? "";
|
||||||
set => SetProperty(ref _password, value);
|
set
|
||||||
|
{
|
||||||
|
if (_mainWindow.Password != value)
|
||||||
|
{
|
||||||
|
_mainWindow.Password = value;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[RelayCommand]
|
[RelayCommand]
|
||||||
private async Task LoginAsync()
|
private void Login()
|
||||||
{
|
{
|
||||||
await Task.Run(() =>
|
if (!string.IsNullOrEmpty(Username) && !string.IsNullOrEmpty(Password))
|
||||||
{
|
{
|
||||||
// 模拟登录逻辑
|
// 模拟登录逻辑
|
||||||
if (Username == "admin" && Password == "password")
|
if (Username == "admin" && Password == "password")
|
||||||
@ -36,7 +51,12 @@ namespace VideoConcat.ViewModels
|
|||||||
{
|
{
|
||||||
MessageBox.Show("用户名或密码错误!");
|
MessageBox.Show("用户名或密码错误!");
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
MessageBox.Show("请输入用户名或密码!");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,6 +4,7 @@
|
|||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
||||||
|
xmlns:helpers="clr-namespace:VideoConcat.Helpers"
|
||||||
xmlns:local="clr-namespace:VideoConcat"
|
xmlns:local="clr-namespace:VideoConcat"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Title="登录"
|
Title="登录"
|
||||||
@ -40,7 +41,7 @@
|
|||||||
Height="30"
|
Height="30"
|
||||||
Kind="User"
|
Kind="User"
|
||||||
Margin="10,0,10,0"/>
|
Margin="10,0,10,0"/>
|
||||||
<TextBox Text="{Binding MainWindowModel.Username}"
|
<TextBox Text="{Binding Username}"
|
||||||
Width="400"
|
Width="400"
|
||||||
Margin="10,0"
|
Margin="10,0"
|
||||||
BorderBrush="White"
|
BorderBrush="White"
|
||||||
@ -62,7 +63,10 @@
|
|||||||
CaretBrush="#FFD94448"
|
CaretBrush="#FFD94448"
|
||||||
SelectionBrush="#FFD94448"
|
SelectionBrush="#FFD94448"
|
||||||
materialDesign:HintAssist.Hint="输入 密码"
|
materialDesign:HintAssist.Hint="输入 密码"
|
||||||
x:Name="PasswordBox"/>
|
helpers:PasswordBoxHelper.BindPassword="True"
|
||||||
|
helpers:PasswordBoxHelper.BoundPassword="{Binding Password, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}">
|
||||||
|
</PasswordBox>
|
||||||
|
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<StackPanel Margin="10"
|
<StackPanel Margin="10"
|
||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
@ -77,7 +81,7 @@
|
|||||||
Content="登录"
|
Content="登录"
|
||||||
ToolTip="登录"
|
ToolTip="登录"
|
||||||
Style="{StaticResource MaterialDesignRaisedButton}"
|
Style="{StaticResource MaterialDesignRaisedButton}"
|
||||||
Click="BtnLogin_Click"/>
|
Command="{Binding LoginCommand}"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Input;
|
using VideoConcat.ViewModels;
|
||||||
using VideoConcat.Models;
|
|
||||||
|
|
||||||
namespace VideoConcat.Views
|
namespace VideoConcat.Views
|
||||||
{
|
{
|
||||||
@ -12,7 +11,7 @@ namespace VideoConcat.Views
|
|||||||
public MainWindow()
|
public MainWindow()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
DataContext = new MainWindowModel();
|
DataContext = new MainWindowViewModel();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void BtnExit_Click(object sender, RoutedEventArgs e)
|
private void BtnExit_Click(object sender, RoutedEventArgs e)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user