mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-15 17:30:27 +08:00
1.通过复制临时文件的方式,规避了自动战斗作业文件不能用中文路径或文件名的bug。
2.修改了标题栏,增加模拟器和IP端口显示。
This commit is contained in:
@@ -133,7 +133,9 @@ namespace MeoAsstGui
|
||||
return;
|
||||
}
|
||||
|
||||
asstProxy.AsstStartCopilot(data["stage_name"].ToString(), Filename, Form);
|
||||
const string _newfilename = "resource/_temp_copilot.json";
|
||||
File.WriteAllText(_newfilename, data.ToString());
|
||||
asstProxy.AsstStartCopilot(data["stage_name"].ToString(), _newfilename, Form);
|
||||
Idle = false;
|
||||
AddLog("Star Burst Stream!");
|
||||
}
|
||||
|
||||
@@ -58,6 +58,7 @@ namespace MeoAsstGui
|
||||
//Items.Add(ivm);
|
||||
Items.Add(cvm);
|
||||
Items.Add(svm);
|
||||
svm.UpdateWindowTitle(); // 在标题栏上显示模拟器和IP端口 必须在 Items.Add(svm)之后执行。
|
||||
ActiveItem = tvm;
|
||||
}
|
||||
|
||||
@@ -88,5 +89,11 @@ namespace MeoAsstGui
|
||||
await task;
|
||||
}
|
||||
}
|
||||
private string _windowTitle;
|
||||
public string WindowTitle
|
||||
{
|
||||
get => _windowTitle;
|
||||
set => SetAndNotify(ref _windowTitle, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -812,6 +812,7 @@ namespace MeoAsstGui
|
||||
{
|
||||
SetAndNotify(ref _connectAddress, value);
|
||||
ViewStatusStorage.Set("Connect.Address", value);
|
||||
UpdateWindowTitle(); /* 每次修改连接地址时更新WIndowTitle */
|
||||
}
|
||||
}
|
||||
|
||||
@@ -930,6 +931,20 @@ namespace MeoAsstGui
|
||||
}
|
||||
}
|
||||
|
||||
/* 标题栏显示模拟器名称和IP端口 */
|
||||
public void UpdateWindowTitle()
|
||||
{
|
||||
var rvm = (RootViewModel)this.Parent;
|
||||
string ConnectConfigName = "";
|
||||
foreach (CombData data in ConnectConfigList)
|
||||
{
|
||||
if (data.Value == ConnectConfig)
|
||||
{
|
||||
ConnectConfigName = data.Display;
|
||||
}
|
||||
}
|
||||
rvm.WindowTitle = string.Format("MaaAssistantArknights - {0} ({1})", ConnectConfigName, ConnectAddress);
|
||||
}
|
||||
//public void TryToSetBlueStacksHyperVAddress()
|
||||
//{
|
||||
// if (AdbPath.Length == 0 || !File.Exists(AdbPath))
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:s="https://github.com/canton7/Stylet"
|
||||
mc:Ignorable="d"
|
||||
Title="MaaAssistantArknights" Height="595" Width="800">
|
||||
Title="{Binding WindowTitle}" Height="595" Width="800">
|
||||
<DockPanel>
|
||||
<TabControl Style="{StaticResource StyletConductorTabControl}" Margin="0,10,0,0" />
|
||||
</DockPanel>
|
||||
|
||||
Reference in New Issue
Block a user