Пример #1
0
 internal static void AddVirtualGenre(IVirtualGenre vgenre)
 {
     Program.mainForm.AddVirtualGenre(vgenre);
     Program.mainForm.Focus();
 }
Пример #2
0
 private bool AddTabIfNotExists(IVirtualGenre vgenre)
 {
     foreach (GenreTabPage gtp in this.tabcGsc.TabPages) {
         VGenreTabPage vgtp = gtp as VGenreTabPage;
         if (null != vgtp) {
             if (vgtp.VirtualGenre.ShortName == vgenre.ShortName && vgtp.VirtualGenre.LongName == vgenre.LongName) return false;
         }
     }
     this.AddGenreTabInternal(new VGenreTabPage(vgenre));
     return true;
 }
Пример #3
0
 public VGenreTabPage(IVirtualGenre vgenre)
     : base(vgenre.ShortName, vgenre.LongName)
 {
     this.vgenre = vgenre;
 }
Пример #4
0
 public void AddAndSelectVirtualGenre(IVirtualGenre vgenre)
 {
     if (this.AddTabIfNotExists(vgenre)) {
         this.tabcGsc.SelectedIndex = this.tabcGsc.TabCount - 1;
         this.HandleTabChangeInternal();
     } else {
         foreach (GenreTabPage gtp in this.tabcGsc.TabPages) {
             VGenreTabPage vgtp = gtp as VGenreTabPage;
             if (null != vgtp) {
                 if (vgtp.VirtualGenre.ShortName == vgenre.ShortName && vgtp.VirtualGenre.LongName == vgenre.LongName) {
                     this.tabcGsc.SelectedTab = vgtp;
                     break;
                 }
             }
         }
     }
 }
Пример #5
0
 public void AddVirtualGenre(IVirtualGenre vgenre)
 {
     this.genreSelctControl1.AddAndSelectVirtualGenre(vgenre);
 }