revit开发控件wpf

news/2025/10/30 16:08:50/文章来源:https://www.cnblogs.com/miki969696/p/19177353

revit开发控件wpf

写了一些revit扩展开发中界面各种wpf元素的示例,放在这里  拿来修改使用

using Autodesk.Revit.Attributes;
using Autodesk.Revit.DB;
using Autodesk.Revit.UI;
using System;
using System.Collections.Generic;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;
using System.Windows.Media.Imaging;namespace RevitWpfControlsDemo
{[Transaction(TransactionMode.Manual)]public class ShowControlsCommand : IExternalCommand{public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements){// 创建并显示自定义WPF窗口var window = new ControlsWindow(commandData.Application);window.ShowDialog();return Result.Succeeded;}}// 简单的数据模型类,用于DataGrid演示public class SampleData{public int ID { get; set; }public string Name { get; set; }public string Category { get; set; }public double Value { get; set; }public bool IsActive { get; set; }}public class ControlsWindow : Window{// 定义各种控件private System.Windows.Controls.TextBox _textBox;private PasswordBox _passwordBox;private CheckBox _checkBox1;private CheckBox _checkBox2;private RadioButton _radioBtn1;private RadioButton _radioBtn2;private System.Windows.Controls.ComboBox _comboBox;private Slider _slider;private DatePicker _datePicker;private TextBlock _statusText;private ListBox _listBox;private ProgressBar _progressBar;private Button _executeButton;private Image _imageControl;private DataGrid _dataGrid;public ControlsWindow(UIApplication app){// 窗口基本设置Title = "Revit控件演示窗口";Width = 900; // 增加宽度以容纳更多内容Height = 700; // 增加高度WindowStartupLocation = WindowStartupLocation.CenterScreen;Background = new SolidColorBrush(System.Windows.Media. Color.FromRgb(240, 240, 240));// 创建主容器 - 使用Grid而不是StackPanel以便更好地控制布局var mainGrid = new System.Windows.Controls.Grid();mainGrid.Margin = new Thickness(10);// 定义列mainGrid.ColumnDefinitions.Add(new ColumnDefinition { Width = new GridLength(1, GridUnitType.Star) });// 创建滚动容器放置所有控件var scrollViewer = new ScrollViewer{VerticalScrollBarVisibility = ScrollBarVisibility.Auto,HorizontalScrollBarVisibility = ScrollBarVisibility.Disabled};var contentPanel = new StackPanel { Margin = new Thickness(5) };// 添加标题contentPanel.Children.Add(CreateTitleSection());contentPanel.Children.Add(new Separator { Margin = new Thickness(0, 5, 0, 10) });// 添加各种控件组contentPanel.Children.Add(CreateTextBoxSection());contentPanel.Children.Add(new Separator { Margin = new Thickness(0, 8, 0, 8) });contentPanel.Children.Add(CreateCheckBoxSection());contentPanel.Children.Add(new Separator { Margin = new Thickness(0, 8, 0, 8) });contentPanel.Children.Add(CreateRadioButtonSection());contentPanel.Children.Add(new Separator { Margin = new Thickness(0, 8, 0, 8) });contentPanel.Children.Add(CreateComboBoxSection());contentPanel.Children.Add(new Separator { Margin = new Thickness(0, 8, 0, 8) });contentPanel.Children.Add(CreateListBoxSection());contentPanel.Children.Add(new Separator { Margin = new Thickness(0, 8, 0, 8) });contentPanel.Children.Add(CreateDataGridSection());contentPanel.Children.Add(new Separator { Margin = new Thickness(0, 8, 0, 8) });contentPanel.Children.Add(CreateImageSection());contentPanel.Children.Add(new Separator { Margin = new Thickness(0, 8, 0, 8) });contentPanel.Children.Add(CreateSliderSection());contentPanel.Children.Add(new Separator { Margin = new Thickness(0, 8, 0, 8) });contentPanel.Children.Add(CreateDatePickerSection());contentPanel.Children.Add(new Separator { Margin = new Thickness(0, 8, 0, 8) });contentPanel.Children.Add(CreateProgressBarSection());contentPanel.Children.Add(new Separator { Margin = new Thickness(0, 8, 0, 8) });contentPanel.Children.Add(CreateButtonSection(app));// 状态文本_statusText = new TextBlock{Text = "就绪",Margin = new Thickness(5, 10, 5, 5),Foreground = Brushes.DarkGreen};contentPanel.Children.Add(_statusText);scrollViewer.Content = contentPanel;// 将滚动查看器添加到主网格System.Windows.Controls.Grid.SetColumn(scrollViewer, 0);mainGrid.Children.Add(scrollViewer);// 设置窗口内容Content = mainGrid;// 添加事件处理SetupEventHandlers();}// 创建标题部分private StackPanel CreateTitleSection(){return new StackPanel{Children ={new TextBlock{Text = "Revit二次开发控件演示",FontSize = 18,FontWeight = FontWeights.Bold,Foreground = Brushes.DarkBlue,Margin = new Thickness(0, 5, 0, 5)},new TextBlock{Text = "包含Image和DataGrid控件演示",FontSize = 12,Foreground = Brushes.DarkGray,Margin = new Thickness(0, 0, 0, 5)}}};}// 创建文本框部分private StackPanel CreateTextBoxSection(){var panel = new StackPanel { Margin = new Thickness(5) };panel.Children.Add(new TextBlock{Text = "文本输入控件",FontSize = 14,FontWeight = FontWeights.SemiBold,Margin = new Thickness(0, 5, 0, 8)});// 文本框var textBoxPanel = new StackPanel { Orientation = Orientation.Horizontal, Margin = new Thickness(5) };textBoxPanel.Children.Add(new TextBlock { Text = "文本框: ", Width = 80, VerticalAlignment = VerticalAlignment.Center });_textBox = new System.Windows.Controls.TextBox { Width = 200, Height = 25, ToolTip = "请输入文本" };textBoxPanel.Children.Add(_textBox);panel.Children.Add(textBoxPanel);// 密码框var passwordPanel = new StackPanel { Orientation = Orientation.Horizontal, Margin = new Thickness(5, 10, 5, 5) };passwordPanel.Children.Add(new TextBlock { Text = "密码框: ", Width = 80, VerticalAlignment = VerticalAlignment.Center });_passwordBox = new PasswordBox { Width = 200, Height = 25, ToolTip = "请输入密码" };passwordPanel.Children.Add(_passwordBox);panel.Children.Add(passwordPanel);return panel;}// 创建复选框部分private StackPanel CreateCheckBoxSection(){var panel = new StackPanel { Margin = new Thickness(5) };panel.Children.Add(new TextBlock{Text = "复选框控件",FontSize = 14,FontWeight = FontWeights.SemiBold,Margin = new Thickness(0, 5, 0, 8)});_checkBox1 = new CheckBox { Content = "选项 1", Margin = new Thickness(10, 2, 0, 2) };_checkBox2 = new CheckBox { Content = "选项 2", Margin = new Thickness(10, 8, 0, 2) };panel.Children.Add(_checkBox1);panel.Children.Add(_checkBox2);return panel;}// 创建单选按钮部分private StackPanel CreateRadioButtonSection(){var panel = new StackPanel { Margin = new Thickness(5) };panel.Children.Add(new TextBlock{Text = "单选按钮控件",FontSize = 14,FontWeight = FontWeights.SemiBold,Margin = new Thickness(0, 5, 0, 8)});var group = new StackPanel { Margin = new Thickness(5) };var radioGroup = new GroupBox { Header = "选择类型", Content = group, Margin = new Thickness(0, 2, 0, 2) };_radioBtn1 = new RadioButton { Content = "类型 A", Margin = new Thickness(5, 2, 0, 2), IsChecked = true };_radioBtn2 = new RadioButton { Content = "类型 B", Margin = new Thickness(5, 8, 0, 2) };group.Children.Add(_radioBtn1);group.Children.Add(_radioBtn2);panel.Children.Add(radioGroup);return panel;}// 创建下拉列表部分private StackPanel CreateComboBoxSection(){var panel = new StackPanel { Margin = new Thickness(5) };panel.Children.Add(new TextBlock{Text = "下拉列表控件",FontSize = 14,FontWeight = FontWeights.SemiBold,Margin = new Thickness(0, 5, 0, 8)});var comboPanel = new StackPanel { Orientation = Orientation.Horizontal, Margin = new Thickness(5) };comboPanel.Children.Add(new TextBlock { Text = "选择项: ", Width = 80, VerticalAlignment = VerticalAlignment.Center });_comboBox = new System.Windows.Controls.ComboBox { Width = 200, Height = 25 };_comboBox.Items.Add("选项 1");_comboBox.Items.Add("选项 2");_comboBox.Items.Add("选项 3");_comboBox.SelectedIndex = 0;comboPanel.Children.Add(_comboBox);panel.Children.Add(comboPanel);return panel;}// 创建列表框部分private StackPanel CreateListBoxSection(){var panel = new StackPanel { Margin = new Thickness(5) };panel.Children.Add(new TextBlock{Text = "列表框控件",FontSize = 14,FontWeight = FontWeights.SemiBold,Margin = new Thickness(0, 5, 0, 8)});_listBox = new ListBox { Height = 100, Width = 300, Margin = new Thickness(5, 0, 5, 5) };_listBox.Items.Add("列表项 1");_listBox.Items.Add("列表项 2");_listBox.Items.Add("列表项 3");_listBox.Items.Add("列表项 4");_listBox.SelectionMode = SelectionMode.Extended;panel.Children.Add(_listBox);return panel;}// 创建DataGrid部分private StackPanel CreateDataGridSection(){var panel = new StackPanel { Margin = new Thickness(5) };panel.Children.Add(new TextBlock{Text = "DataGrid数据表格控件",FontSize = 14,FontWeight = FontWeights.SemiBold,Margin = new Thickness(0, 5, 0, 8)});// 创建DataGrid_dataGrid = new DataGrid{Height = 150,Width = 600,Margin = new Thickness(5, 0, 5, 5),AutoGenerateColumns = false,CanUserAddRows = false,CanUserDeleteRows = false,SelectionMode = DataGridSelectionMode.Extended};// 定义列_dataGrid.Columns.Add(new DataGridTextColumn { Header = "ID", Binding = new System.Windows.Data.Binding("ID"), Width = 50 });_dataGrid.Columns.Add(new DataGridTextColumn { Header = "名称", Binding = new System.Windows.Data.Binding("Name"), Width = 120 });_dataGrid.Columns.Add(new DataGridTextColumn { Header = "类别", Binding = new System.Windows.Data.Binding("Category"), Width = 100 });_dataGrid.Columns.Add(new DataGridTextColumn { Header = "数值", Binding = new System.Windows.Data.Binding("Value"), Width = 80 });_dataGrid.Columns.Add(new DataGridCheckBoxColumn { Header = "激活", Binding = new System.Windows.Data.Binding("IsActive"), Width = 60 });// 添加示例数据var sampleData = new List<SampleData>{new SampleData { ID = 1, Name = "项目A", Category = "类别1", Value = 10.5, IsActive = true },new SampleData { ID = 2, Name = "项目B", Category = "类别2", Value = 20.3, IsActive = false },new SampleData { ID = 3, Name = "项目C", Category = "类别1", Value = 15.7, IsActive = true },new SampleData { ID = 4, Name = "项目D", Category = "类别3", Value = 8.9, IsActive = true },new SampleData { ID = 5, Name = "项目E", Category = "类别2", Value = 25.1, IsActive = false }};_dataGrid.ItemsSource = sampleData;panel.Children.Add(_dataGrid);// 添加DataGrid操作按钮var gridButtonPanel = new StackPanel { Orientation = Orientation.Horizontal, Margin = new Thickness(5, 10, 5, 5) };var addRowButton = new Button { Content = "添加行", Width = 80, Height = 25, Margin = new Thickness(0, 0, 10, 0) };var deleteRowButton = new Button { Content = "删除行", Width = 80, Height = 25, Margin = new Thickness(0, 0, 10, 0) };var refreshButton = new Button { Content = "刷新", Width = 80, Height = 25 };addRowButton.Click += AddRowButton_Click;deleteRowButton.Click += DeleteRowButton_Click;refreshButton.Click += RefreshButton_Click;gridButtonPanel.Children.Add(addRowButton);gridButtonPanel.Children.Add(deleteRowButton);gridButtonPanel.Children.Add(refreshButton);panel.Children.Add(gridButtonPanel);return panel;}// 创建图像部分private StackPanel CreateImageSection(){var panel = new StackPanel { Margin = new Thickness(5) };panel.Children.Add(new TextBlock{Text = "Image图像控件",FontSize = 14,FontWeight = FontWeights.SemiBold,Margin = new Thickness(0, 5, 0, 8)});// 创建图像控件_imageControl = new Image{Width = 200,Height = 150,Margin = new Thickness(5, 0, 5, 5),Stretch = Stretch.Uniform,ToolTip = "示例图像"};// 尝试加载一个示例图像(使用内置的图标)try{// 使用WPF内置的图标作为示例var bitmap = new BitmapImage(new Uri("pack://application:,,,/System.Windows.Extensions;component/Resources/Globe.ico"));_imageControl.Source = bitmap;}catch{// 如果加载失败,创建一个简单的彩色矩形作为替代var drawingVisual = new DrawingVisual();using (var drawingContext = drawingVisual.RenderOpen()){drawingContext.DrawRectangle(Brushes.LightBlue, null, new Rect(0, 0, 200, 150));drawingContext.DrawText(new System.Windows.Media. FormattedText("示例图像",System.Globalization.CultureInfo.CurrentCulture,FlowDirection.LeftToRight,new Typeface("Arial"),16,Brushes.DarkBlue,VisualTreeHelper.GetDpi(this).PixelsPerDip),new System.Windows.Point(50, 60));}var renderTarget = new RenderTargetBitmap(200, 150, 96, 96, PixelFormats.Pbgra32);renderTarget.Render(drawingVisual);_imageControl.Source = renderTarget;}panel.Children.Add(_imageControl);// 添加图像操作按钮var imageButtonPanel = new StackPanel { Orientation = Orientation.Horizontal, Margin = new Thickness(5, 10, 5, 5) };var changeImageButton = new Button { Content = "更换图像", Width = 100, Height = 25, Margin = new Thickness(0, 0, 10, 0) };var resetImageButton = new Button { Content = "重置图像", Width = 100, Height = 25 };changeImageButton.Click += ChangeImageButton_Click;resetImageButton.Click += ResetImageButton_Click;imageButtonPanel.Children.Add(changeImageButton);imageButtonPanel.Children.Add(resetImageButton);panel.Children.Add(imageButtonPanel);return panel;}// 创建滑块部分private StackPanel CreateSliderSection(){var panel = new StackPanel { Margin = new Thickness(5) };panel.Children.Add(new TextBlock{Text = "滑块控件",FontSize = 14,FontWeight = FontWeights.SemiBold,Margin = new Thickness(0, 5, 0, 8)});var sliderPanel = new StackPanel { Margin = new Thickness(5) };_slider = new Slider { Minimum = 0, Maximum = 100, Value = 50, Width = 300, TickFrequency = 10, IsSnapToTickEnabled = true };var sliderValueText = new TextBlock { Margin = new Thickness(0, 8, 0, 0) };// 绑定滑块值到文本块sliderValueText.SetBinding(TextBlock.TextProperty, new System.Windows.Data.Binding("Value"){Source = _slider,StringFormat = "当前值: {0}"});sliderPanel.Children.Add(_slider);sliderPanel.Children.Add(sliderValueText);panel.Children.Add(sliderPanel);return panel;}// 创建日期选择器部分private StackPanel CreateDatePickerSection(){var panel = new StackPanel { Margin = new Thickness(5) };panel.Children.Add(new TextBlock{Text = "日期选择控件",FontSize = 14,FontWeight = FontWeights.SemiBold,Margin = new Thickness(0, 5, 0, 8)});var datePanel = new StackPanel { Orientation = Orientation.Horizontal, Margin = new Thickness(5) };datePanel.Children.Add(new TextBlock { Text = "选择日期: ", Width = 80, VerticalAlignment = VerticalAlignment.Center });_datePicker = new DatePicker { Width = 200, SelectedDate = DateTime.Now };datePanel.Children.Add(_datePicker);panel.Children.Add(datePanel);return panel;}// 创建进度条部分private StackPanel CreateProgressBarSection(){var panel = new StackPanel { Margin = new Thickness(5) };panel.Children.Add(new TextBlock{Text = "进度条控件",FontSize = 14,FontWeight = FontWeights.SemiBold,Margin = new Thickness(0, 5, 0, 8)});_progressBar = new ProgressBar { Width = 300, Height = 20, Minimum = 0, Maximum = 100, Value = 30, Margin = new Thickness(5, 0, 5, 5) };panel.Children.Add(_progressBar);return panel;}// 创建按钮部分private StackPanel CreateButtonSection(UIApplication app){var panel = new StackPanel { Margin = new Thickness(5) };panel.Children.Add(new TextBlock{Text = "按钮控件",FontSize = 14,FontWeight = FontWeights.SemiBold,Margin = new Thickness(0, 5, 0, 8)});var buttonPanel = new StackPanel { Orientation = Orientation.Horizontal, Margin = new Thickness(5) };_executeButton = new Button { Content = "执行操作", Width = 100, Height = 30, Background = Brushes.LightBlue, Margin = new Thickness(0, 0, 10, 0) };var cancelButton = new Button { Content = "取消", Width = 100, Height = 30, Margin = new Thickness(0, 0, 10, 0) };var infoButton = new Button { Content = "显示信息", Width = 100, Height = 30 };cancelButton.Click += (s, e) => Close();infoButton.Click += (s, e) => TaskDialog.Show("信息", "这是一个Revit二次开发演示窗口");buttonPanel.Children.Add(_executeButton);buttonPanel.Children.Add(cancelButton);buttonPanel.Children.Add(infoButton);panel.Children.Add(buttonPanel);return panel;}// 设置事件处理程序private void SetupEventHandlers(){_executeButton.Click += ExecuteButton_Click;_checkBox1.Checked += CheckBox_CheckedChanged;_checkBox1.Unchecked += CheckBox_CheckedChanged;_checkBox2.Checked += CheckBox_CheckedChanged;_checkBox2.Unchecked += CheckBox_CheckedChanged;}// DataGrid添加行按钮点击事件private void AddRowButton_Click(object sender, RoutedEventArgs e){var currentItems = _dataGrid.ItemsSource as List<SampleData> ?? new List<SampleData>();var newId = currentItems.Count + 1;currentItems.Add(new SampleData{ID = newId,Name = $"新项目{newId}",Category = "新类别",Value = newId * 5.0,IsActive = true});_dataGrid.ItemsSource = null;_dataGrid.ItemsSource = currentItems;_statusText.Text = $"已添加新行 (ID: {newId}) - {DateTime.Now:HH:mm:ss}";_statusText.Foreground = Brushes.DarkBlue;}// DataGrid删除行按钮点击事件private void DeleteRowButton_Click(object sender, RoutedEventArgs e){if (_dataGrid.SelectedItems.Count > 0){var currentItems = _dataGrid.ItemsSource as List<SampleData>;if (currentItems != null){var itemsToRemove = new List<SampleData>();foreach (var selectedItem in _dataGrid.SelectedItems){if (selectedItem is SampleData data){itemsToRemove.Add(data);}}foreach (var item in itemsToRemove){currentItems.Remove(item);}_dataGrid.ItemsSource = null;_dataGrid.ItemsSource = currentItems;_statusText.Text = $"已删除 {itemsToRemove.Count} 行 - {DateTime.Now:HH:mm:ss}";_statusText.Foreground = Brushes.DarkRed;}}else{TaskDialog.Show("提示", "请先选择要删除的行");}}// DataGrid刷新按钮点击事件private void RefreshButton_Click(object sender, RoutedEventArgs e){var sampleData = new List<SampleData>{new SampleData { ID = 1, Name = "项目A", Category = "类别1", Value = 10.5, IsActive = true },new SampleData { ID = 2, Name = "项目B", Category = "类别2", Value = 20.3, IsActive = false },new SampleData { ID = 3, Name = "项目C", Category = "类别1", Value = 15.7, IsActive = true },new SampleData { ID = 4, Name = "项目D", Category = "类别3", Value = 8.9, IsActive = true },new SampleData { ID = 5, Name = "项目E", Category = "类别2", Value = 25.1, IsActive = false }};_dataGrid.ItemsSource = sampleData;_statusText.Text = $"数据已刷新 - {DateTime.Now:HH:mm:ss}";_statusText.Foreground = Brushes.DarkGreen;}// 更换图像按钮点击事件private void ChangeImageButton_Click(object sender, RoutedEventArgs e){// 创建一个新的彩色图像var colors = new[] { Brushes.LightBlue, Brushes.LightGreen, Brushes.LightYellow, Brushes.LightPink };var random = new Random();var selectedColor = colors[random.Next(colors.Length)];var drawingVisual = new DrawingVisual();using (var drawingContext = drawingVisual.RenderOpen()){drawingContext.DrawRectangle(selectedColor, null, new Rect(0, 0, 200, 150));drawingContext.DrawText(new System.Windows.Media.FormattedText($"颜色: {selectedColor}",System.Globalization.CultureInfo.CurrentCulture,FlowDirection.LeftToRight,new Typeface("Arial"),14,Brushes.DarkBlue,VisualTreeHelper.GetDpi(this).PixelsPerDip),new System.Windows.Point(30, 65));}var renderTarget = new RenderTargetBitmap(200, 150, 96, 96, PixelFormats.Pbgra32);renderTarget.Render(drawingVisual);_imageControl.Source = renderTarget;_statusText.Text = $"图像已更换 - {DateTime.Now:HH:mm:ss}";_statusText.Foreground = Brushes.Purple;}// 重置图像按钮点击事件private void ResetImageButton_Click(object sender, RoutedEventArgs e){// 重置为原始图像try{var bitmap = new BitmapImage(new Uri("pack://application:,,,/System.Windows.Extensions;component/Resources/Globe.ico"));_imageControl.Source = bitmap;}catch{// 使用默认图像var drawingVisual = new DrawingVisual();using (var drawingContext = drawingVisual.RenderOpen()){drawingContext.DrawRectangle(Brushes.LightBlue, null, new Rect(0, 0, 200, 150));drawingContext.DrawText(new System.Windows.Media. FormattedText("示例图像",System.Globalization.CultureInfo.CurrentCulture,FlowDirection.LeftToRight,new Typeface("Arial"),16,Brushes.DarkBlue,VisualTreeHelper.GetDpi(this).PixelsPerDip),new System.Windows.Point(50, 60));}var renderTarget = new RenderTargetBitmap(200, 150, 96, 96, PixelFormats.Pbgra32);renderTarget.Render(drawingVisual);_imageControl.Source = renderTarget;}_statusText.Text = $"图像已重置 - {DateTime.Now:HH:mm:ss}";_statusText.Foreground = Brushes.DarkGreen;}// 执行按钮点击事件private void ExecuteButton_Click(object sender, RoutedEventArgs e){// 收集所有控件的值var message = new System.Text.StringBuilder();message.AppendLine("控件值汇总:");message.AppendLine($"文本框: {_textBox.Text}");message.AppendLine($"密码框长度: {_passwordBox.Password.Length}");message.AppendLine($"复选框1: {_checkBox1.IsChecked}");message.AppendLine($"复选框2: {_checkBox2.IsChecked}");message.AppendLine($"单选按钮: {(_radioBtn1.IsChecked == true ? "类型A" : "类型B")}");message.AppendLine($"下拉列表: {_comboBox.SelectedItem}");message.AppendLine($"滑块值: {_slider.Value}");message.AppendLine($"日期选择: {_datePicker.SelectedDate?.ToShortDateString()}");// 处理列表框选中项message.AppendLine("列表框选中项:");foreach (var item in _listBox.SelectedItems){message.AppendLine($"- {item}");}// 处理DataGrid选中项message.AppendLine("DataGrid选中项:");foreach (var item in _dataGrid.SelectedItems){if (item is SampleData data){message.AppendLine($"- ID: {data.ID}, 名称: {data.Name}, 值: {data.Value}");}}// 更新进度条_progressBar.Value = 100;// 显示收集的值TaskDialog.Show("控件值", message.ToString());// 更新状态文本_statusText.Text = $"操作已执行 - {DateTime.Now:HH:mm:ss}";_statusText.Foreground = Brushes.DarkGreen;}// 复选框状态变化事件private void CheckBox_CheckedChanged(object sender, RoutedEventArgs e){_statusText.Text = $"复选框状态已更改 - {DateTime.Now:HH:mm:ss}";_statusText.Foreground = Brushes.DarkOrange;}}
}

 

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/950918.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

2025年福建电商数据分析公司权威推荐榜单:商品趋势分析/抖音数据分析/AI商品图服务商源头厂家精选

随着电商行业的快速发展,数据分析服务已成为企业决策和增长的核心驱动力。据最新行业统计,中国电商数据分析服务市场规模在2024年已达到数百亿元,预计未来五年将保持稳定增长。福建省作为数字经济发展的重点区域,电…

2025年热门的智能太空舱行业内知名厂家排行榜

2025年热门的智能太空舱行业内知名厂家排行榜 随着科技的飞速发展和人们对个性化、智能化居住需求的提升,智能太空舱行业正迎来爆发式增长。这种融合了高科技、环保理念与灵活居住方式的创新产品,正在文旅、康养、商…

软考复习 - 2025/10/30

CPU 是硬件系统的核心,主要由运算器、控制器、寄存器组和内部总线等部件组成,用于数据的加工处理,能完成各种算术、逻辑运算及控制功能。浮点数的二进制表示: 176.0625 整数部分 176 = 10110000 小数部分 乘2取整法…

qoj14457. 缺陷解码器

qoj14457. 缺陷解码器 有一初始为空的字符串 \(S\) 和大小为 \(m\) 的字符集 \(C\),一直执行以下操作:从 \(C\) 中随意一个字符,接在 \(S\) 后面。分别令 \(S_1,S_2\) 表示 \(S\) 的 前/后 \(\lfloor\frac {|S|}2\r…

2025年口碑好的涤纶单层网布厂家最新推荐权威榜

2025年口碑好的涤纶单层网布厂家最新推荐权威榜在纺织行业中,涤纶单层网布凭借其轻便、透气、耐用等特性,已成为运动服饰、鞋材、箱包、户外用品等多个领域的重要材料。随着市场需求的不断增长,选择一家可靠的涤纶单…

Index of /opensuse/distribution/leap/16.0/offline/

https://mirrors.ustc.edu.cn/opensuse/distribution/leap/16.0/offline/

基于单片机的纯正弦波逆变程序实现

基于单片机的纯正弦波逆变程序实现,包含硬件配置、SPWM生成算法和系统控制逻辑的核心代码及设计要点:一、系统架构设计 1.1 硬件组成 // 主控芯片选型(以STM32F103为例) #define PWM_FREQ 20000 // PWM频率…

2025 年 10 月预制舱厂家推荐排行榜,光伏预制舱,风电光伏预制舱,储能预制舱,一二次设备电气预制舱,SVG 预制舱,控制预制舱公司推荐

2025 年 10 月预制舱厂家推荐排行榜:光伏、风电、储能及电气设备专业解析 行业背景与发展现状 随着新能源产业的快速发展,预制舱作为电力系统中的关键设备,在光伏发电、风力发电、储能系统等领域发挥着越来越重要的…

Python变量 _ 怎么让程序记住你对象的手机号

Python变量 _ 怎么让程序记住你对象的手机号greet = "你好"greet_chinese = greetgreet_english = "you hello"greet = greet_englishprint("\n" + greet + "13233455566")pr…

2025年酒吧氛围灯制造商权威推荐榜单:万圣节南瓜灯/酒吧装饰灯/圣诞树小夜灯源头厂家精选

在酒吧行业竞争日益激烈的今天,氛围照明已成为塑造场所特色、提升顾客体验的关键因素。根据市场研究机构统计,2025年全球氛围灯市场销售额预计将达到数百亿元,其中商业应用占据主导地位。 作为营造酒吧独特氛围的核…

2025年杭州美术画室机构权威推荐榜单:画室/美术培训画室 /孪生画室源头机构精选

在杭州孪生画室城堡校区,一名美术生刚刚得知自己以综合分272分的优异成绩荣登浙江省联考榜首,而这已是该画室连续第三年培养出联考前三甲的学子。 杭州作为中国美术教育的重要基地,汇聚了众多优质美术培训机构。据统…

2025年靠谱的双头螺杆热门厂家推荐榜单

2025年靠谱的双头螺杆热门厂家推荐榜单 在建筑、机械制造、水利工程等领域,双头螺杆作为一种关键连接件,其质量直接影响工程的安全性和耐久性。随着市场需求的增长,选择一家技术成熟、质量可靠的供应商至关重要。本…

网络同步之伤害计算

总结上期 上期网络同步学习记录中,只是完成了一个简单的Actor行为和UI,涉及到的网络同步也比比较简单,只有些,简单的数据同步,加上个回调。没有任何函数是运行在服务器上的,如果蓝图算的化,那估计有。这次打算实…

P11292 【MX-S6-T4】「KDOI-11」彩灯晚会 解题报告

题目链接 题意关键词:DAG,k种颜色,求长度为l的同色链的cnt平方 做法关键词:平方拆贡献,卡常,dp,二项式反演,容斥,二项式定理,k-1 好题,绝世好题。先放一张白板图用以辅助理解。左上角写错了是cnt^2.首先转化…

2025 年拉丝机生产厂家最新推荐榜,技术实力与市场口碑深度解析,筛选优质品牌助力企业生产水箱直线式 / 非滑动式 / 双卷筒 / 平面拉丝机公司推荐

引言 为精准筛选出能满足金属制品及紧固件行业发展需求的拉丝机生产厂家,本次 2025 年拉丝机生产厂家推荐榜测评工作,由金属制品工业协会联合行业权威专家团队共同开展。测评过程严格遵循多维度评估体系,从企业技术…

深入解析:手写MyBatis第92弹:SqlSource体系、SqlNode树与Trim标签实现原理全揭秘

pre { white-space: pre !important; word-wrap: normal !important; overflow-x: auto !important; display: block !important; font-family: "Consolas", "Monaco", "Courier New", …

2025年比较好的数字化涂装生产线厂家推荐及选择参考

2025年比较好的数字化涂装生产线厂家推荐及选择参考随着工业4.0时代的深入发展,数字化涂装生产线已成为制造业转型升级的关键环节。2025年,数字化涂装技术将更加成熟,市场需求也将持续增长。优秀的涂装生产线不仅能…

树形DP通用思路总结

树形 DP 的通用套路就是定根 → 设状态(含语义与边界)→ 按子树合并转移,再用 换根(rerooting)/树形背包/计数与期望等模板覆盖高频题型,必要时配合小到大合并、长链剖分或虚树解决复杂度问题。 一、通用三步法?…

2025年深圳货车锂电池回收公司权威推荐榜单:沃特玛电池回收/力神锂电池回收 /测试车锂电池回收源头公司精选

深圳作为中国新能源汽车产业发展的核心区域,已构建了完善的动力电池回收网络体系,为货车锂电池回收提供了强有力的支撑。 在新能源汽车产业快速发展的背景下,深圳作为全国新能源技术创新的前沿阵地,其货车锂电池回…

2025年知名的超微粉碎机厂家推荐及选择参考

2025年知名的超微粉碎机厂家推荐及选择参考行业概述超微粉碎技术作为现代粉体加工的核心工艺,在食品、医药、化工、新材料等领域发挥着越来越重要的作用。随着2025年制造业智能化升级的加速推进,超微粉碎机行业也迎来…