コード例 #1
0
ファイル: RegularViewer.cs プロジェクト: nnovic/GetFacts
        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);
        }
コード例 #2
0
 public RegularViewer()
 {
     thread = new Thread(CycleThread);
     thread.IsBackground = true;
     thread.Priority = ThreadPriority.BelowNormal;
     database = Database.GetInstance();
     InitializeComponent();
 }
コード例 #3
0
ファイル: Database.cs プロジェクト: nnovic/GetFacts
 public static Database GetInstance()
 {
     lock (_lock_)
     {
         if (uniqueInstance == null)
         {
             uniqueInstance = new Database();
         }
         return uniqueInstance;
     }
 }