コード例 #1
0
        private async Task ConfigureMail()
        {
            mailInfo = await _context.TInfo.FirstOrDefaultAsync();

            emailClient.Port                  = 587;
            emailClient.EnableSsl             = true;
            emailClient.UseDefaultCredentials = false;
            emailClient.Credentials           = SMTPUserInfo;
        }
コード例 #2
0
    public void add(int reason, long income, long outlay)
    {
        TInfo <long, long> tmp = null;

        if (m_data.ContainsKey(reason))
        {
            tmp = m_data[reason];
        }
        else
        {
            tmp = new TInfo <long, long>();
            m_data.Add(reason, tmp);
        }
        tmp.m_first  += income;
        tmp.m_second += outlay;
    }
コード例 #3
0
ファイル: ViewerHumanLogic.cs プロジェクト: VladimirKhil/SI
        virtual public async void Choice()
        {
            TInfo.Text                = "";
            TInfo.MediaSource         = null;
            TInfo.QuestionContentType = QuestionContentType.Text;
            TInfo.Sound               = false;

            foreach (var item in _data.Players)
            {
                item.State = PlayerState.None;
            }

            var select = false;

            lock (_data.ChoiceLock)
            {
                lock (TInfo.RoundInfoLock)
                {
                    if (_data.ThemeIndex > -1 && _data.ThemeIndex < TInfo.RoundInfo.Count &&
                        _data.QuestionIndex > -1 && _data.QuestionIndex < TInfo.RoundInfo[_data.ThemeIndex].Questions.Count)
                    {
                        select = true;
                    }
                }
            }

            if (!select)
            {
                return;
            }

            try
            {
                await TInfo.PlaySimpleSelectionAsync(_data.ThemeIndex, _data.QuestionIndex);
            }
            catch (Exception exc)
            {
                _viewerActions.Client.CurrentServer.OnError(exc, false);
            }
        }
コード例 #4
0
 public void StopMedia()
 {
     TInfo.OnMediaPause();
 }
コード例 #5
0
 public void RunMedia()
 {
     TInfo.OnMediaResume();
 }
コード例 #6
0
 public void SeekMedia(int position)
 {
     TInfo.OnMediaSeek(position);
 }
コード例 #7
0
 public void PlaySelection(int theme)
 {
     TInfo.PlaySelection(theme);
 }
コード例 #8
0
 public void PlayComplexSelection(int theme, int quest, bool setActive) => TInfo.PlayComplexSelectionAsync(theme, quest, setActive);
コード例 #9
0
 public void PlaySimpleSelection(int theme, int quest) => TInfo.PlaySimpleSelectionAsync(theme, quest);
コード例 #10
0
 public void PlaySimpleSelection(int theme, int quest)
 {
     TInfo.PlaySimpleSelection(theme, quest);
 }
コード例 #11
0
 public Registration(TInfo info, TOrders orders)
 {
     Info   = info;
     Orders = orders;
 }
コード例 #12
0
ファイル: ViewerHumanLogic.cs プロジェクト: VladimirKhil/SI
 virtual public void Out(int themeIndex)
 {
     TInfo.PlaySelection(themeIndex);
     _data.Sound = Sounds.FinalDelete;
 }