/// <summary>
 /// Show the setting window.
 /// </summary>
 private void ShowSettingWindow()
 {
     if (_settingWindow == null)
     {
         _settingWindow         = new SettingWindow();
         _settingWindow.Closed += OnSettingWindowClosed;
     }
     _settingWindow.Show();
 }
Esempio n. 2
0
        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;
            }
        }
Esempio n. 3
0
        /// <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();
            }
        }
Esempio n. 4
0
    // 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();
        });
    }
Esempio n. 5
0
    public static void Settings()
    {
        SettingWindow window = (SettingWindow)EditorWindow.GetWindow(typeof(SettingWindow));

        window.titleContent = new GUIContent("全局设置");
        window.Show();
    }
Esempio n. 6
0
    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();
    }
Esempio n. 7
0
 public void OnClickSettingBtn()
 {
     if (SettingWin == null)
     {
         YxDebug.Log(" === Panel_Setting === ");
         return;
     }
     SettingWin.Show();
 }
Esempio n. 8
0
        private void settingBtn_Click(object sender, RoutedEventArgs e)
        {
            var setting = new SettingWindow();

            setting.Closed += (s, ee) =>
            {
                InitializeHotKey();
            };
            setting.Show();
        }
Esempio n. 9
0
    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);
        }
Esempio n. 11
0
        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();
        }
Esempio n. 13
0
        private void MenuSetting_OnClick(object sender, RoutedEventArgs e)
        {
            SettingWindow win = new SettingWindow();

            win.Show();
        }
Esempio n. 14
0
        private void Menu_Setting(object sender, RoutedEventArgs e)
        {
            Window settingsWindow = new SettingWindow();

            settingsWindow.Show();
        }
        private void settingsClick()
        {
            var SettingsWin = new SettingWindow();

            SettingsWin.Show();
        }
Esempio n. 16
0
        private void OnSettingClick()
        {
            SettingWindow setting = new SettingWindow();

            setting.Show();
        }
        private void DoSettingMenuItemCommand()
        {
            SettingWindow settingWindow = new SettingWindow();

            settingWindow.Show();
        }