//显示host弹框 public static void showRuleAlertUI(int parentIndex, int index = -1, string handleType = "") { string type = Main.mainData.type; //初始化窗体 Window window = initWindow(310); //设置window窗体内容 if (type == "host") { HostAlertUI hostAlertUI = new HostAlertUI(parentIndex, index, handleType); window.Content = hostAlertUI; //自动聚焦 hostAlertUI.ip.Focus(); } else if (type == "file") { FIleAlertUI fileAlertUI = new FIleAlertUI(parentIndex, index, handleType); window.Content = fileAlertUI; //自动聚焦 fileAlertUI.url.Focus(); } else if (type == "https") { HttpsAlertUI httpsAlertUI = new HttpsAlertUI(parentIndex, index, handleType); window.Content = httpsAlertUI; //自动聚焦 httpsAlertUI.url.Focus(); } //显示窗体 window.ShowDialog(); }
//显示Host弹框 public static void showHostAlertUI(int index = -1) { HostAlertUI hostAlertUI = new HostAlertUI(index); //初始化窗体 Window window = initWindow("host", 310); //设置window窗体内容 window.Content = hostAlertUI; //自动聚焦 hostAlertUI.ip.Focus(); //显示窗体 window.ShowDialog(); }