From 5f52372fb479439c2986083dd154d0a70c3b0ebd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=B0=E6=97=A0=E6=AD=A2=E7=AB=9E?= <734913414@qq.com> Date: Wed, 12 Jun 2024 20:47:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3CPF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CPF/Charts/Chart.cs | 4 ++-- CPF/Charts/PieChart.cs | 4 ++-- CPF/Controls/Calendar.cs | 4 ++-- CPF/Controls/CodeTextBox/CodeTextBox.cs | 4 ++-- CPF/Controls/ComboBox.cs | 4 ++-- CPF/Controls/ContentControl.cs | 4 ++-- CPF/Controls/Control.cs | 4 ++-- CPF/Controls/DataGrid/DataGrid.cs | 4 ++-- CPF/Controls/DataGrid/DataGridCell.cs | 4 ++-- CPF/Controls/DataGrid/DataGridRow.cs | 4 ++-- CPF/Controls/DataGrid/DataGridScrollViewer.cs | 4 ++-- CPF/Controls/ItemsControl.cs | 4 ++-- CPF/Controls/ListBox.cs | 4 ++-- CPF/Controls/MenuItem.cs | 4 ++-- CPF/Controls/MultiSelector.cs | 4 ++-- CPF/Controls/NumericUpDown.cs | 4 ++-- CPF/Controls/PageManger.cs | 4 ++-- CPF/Controls/ProgressBar.cs | 4 ++-- CPF/Controls/Slider.cs | 4 ++-- CPF/Controls/TabControl.cs | 4 ++-- CPF/Controls/TextBox.cs | 4 ++-- CPF/Controls/View.cs | 4 ++-- 22 files changed, 44 insertions(+), 44 deletions(-) diff --git a/CPF/Charts/Chart.cs b/CPF/Charts/Chart.cs index d4f0336..a695c79 100644 --- a/CPF/Charts/Chart.cs +++ b/CPF/Charts/Chart.cs @@ -64,9 +64,9 @@ namespace CPF.Charts Panel tipPanel; TextBlock tipName; Panel tipListPanel; - protected override void OnInitializedAsync() + protected override void OnInitialized() { - base.OnInitializedAsync(); + base.OnInitialized(); seriesPanel = FindPresenterByName("seriesPanel"); tipPanel = FindPresenterByName("tipPanel"); tipName = FindPresenterByName("tipName"); diff --git a/CPF/Charts/PieChart.cs b/CPF/Charts/PieChart.cs index 8202181..378c398 100644 --- a/CPF/Charts/PieChart.cs +++ b/CPF/Charts/PieChart.cs @@ -269,9 +269,9 @@ namespace CPF.Charts Panel tipPanel; TextBlock tipName; Panel tipListPanel; - protected override void OnInitializedAsync() + protected override void OnInitialized() { - base.OnInitializedAsync(); + base.OnInitialized(); seriesPanel = FindPresenterByName("seriesPanel"); tipPanel = FindPresenterByName("tipPanel"); tipName = FindPresenterByName("tipName"); diff --git a/CPF/Controls/Calendar.cs b/CPF/Controls/Calendar.cs index 31ad4ca..6de278f 100644 --- a/CPF/Controls/Calendar.cs +++ b/CPF/Controls/Calendar.cs @@ -74,9 +74,9 @@ namespace CPF.Controls Grid Month; Grid Year; - protected override void OnInitializedAsync() + protected override void OnInitialized() { - base.OnInitializedAsync(); + base.OnInitialized(); Month = FindPresenterByName("MonthView"); Year = FindPresenterByName("YearView"); var date = DisplayDate.Date; diff --git a/CPF/Controls/CodeTextBox/CodeTextBox.cs b/CPF/Controls/CodeTextBox/CodeTextBox.cs index 85585a9..9aa4271 100644 --- a/CPF/Controls/CodeTextBox/CodeTextBox.cs +++ b/CPF/Controls/CodeTextBox/CodeTextBox.cs @@ -357,9 +357,9 @@ namespace CPF.Controls ScrollViewer scrollViewer; LineNumber lineNumber; - protected override void OnInitializedAsync() + protected override void OnInitialized() { - base.OnInitializedAsync(); + base.OnInitialized(); scrollViewer = FindPresenterByName("scrollViewer"); lineNumber = FindPresenterByName("lineNumber"); var contentPresenter = scrollViewer.FindPresenterByName("contentPresenter"); diff --git a/CPF/Controls/ComboBox.cs b/CPF/Controls/ComboBox.cs index ac412ce..491f567 100644 --- a/CPF/Controls/ComboBox.cs +++ b/CPF/Controls/ComboBox.cs @@ -362,9 +362,9 @@ namespace CPF.Controls // return panel; //} //Panel panel; - protected override void OnInitializedAsync() + protected override void OnInitialized() { - base.OnInitializedAsync(); + base.OnInitialized(); //panel = GetItemsPanel(); //if (panel == null) //{ diff --git a/CPF/Controls/ContentControl.cs b/CPF/Controls/ContentControl.cs index 1ac1dd5..e425af8 100644 --- a/CPF/Controls/ContentControl.cs +++ b/CPF/Controls/ContentControl.cs @@ -163,7 +163,7 @@ namespace CPF.Controls }); } UIElement contentPresenter; - protected override void OnInitializedAsync() + protected override void OnInitialized() { contentPresenter = FindPresenterByName("contentPresenter"); if (contentPresenter == null) @@ -192,7 +192,7 @@ namespace CPF.Controls } } } - base.OnInitializedAsync(); + base.OnInitialized(); } protected override void OnOverrideMetadata(OverrideMetadata overridePropertys) diff --git a/CPF/Controls/Control.cs b/CPF/Controls/Control.cs index 74e5fc6..6fed919 100644 --- a/CPF/Controls/Control.cs +++ b/CPF/Controls/Control.cs @@ -281,12 +281,12 @@ namespace CPF.Controls Template(this, this.Children); } IsInitialized = true; - OnInitializedAsync(); + OnInitialized(); } LoadStyle(); } - protected virtual void OnInitializedAsync() + protected virtual void OnInitialized() { if (triggers != null) { diff --git a/CPF/Controls/DataGrid/DataGrid.cs b/CPF/Controls/DataGrid/DataGrid.cs index 81b0203..9b7ea82 100644 --- a/CPF/Controls/DataGrid/DataGrid.cs +++ b/CPF/Controls/DataGrid/DataGrid.cs @@ -202,7 +202,7 @@ namespace CPF.Controls } internal DataGridScrollViewer viewer; VirtualizationPresenter presenter; - protected override void OnInitializedAsync() + protected override void OnInitialized() { viewer = FindPresenter().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.OnInitializedAsync(); + base.OnInitialized(); var panel = ItemsHost as StackPanel; if (!panel || panel.Orientation == Orientation.Horizontal) { diff --git a/CPF/Controls/DataGrid/DataGridCell.cs b/CPF/Controls/DataGrid/DataGridCell.cs index d77883c..f12784e 100644 --- a/CPF/Controls/DataGrid/DataGridCell.cs +++ b/CPF/Controls/DataGrid/DataGridCell.cs @@ -85,9 +85,9 @@ namespace CPF.Controls Triggers.Add(nameof(IsSelected), Relation.Me, null, (nameof(Background), "75,178,255")); } DataGridCellTemplate cellTemplate; - protected override void OnInitializedAsync() + protected override void OnInitialized() { - base.OnInitializedAsync(); + base.OnInitialized(); cellTemplate = FindPresenter().FirstOrDefault(a => a.Name == "CellTemplate"); } diff --git a/CPF/Controls/DataGrid/DataGridRow.cs b/CPF/Controls/DataGrid/DataGridRow.cs index 2976f07..f28ab37 100644 --- a/CPF/Controls/DataGrid/DataGridRow.cs +++ b/CPF/Controls/DataGrid/DataGridRow.cs @@ -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 OnInitializedAsync() + protected override void OnInitialized() { itemsPanel = FindPresenter().FirstOrDefault(a => a.Name == "itemsPanel"); if (!itemsPanel) @@ -74,7 +74,7 @@ namespace CPF.Controls } } - base.OnInitializedAsync(); + base.OnInitialized(); } [PropertyChanged(nameof(IsSelected))] diff --git a/CPF/Controls/DataGrid/DataGridScrollViewer.cs b/CPF/Controls/DataGrid/DataGridScrollViewer.cs index 2851945..ef0b5f9 100644 --- a/CPF/Controls/DataGrid/DataGridScrollViewer.cs +++ b/CPF/Controls/DataGrid/DataGridScrollViewer.cs @@ -47,14 +47,14 @@ namespace CPF.Controls internal Panel PART_ColumnHeadersPresenter; internal UIElement contentPresenter; - protected override void OnInitializedAsync() + protected override void OnInitialized() { PART_ColumnHeadersPresenter = FindPresenter().FirstOrDefault(a => a.Name == "PART_ColumnHeadersPresenter"); if (!PART_ColumnHeadersPresenter) { throw new Exception("需要Name为PART_ColumnHeadersPresenter的元素"); } - base.OnInitializedAsync(); + base.OnInitialized(); contentPresenter = FindPresenter().FirstOrDefault(a => a.Name == "contentPresenter"); } diff --git a/CPF/Controls/ItemsControl.cs b/CPF/Controls/ItemsControl.cs index 5443eb2..4ca5118 100644 --- a/CPF/Controls/ItemsControl.cs +++ b/CPF/Controls/ItemsControl.cs @@ -271,9 +271,9 @@ namespace CPF.Controls return FindPresenter().FirstOrDefault(a => a.Name == "itemsPanel"); } - protected override void OnInitializedAsync() + protected override void OnInitialized() { - base.OnInitializedAsync(); + base.OnInitialized(); panel = GetItemsPanel(); //if (panel == null) //{ diff --git a/CPF/Controls/ListBox.cs b/CPF/Controls/ListBox.cs index 89c3698..b039c99 100644 --- a/CPF/Controls/ListBox.cs +++ b/CPF/Controls/ListBox.cs @@ -179,9 +179,9 @@ namespace CPF.Controls VirtualizationPresenter presenter; //Panel InnerPanel; - protected override void OnInitializedAsync() + protected override void OnInitialized() { - base.OnInitializedAsync(); + base.OnInitialized(); if (isVirtualizing) { presenter = FindPresenter>().FirstOrDefault(); diff --git a/CPF/Controls/MenuItem.cs b/CPF/Controls/MenuItem.cs index 93dc4c1..f665e9c 100644 --- a/CPF/Controls/MenuItem.cs +++ b/CPF/Controls/MenuItem.cs @@ -322,9 +322,9 @@ namespace CPF.Controls this.Triggers.Add(new Styling.Trigger { Property = nameof(IsMouseOver), Setters = { { nameof(Background), "#fff" } } }); } - protected override void OnInitializedAsync() + protected override void OnInitialized() { - base.OnInitializedAsync(); + base.OnInitialized(); } diff --git a/CPF/Controls/MultiSelector.cs b/CPF/Controls/MultiSelector.cs index 75e3ea8..6000c83 100644 --- a/CPF/Controls/MultiSelector.cs +++ b/CPF/Controls/MultiSelector.cs @@ -331,10 +331,10 @@ namespace CPF.Controls } bool isFirst; - protected override void OnInitializedAsync() + protected override void OnInitialized() { isFirst = true; - base.OnInitializedAsync(); + base.OnInitialized(); isFirst = false; if (selectIndex.HasValue) { diff --git a/CPF/Controls/NumericUpDown.cs b/CPF/Controls/NumericUpDown.cs index d80bb33..af5149d 100644 --- a/CPF/Controls/NumericUpDown.cs +++ b/CPF/Controls/NumericUpDown.cs @@ -107,9 +107,9 @@ namespace CPF.Controls }); } - protected override void OnInitializedAsync() + protected override void OnInitialized() { - base.OnInitializedAsync(); + base.OnInitialized(); numTextBox = FindPresenterByName("numTextBox"); } TextBox numTextBox; diff --git a/CPF/Controls/PageManger.cs b/CPF/Controls/PageManger.cs index f60a9db..f719662 100644 --- a/CPF/Controls/PageManger.cs +++ b/CPF/Controls/PageManger.cs @@ -138,9 +138,9 @@ namespace CPF.Controls } #if !DesignMode //用户代码写到这里,设计器下不执行,防止设计器出错 - protected override void OnInitializedAsync() + protected override void OnInitialized() { - base.OnInitializedAsync(); + base.OnInitialized(); } //用户代码 diff --git a/CPF/Controls/ProgressBar.cs b/CPF/Controls/ProgressBar.cs index 6daf5f1..6ee16c9 100644 --- a/CPF/Controls/ProgressBar.cs +++ b/CPF/Controls/ProgressBar.cs @@ -97,9 +97,9 @@ namespace CPF.Controls }); } - protected override void OnInitializedAsync() + protected override void OnInitialized() { - base.OnInitializedAsync(); + base.OnInitialized(); _indicator = FindPresenter().FirstOrDefault(a => a.Name == "Indicator"); _Animation = FindPresenter().FirstOrDefault(a => a.Name == "Animation"); } diff --git a/CPF/Controls/Slider.cs b/CPF/Controls/Slider.cs index f5ebd74..450cae0 100644 --- a/CPF/Controls/Slider.cs +++ b/CPF/Controls/Slider.cs @@ -197,9 +197,9 @@ namespace CPF.Controls }); } - protected override void OnInitializedAsync() + protected override void OnInitialized() { - base.OnInitializedAsync(); + base.OnInitialized(); this.Track = FindPresenter().FirstOrDefault(a => a.Name == "PART_Track"); } diff --git a/CPF/Controls/TabControl.cs b/CPF/Controls/TabControl.cs index 403c6e2..20163f2 100644 --- a/CPF/Controls/TabControl.cs +++ b/CPF/Controls/TabControl.cs @@ -363,7 +363,7 @@ namespace CPF.Controls Panel headerPanel; Panel contentPanel; - protected override void OnInitializedAsync() + protected override void OnInitialized() { headerPanel = FindPresenter().FirstOrDefault(a => a.Name == "headerPanel"); if (!headerPanel) @@ -410,7 +410,7 @@ namespace CPF.Controls } //} } - base.OnInitializedAsync(); + base.OnInitialized(); } [PropertyChanged(nameof(SelectedIndex))] void RegisterSelectedIndex(object newValue, object oldValue, PropertyMetadataAttribute attribute) diff --git a/CPF/Controls/TextBox.cs b/CPF/Controls/TextBox.cs index 5a2d768..82f1bb3 100644 --- a/CPF/Controls/TextBox.cs +++ b/CPF/Controls/TextBox.cs @@ -420,9 +420,9 @@ namespace CPF.Controls } ScrollViewer scrollViewer; - protected override void OnInitializedAsync() + protected override void OnInitialized() { - base.OnInitializedAsync(); + base.OnInitialized(); if (view == null) { view = TextBoxView; diff --git a/CPF/Controls/View.cs b/CPF/Controls/View.cs index 9abaece..511a699 100644 --- a/CPF/Controls/View.cs +++ b/CPF/Controls/View.cs @@ -1795,9 +1795,9 @@ namespace CPF.Controls //} internal List<(Delegate, UIElement)> afterStyles; - protected override void OnInitializedAsync() + protected override void OnInitialized() { - base.OnInitializedAsync(); + base.OnInitialized(); if (afterStyles != null) { foreach (var item in afterStyles)