예제 #1
0
파일: Session.cs 프로젝트: catright/Wale
 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
파일: Session.cs 프로젝트: catright/Wale
 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; }