Пример #1
0
 public Session(CSCore.CoreAudioAPI.AudioSessionControl2 asc2, List <string> ExcList, double AvgTime, double AcInterval)
 {
     this.asc2 = asc2;
     NameSet   = new NameSet(
         asc2.ProcessID,
         asc2.IsSystemSoundSession,
         "", //asc2.Process.ProcessName,
         "", //asc2.Process?.MainWindowTitle,
         asc2.DisplayName,
         asc2.SessionIdentifier
         );
     //AutoIncluded = ExcList.Contains(NameSet.Name) ? false : true;
     if (ExcList == null)
     {
         JPack.FileLog.Log($"Error: ExcList is null. {NameSet.SessionIdentifier}");
     }
     if (ExcList != null && ExcList.Contains(NameSet.Name))
     {
         //LastIncluded = false;
         AutoIncluded = false;
     }
     else
     {
         //LastIncluded = true;
         //AutoIncluded = SoundEnabled;
         AutoIncluded = true;
     }
     SetAvTime(AvgTime, AcInterval);
     //SetAvTimeAR(1000, 100, AvgTime, 100, AcInterval);
 }
Пример #2
0
 public Session(CSCore.CoreAudioAPI.AudioSessionControl2 asc2, List <string> ExcList, double AvTime, double AvInterval)
 {
     this.asc2 = asc2;
     nameSet   = new NameSet(
         asc2.ProcessID,
         asc2.IsSystemSoundSession,
         "", //asc2.Process.ProcessName
         "", //asc2.Process.MainWindowTitle
         asc2.DisplayName,
         asc2.SessionIdentifier
         );
     AutoIncluded = ExcList.Contains(nameSet.Name) ? false : true;
     SetAvTime(AvTime, AvInterval);
 }
Пример #3
0
 private void MakeNameSet()
 {
     try
     {
         NameSet = new NameSet(
             ProcessID,
             IsSystemSoundSession,
             ProcessName,
             MainWindowTitle,
             DisplayName,
             SessionIdentifier
             );
     }
     catch
     {
         string l = $"Error: failed to re-make NameSet of {Name}";
         Console.WriteLine(l);
         JPack.FileLog.Log(l);
         return;
     }
     NameSet.MakeName();
 }
Пример #4
0
 public Session(CSCore.CoreAudioAPI.AudioSessionControl2 asc2, List <string> ExcList, double AvgTime, double AcInterval)
 {
     this.asc2 = asc2;
     NameSet   = new NameSet(
         asc2.ProcessID,
         asc2.IsSystemSoundSession,
         "", //asc2.Process.ProcessName
         "", //asc2.Process.MainWindowTitle
         asc2.DisplayName,
         asc2.SessionIdentifier
         );
     //AutoIncluded = ExcList.Contains(NameSet.Name) ? false : true;
     if (ExcList.Contains(NameSet.Name))
     {
         LastIncluded = false;
         AutoIncluded = false;
     }
     else
     {
         LastIncluded = true;
         AutoIncluded = SoundEnabled;
     }
     SetAvTime(AvgTime, AcInterval);
 }
Пример #5
0
 public SessionData(NameSet nameset) { this.nameSet = nameset; }