Exemplo n.º 1
0
 /// <summary>
 /// Extra functionality added to the enable panel methods: disable gameplay if the passed panel requires gameplay disabled or paused (pause panel).
 /// Otherwise enables gameplay (HUD panel).
 /// </summary>
 protected override void ExtraEnableFunctionality(PanelDetails _panel)
 {
     if (_panel.disableGame)
     {
         DisableGame(true);
     }
     else
     {
         DisableGame(false);
     }
 }
Exemplo n.º 2
0
        private static void GetPanelDetails()
        {
            string         requestUri = $"http://{PanelID}.ethosdistro.com/?json=yes";
            HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create(requestUri);

            webRequest.Method = @"GET";
            webRequest.Accept = @"application/json";
            using (HttpWebResponse webResponse = (HttpWebResponse)webRequest.GetResponse())
            {
                using (StreamReader reader = new StreamReader(webResponse.GetResponseStream()))
                {
                    panel = JsonConvert.DeserializeObject <PanelDetails>(reader.ReadToEnd());
                }
            }
        }
Exemplo n.º 3
0
        protected PanelDetails GetMinerDetails()
        {
            PanelDetails panel = null;

            try
            {
                using (EthosAPIController ethos = new EthosAPIController())
                {
                    panel                 = JsonConvert.DeserializeObject <PanelDetails>(ethos.GetEthosPanelData());
                    panel.HasAPIError     = false;
                    panel.UpdatedDateTime = DateTime.Now;
                }
            }
            catch (WebException ex)
            {
                panel = new PanelDetails
                {
                    HasAPIError  = true,
                    ErrorMessage = ex.Message
                };
            }
            return(panel);
        }
Exemplo n.º 4
0
 protected virtual void ExtraEnableFunctionality(PanelDetails _panel)
 {
 }
Exemplo n.º 5
0
 private void DataViewDialog_Scroll(object sender, ScrollEventArgs e)
 {
     PanelDetails.Update(); // Removes lag when scrolling
 }