示例#1
0
 public void AddOrChangeOpener(Opener a)
 {
     if (UsersOpener.Find(r => r.TypeOfFile() == a.TypeOfFile()) == null)
         AddOpener(a);
     else
         ChangeOpener(a);
 }
示例#2
0
 private void AddProgramBut_Click(object sender, EventArgs e)
 {
     Opener a = new Opener();
     a.SetAddress(openersway);
     a.SetName(ProgramNameTB.Text);
     a.SetTypeOfFile(TypeOfFileTB.Text);
     CurrentUser.AddOrChangeOpener(a);
     CurrentUser.WriteOutOpeners();
 }
示例#3
0
        private void AddProgramBut_Click(object sender, EventArgs e)
        {
            Opener a = new Opener();

            a.SetAddress(openersway);
            a.SetName(ProgramNameTB.Text);
            a.SetTypeOfFile(TypeOfFileTB.Text);
            CurrentUser.AddOrChangeOpener(a);
            CurrentUser.WriteOutOpeners();
        }
示例#4
0
 public void AddOrChangeOpener(Opener a)
 {
     if (UsersOpener.Find(r => r.TypeOfFile() == a.TypeOfFile()) == null)
     {
         AddOpener(a);
     }
     else
     {
         ChangeOpener(a);
     }
 }
示例#5
0
        private void TracksList_DoubleClick(object sender, EventArgs e)
        {
            string    wrt;
            Opener    CurrentOpener    = CurrentUser.SearchOpener(Tracks.Find(r => r.Name() == TracksList.SelectedItem.ToString()).Type());
            MusicFile CurrentMusicFile = Tracks.Find(r => r.Name() == TracksList.SelectedItem.ToString());

            if (CurrentOpener == null)
            {
                wrt = '"' + CurrentMusicFile.Address() + '"';
            }
            else
            {
                wrt = "start \"\" \"" + CurrentOpener.Address() + "\" \"" + CurrentMusicFile.Address() + "\"";
            }
            Process pr = new Process();

            pr.StartInfo.FileName    = "cmd";
            pr.StartInfo.Arguments   = "/C " + wrt;
            pr.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
            pr.Start();
            pr.Close();
            pr.Dispose();
        }
示例#6
0
 public void DeleteOpener(Opener a)
 {
     UsersOpener.Remove(a);
 }
示例#7
0
 public void ChangeOpener(Opener a)
 {
     UsersOpener[UsersOpener.FindIndex(r => r.TypeOfFile() == a.TypeOfFile())] = a;
 }
示例#8
0
 public void AddOpener(Opener a)
 {
     UsersOpener.Add(a);
 }
示例#9
0
 public void AddOpener(Opener a)
 {
     UsersOpener.Add(a);
 }
示例#10
-1
 public void DeleteOpener(Opener a)
 {
     UsersOpener.Remove(a);
 }
示例#11
-1
 public void ChangeOpener(Opener a)
 {
     UsersOpener[UsersOpener.FindIndex(r=>r.TypeOfFile()==a.TypeOfFile())]=a;
 }