예제 #1
0
 private void UpdateResource()
 {
     chbSelectAll.Checked = false;
     if (grid.SelectedRows.Count > 0)
     {
         var resouce = grid.SelectedRows[0].DataBoundItem as PageResource;
         if (Category == PageResourceCategory.Flash)
         {
             using (var flash = new FlashDialog())
             {
                 flash.IsCreate = false;
                 flash.Resource = resouce;
                 flash.ShowDialog();
             }
         }
         else
         {
             using (var image = new ImageDialog())
             {
                 image.IsCreate = false;
                 image.Resource = resouce;
                 image.ShowDialog();
             }
         }
     }
 }
예제 #2
0
 private void AddResource()
 {
     chbSelectAll.Checked = false;
     if (Category == PageResourceCategory.Flash)
     {
         using (var flash = new FlashDialog())
         {
             flash.IsCreate = true;
             flash.ShowDialog();
         }
     }
     else
     {
         using (var image = new ImageDialog())
         {
             image.IsCreate = true;
             image.ShowDialog();
         }
     }
 }