Skip to content
16 changes: 13 additions & 3 deletions ContextMenuManager/BluePointLilac.Controls/BackupDialog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -132,20 +132,22 @@ public string[] TvItems
readonly Label cmbInfo = new Label { AutoSize = true };
readonly RComboBox cmbItems = new RComboBox
{
AutoCompleteMode = AutoCompleteMode.SuggestAppend,
AutoCompleteMode = AutoCompleteMode.None,
AutoCompleteSource = AutoCompleteSource.ListItems,
DropDownHeight = 300.DpiZoom(),
DropDownStyle = ComboBoxStyle.DropDownList,
ImeMode = ImeMode.Disable
};

readonly Button btnOK = new Button
// 使用 MyButton 替换原有的 Button
readonly MyButton btnOK = new MyButton
{
DialogResult = DialogResult.OK,
Text = ResourceString.OK,
AutoSize = true
};
readonly Button btnCancel = new Button

readonly MyButton btnCancel = new MyButton
{
DialogResult = DialogResult.Cancel,
Text = ResourceString.Cancel,
Expand Down Expand Up @@ -175,6 +177,14 @@ private void InitializeComponents()
cmbItems.AutosizeDropDownWidth();
}

protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
// 确保按钮尺寸适应文本
btnOK.PerformLayout();
btnCancel.PerformLayout();
}

private void ShowTreeView()
{
treeView.Nodes.Add(new TreeNode(AppString.ToolBar.Home));
Expand Down
140 changes: 0 additions & 140 deletions ContextMenuManager/BluePointLilac.Controls/LoadingDialog.Designer.cs

This file was deleted.

Loading
Loading