/// <summary> /// Initialization. /// </summary> /// <param name="tmp">Host.</param> /// <param name="video">Videos id</param> /// <param name="user">Users id</param> public VideoPlayer(EngServiceClient tmp, int video, int?user) : this() { _proxy = tmp; videoId = video; this.user = user; txtName.Text = _proxy.GetItemProperty(video, ServerData.Video, PropertyData.Name); }
/// <summary> /// Initialization. /// </summary> /// <param name="tmp">Host.</param> /// <param name="user">Id of player.</param> /// <param name="cat">Id of category.</param> /// <param name="data">Type of category.</param> public WordsGamePlayer(EngServiceClient tmp, int user, int cat, ServerData data) : this() { _proxy = tmp; _user = user; _catId = cat; _type = data; _level = Convert.ToInt32(_proxy.GetItemProperty(user, ServerData.User, PropertyData.Level)); }
/// <summary> /// Initialization. /// </summary> /// <param name="tmp">Host.</param> /// <param name="video">Id of video to be payed.</param> /// <param name="user">Id of player.</param> public GamePlayer(EngServiceClient tmp, int video, int?user) : this() { _proxy = tmp; videoId = video; this.user = user; txtName.Text = _proxy.GetItemProperty(video, ServerData.Video, PropertyData.Name); level = Convert.ToInt32(_proxy.GetItemProperty(Convert.ToInt32(user), ServerData.User, PropertyData.Level)); _game = _proxy.GetItemsId("Video player", ServerData.Game); }
//Check connection. public MainWindow() { InitializeComponent(); DeleteTemporary(); _proxy = new EngServiceClient(); try { _proxy.Open(); if (_proxy.InnerChannel.State != CommunicationState.Opened) { throw new EndpointNotFoundException(); } } catch (EndpointNotFoundException) { MessageBox.Show("There is no connection to a service.", "Error", MessageBoxButton.OK, MessageBoxImage.Error); Close(); } }
//Initialize '_proxy' and fields. public AddWordsCategory(EngServiceClient tmp, int catId) : this(tmp) { id = catId; txtName.Text = _proxy.GetItemProperty(catId, ServerData.WordCategory, PropertyData.Name); txtAbbr.Text = _proxy.GetItemProperty(catId, ServerData.WordCategory, PropertyData.Abbreviation); }
//Initialize '_proxy'. public AddWordsCategory(EngServiceClient tmp) : this() { _proxy = tmp; }
//Initialize '_proxy' and fields. public AddCategory(EngServiceClient tmp, ServerData type, int catId) : this(tmp, type) { id = catId; txtName.Text = _proxy.GetItemProperty(catId, type, PropertyData.Name); }
//Initialize '_proxy'. public AddCategory(EngServiceClient tmp, ServerData type) : this() { _proxy = tmp; dataType = type; }
/// <summary> /// Initialize 'videoId' and host. /// </summary> /// <param name="tmp">Host.</param> /// <param name="video">Videos id.</param> public GenerateSubs(EngServiceClient tmp, int video) : this() { _proxy = tmp; videoId = video; }
/// <summary> /// Set default value. /// </summary> /// <param name="tmp">Host.</param> /// <param name="video">Videos id.</param> /// <param name="pos">Posituion.</param> public AddSubItem(EngServiceClient tmp, int video, TimeSpan pos) : this(tmp, video) { start = pos; }
/// <summary> /// Initialize 'videoId' and host. /// </summary> /// <param name="tmp">Host.</param> /// <param name="video">Videos id.</param> public AddSubItem(EngServiceClient tmp, int video) : this() { _proxy = tmp; videoId = video; GeneratedSub.Name = null; }
/// <summary> /// Initialization. /// </summary> /// <param name="proxy">Server.</param> /// <param name="id">Books id.</param> /// <param name="usersId">Users id.</param> public BookReader(EngServiceClient proxy, int id, int usersId) : this() { _proxy = proxy; book = id; user = usersId; }
//Initialize '_proxy'. public AddWordsExtraData(EngServiceClient tmp, ServerData type) : this() { _proxy = tmp; dataType = type; }