Exemple #1
0
        public RegularViewer()
        {
            articlesRotatorThread = new Thread(ArticlesRotatorThread);
            articlesRotatorThread.Name = "articlesRotatorThread";
            articlesRotatorThread.IsBackground = true;

            articlesPopupThread = new Thread(ArticlesPopupThread);
            articlesPopupThread.Name = "aritclesPopupThread";
            articlesPopupThread.IsBackground = true;
            articlesPopupThread.Priority = ThreadPriority.BelowNormal;

            database = Database.GetInstance();

            InitializeComponent();

            Version vrs = new Version(Application.ProductVersion);
            StringBuilder profileNames = new StringBuilder();
            foreach (Profile p in Profile.SelectedProfiles)
            {
                if (profileNames.Length > 0)
                {
                    profileNames.Append(", ");
                }
                profileNames.Append(p.Name);
            }
            Text = string.Format("GetFacts {0}.{1}: {2}", vrs.Major, vrs.Minor, profileNames.ToString());
            notifyIcon1.Text = "GetFacts";
            timer1_Tick(this, EventArgs.Empty);
        }
 public RegularViewer()
 {
     thread = new Thread(CycleThread);
     thread.IsBackground = true;
     thread.Priority = ThreadPriority.BelowNormal;
     database = Database.GetInstance();
     InitializeComponent();
 }
Exemple #3
0
 public static Database GetInstance()
 {
     lock (_lock_)
     {
         if (uniqueInstance == null)
         {
             uniqueInstance = new Database();
         }
         return uniqueInstance;
     }
 }