优化是否有网络的方法
This commit is contained in:
parent
bae5b207c1
commit
eb2152edae
@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Version>0.9.6.5</Version>
|
||||
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
|
||||
<Authors>QQ:761716178</Authors>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Product>QQ:761716178 跨平台UI框架</Product>
|
||||
<Version>0.9.6.6</Version>
|
||||
<PackageId>Xhm.CPF.Skia</PackageId>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Product>QQ:761716178 跨平台UI框架</Product>
|
||||
<Version>0.9.6.6</Version>
|
||||
<PackageId>Xhm.CPF.Windows</PackageId>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Authors>QQ:761716178</Authors>
|
||||
<Company>QQ:761716178</Company>
|
||||
<Product>QQ:761716178 跨平台UI框架</Product>
|
||||
|
@ -64,9 +64,9 @@ namespace CPF.Charts
|
||||
Panel tipPanel;
|
||||
TextBlock tipName;
|
||||
Panel tipListPanel;
|
||||
protected override void OnInitialized()
|
||||
protected override void OnInitializedAsync()
|
||||
{
|
||||
base.OnInitialized();
|
||||
base.OnInitializedAsync();
|
||||
seriesPanel = FindPresenterByName<Panel>("seriesPanel");
|
||||
tipPanel = FindPresenterByName<Panel>("tipPanel");
|
||||
tipName = FindPresenterByName<TextBlock>("tipName");
|
||||
|
@ -269,9 +269,9 @@ namespace CPF.Charts
|
||||
Panel tipPanel;
|
||||
TextBlock tipName;
|
||||
Panel tipListPanel;
|
||||
protected override void OnInitialized()
|
||||
protected override void OnInitializedAsync()
|
||||
{
|
||||
base.OnInitialized();
|
||||
base.OnInitializedAsync();
|
||||
seriesPanel = FindPresenterByName<Panel>("seriesPanel");
|
||||
tipPanel = FindPresenterByName<Panel>("tipPanel");
|
||||
tipName = FindPresenterByName<TextBlock>("tipName");
|
||||
|
@ -74,9 +74,9 @@ namespace CPF.Controls
|
||||
Grid Month;
|
||||
Grid Year;
|
||||
|
||||
protected override void OnInitialized()
|
||||
protected override void OnInitializedAsync()
|
||||
{
|
||||
base.OnInitialized();
|
||||
base.OnInitializedAsync();
|
||||
Month = FindPresenterByName<Grid>("MonthView");
|
||||
Year = FindPresenterByName<Grid>("YearView");
|
||||
var date = DisplayDate.Date;
|
||||
|
@ -357,9 +357,9 @@ namespace CPF.Controls
|
||||
|
||||
ScrollViewer scrollViewer;
|
||||
LineNumber lineNumber;
|
||||
protected override void OnInitialized()
|
||||
protected override void OnInitializedAsync()
|
||||
{
|
||||
base.OnInitialized();
|
||||
base.OnInitializedAsync();
|
||||
scrollViewer = FindPresenterByName<ScrollViewer>("scrollViewer");
|
||||
lineNumber = FindPresenterByName<LineNumber>("lineNumber");
|
||||
var contentPresenter = scrollViewer.FindPresenterByName<Border>("contentPresenter");
|
||||
|
@ -362,9 +362,9 @@ namespace CPF.Controls
|
||||
// return panel;
|
||||
//}
|
||||
//Panel panel;
|
||||
protected override void OnInitialized()
|
||||
protected override void OnInitializedAsync()
|
||||
{
|
||||
base.OnInitialized();
|
||||
base.OnInitializedAsync();
|
||||
//panel = GetItemsPanel();
|
||||
//if (panel == null)
|
||||
//{
|
||||
|
@ -163,7 +163,7 @@ namespace CPF.Controls
|
||||
});
|
||||
}
|
||||
UIElement contentPresenter;
|
||||
protected override void OnInitialized()
|
||||
protected override void OnInitializedAsync()
|
||||
{
|
||||
contentPresenter = FindPresenterByName<UIElement>("contentPresenter");
|
||||
if (contentPresenter == null)
|
||||
@ -192,7 +192,7 @@ namespace CPF.Controls
|
||||
}
|
||||
}
|
||||
}
|
||||
base.OnInitialized();
|
||||
base.OnInitializedAsync();
|
||||
}
|
||||
|
||||
protected override void OnOverrideMetadata(OverrideMetadata overridePropertys)
|
||||
|
@ -281,12 +281,12 @@ namespace CPF.Controls
|
||||
Template(this, this.Children);
|
||||
}
|
||||
IsInitialized = true;
|
||||
OnInitialized();
|
||||
OnInitializedAsync();
|
||||
}
|
||||
LoadStyle();
|
||||
}
|
||||
|
||||
protected virtual void OnInitialized()
|
||||
protected virtual void OnInitializedAsync()
|
||||
{
|
||||
if (triggers != null)
|
||||
{
|
||||
|
@ -202,7 +202,7 @@ namespace CPF.Controls
|
||||
}
|
||||
internal DataGridScrollViewer viewer;
|
||||
VirtualizationPresenter<DataGridRow> presenter;
|
||||
protected override void OnInitialized()
|
||||
protected override void OnInitializedAsync()
|
||||
{
|
||||
viewer = FindPresenter<DataGridScrollViewer>().FirstOrDefault(a => a.Name == "DG_ScrollViewer");
|
||||
if (!viewer)
|
||||
@ -254,7 +254,7 @@ namespace CPF.Controls
|
||||
}
|
||||
columns.CollectionChanged += Columns_CollectionChanged;
|
||||
viewer.contentPresenter.LayoutUpdated += ContentPresenter_LayoutUpdated;
|
||||
base.OnInitialized();
|
||||
base.OnInitializedAsync();
|
||||
var panel = ItemsHost as StackPanel;
|
||||
if (!panel || panel.Orientation == Orientation.Horizontal)
|
||||
{
|
||||
|
@ -85,9 +85,9 @@ namespace CPF.Controls
|
||||
Triggers.Add(nameof(IsSelected), Relation.Me, null, (nameof(Background), "75,178,255"));
|
||||
}
|
||||
DataGridCellTemplate cellTemplate;
|
||||
protected override void OnInitialized()
|
||||
protected override void OnInitializedAsync()
|
||||
{
|
||||
base.OnInitialized();
|
||||
base.OnInitializedAsync();
|
||||
cellTemplate = FindPresenter<DataGridCellTemplate>().FirstOrDefault(a => a.Name == "CellTemplate");
|
||||
}
|
||||
|
||||
|
@ -59,7 +59,7 @@ namespace CPF.Controls
|
||||
Triggers.Add(new Styling.Trigger { Property = nameof(IsSelected), Setters = { { nameof(Background), "#ddd" } } });
|
||||
}
|
||||
internal Panel itemsPanel;
|
||||
protected override void OnInitialized()
|
||||
protected override void OnInitializedAsync()
|
||||
{
|
||||
itemsPanel = FindPresenter<Panel>().FirstOrDefault(a => a.Name == "itemsPanel");
|
||||
if (!itemsPanel)
|
||||
@ -74,7 +74,7 @@ namespace CPF.Controls
|
||||
}
|
||||
}
|
||||
|
||||
base.OnInitialized();
|
||||
base.OnInitializedAsync();
|
||||
}
|
||||
|
||||
[PropertyChanged(nameof(IsSelected))]
|
||||
|
@ -47,14 +47,14 @@ namespace CPF.Controls
|
||||
|
||||
internal Panel PART_ColumnHeadersPresenter;
|
||||
internal UIElement contentPresenter;
|
||||
protected override void OnInitialized()
|
||||
protected override void OnInitializedAsync()
|
||||
{
|
||||
PART_ColumnHeadersPresenter = FindPresenter<Panel>().FirstOrDefault(a => a.Name == "PART_ColumnHeadersPresenter");
|
||||
if (!PART_ColumnHeadersPresenter)
|
||||
{
|
||||
throw new Exception("需要Name为PART_ColumnHeadersPresenter的元素");
|
||||
}
|
||||
base.OnInitialized();
|
||||
base.OnInitializedAsync();
|
||||
contentPresenter = FindPresenter().FirstOrDefault(a => a.Name == "contentPresenter");
|
||||
}
|
||||
|
||||
|
@ -271,9 +271,9 @@ namespace CPF.Controls
|
||||
return FindPresenter<Panel>().FirstOrDefault(a => a.Name == "itemsPanel");
|
||||
}
|
||||
|
||||
protected override void OnInitialized()
|
||||
protected override void OnInitializedAsync()
|
||||
{
|
||||
base.OnInitialized();
|
||||
base.OnInitializedAsync();
|
||||
panel = GetItemsPanel();
|
||||
//if (panel == null)
|
||||
//{
|
||||
|
@ -179,9 +179,9 @@ namespace CPF.Controls
|
||||
|
||||
VirtualizationPresenter<ListBoxItem> presenter;
|
||||
//Panel InnerPanel;
|
||||
protected override void OnInitialized()
|
||||
protected override void OnInitializedAsync()
|
||||
{
|
||||
base.OnInitialized();
|
||||
base.OnInitializedAsync();
|
||||
if (isVirtualizing)
|
||||
{
|
||||
presenter = FindPresenter<VirtualizationPresenter<ListBoxItem>>().FirstOrDefault();
|
||||
|
@ -322,9 +322,9 @@ namespace CPF.Controls
|
||||
this.Triggers.Add(new Styling.Trigger { Property = nameof(IsMouseOver), Setters = { { nameof(Background), "#fff" } } });
|
||||
}
|
||||
|
||||
protected override void OnInitialized()
|
||||
protected override void OnInitializedAsync()
|
||||
{
|
||||
base.OnInitialized();
|
||||
base.OnInitializedAsync();
|
||||
|
||||
}
|
||||
|
||||
|
@ -331,10 +331,10 @@ namespace CPF.Controls
|
||||
}
|
||||
|
||||
bool isFirst;
|
||||
protected override void OnInitialized()
|
||||
protected override void OnInitializedAsync()
|
||||
{
|
||||
isFirst = true;
|
||||
base.OnInitialized();
|
||||
base.OnInitializedAsync();
|
||||
isFirst = false;
|
||||
if (selectIndex.HasValue)
|
||||
{
|
||||
|
@ -107,9 +107,9 @@ namespace CPF.Controls
|
||||
});
|
||||
}
|
||||
|
||||
protected override void OnInitialized()
|
||||
protected override void OnInitializedAsync()
|
||||
{
|
||||
base.OnInitialized();
|
||||
base.OnInitializedAsync();
|
||||
numTextBox = FindPresenterByName<TextBox>("numTextBox");
|
||||
}
|
||||
TextBox numTextBox;
|
||||
|
@ -138,9 +138,9 @@ namespace CPF.Controls
|
||||
}
|
||||
|
||||
#if !DesignMode //用户代码写到这里,设计器下不执行,防止设计器出错
|
||||
protected override void OnInitialized()
|
||||
protected override void OnInitializedAsync()
|
||||
{
|
||||
base.OnInitialized();
|
||||
base.OnInitializedAsync();
|
||||
|
||||
}
|
||||
//用户代码
|
||||
|
@ -97,9 +97,9 @@ namespace CPF.Controls
|
||||
});
|
||||
}
|
||||
|
||||
protected override void OnInitialized()
|
||||
protected override void OnInitializedAsync()
|
||||
{
|
||||
base.OnInitialized();
|
||||
base.OnInitializedAsync();
|
||||
_indicator = FindPresenter().FirstOrDefault(a => a.Name == "Indicator");
|
||||
_Animation = FindPresenter().FirstOrDefault(a => a.Name == "Animation");
|
||||
}
|
||||
|
@ -197,9 +197,9 @@ namespace CPF.Controls
|
||||
});
|
||||
}
|
||||
|
||||
protected override void OnInitialized()
|
||||
protected override void OnInitializedAsync()
|
||||
{
|
||||
base.OnInitialized();
|
||||
base.OnInitializedAsync();
|
||||
this.Track = FindPresenter<Track>().FirstOrDefault(a => a.Name == "PART_Track");
|
||||
}
|
||||
|
||||
|
@ -363,7 +363,7 @@ namespace CPF.Controls
|
||||
|
||||
Panel headerPanel;
|
||||
Panel contentPanel;
|
||||
protected override void OnInitialized()
|
||||
protected override void OnInitializedAsync()
|
||||
{
|
||||
headerPanel = FindPresenter<Panel>().FirstOrDefault(a => a.Name == "headerPanel");
|
||||
if (!headerPanel)
|
||||
@ -410,7 +410,7 @@ namespace CPF.Controls
|
||||
}
|
||||
//}
|
||||
}
|
||||
base.OnInitialized();
|
||||
base.OnInitializedAsync();
|
||||
}
|
||||
[PropertyChanged(nameof(SelectedIndex))]
|
||||
void RegisterSelectedIndex(object newValue, object oldValue, PropertyMetadataAttribute attribute)
|
||||
|
@ -420,9 +420,9 @@ namespace CPF.Controls
|
||||
}
|
||||
|
||||
ScrollViewer scrollViewer;
|
||||
protected override void OnInitialized()
|
||||
protected override void OnInitializedAsync()
|
||||
{
|
||||
base.OnInitialized();
|
||||
base.OnInitializedAsync();
|
||||
if (view == null)
|
||||
{
|
||||
view = TextBoxView;
|
||||
|
@ -1795,9 +1795,9 @@ namespace CPF.Controls
|
||||
|
||||
//}
|
||||
internal List<(Delegate, UIElement)> afterStyles;
|
||||
protected override void OnInitialized()
|
||||
protected override void OnInitializedAsync()
|
||||
{
|
||||
base.OnInitialized();
|
||||
base.OnInitializedAsync();
|
||||
if (afterStyles != null)
|
||||
{
|
||||
foreach (var item in afterStyles)
|
||||
|
Loading…
x
Reference in New Issue
Block a user