Esempio n. 1
0
 public UI_SongList(Interface par)
 {
     InitializeComponent();
     _par = par;
     UI_ListBox.DataSource = sl.Songs;
     UI_ListBox.DisplayMember = "Title";
 }
Esempio n. 2
0
 private void UI_mainMenuItem1_Click(object sender, EventArgs e)
 {
     Interface UI_interface = new Interface();
     UI_interface.Show();
     this.Hide();
     GC.Collect();
     //this.Dispose();
 }
Esempio n. 3
0
        public void showmatches(Interface theint)
        {
            UI_SongList uisl = new UI_SongList(theint);
#if VERBOSE
            MessageBox.Show("num songs " + matches.Count.ToString());
#endif
            uisl.SL = this.matches;
            uisl.Show();
            
        }
Esempio n. 4
0
        public bool askserver(Interface theint, string serverip) // return true on succeed, return false on fail.
        {
            Connector con = new Connector();
            if (con.Connect(serverip) == true)
            {
                matches = con.SendFingerprint(fingerprint);

                this.showmatches(theint);

                //UI_SongList uiSongList = new UI_SongList(theint);
                //uiSongList.SL = matches;
                //uiSongList.Show();
                return true;
            }
            else
            {
                System.Windows.Forms.MessageBox.Show("failed to connect");//should be replaced with statusbar.
                //how to change status bar here?
                if (this.matches.Count >0)
                    this.showmatches(theint); //do this in both cases, one button.
                return false;
            }
            
        }