master
editor 1 week ago
commit 9a73500d2f

@ -0,0 +1,54 @@
WPF物理曲线模拟
一、源码描述
WPF物理曲线模拟
环境VS2022 WPF
二、功能介绍
运行后,可用鼠标控制两条向量的长度与方向,进而生成曲线。
三、注意事项
ctrl+F5运行即可。
作者: coderbest
如需获得该源码的视频、更新等更多资料请访问: https://www.51aspx.com/Code/PhysicalCurveSimulation
------------------------------------------------------------------------------------------------
源码服务专家
官网: https://www.51aspx.com
讨论圈: https://club.51aspx.com/
平台声明:
1.51Aspx平台上提供下载的资源为免费、共享、商业三类源码,其中免费和共享源码仅供个人学习和研究使用,商业源码请在相应的授权许可条件下使用;
2.51Aspx平台对提供下载的软件及其它资源不拥有任何权利,其版权归属源码合法拥有者所有;
3.著作权人发现本网站载有侵害其合法权益的内容或作品,请与我们联系( 登录官网与客服反馈或发送邮件到support@51Aspx.com
4.51Aspx平台不保证提供的下载资源的准确性、安全性和完整性;
友情提示:
一般数据库文件默认在 DB_51Aspx 文件夹下
默认账号密码一般均为51Aspx
关于源码使用常见问题及解决方案,请参阅: https://www.51aspx.com/Help

@ -0,0 +1,6 @@
<Application x:Class="YiYan127.WPF.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
StartupUri="MainWindow.xaml">
<Application.Resources />
</Application>

@ -0,0 +1,11 @@
namespace YiYan127.WPF
{
using System.Windows;
/// <summary>
/// App.xaml 的交互逻辑
/// </summary>
public partial class App : Application
{
}
}

@ -0,0 +1,15 @@
namespace YiYan127.WPF.Arrows
{
using System.Windows;
using System.Windows.Input;
using System.Windows.Media;
/// <summary>
/// 可调整的贝塞尔曲线
/// </summary>
public class AdjustableArrowBezierCurve : ArrowBezierCurve
{
#region Fields
/// <summary>
/// 是否显示控制的依赖属性

@ -0,0 +1,15 @@
namespace YiYan127.WPF.Arrows
{
using System.Windows;
using System.Windows.Input;
using System.Windows.Media;
/// <summary>
/// 可调整的二次贝塞尔曲线
/// </summary>
public class AdjustableArrowQuadraticBezier : ArrowQuadraticBezier
{
#region Fields
/// <summary>
/// 是否显示控制的依赖属性

@ -0,0 +1,15 @@
namespace YiYan127.WPF.Arrows
{
using System.Windows;
using System.Windows.Media;
using System.Windows.Shapes;
/// <summary>
/// <20><>ͷ<EFBFBD><CDB7><EFBFBD><EFBFBD>
/// </summary>
public abstract class ArrowBase : Shape
{
#region Fields
#region DependencyProperty

@ -0,0 +1,15 @@
namespace YiYan127.WPF.Arrows
{
using System.Windows;
using System.Windows.Media;
/// <summary>
/// <20><><EFBFBD><EFBFBD>ͷ<EFBFBD>ı<EFBFBD><C4B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
/// </summary>
public class ArrowBezierCurve : ArrowBase
{
#region Fields
#region DependencyProperty
/// <summary>

@ -0,0 +1,15 @@
namespace YiYan127.WPF.Arrows
{
using System;
/// <summary>
/// <20><>ͷ<EFBFBD><CDB7><EFBFBD>ڶ<EFBFBD>
/// </summary>
[Flags]
public enum ArrowEnds
{
/// <summary>
/// <20>޼<EFBFBD>ͷ
/// </summary>
None = 0,

@ -0,0 +1,15 @@
namespace YiYan127.WPF.Arrows
{
using System.Windows;
using System.Windows.Media;
/// <summary>
/// <20><><EFBFBD><EFBFBD>֮<EFBFBD><D6AE><EFBFBD><EFBFBD><EFBFBD>ͷ<EFBFBD><CDB7>ֱ<EFBFBD><D6B1>
/// </summary>
public class ArrowLine : ArrowBase
{
#region Fields
/// <summary>
/// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
/// </summary>

@ -0,0 +1,15 @@
namespace YiYan127.WPF.Arrows
{
using System.Globalization;
using System.Windows;
using System.Windows.Media;
/// <summary>
/// 带文本和箭头的两点之间连线
/// </summary>
public class ArrowLineWithText : ArrowLine
{
#region DependencyProperty
/// <summary>
/// 文本的依赖属性

@ -0,0 +1,15 @@
namespace YiYan127.WPF.Arrows
{
using System.Windows;
using System.Windows.Media;
/// <summary>
/// 二次贝塞尔曲线
/// </summary>
public class ArrowQuadraticBezier : ArrowBase
{
#region Fields
#region DependencyProperty
/// <summary>

@ -0,0 +1,15 @@
<Window x:Class="YiYan127.WPF.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:arrows="clr-namespace:YiYan127.WPF.Arrows"
Title="MainWindow"
Width="525"
Height="350">
<Canvas>
<arrows:ArrowLine Stroke="Black"
StartPoint="10,10"
EndPoint="100,100" />
<arrows:ArrowLineWithText ArrowEnds="Both"
IsTextUp="True"
Stroke="Blue"
StrokeDashArray="5,3"

@ -0,0 +1,15 @@
namespace YiYan127.WPF
{
using System.Windows;
/// <summary>
/// MainWindow.xaml 的交互逻辑
/// </summary>
public partial class MainWindow : Window
{
/// <summary>
/// 构造函数
/// </summary>
public MainWindow()
{
InitializeComponent();

@ -0,0 +1,15 @@
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Windows;
// 有关程序集的常规信息通过以下
// 特性集控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("YiYan127.WPF")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("YiYan127.WPF")]
[assembly: AssemblyCopyright("Copyright © 2015")]

@ -0,0 +1,15 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace YiYan127.WPF.Properties {
using System;
/// <summary>

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...

@ -0,0 +1,15 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace YiYan127.WPF.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.10.0.0")]

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{E8BAE5CF-42A1-4142-B2CA-180D05BD4E68}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>YiYan127.WPF</RootNamespace>
<AssemblyName>YiYan127.WPF</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WarningLevel>4</WarningLevel>

@ -0,0 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/></startup></configuration>
Loading…
Cancel
Save