Esempio n. 1
0
        void btnSelectDefaultSeries_Click(object sender, RoutedEventArgs e)
        {
            AnimeGroupVM grp = this.DataContext as AnimeGroupVM;

            if (grp == null)
            {
                return;
            }

            Window wdw = Window.GetWindow(this);

            SelectDefaultSeriesForm frm = new SelectDefaultSeriesForm();

            frm.Owner = wdw;
            frm.Init(grp);
            bool?result = frm.ShowDialog();

            if (result.Value)
            {
                // update info
                grp.DefaultAnimeSeriesID = frm.SelectedSeriesID.Value;
                JMMServerVM.Instance.clientBinaryHTTP.SetDefaultSeriesForGroup(grp.AnimeGroupID.Value, frm.SelectedSeriesID.Value);
            }
        }
        void btnSelectDefaultSeries_Click(object sender, RoutedEventArgs e)
        {
            VM_AnimeGroup_User grp = DataContext as VM_AnimeGroup_User;

            if (grp == null)
            {
                return;
            }

            Window wdw = Window.GetWindow(this);

            SelectDefaultSeriesForm frm = new SelectDefaultSeriesForm();

            frm.Owner = wdw;
            frm.Init(grp);
            bool?result = frm.ShowDialog();

            if (result.Value)
            {
                // update info
                grp.DefaultAnimeSeriesID = frm.SelectedSeriesID.Value;
                VM_ShokoServer.Instance.ShokoServices.SetDefaultSeriesForGroup(grp.AnimeGroupID, frm.SelectedSeriesID.Value);
            }
        }