コード例 #1
0
ファイル: frmConfigGeneral.cs プロジェクト: foxjazz/IRCAL
 private void btnSave_Click(object sender, EventArgs e)
 {
     dc.SetNick(tbNick.Text);
     dc.SetUser(tbName.Text);
     dc.SetColors(pbSent.BackColor, pbNames.BackColor, pbAlert.BackColor);
     dc.Save();
 }
コード例 #2
0
ファイル: Notify.cs プロジェクト: foxjazz/IRCAL
        public void CheckName(string nick)
        {
            SavedSet.NameNotificationRow nnr;
            if (dc.NameNotificationList.ContainsKey(nick))
            {
                dc.NameNotificationList.TryGetValue(nick, out nnr);
                if (DBNull.Value.Equals(nnr["DateOfLastActivity"]))
                {
                    nnr.DateOfLastActivity = DateTime.Now;
                }

                else
                {
                    //here compare now to threshhold,
                    DateTime activity  = nnr.DateOfLastActivity;
                    int      Threshold = nnr.Threshold;
                    activity = activity.AddMinutes(Threshold);
                    if (activity > DateTime.Now)
                    { //if added activity time < currenttime then no need to notify, get out.
                        nnr.DateOfLastActivity = DateTime.Now;
                        return;
                    }
                }

                if (nnr.WaveFile == null || nnr.WaveFile.Length == 0)
                {
                    speaker.Speak(nnr.Phonetic);
                    dc.Save();
                }
                //else play wav file selected.

                nnr.DateOfLastActivity = DateTime.Now;
            }
        }
コード例 #3
0
ファイル: frmFavoriteChannels.cs プロジェクト: foxjazz/IRCAL
 private void frmFavoriteChannels_FormClosing(object sender, FormClosingEventArgs e)
 {
     dc.Save();
 }