private void newFavorite_Click(object sender, System.Windows.RoutedEventArgs e)
 {
     MsgBroker.MsgBrokerMsg arg = new MsgBroker.MsgBrokerMsg();
     arg.MsgOPCode = UI_CONTROL.SHOW_TOP_GRID;
     arg.MsgBody   = new Create_FavoritePlaylistUserControl();
     (Application.Current as App).msgBroker.SendMessage(arg);
 }
Ejemplo n.º 2
0
 private void favoritelist_Loadfile(string nameoflist)
 {
     MsgBroker.MsgBrokerMsg arg = new MsgBroker.MsgBrokerMsg();
     arg.MsgOPCode = MESSAGE_MAP.LOAD_ITEMS_IN_FAVORITE_PLAYLIST;
     arg.MsgBody   = nameoflist;
     (Application.Current as App).msgBroker.SendMessage(arg);
 }
        private void CloseUserControl()
        {
            MsgBroker.MsgBrokerMsg arg = new MsgBroker.MsgBrokerMsg();
            arg.MsgOPCode = Orange.MsgBroker.UI_CONTROL.HIDE_TOP_GRID;

            (Application.Current as App).msgBroker.SendMessage(arg);
        }
        private void HideThisUsercontrol()
        {
            MsgBroker.MsgBrokerMsg arg = new MsgBroker.MsgBrokerMsg();
            arg.MsgOPCode = UI_CONTROL.HIDE_TOP_GRID;

            (Application.Current as App).msgBroker.SendMessage(arg);
        }
Ejemplo n.º 5
0
        private void confirmBtn_Click(object sender, RoutedEventArgs e)
        {
            MsgBroker.MsgBrokerMsg arg = new MsgBroker.MsgBrokerMsg();
            arg.MsgOPCode = UI_CONTROL.HIDE_TOP_GRID;

            (Application.Current as App).msgBroker.SendMessage(arg);
        }
Ejemplo n.º 6
0
        public tutorial()
        {
            this.InitializeComponent();
            arg = new MsgBroker.MsgBrokerMsg();

            CountInstall();
        }
        private void LanguageCombobox_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (LanguageCombobox.SelectedIndex != -1)
            {
                if (LanguageCombobox.SelectedIndex == 0)
                {
                    Properties.Settings.Default.Language_for_Orange = 1;
                }
                if (LanguageCombobox.SelectedIndex == 1)
                {
                    Properties.Settings.Default.Language_for_Orange = 0;
                }
                if (LanguageCombobox.SelectedIndex == 2)
                {
                    Properties.Settings.Default.Language_for_Orange = 2;
                }
                if (LanguageCombobox.SelectedIndex == 3)
                {
                    Properties.Settings.Default.Language_for_Orange = 3;
                }

                Orange.Util.LanguagePack.TYPE = Properties.Settings.Default.Language_for_Orange;

                TopmostToggleSwitch.Header = LanguagePack.TopMost();
                MsgBroker.MsgBrokerMsg arg = new MsgBroker.MsgBrokerMsg();
                arg.MsgOPCode = UI_CONTROL.SET_LANGUAGE;

                (Application.Current as App).msgBroker.SendMessage(arg);
            }
        }
Ejemplo n.º 8
0
        private void LayoutRoot_MouseDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
        {
            e.Handled = true;
            MsgBroker.MsgBrokerMsg arg = new MsgBroker.MsgBrokerMsg();
            arg.MsgOPCode = UI_CONTROL.HIDE_TOP_GRID;

            (Application.Current as App).msgBroker.SendMessage(arg);
        }
        public void SendMessage(MsgBrokerMsg msg)
        {
            MsgBrokerEventArgs args;

            args = new MsgBrokerEventArgs(msg.MsgName, msg);

            RaiseMessageRecevied(args);
        }
        public main_menuControl()
        {
            this.InitializeComponent();
            IsFavoritePanel               = false;
            arg                           = new MsgBroker.MsgBrokerMsg();
            playCollection                = new PlaylistCollection();
            myFavoriteMgr                 = MyfavoritelistMgr.instance();
            result_playlist.DataContext   = playCollection;
            favorite_playlist.DataContext = myFavoriteMgr.MyfavoriteCollection;

            favoritelist_Content.Visibility = Visibility.Hidden;
        }
