Example #1
0
        private void PostInitializeComponent()
        {
            timerHide = 0;
            string currentPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);

            dirCommon = Path.GetFullPath(Path.Combine(currentPath, ".."));
            dirCommon = Path.GetFullPath(Path.Combine(dirCommon, "Common"));
            if (File.Exists($"{dirCommon}\\Images\\keyboard-right-arrow-button.png"))
            {
                pbHide.Text = "";
                pbHide.Tag  = "Hide";
                Image img = Image.FromFile($"{dirCommon}\\Images\\keyboard-right-arrow-button.png");
                img          = (Image) new Bitmap(img, 25, 52);
                pbHide.Image = img;
            }
            else
            {
                pbHide.Tag  = "Hide";
                pbHide.Text = "Hide";
            }
            statUser.user_name   = Environment.UserName;
            statUser.user_domain = Environment.UserDomainName;
            statUser             = apiStatWrapper.GetUser(statUser);
            locations            = apiStatWrapper.GetLocations();
            lbLocation.Text      = locIDtoString(locations, statUser.id_loc);
            setFormButtons(locations, statUser.id_loc);
            timer1.Interval = 1000;
            timer1.Start();
        }
Example #2
0
 public List <Location> ApiGetLocations() => apiStatsWrapper.GetLocations();