protected void Page_Load(object sender, EventArgs e) { ImagesFileData = (IEnumerable<ImageFileData>)Session["ImagesFileData"]; Manager = (ImageServiceClientManager)Session["Manager"]; ImagesFileData = Manager.GetAllImagesInfo(true); if (ImagesFileData != null) { GridView1.DataSource = ImagesFileData; GridView1.DataBind(); } }
public ImageServiceClientForm() { InitializeComponent(); IImageService channel = null; try { channelFactory = new ChannelFactory<IImageService>("streamingBinding"); channel = channelFactory.CreateChannel(); } catch (Exception) { MessageBox.Show("Can't create client channel!"); return; } IClientNotifier notyfier = new WindowsFormsNotifier(); manager = new ImageServiceClientManager(channel, notyfier, UpdateImagesInfoGrid); }
public MainWindow() { InitializeComponent(); model = (DataGridModel)imageFilesGrid.DataContext; IImageService channel = null; try { channelFactory = new ChannelFactory<IImageService>("streamingBinding"); channel = channelFactory.CreateChannel(); } catch (Exception) { MessageBox.Show("Can't create client channel!"); return; } IClientNotifier notyfier = new WPFNotifier(); manager = new ImageServiceClientManager(channel, notyfier, UpdateImagesInfoGrid); }
protected void ResetConnection_Click(object sender, EventArgs e) { ChannelFactory<IImageService> ChannelFactory; IClientNotifier Notyfier = new WebNotifier(); IImageService channel = null; try { ChannelFactory = new ChannelFactory<IImageService>("streamingBinding"); channel = ChannelFactory.CreateChannel(); } catch (Exception) { Notyfier.Error("Can't create client channel!"); return; } ImageServiceClientManager Manager = new ImageServiceClientManager(channel, Notyfier, null); IEnumerable<ImageFileData> ImagesFileData = Manager.GetAllImagesInfo(true); Session["Manager"] = Manager; Session["ImagesFileData"] = ImagesFileData; }