Ejemplo n.º 11
0
 private void confirm_Click(object sender, RoutedEventArgs e)
 {
     MsgBroker.MsgBrokerMsg arg = new MsgBroker.MsgBrokerMsg();
     arg.MsgOPCode = Orange.MsgBroker.MESSAGE_MAP.CREATE_FAVORITE_PLAYLIST;
     if (InputTxb.Text.Trim().Equals(""))
     {
         MessageBox.Show("The content is empty");
         return;
     }
     arg.MsgBody = InputTxb.Text;
     (Application.Current as App).msgBroker.SendMessage(arg);
     HideThisUsercontrol();
 }
        private void mn_pop_btn_Click(object sender, System.Windows.RoutedEventArgs e)
        {
            url = "http://115.71.236.224:8081/getBillboardChart";

            musicCollection.Clear();
            MsgBroker.MsgBrokerMsg arg = new MsgBroker.MsgBrokerMsg();
            arg.MsgOPCode = UI_CONTROL.PROGRESS_SHOW;
            Orange.Util.UI_Flag.IsChart = true;
            (Application.Current as App).msgBroker.SendMessage(arg);
            Thread thread = new Thread(new ThreadStart(ParsingThread));

            thread.Start();
        }
        private void confirm_Click(object sender, System.Windows.RoutedEventArgs e)
        {
            if (RenameTxb.Text.Trim().Equals(""))
            {
                MessageBox.Show("Empty title"); return;
            }


            item.title = RenameTxb.Text;
            MsgBroker.MsgBrokerMsg arg = new MsgBroker.MsgBrokerMsg();
            arg.MsgOPCode = Orange.MsgBroker.UI_CONTROL.RefreshMyplayList;

            (Application.Current as App).msgBroker.SendMessage(arg);
            CloseUserControl();
        }
 void TrayToggleSwitch_IsCheckedChanged(object sender, EventArgs e)
 {
     MsgBroker.MsgBrokerMsg arg = new MsgBroker.MsgBrokerMsg();
     if (Properties.Settings.Default.IsTray)
     {
         Properties.Settings.Default.IsTray = false;
         arg.MsgOPCode = UI_CONTROL.DEACTIVETRAY;
         (Application.Current as App).msgBroker.SendMessage(arg);
     }
     else
     {
         Properties.Settings.Default.IsTray = true;
         arg.MsgOPCode = UI_CONTROL.ACTIVETRAY;
         (Application.Current as App).msgBroker.SendMessage(arg);
     }
 }
 private void TopmostToggleSwitch_IsCheckedChanged(object sender, EventArgs e)
 {
     if (Config.IsTopMost)
     {
         TopmostToggleSwitch.IsChecked = Config.IsTopMost = false;
         MsgBroker.MsgBrokerMsg arg = new MsgBroker.MsgBrokerMsg();
         arg.MsgOPCode = UI_CONTROL.DisableTopmost;
         (Application.Current as App).msgBroker.SendMessage(arg);
     }
     else
     {
         TopmostToggleSwitch.IsChecked = Config.IsTopMost = true;
         MsgBroker.MsgBrokerMsg arg = new MsgBroker.MsgBrokerMsg();
         arg.MsgOPCode = UI_CONTROL.SetTopmost;
         (Application.Current as App).msgBroker.SendMessage(arg);
     }
 }
        private void Load_Playlist(string list_name)
        {
            HideFavoriteList();

            /*
             #   특정 플레이 리스트 요청
             #  /getPlayList?title="단어"
             #  response-> getMelonChart했을때랑랑 같음
             */


            url_yotube = "http://115.71.236.224:8081/getPlayList?title=" + list_name;

            musicCollection.Clear();
            MsgBroker.MsgBrokerMsg arg = new MsgBroker.MsgBrokerMsg();
            arg.MsgOPCode = UI_CONTROL.PROGRESS_SHOW;
            Orange.Util.UI_Flag.IsChart = true;
            (Application.Current as App).msgBroker.SendMessage(arg);

            Thread thread = new Thread(new ThreadStart(ParsingThread));

            thread.Start();
        }
 public MsgBrokerEventArgs(string name, MsgBrokerMsg body)
 {
     MsgName = name;
     Message = body;
 }