Exemplo n.º 1
0
        private void buttonBS_Click(object sender, RoutedEventArgs e)
        {
            byte[] myBytes = Encoding.ASCII.GetBytes("leach");
            string EncryptBSPassword = Encryption.SimpleEncryptWithPassword(txPasswordBS.Text, MainWindow.CurConfig["username"], myBytes);
            MainWindow.CurConfig["password"] = EncryptBSPassword;


            ConfigData.SetConfigData();

            ConfigData newConf = new ConfigData();
            MainWindow.CurConfig = newConf.GetConfigData();


            
        }
Exemplo n.º 2
0
        private void btStartStop_Click(object sender, RoutedEventArgs e)
        {
            if (isStarted)
            {
                //Stopping checker thread
                isStarted = false;
                btStartStop.Content = "Start";
                CheckingThread = null;

                LogFromThread("STATUS: BlueSource checking service has been shutdown.");
                ConfigData.WriteToLog("STATUS: BlueSource checking service has been shutdown.");
                lbStatus.Content = "Checker has been shutdown...";
            }
            else
            {

                StartTime = DateTime.Now;
                //starting checker
                CurConfig = null;
                ConfigData CurCon = new ConfigData();
                CurConfig = CurCon.GetConfigData();
                CheckingThread = new Thread(new ThreadStart(Checker));
                isStarted = true;
                CheckingThread.Start();
                btStartStop.Content = "Stop";

                LogFromThread("STATUS: BlueSource checking service is starting.");
                ConfigData.WriteToLog("STATUS: BlueSource checking service is starting.");
            }
        }
Exemplo n.º 3
0
        public MainWindow()
        {
            InitializeComponent();
            ConfigData CurCon = new ConfigData();
            CurConfig = CurCon.GetConfigData();
            MinimizeToTray.Enable(this);

            if (CurConfig["autostart"] == "TRUE")
            {
                StartTime = DateTime.Now;
                CheckingThread = new Thread(new ThreadStart(Checker));
                isStarted = true;
                CheckingThread.Start();
                btStartStop.Content = "Stop";
                LogFromThread("STATUS: BlueSource checking service has started.");
                ConfigData.WriteToLog("STATUS: BlueSource checking service has started.");
            }

            urlandids = CurConfig["urlandids"].Split(',');
 
            URLCount = urlandids.Length;
            aFailedLastTime = new bool[URLCount];
            aLastSentAt = new Int64[URLCount];

            BCVersion = this.Title;

            pbMainLoad.Maximum = URLCount + 1;
            pbMainLoad.Minimum = 0;
            


        }