Exemplo n.º 1
0
        private void Check()
        {
            if (Settings.Default.SettingUseLocalFile)
            {
                pictureBoxTokenURLCheck.Image = File.Exists(Settings.Default.filePath) ? Resources.TickSmall : Resources.Exclamation24;
            }
            else
            {
                dataStore.IsFileURLValid      = Networker.CheckFileURL(Settings.Default.fileURL);
                pictureBoxTokenURLCheck.Image = dataStore.IsFileURLValid ? Resources.Tick32 : Resources.Warning32;
                toolTip.SetToolTip(pictureBoxTokenURLCheck, dataStore.IsFileURLValid ? "URL is responding but its not verified that the data is correct!" : "URL isn't responding");
            }

            pictureBoxUserTokenCheck.Image = Settings.Default.userIsLoggedIn ? Resources.Tick32 : Resources.Exclamation24;
            toolTip.SetToolTip(pictureBoxUserTokenCheck, Settings.Default.userIsLoggedIn ? Settings.Default.loginName + " is logged in" : "This field have to be valid in order to send notifications.\r\nPlease type or sign in");
            pictureBoxTokenFileCheck.Image = File.Exists(Settings.Default.filePath) ? Resources.TickSmall : Resources.Exclamation24;
            pictureBoxLogCheck.Image       = File.Exists(Settings.Default.logFilePath) ? Resources.TickSmall : Resources.Exclamation24;
        }
Exemplo n.º 2
0
 private void textBoxTokenURL_TextChanged(object sender, EventArgs e)
 {
     Networker.CheckFileURL(textBoxTokenURL.Text);
     Check();
 }