/// <summary> /// Show the setting window. /// </summary> private void ShowSettingWindow() { if (_settingWindow == null) { _settingWindow = new SettingWindow(); _settingWindow.Closed += OnSettingWindowClosed; } _settingWindow.Show(); }
public void ShowControlWindow(string cmd, int lscId, int nodeId, int nodeType, string nodeName) { if (UserData.MaxOpLevel <= EnmUserLevel.Attendant) { WebUtility.ShowMessage(EnmErrType.Warning, "权限不足,请与管理员联系。"); return; } switch (cmd.Trim().ToLower()) { case "ctrl": ControlWindow.Title = String.Format("[{0}]{1}", nodeName, "遥控参数值设置"); ControlWindowHF.Text = String.Format("{0}&{1}&{2}", lscId, nodeId, nodeType); ControlWindow.Show(); break; case "set": SettingWindow.Title = String.Format("[{0}]{1}", nodeName, "遥调参数值设置"); SettingWindowHF.Text = String.Format("{0}&{1}&{2}", lscId, nodeId, nodeType); SettingWindow.Show(); break; default: break; } }
/// <summary> /// 設定ウィンドウを開く。 /// </summary> /// <param name="pageId">ページID</param> /// <param name="element">親要素</param> /// <param name="waitForClose">終了を待機する</param> public static void ShowSettingWindow(int?pageId, FrameworkElement?element, bool waitForClose = false) { var view = App.Instance.Windows .OfType <SettingWindow>() .SingleOrDefault(); if (view != null) { view.Activate(); } else { view = new SettingWindow { Owner = element == null ? null : Window.GetWindow(element), WindowStartupLocation = WindowStartupLocation.CenterOwner, }; view.Show(); } if (pageId.HasValue) { view.SelectPage(pageId.Value); } if (waitForClose) { view.WaitForClose(); } }
// Start is called before the first frame update void Start() { //// 加载个人信息 //var token = PlayerPrefs.GetString("token"); //Debug.Log("player token:" + token); //client = new Client(token); //string text = client.GetContent("/users"); //Debug.Log(text); //JSONObject j = new JSONObject(text); settingWindow = new SettingWindow(); mainUI = GetComponent <UIPanel>().ui; var header = mainUI.GetChild("header").asCom; //header.GetChild("textNick").asTextField.text = j["data"]["user"]["nick"].str; //header.GetChild("textGold").asTextField.text = j["data"]["user"]["card"].n + ""; //header.GetChild("imgAvatar").asLoader.url = "/static" + j["data"]["user"]["avatar"].str; header.GetChild("btnSetting").onClick.Add(() => { settingWindow.Show(); settingWindow.Center(); }); }
public static void Settings() { SettingWindow window = (SettingWindow)EditorWindow.GetWindow(typeof(SettingWindow)); window.titleContent = new GUIContent("全局设置"); window.Show(); }
public static void OpenSettingTool() { SettingWindow win = EditorWindow.GetWindow <SettingWindow>(); win.titleContent.text = "宏设置"; win.minSize = new Vector2(635, 200); win.maxSize = new Vector2(635, 630); win.Show(); }
public void OnClickSettingBtn() { if (SettingWin == null) { YxDebug.Log(" === Panel_Setting === "); return; } SettingWin.Show(); }
private void settingBtn_Click(object sender, RoutedEventArgs e) { var setting = new SettingWindow(); setting.Closed += (s, ee) => { InitializeHotKey(); }; setting.Show(); }
public static void Setting() { //实例化 SettingWindow win = (SettingWindow)EditorWindow.GetWindow(typeof(SettingWindow)); //设置窗口名称 win.titleContent = new GUIContent("全局设置"); //窗口显示 win.Show(); }
/// <summary> /// open setting window /// </summary> /// <param name="sender"></param> /// <param name="e"></param> public void OpenSettingWindow(object sender, RoutedEventArgs e) { var mb = new SettingWindow() { Width = 500, Height = 320 }; mb.Show(this); }
private void MI_Setting_Click(object sender, RoutedEventArgs e) { GlobalSetting.TimeRulerStart = (int)(TimeStart); GlobalSetting.TimeRulerEnd = (int)(TimeEnd); GlobalSetting.TimeRulerDivideNumber = DivideNumber; GlobalSetting.TimeRulerSubDivideNumber = SubDivideNumber; SettingWindow swin = new SettingWindow(); swin.EnsureButtonClick += W_Setting_Ensure_Click; swin.Show(); }
void btnSetting(object sender, RoutedEventArgs e) { IPHostEntry ipHostInfo = Dns.Resolve(Dns.GetHostName()); SettingWindow settingWindow = new SettingWindow(); IPAddress[] address = ipHostInfo.AddressList; settingWindow.ipLists.Clear(); for (int i = 0; i < address.Length; i++) { settingWindow.ipLists.Add(address[i].ToString()); } settingWindow.ReStartServer += RestartServer; settingWindow.Show(); }
private void MenuSetting_OnClick(object sender, RoutedEventArgs e) { SettingWindow win = new SettingWindow(); win.Show(); }
private void Menu_Setting(object sender, RoutedEventArgs e) { Window settingsWindow = new SettingWindow(); settingsWindow.Show(); }
private void settingsClick() { var SettingsWin = new SettingWindow(); SettingsWin.Show(); }
private void OnSettingClick() { SettingWindow setting = new SettingWindow(); setting.Show(); }
private void DoSettingMenuItemCommand() { SettingWindow settingWindow = new SettingWindow(); settingWindow.Show(); }