Skip to content

Commit

Permalink
Add BetWindow and update ServiceReference.
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanDeveloper committed Jun 12, 2017
1 parent 32d142d commit 217eefa
Show file tree
Hide file tree
Showing 44 changed files with 803 additions and 154 deletions.
4 changes: 3 additions & 1 deletion LigaManagerBettorClient/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_IBettorClientService" />
<binding name="BasicHttpBinding_IBettorClientService" closeTimeout="00:10:00" openTimeout="00:10:00" sendTimeout="00:10:00" maxReceivedMessageSize="2147483647" maxBufferPoolSize="2147483647" messageEncoding="Text">
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
</binding>
</basicHttpBinding>
</bindings>
<client>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,10 @@
</xs:sequence>
</xs:complexType>
<xs:element name="ArrayOfBettor" nillable="true" type="tns:ArrayOfBettor" />
<xs:complexType name="ArrayOfSeason">
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="unbounded" name="Season" nillable="true" type="tns:Season" />
</xs:sequence>
</xs:complexType>
<xs:element name="ArrayOfSeason" nillable="true" type="tns:ArrayOfSeason" />
</xs:schema>
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,41 @@ public interface IBettorClientService {
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/ILigaManagerService/GetBettors", ReplyAction="http://tempuri.org/ILigaManagerService/GetBettorsResponse")]
System.Threading.Tasks.Task<LigaManagerServer.Models.Bettor[]> GetBettorsAsync();

[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IBettorClientService/Login", ReplyAction="http://tempuri.org/IBettorClientService/LoginResponse")]
bool Login(string name);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/ILigaManagerService/GetBettor", ReplyAction="http://tempuri.org/ILigaManagerService/GetBettorResponse")]
LigaManagerServer.Models.Bettor GetBettor(string nickname);

[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IBettorClientService/Login", ReplyAction="http://tempuri.org/IBettorClientService/LoginResponse")]
System.Threading.Tasks.Task<bool> LoginAsync(string name);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/ILigaManagerService/GetBettor", ReplyAction="http://tempuri.org/ILigaManagerService/GetBettorResponse")]
System.Threading.Tasks.Task<LigaManagerServer.Models.Bettor> GetBettorAsync(string nickname);

[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/ILigaManagerService/GetSeasons", ReplyAction="http://tempuri.org/ILigaManagerService/GetSeasonsResponse")]
LigaManagerServer.Models.Season[] GetSeasons();

[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/ILigaManagerService/GetSeasons", ReplyAction="http://tempuri.org/ILigaManagerService/GetSeasonsResponse")]
System.Threading.Tasks.Task<LigaManagerServer.Models.Season[]> GetSeasonsAsync();

[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IBettorClientService/IsValidNickname", ReplyAction="http://tempuri.org/IBettorClientService/IsValidNicknameResponse")]
bool IsValidNickname(string name);

[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IBettorClientService/IsValidNickname", ReplyAction="http://tempuri.org/IBettorClientService/IsValidNicknameResponse")]
System.Threading.Tasks.Task<bool> IsValidNicknameAsync(string name);

[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IBettorClientService/AddBet", ReplyAction="http://tempuri.org/IBettorClientService/AddBetResponse")]
bool AddBet(LigaManagerServer.Models.Bet bet);

[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IBettorClientService/AddBet", ReplyAction="http://tempuri.org/IBettorClientService/AddBetResponse")]
System.Threading.Tasks.Task<bool> AddBetAsync(LigaManagerServer.Models.Bet bet);

[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IBettorClientService/ChangeBet", ReplyAction="http://tempuri.org/IBettorClientService/ChangeBetResponse")]
bool ChangeBet(LigaManagerServer.Models.Bet bet);

[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IBettorClientService/ChangeBet", ReplyAction="http://tempuri.org/IBettorClientService/ChangeBetResponse")]
System.Threading.Tasks.Task<bool> ChangeBetAsync(LigaManagerServer.Models.Bet bet);

[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IBettorClientService/GetBet", ReplyAction="http://tempuri.org/IBettorClientService/GetBetResponse")]
LigaManagerServer.Models.Bet GetBet(LigaManagerServer.Models.Match match, LigaManagerServer.Models.Bettor bettor);

[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IBettorClientService/GetBet", ReplyAction="http://tempuri.org/IBettorClientService/GetBetResponse")]
System.Threading.Tasks.Task<LigaManagerServer.Models.Bet> GetBetAsync(LigaManagerServer.Models.Match match, LigaManagerServer.Models.Bettor bettor);
}

[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
Expand Down Expand Up @@ -97,12 +121,28 @@ public LigaManagerServer.Models.Bettor[] GetBettors() {
return base.Channel.GetBettorsAsync();
}

public bool Login(string name) {
return base.Channel.Login(name);
public LigaManagerServer.Models.Bettor GetBettor(string nickname) {
return base.Channel.GetBettor(nickname);
}

public System.Threading.Tasks.Task<LigaManagerServer.Models.Bettor> GetBettorAsync(string nickname) {
return base.Channel.GetBettorAsync(nickname);
}

public LigaManagerServer.Models.Season[] GetSeasons() {
return base.Channel.GetSeasons();
}

public System.Threading.Tasks.Task<bool> LoginAsync(string name) {
return base.Channel.LoginAsync(name);
public System.Threading.Tasks.Task<LigaManagerServer.Models.Season[]> GetSeasonsAsync() {
return base.Channel.GetSeasonsAsync();
}

public bool IsValidNickname(string name) {
return base.Channel.IsValidNickname(name);
}

public System.Threading.Tasks.Task<bool> IsValidNicknameAsync(string name) {
return base.Channel.IsValidNicknameAsync(name);
}

public bool AddBet(LigaManagerServer.Models.Bet bet) {
Expand All @@ -112,5 +152,21 @@ public bool AddBet(LigaManagerServer.Models.Bet bet) {
public System.Threading.Tasks.Task<bool> AddBetAsync(LigaManagerServer.Models.Bet bet) {
return base.Channel.AddBetAsync(bet);
}

public bool ChangeBet(LigaManagerServer.Models.Bet bet) {
return base.Channel.ChangeBet(bet);
}

public System.Threading.Tasks.Task<bool> ChangeBetAsync(LigaManagerServer.Models.Bet bet) {
return base.Channel.ChangeBetAsync(bet);
}

public LigaManagerServer.Models.Bet GetBet(LigaManagerServer.Models.Match match, LigaManagerServer.Models.Bettor bettor) {
return base.Channel.GetBet(match, bettor);
}

public System.Threading.Tasks.Task<LigaManagerServer.Models.Bet> GetBetAsync(LigaManagerServer.Models.Match match, LigaManagerServer.Models.Bettor bettor) {
return base.Channel.GetBetAsync(match, bettor);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,42 @@
<wsdl:message name="IBettorClientService_GetBettors_OutputMessage">
<wsdl:part name="parameters" element="tns:GetBettorsResponse" />
</wsdl:message>
<wsdl:message name="IBettorClientService_Login_InputMessage">
<wsdl:part name="parameters" element="tns:Login" />
<wsdl:message name="IBettorClientService_GetBettor_InputMessage">
<wsdl:part name="parameters" element="tns:GetBettor" />
</wsdl:message>
<wsdl:message name="IBettorClientService_Login_OutputMessage">
<wsdl:part name="parameters" element="tns:LoginResponse" />
<wsdl:message name="IBettorClientService_GetBettor_OutputMessage">
<wsdl:part name="parameters" element="tns:GetBettorResponse" />
</wsdl:message>
<wsdl:message name="IBettorClientService_GetSeasons_InputMessage">
<wsdl:part name="parameters" element="tns:GetSeasons" />
</wsdl:message>
<wsdl:message name="IBettorClientService_GetSeasons_OutputMessage">
<wsdl:part name="parameters" element="tns:GetSeasonsResponse" />
</wsdl:message>
<wsdl:message name="IBettorClientService_IsValidNickname_InputMessage">
<wsdl:part name="parameters" element="tns:IsValidNickname" />
</wsdl:message>
<wsdl:message name="IBettorClientService_IsValidNickname_OutputMessage">
<wsdl:part name="parameters" element="tns:IsValidNicknameResponse" />
</wsdl:message>
<wsdl:message name="IBettorClientService_AddBet_InputMessage">
<wsdl:part name="parameters" element="tns:AddBet" />
</wsdl:message>
<wsdl:message name="IBettorClientService_AddBet_OutputMessage">
<wsdl:part name="parameters" element="tns:AddBetResponse" />
</wsdl:message>
<wsdl:message name="IBettorClientService_ChangeBet_InputMessage">
<wsdl:part name="parameters" element="tns:ChangeBet" />
</wsdl:message>
<wsdl:message name="IBettorClientService_ChangeBet_OutputMessage">
<wsdl:part name="parameters" element="tns:ChangeBetResponse" />
</wsdl:message>
<wsdl:message name="IBettorClientService_GetBet_InputMessage">
<wsdl:part name="parameters" element="tns:GetBet" />
</wsdl:message>
<wsdl:message name="IBettorClientService_GetBet_OutputMessage">
<wsdl:part name="parameters" element="tns:GetBetResponse" />
</wsdl:message>
<wsdl:portType name="IBettorClientService">
<wsdl:operation name="GetMatches">
<wsdl:input wsaw:Action="http://tempuri.org/ILigaManagerService/GetMatches" message="tns:IBettorClientService_GetMatches_InputMessage" />
Expand All @@ -50,14 +74,30 @@
<wsdl:input wsaw:Action="http://tempuri.org/ILigaManagerService/GetBettors" message="tns:IBettorClientService_GetBettors_InputMessage" />
<wsdl:output wsaw:Action="http://tempuri.org/ILigaManagerService/GetBettorsResponse" message="tns:IBettorClientService_GetBettors_OutputMessage" />
</wsdl:operation>
<wsdl:operation name="Login">
<wsdl:input wsaw:Action="http://tempuri.org/IBettorClientService/Login" message="tns:IBettorClientService_Login_InputMessage" />
<wsdl:output wsaw:Action="http://tempuri.org/IBettorClientService/LoginResponse" message="tns:IBettorClientService_Login_OutputMessage" />
<wsdl:operation name="GetBettor">
<wsdl:input wsaw:Action="http://tempuri.org/ILigaManagerService/GetBettor" message="tns:IBettorClientService_GetBettor_InputMessage" />
<wsdl:output wsaw:Action="http://tempuri.org/ILigaManagerService/GetBettorResponse" message="tns:IBettorClientService_GetBettor_OutputMessage" />
</wsdl:operation>
<wsdl:operation name="GetSeasons">
<wsdl:input wsaw:Action="http://tempuri.org/ILigaManagerService/GetSeasons" message="tns:IBettorClientService_GetSeasons_InputMessage" />
<wsdl:output wsaw:Action="http://tempuri.org/ILigaManagerService/GetSeasonsResponse" message="tns:IBettorClientService_GetSeasons_OutputMessage" />
</wsdl:operation>
<wsdl:operation name="IsValidNickname">
<wsdl:input wsaw:Action="http://tempuri.org/IBettorClientService/IsValidNickname" message="tns:IBettorClientService_IsValidNickname_InputMessage" />
<wsdl:output wsaw:Action="http://tempuri.org/IBettorClientService/IsValidNicknameResponse" message="tns:IBettorClientService_IsValidNickname_OutputMessage" />
</wsdl:operation>
<wsdl:operation name="AddBet">
<wsdl:input wsaw:Action="http://tempuri.org/IBettorClientService/AddBet" message="tns:IBettorClientService_AddBet_InputMessage" />
<wsdl:output wsaw:Action="http://tempuri.org/IBettorClientService/AddBetResponse" message="tns:IBettorClientService_AddBet_OutputMessage" />
</wsdl:operation>
<wsdl:operation name="ChangeBet">
<wsdl:input wsaw:Action="http://tempuri.org/IBettorClientService/ChangeBet" message="tns:IBettorClientService_ChangeBet_InputMessage" />
<wsdl:output wsaw:Action="http://tempuri.org/IBettorClientService/ChangeBetResponse" message="tns:IBettorClientService_ChangeBet_OutputMessage" />
</wsdl:operation>
<wsdl:operation name="GetBet">
<wsdl:input wsaw:Action="http://tempuri.org/IBettorClientService/GetBet" message="tns:IBettorClientService_GetBet_InputMessage" />
<wsdl:output wsaw:Action="http://tempuri.org/IBettorClientService/GetBetResponse" message="tns:IBettorClientService_GetBet_OutputMessage" />
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="BasicHttpBinding_IBettorClientService" type="tns:IBettorClientService">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
Expand Down Expand Up @@ -88,8 +128,26 @@
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="Login">
<soap:operation soapAction="http://tempuri.org/IBettorClientService/Login" style="document" />
<wsdl:operation name="GetBettor">
<soap:operation soapAction="http://tempuri.org/ILigaManagerService/GetBettor" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="GetSeasons">
<soap:operation soapAction="http://tempuri.org/ILigaManagerService/GetSeasons" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="IsValidNickname">
<soap:operation soapAction="http://tempuri.org/IBettorClientService/IsValidNickname" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
Expand All @@ -106,6 +164,24 @@
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="ChangeBet">
<soap:operation soapAction="http://tempuri.org/IBettorClientService/ChangeBet" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="GetBet">
<soap:operation soapAction="http://tempuri.org/IBettorClientService/GetBet" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="BettorClientService">
<wsdl:port name="BasicHttpBinding_IBettorClientService" binding="tns:BasicHttpBinding_IBettorClientService">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,24 +41,50 @@
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Login">
<xs:element name="GetBettor">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="nickname" nillable="true" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="GetBettorResponse">
<xs:complexType>
<xs:sequence>
<xs:element xmlns:q6="http://schemas.datacontract.org/2004/07/LigaManagerServer.Models" minOccurs="0" name="GetBettorResult" nillable="true" type="q6:Bettor" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="GetSeasons">
<xs:complexType>
<xs:sequence />
</xs:complexType>
</xs:element>
<xs:element name="GetSeasonsResponse">
<xs:complexType>
<xs:sequence>
<xs:element xmlns:q7="http://schemas.datacontract.org/2004/07/LigaManagerServer.Models" minOccurs="0" name="GetSeasonsResult" nillable="true" type="q7:ArrayOfSeason" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="IsValidNickname">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="name" nillable="true" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="LoginResponse">
<xs:element name="IsValidNicknameResponse">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="LoginResult" type="xs:boolean" />
<xs:element minOccurs="0" name="IsValidNicknameResult" type="xs:boolean" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="AddBet">
<xs:complexType>
<xs:sequence>
<xs:element xmlns:q6="http://schemas.datacontract.org/2004/07/LigaManagerServer.Models" minOccurs="0" name="bet" nillable="true" type="q6:Bet" />
<xs:element xmlns:q8="http://schemas.datacontract.org/2004/07/LigaManagerServer.Models" minOccurs="0" name="bet" nillable="true" type="q8:Bet" />
</xs:sequence>
</xs:complexType>
</xs:element>
Expand All @@ -69,4 +95,33 @@
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="ChangeBet">
<xs:complexType>
<xs:sequence>
<xs:element xmlns:q9="http://schemas.datacontract.org/2004/07/LigaManagerServer.Models" minOccurs="0" name="bet" nillable="true" type="q9:Bet" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="ChangeBetResponse">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="ChangeBetResult" type="xs:boolean" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="GetBet">
<xs:complexType>
<xs:sequence>
<xs:element xmlns:q10="http://schemas.datacontract.org/2004/07/LigaManagerServer.Models" minOccurs="0" name="match" nillable="true" type="q10:Match" />
<xs:element xmlns:q11="http://schemas.datacontract.org/2004/07/LigaManagerServer.Models" minOccurs="0" name="bettor" nillable="true" type="q11:Bettor" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="GetBetResponse">
<xs:complexType>
<xs:sequence>
<xs:element xmlns:q12="http://schemas.datacontract.org/2004/07/LigaManagerServer.Models" minOccurs="0" name="GetBetResult" nillable="true" type="q12:Bet" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
7 changes: 0 additions & 7 deletions LigaManagerBettorClient/Controllers/BetsWindowController.cs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@

namespace LigaManagerBettorClient.Controllers
{
public class BettorWindowController
public class BettorRankingWindowController
{
public MainWindow MainWindow { get; set; }
private BettorWindow _view;
private BettorWindowViewModel _viewModel;
private BettorRankingWindow _view;
private BettorRankingWindowViewModel _viewModel;
private BettorClientServiceClient _bettorClient;
public void Initialize()
{
_view = new BettorWindow();
_view = new BettorRankingWindow();
_bettorClient = new BettorClientServiceClient();
var bettors = _bettorClient.GetBettors();
_viewModel = new BettorWindowViewModel
_viewModel = new BettorRankingWindowViewModel
{
Bettors = bettors.ToList()
};
Expand Down
Loading

0 comments on commit 217eefa

Please sign in to comment.