public MainWindow()
        {
            InitializeComponent();
            MessageBus.MainWindow = this;
            WebBrowserZoomInvoker.AddZoomInvoker(WebBrowserMain);

            foreach (string uid in MessageBus.QueryHistory)
            {
                ComboBoxUserId.Items.Add(uid);
            }

            if (ComboBoxUserId.Items.Count > 0)
            {
                ComboBoxUserId.Text = ComboBoxUserId.Items[ComboBoxUserId.Items.Count - 1].ToString();
            }

            if (GenshinApi.GetLoginStatus())
            {
                Visibility = Visibility.Visible;
            }
            else
            {
                MessageBus.Login();
            }
        }
Exemplo n.º 2
0
        public RoleWindow(string html)
        {
            InitializeComponent();
            WebBrowserZoomInvoker.AddZoomInvoker(WebBrowserRole);
            bool loaded = false;

            WebBrowserRole.LoadCompleted += (sender, args) =>
            {
                if (!loaded)
                {
                    WebBrowserRole.NavigateToString(html);
                    loaded = true;
                }
            };
        }
Exemplo n.º 3
0
 public ChromeWindow()
 {
     InitializeComponent();
     thisWindow = this;
     dpiPointF  = WebBrowserZoomInvoker.GetCurrentDIPScale();
 }