mirror of
https://github.com/vdemydiuk/mtapi.git
synced 2026-07-29 11:37:48 +00:00
Added projects MtApi4 and MtApi5
This commit is contained in:
+1180
File diff suppressed because it is too large
Load Diff
Executable
+861
@@ -0,0 +1,861 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using System.Security.Cryptography;
|
||||
using System.IO;
|
||||
using MtApi;
|
||||
using System.Net;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace TestApiClientUI
|
||||
{
|
||||
public partial class Form1 : Form
|
||||
{
|
||||
delegate void PerformCommandHandler();
|
||||
|
||||
private List<PerformCommandHandler> GroupOrderCommands = new List<PerformCommandHandler>();
|
||||
|
||||
private MtApiClient apiClient = new MtApiClient();
|
||||
|
||||
public Form1()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
apiClient.QuoteUpdated += apiClient_QuoteUpdated;
|
||||
apiClient.QuoteAdded += apiClient_QuoteAdded;
|
||||
apiClient.QuoteRemoved += apiClient_QuoteRemoved;
|
||||
apiClient.ConnectionStateChanged += apiClient_ConnectionStateChanged;
|
||||
|
||||
initOrderCommandsGroup();
|
||||
}
|
||||
|
||||
private void initOrderCommandsGroup()
|
||||
{
|
||||
GroupOrderCommands.Add(new PerformCommandHandler(closeOrders));
|
||||
GroupOrderCommands.Add(new PerformCommandHandler(closeOrdersBy));
|
||||
GroupOrderCommands.Add(new PerformCommandHandler(orderClosePrice));
|
||||
GroupOrderCommands.Add(new PerformCommandHandler(orderCloseTime));
|
||||
GroupOrderCommands.Add(new PerformCommandHandler(orderComment));
|
||||
GroupOrderCommands.Add(new PerformCommandHandler(orderCommission));
|
||||
GroupOrderCommands.Add(new PerformCommandHandler(orderDelete));
|
||||
GroupOrderCommands.Add(new PerformCommandHandler(orderExpiration));
|
||||
GroupOrderCommands.Add(new PerformCommandHandler(orderLots));
|
||||
GroupOrderCommands.Add(new PerformCommandHandler(orderMagicNumber));
|
||||
GroupOrderCommands.Add(new PerformCommandHandler(orderModify));
|
||||
GroupOrderCommands.Add(new PerformCommandHandler(orderOpenPrice));
|
||||
GroupOrderCommands.Add(new PerformCommandHandler(orderOpenTime));
|
||||
GroupOrderCommands.Add(new PerformCommandHandler(orderPrint));
|
||||
GroupOrderCommands.Add(new PerformCommandHandler(orderProfit));
|
||||
GroupOrderCommands.Add(new PerformCommandHandler(orderSelect));
|
||||
GroupOrderCommands.Add(new PerformCommandHandler(ordersHistoryTotal));
|
||||
GroupOrderCommands.Add(new PerformCommandHandler(orderStopLoss));
|
||||
GroupOrderCommands.Add(new PerformCommandHandler(ordersTotal));
|
||||
GroupOrderCommands.Add(new PerformCommandHandler(orderSwap));
|
||||
GroupOrderCommands.Add(new PerformCommandHandler(orderSymbol));
|
||||
GroupOrderCommands.Add(new PerformCommandHandler(orderTakeProfit));
|
||||
GroupOrderCommands.Add(new PerformCommandHandler(orderTicket));
|
||||
GroupOrderCommands.Add(new PerformCommandHandler(orderType));
|
||||
}
|
||||
|
||||
private void RunOnUIThread(Action action)
|
||||
{
|
||||
this.BeginInvoke(action);
|
||||
}
|
||||
|
||||
private void apiClient_ConnectionStateChanged(object sender, MtConnectionEventArgs e)
|
||||
{
|
||||
RunOnUIThread(() =>
|
||||
{
|
||||
toolStripStatusConnection.Text = e.Status.ToString();
|
||||
});
|
||||
|
||||
switch (e.Status)
|
||||
{
|
||||
case MtConnectionState.Connected:
|
||||
RunOnUIThread(onConnected);
|
||||
break;
|
||||
case MtConnectionState.Disconnected:
|
||||
case MtConnectionState.Failed:
|
||||
RunOnUIThread(onDisconnected);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void apiClient_QuoteRemoved(object sender, MtQuoteEventArgs e)
|
||||
{
|
||||
string instrument = e.Quote.Instrument;
|
||||
|
||||
RunOnUIThread(() =>
|
||||
{
|
||||
removeQuote(e.Quote);
|
||||
});
|
||||
}
|
||||
|
||||
private void apiClient_QuoteAdded(object sender, MtQuoteEventArgs e)
|
||||
{
|
||||
RunOnUIThread(() =>
|
||||
{
|
||||
addNewQuote(e.Quote);
|
||||
});
|
||||
}
|
||||
|
||||
private void apiClient_QuoteUpdated(object sender, string symbol, double bid, double ask)
|
||||
{
|
||||
this.BeginInvoke((Action)(() =>
|
||||
{
|
||||
changeQuote(symbol, bid, ask);
|
||||
}));
|
||||
}
|
||||
|
||||
private void addNewQuote(MtQuote quote)
|
||||
{
|
||||
if (quote != null
|
||||
&& string.IsNullOrEmpty(quote.Instrument) == false
|
||||
&& listViewQuotes.Items.ContainsKey(quote.Instrument) == false)
|
||||
{
|
||||
var item = new ListViewItem(quote.Instrument);
|
||||
item.Name = quote.Instrument;
|
||||
item.SubItems.Add(quote.Bid.ToString());
|
||||
item.SubItems.Add(quote.Ask.ToString());
|
||||
item.SubItems.Add("1");
|
||||
listViewQuotes.Items.Add(item);
|
||||
}
|
||||
else
|
||||
{
|
||||
var item = listViewQuotes.Items[quote.Instrument];
|
||||
int feedCount = 0;
|
||||
int.TryParse(item.SubItems[3].Text, out feedCount);
|
||||
feedCount++;
|
||||
item.SubItems[3].Text = feedCount.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
private void removeQuote(MtQuote quote)
|
||||
{
|
||||
if (quote != null
|
||||
&& string.IsNullOrEmpty(quote.Instrument) == false
|
||||
&& listViewQuotes.Items.ContainsKey(quote.Instrument) == true)
|
||||
{
|
||||
var item = listViewQuotes.Items[quote.Instrument];
|
||||
int feedCount = 0;
|
||||
int.TryParse(item.SubItems[3].Text, out feedCount);
|
||||
feedCount--;
|
||||
if (feedCount <= 0)
|
||||
{
|
||||
listViewQuotes.Items.RemoveByKey(quote.Instrument);
|
||||
}
|
||||
else
|
||||
{
|
||||
item.SubItems[3].Text = feedCount.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void changeQuote(string symbol, double bid, double ask)
|
||||
{
|
||||
if (string.IsNullOrEmpty(symbol) == false)
|
||||
{
|
||||
if (listViewQuotes.Items.ContainsKey(symbol) == true)
|
||||
{
|
||||
var item = listViewQuotes.Items[symbol];
|
||||
item.SubItems[1].Text = bid.ToString();
|
||||
item.SubItems[2].Text = ask.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void onConnected()
|
||||
{
|
||||
var quotes = apiClient.GetQuotes();
|
||||
|
||||
if (quotes != null)
|
||||
{
|
||||
foreach (var quote in quotes)
|
||||
{
|
||||
addNewQuote(quote);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void onDisconnected()
|
||||
{
|
||||
listViewQuotes.Items.Clear();
|
||||
}
|
||||
|
||||
private void buttonConnect_Click(object sender, EventArgs e)
|
||||
{
|
||||
string serverName = textBoxServerName.Text;
|
||||
|
||||
int port;
|
||||
int.TryParse(textBoxPort.Text, out port);
|
||||
|
||||
if (string.IsNullOrEmpty(serverName))
|
||||
apiClient.BeginConnect(port);
|
||||
else
|
||||
apiClient.BeginConnect(serverName, port);
|
||||
|
||||
onConnected();
|
||||
}
|
||||
|
||||
private void buttonDisconnect_Click(object sender, EventArgs e)
|
||||
{
|
||||
apiClient.BeginDisconnect();
|
||||
}
|
||||
|
||||
private void Form1_FormClosing(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
apiClient.BeginDisconnect();
|
||||
}
|
||||
|
||||
private void sendOrder(string symbol, TradeOperation command, double volume, double price, int slippage, double stoploss, double takeprofit
|
||||
, string comment, int magic, DateTime expiration, Color arrow_color)
|
||||
{
|
||||
int orderId = apiClient.OrderSend(symbol, command, volume, price, slippage, stoploss, takeprofit, comment, magic, expiration, arrow_color);
|
||||
|
||||
RunOnUIThread(() =>
|
||||
{
|
||||
if (orderId >= 0)
|
||||
{
|
||||
listBoxSendedOrders.Items.Add(orderId);
|
||||
}
|
||||
|
||||
addToLog(string.Format("Sended order result: ticketId = {0}, volume - {1}", orderId, volume, slippage));
|
||||
});
|
||||
}
|
||||
|
||||
private void button1_Click(object sender, EventArgs e)
|
||||
{
|
||||
string symbol = textBoxOrderSymbol.Text;
|
||||
|
||||
var op_command = (TradeOperation)(comboBoxOrderCommand.SelectedIndex);
|
||||
|
||||
double volume;
|
||||
double.TryParse(textBoxOrderVolume.Text, out volume);
|
||||
|
||||
double price;
|
||||
double.TryParse(textBoxOrderPrice.Text, out price);
|
||||
|
||||
int slippage = (int)numericOrderSlippage.Value;
|
||||
|
||||
double stoploss;
|
||||
double.TryParse(textBoxOrderStoploss.Text, out stoploss);
|
||||
|
||||
double takeprofit;
|
||||
double.TryParse(textBoxOrderProffit.Text, out takeprofit);
|
||||
|
||||
string comment = textBoxOrderComment.Text;
|
||||
|
||||
int magic;
|
||||
int.TryParse(textBoxOrderMagic.Text, out magic);
|
||||
|
||||
DateTime expiration = DateTime.Now;
|
||||
|
||||
Color arrow_color = new Color();
|
||||
switch (comboBoxOrderColor.SelectedIndex)
|
||||
{
|
||||
case 0:
|
||||
arrow_color = Color.Green;
|
||||
break;
|
||||
case 1:
|
||||
arrow_color = Color.Blue;
|
||||
break;
|
||||
case 2:
|
||||
arrow_color = Color.Red;
|
||||
break;
|
||||
}
|
||||
|
||||
Action a = () =>
|
||||
{
|
||||
sendOrder(symbol, op_command, volume, price, slippage, stoploss, takeprofit, comment, magic, expiration, arrow_color);
|
||||
};
|
||||
a.BeginInvoke(null, null);
|
||||
}
|
||||
|
||||
private void listViewQuotes_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (listViewQuotes.SelectedItems.Count > 0)
|
||||
{
|
||||
textBoxOrderSymbol.Text = listViewQuotes.SelectedItems[0].Text;
|
||||
txtMarketInfoSymbol.Text = listViewQuotes.SelectedItems[0].Text;
|
||||
textBoxSelectedSymbol.Text = listViewQuotes.SelectedItems[0].Text;
|
||||
}
|
||||
}
|
||||
|
||||
private void closeOrders()
|
||||
{
|
||||
if (listBoxSendedOrders.SelectedItems.Count > 0)
|
||||
{
|
||||
double volume;
|
||||
double.TryParse(textBoxOrderVolume.Text, out volume);
|
||||
|
||||
double price;
|
||||
double.TryParse(textBoxOrderPrice.Text, out price);
|
||||
|
||||
int slippage = (int)numericOrderSlippage.Value;
|
||||
|
||||
List<int> sendedOrders = new List<int>();
|
||||
|
||||
foreach (var item in listBoxSendedOrders.SelectedItems)
|
||||
{
|
||||
int orderId = (int)item;
|
||||
var result = apiClient.OrderClose(orderId, volume, price, slippage);
|
||||
|
||||
if (result == true)
|
||||
{
|
||||
sendedOrders.Add(orderId);
|
||||
}
|
||||
|
||||
addToLog(string.Format("Closed order result: {0}, ticketId = {1}, volume - {2}, slippage {3}", result, orderId, volume, slippage));
|
||||
}
|
||||
|
||||
foreach (var orderId in sendedOrders)
|
||||
{
|
||||
listBoxClosedOrders.Items.Add(orderId);
|
||||
listBoxSendedOrders.Items.Remove(orderId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void closeOrdersBy()
|
||||
{
|
||||
if (listBoxSendedOrders.SelectedItems.Count >= 1)
|
||||
{
|
||||
int ticket = int.Parse(textBoxIndexTicket.Text);
|
||||
int opposite = (int)listBoxSendedOrders.SelectedItems[0];
|
||||
|
||||
Color color = new Color();
|
||||
switch (comboBoxOrderColor.SelectedIndex)
|
||||
{
|
||||
case 0:
|
||||
color = Color.Green;
|
||||
break;
|
||||
case 1:
|
||||
color = Color.Blue;
|
||||
break;
|
||||
case 2:
|
||||
color = Color.Red;
|
||||
break;
|
||||
}
|
||||
|
||||
var result = apiClient.OrderCloseBy(ticket, opposite, color);
|
||||
|
||||
addToLog(string.Format("ClosedBy order result: {0}, ticketId = {1}, opposite {2}", result, ticket, opposite));
|
||||
}
|
||||
}
|
||||
|
||||
private void orderClosePrice()
|
||||
{
|
||||
var result = apiClient.OrderClosePrice();
|
||||
textBoxOrderPrice.Text = result.ToString();
|
||||
addToLog(string.Format("OrderClosePrice result: {0}", result));
|
||||
}
|
||||
|
||||
private void orderCloseTime()
|
||||
{
|
||||
var result = apiClient.OrderCloseTime();
|
||||
addToLog(string.Format("OrderCloseTime result: {0}", result));
|
||||
}
|
||||
|
||||
private void orderComment()
|
||||
{
|
||||
var result = apiClient.OrderComment();
|
||||
textBoxOrderComment.Text = result.ToString();
|
||||
addToLog(string.Format("OrderComment result: {0}", result));
|
||||
}
|
||||
|
||||
private void orderCommission()
|
||||
{
|
||||
var result = apiClient.OrderCommission();
|
||||
addToLog(string.Format("OrderCommission result: {0}", result));
|
||||
}
|
||||
|
||||
private void orderDelete()
|
||||
{
|
||||
if (listBoxSendedOrders.SelectedItems.Count >= 1)
|
||||
{
|
||||
int ticket = (int)listBoxSendedOrders.SelectedItems[0];
|
||||
|
||||
var result = apiClient.OrderDelete(ticket);
|
||||
|
||||
addToLog(string.Format("Delete order result: {0}, ticketId = {1}", result, ticket));
|
||||
}
|
||||
}
|
||||
|
||||
private void orderExpiration()
|
||||
{
|
||||
var result = apiClient.OrderExpiration();
|
||||
addToLog(string.Format("Expiration order result: {0}", result));
|
||||
}
|
||||
|
||||
private void orderLots()
|
||||
{
|
||||
var result = apiClient.OrderLots();
|
||||
addToLog(string.Format("Lots order result: {0}", result));
|
||||
}
|
||||
|
||||
private void orderMagicNumber()
|
||||
{
|
||||
var result = apiClient.OrderMagicNumber();
|
||||
addToLog(string.Format("MagicNumber order result: {0}", result));
|
||||
}
|
||||
|
||||
private void orderModify()
|
||||
{
|
||||
if (listBoxSendedOrders.SelectedItems.Count >= 1)
|
||||
{
|
||||
int ticket = (int)listBoxSendedOrders.SelectedItems[0];
|
||||
|
||||
double price;
|
||||
double.TryParse(textBoxOrderPrice.Text, out price);
|
||||
|
||||
double stoploss;
|
||||
double.TryParse(textBoxOrderStoploss.Text, out stoploss);
|
||||
|
||||
double takeprofit;
|
||||
double.TryParse(textBoxOrderProffit.Text, out takeprofit);
|
||||
|
||||
DateTime expiration = DateTime.Now;
|
||||
|
||||
Color arrow_color = new Color();
|
||||
switch (comboBoxOrderColor.SelectedIndex)
|
||||
{
|
||||
case 0:
|
||||
arrow_color = Color.Green;
|
||||
break;
|
||||
case 1:
|
||||
arrow_color = Color.Blue;
|
||||
break;
|
||||
case 2:
|
||||
arrow_color = Color.Red;
|
||||
break;
|
||||
}
|
||||
|
||||
var result = apiClient.OrderModify(ticket, price, stoploss, takeprofit, expiration, arrow_color);
|
||||
|
||||
addToLog(string.Format("OrderModify result: {0}", result));
|
||||
}
|
||||
}
|
||||
|
||||
private void orderOpenPrice()
|
||||
{
|
||||
var result = apiClient.OrderOpenPrice();
|
||||
addToLog(string.Format("OrderOpenPrice result: {0}", result));
|
||||
}
|
||||
|
||||
private void orderOpenTime()
|
||||
{
|
||||
var result = apiClient.OrderOpenTime();
|
||||
addToLog(string.Format("OpenTime order result: {0}", result));
|
||||
}
|
||||
|
||||
private void orderPrint()
|
||||
{
|
||||
apiClient.OrderPrint();
|
||||
}
|
||||
|
||||
private void orderProfit()
|
||||
{
|
||||
var result = apiClient.OrderProfit();
|
||||
addToLog(string.Format("Profit order result: {0}", result));
|
||||
}
|
||||
|
||||
private void orderSelect()
|
||||
{
|
||||
int ticket = -1;
|
||||
|
||||
if (string.IsNullOrEmpty(textBoxIndexTicket.Text) == false)
|
||||
ticket = int.Parse(textBoxIndexTicket.Text);
|
||||
else if (listBoxSendedOrders.SelectedItems.Count > 0)
|
||||
ticket = (int)listBoxSendedOrders.SelectedItems[0];
|
||||
else if (listBoxClosedOrders.SelectedItems.Count > 0)
|
||||
ticket = (int)listBoxClosedOrders.SelectedItems[0];
|
||||
|
||||
if (ticket >= 0)
|
||||
{
|
||||
var result = apiClient.OrderSelect(ticket, OrderSelectMode.SELECT_BY_POS);
|
||||
|
||||
addToLog(string.Format("OrderSelect result: {0}", result));
|
||||
}
|
||||
}
|
||||
|
||||
private void ordersHistoryTotal()
|
||||
{
|
||||
var result = apiClient.OrdersHistoryTotal();
|
||||
addToLog(string.Format("OrdersHistoryTotal result: {0}", result));
|
||||
}
|
||||
|
||||
private void orderStopLoss()
|
||||
{
|
||||
var result = apiClient.OrderStopLoss();
|
||||
textBoxOrderStoploss.Text = result.ToString();
|
||||
addToLog(string.Format("OrderStopLoss result: {0}", result));
|
||||
}
|
||||
|
||||
private void ordersTotal()
|
||||
{
|
||||
var result = apiClient.OrdersTotal();
|
||||
addToLog(string.Format("OrdersTotal result: {0}", result));
|
||||
}
|
||||
|
||||
private void orderSwap()
|
||||
{
|
||||
var result = apiClient.OrderSwap();
|
||||
addToLog(string.Format("OrderSwap result: {0}", result));
|
||||
}
|
||||
|
||||
private void orderSymbol()
|
||||
{
|
||||
var result = apiClient.OrderSymbol();
|
||||
textBoxOrderSymbol.Text = result;
|
||||
addToLog(string.Format("OrderSymbol result: {0}", result));
|
||||
}
|
||||
|
||||
private void orderTakeProfit()
|
||||
{
|
||||
var result = apiClient.OrderTakeProfit();
|
||||
textBoxOrderProffit.Text = result.ToString();
|
||||
addToLog(string.Format("OrderTakeProfit result: {0}", result));
|
||||
}
|
||||
|
||||
private void orderTicket()
|
||||
{
|
||||
var result = apiClient.OrderTicket();
|
||||
addToLog(string.Format("OrderTicket result: {0}", result));
|
||||
}
|
||||
|
||||
private void orderType()
|
||||
{
|
||||
var result = apiClient.OrderType();
|
||||
comboBoxOrderCommand.SelectedIndex = (int)result;
|
||||
addToLog(string.Format("OrderType result: {0}", result));
|
||||
}
|
||||
|
||||
private void button2_Click(object sender, EventArgs e)
|
||||
{
|
||||
GroupOrderCommands[comboBoxSelectedCommand.SelectedIndex]();
|
||||
}
|
||||
|
||||
private void addToLog(string msg)
|
||||
{
|
||||
listBoxEventLog.Items.Add(msg);
|
||||
listBoxEventLog.SetSelected(listBoxEventLog.Items.Count - 1, true);
|
||||
listBoxEventLog.SetSelected(listBoxEventLog.Items.Count - 1, false);
|
||||
}
|
||||
|
||||
private void button3_Click(object sender, EventArgs e)
|
||||
{
|
||||
switch (comboBoxStatusCommand.SelectedIndex)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
var result = apiClient.GetLastError();
|
||||
addToLog(string.Format("GetLastError result: {0}", result));
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
{
|
||||
var result = apiClient.IsConnected();
|
||||
addToLog(string.Format("IsConnected result: {0}", result));
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
{
|
||||
var result = apiClient.IsDemo();
|
||||
addToLog(string.Format("IsDemo result: {0}", result));
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
{
|
||||
var result = apiClient.IsDllsAllowed();
|
||||
addToLog(string.Format("IsDllsAllowed result: {0}", result));
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
{
|
||||
var result = apiClient.IsExpertEnabled();
|
||||
addToLog(string.Format("IsExpertEnabled result: {0}", result));
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
{
|
||||
var result = apiClient.IsLibrariesAllowed();
|
||||
addToLog(string.Format("IsLibrariesAllowed result: {0}", result));
|
||||
}
|
||||
break;
|
||||
case 6:
|
||||
{
|
||||
var result = apiClient.IsOptimization();
|
||||
addToLog(string.Format("IsOptimization result: {0}", result));
|
||||
}
|
||||
break;
|
||||
case 7:
|
||||
{
|
||||
var result = apiClient.IsStopped();
|
||||
addToLog(string.Format("IsStopped result: {0}", result));
|
||||
}
|
||||
break;
|
||||
case 8:
|
||||
{
|
||||
var result = apiClient.IsTesting();
|
||||
addToLog(string.Format("IsTesting result: {0}", result));
|
||||
}
|
||||
break;
|
||||
case 9:
|
||||
{
|
||||
var result = apiClient.IsTradeAllowed();
|
||||
addToLog(string.Format("IsTradeAllowed result: {0}", result));
|
||||
}
|
||||
break;
|
||||
case 10:
|
||||
{
|
||||
var result = apiClient.IsTradeContextBusy();
|
||||
addToLog(string.Format("IsTradeContextBusy result: {0}", result));
|
||||
}
|
||||
break;
|
||||
case 11:
|
||||
{
|
||||
var result = apiClient.IsVisualMode();
|
||||
addToLog(string.Format("IsVisualMode result: {0}", result));
|
||||
}
|
||||
break;
|
||||
case 12:
|
||||
{
|
||||
var result = apiClient.UninitializeReason();
|
||||
addToLog(string.Format("UninitializeReason result: {0}", result));
|
||||
}
|
||||
break;
|
||||
case 13:
|
||||
{
|
||||
int errorCode = -1;
|
||||
int.TryParse(textBoxErrorCode.Text, out errorCode);
|
||||
var result = apiClient.ErrorDescription(errorCode);
|
||||
addToLog(string.Format("ErrorDescription result: {0}", result));
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void button4_Click(object sender, EventArgs e)
|
||||
{
|
||||
switch (listBoxAccountInfo.SelectedIndex)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
var result = apiClient.AccountBalance();
|
||||
addToLog(string.Format("AccountBalance result: {0}", result));
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
{
|
||||
var result = apiClient.AccountCredit();
|
||||
addToLog(string.Format("AccountCredit result: {0}", result));
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
{
|
||||
var result = apiClient.AccountCompany();
|
||||
addToLog(string.Format("AccountCompany result: {0}", result));
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
{
|
||||
var result = apiClient.AccountCurrency();
|
||||
addToLog(string.Format("AccountCurrency result: {0}", result));
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
{
|
||||
var result = apiClient.AccountEquity();
|
||||
addToLog(string.Format("AccountEquity result: {0}", result));
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
{
|
||||
var result = apiClient.AccountFreeMargin();
|
||||
addToLog(string.Format("AccountFreeMargin result: {0}", result));
|
||||
}
|
||||
break;
|
||||
case 6:
|
||||
{
|
||||
var result = apiClient.AccountFreeMarginCheck(textBoxAccountInfoSymbol.Text, (TradeOperation)comboBoxAccountInfoCmd.SelectedIndex, int.Parse(textBoxAccountInfoVolume.Text));
|
||||
addToLog(string.Format("AccountFreeMarginCheck result: {0}", result));
|
||||
}
|
||||
break;
|
||||
case 7:
|
||||
{
|
||||
var result = apiClient.AccountFreeMarginMode();
|
||||
addToLog(string.Format("AccountFreeMarginMode result: {0}", result));
|
||||
}
|
||||
break;
|
||||
case 8:
|
||||
{
|
||||
var result = apiClient.AccountLeverage();
|
||||
addToLog(string.Format("AccountLeverage result: {0}", result));
|
||||
}
|
||||
break;
|
||||
case 9:
|
||||
{
|
||||
var result = apiClient.AccountMargin();
|
||||
addToLog(string.Format("AccountMargin result: {0}", result));
|
||||
}
|
||||
break;
|
||||
case 10:
|
||||
{
|
||||
var result = apiClient.AccountName();
|
||||
addToLog(string.Format("AccountName result: {0}", result));
|
||||
}
|
||||
break;
|
||||
case 11:
|
||||
{
|
||||
var result = apiClient.AccountNumber();
|
||||
addToLog(string.Format("AccountNumber result: {0}", result));
|
||||
}
|
||||
break;
|
||||
case 12:
|
||||
{
|
||||
var result = apiClient.AccountProfit();
|
||||
addToLog(string.Format("AccountProfit result: {0}", result));
|
||||
}
|
||||
break;
|
||||
case 13:
|
||||
{
|
||||
var result = apiClient.AccountServer();
|
||||
addToLog(string.Format("AccountServer result: {0}", result));
|
||||
}
|
||||
break;
|
||||
case 14:
|
||||
{
|
||||
var result = apiClient.AccountStopoutLevel();
|
||||
addToLog(string.Format("AccountStopoutLevel result: {0}", result));
|
||||
}
|
||||
break;
|
||||
case 15:
|
||||
{
|
||||
var result = apiClient.AccountStopoutMode();
|
||||
addToLog(string.Format("AccountStopoutMode result: {0}", result));
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void button5_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (listBoxMarketInfo.SelectedIndex < 0)
|
||||
return;
|
||||
|
||||
var result = apiClient.MarketInfo(txtMarketInfoSymbol.Text, (MarketInfoModeType)listBoxMarketInfo.SelectedIndex);
|
||||
addToLog(string.Format("MarketInfo result: {0}", result));
|
||||
}
|
||||
|
||||
private void button6_Click(object sender, EventArgs e)
|
||||
{
|
||||
string symbol = textBoxSelectedSymbol.Text;
|
||||
int timeframeCount = 1;
|
||||
int.TryParse(textBoxTimeframesCount.Text, out timeframeCount);
|
||||
|
||||
Console.WriteLine("Started time: " + DateTime.Now.ToString());
|
||||
|
||||
List<double> openPriceList = new List<double>();
|
||||
|
||||
//for (int i = 0; i < COUNT; i++)
|
||||
//{
|
||||
// var price = apiClient.iOpen(symbol, ChartPeriod.PERIOD_M1, i);
|
||||
// openPriceList.Add(price);
|
||||
//}
|
||||
|
||||
var prices = apiClient.iCloseArray(symbol, ChartPeriod.PERIOD_M1);
|
||||
|
||||
openPriceList = new List<double>(prices);
|
||||
|
||||
listBoxProceHistory.DataSource = openPriceList;
|
||||
|
||||
Console.WriteLine("Finished time: " + DateTime.Now.ToString());
|
||||
|
||||
using (System.IO.StreamWriter file = new System.IO.StreamWriter("d:\\test.txt"))
|
||||
{
|
||||
foreach (var value in openPriceList)
|
||||
{
|
||||
file.WriteLine(value.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void button7_Click(object sender, EventArgs e)
|
||||
{
|
||||
string symbol = textBoxSelectedSymbol.Text;
|
||||
var barCount = apiClient.iBars(symbol, ChartPeriod.PERIOD_M1);
|
||||
textBoxTimeframesCount.Text = barCount.ToString();
|
||||
}
|
||||
|
||||
private void button8_Click(object sender, EventArgs e)
|
||||
{
|
||||
string symbol = textBoxSelectedSymbol.Text;
|
||||
var prices = apiClient.iHighArray(symbol, ChartPeriod.PERIOD_M1);
|
||||
var items = new List<double>(prices);
|
||||
listBoxProceHistory.DataSource = items;
|
||||
}
|
||||
|
||||
private void button9_Click(object sender, EventArgs e)
|
||||
{
|
||||
string symbol = textBoxSelectedSymbol.Text;
|
||||
var prices = apiClient.iLowArray(symbol, ChartPeriod.PERIOD_M1);
|
||||
var items = new List<double>(prices);
|
||||
listBoxProceHistory.DataSource = items;
|
||||
}
|
||||
|
||||
private void button10_Click(object sender, EventArgs e)
|
||||
{
|
||||
string symbol = textBoxSelectedSymbol.Text;
|
||||
var prices = apiClient.iOpenArray(symbol, ChartPeriod.PERIOD_M1);
|
||||
var items = new List<double>(prices);
|
||||
listBoxProceHistory.DataSource = items;
|
||||
}
|
||||
|
||||
private void button11_Click(object sender, EventArgs e)
|
||||
{
|
||||
string symbol = textBoxSelectedSymbol.Text;
|
||||
var prices = apiClient.iVolumeArray(symbol, ChartPeriod.PERIOD_M1);
|
||||
var items = new List<double>(prices);
|
||||
listBoxProceHistory.DataSource = items;
|
||||
}
|
||||
|
||||
private void button12_Click(object sender, EventArgs e)
|
||||
{
|
||||
string symbol = textBoxSelectedSymbol.Text;
|
||||
var times = apiClient.iTimeArray(symbol, ChartPeriod.PERIOD_M1);
|
||||
var items = new List<DateTime>(times);
|
||||
listBoxProceHistory.DataSource = items;
|
||||
}
|
||||
|
||||
private void iCustomBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
string symbol = textBoxSelectedSymbol.Text;
|
||||
int[] param = {11, 12, 13};
|
||||
var retVal = apiClient.iCustom(symbol, (int)ChartPeriod.PERIOD_H1, "Zigzag", param, 1, 0);
|
||||
addToLog(string.Format("ICustom result: {0}", retVal));
|
||||
}
|
||||
|
||||
private void button13_Click(object sender, EventArgs e)
|
||||
{
|
||||
var retVal = apiClient.TimeCurrent();
|
||||
addToLog(string.Format("TimeCurrent result: {0}", retVal));
|
||||
}
|
||||
|
||||
private void button14_Click(object sender, EventArgs e)
|
||||
{
|
||||
var retVal = apiClient.TimeLocal();
|
||||
addToLog(string.Format("TimeLocal result: {0}", retVal));
|
||||
}
|
||||
|
||||
private void buttonRefreshRates_Click(object sender, EventArgs e)
|
||||
{
|
||||
var retVal = apiClient.RefreshRates();
|
||||
addToLog(string.Format("RefreshRates result: {0}", retVal));
|
||||
}
|
||||
}
|
||||
}
|
||||
Executable
+123
@@ -0,0 +1,123 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
</root>
|
||||
Executable
+21
@@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace TestApiClientUI
|
||||
{
|
||||
static class Program
|
||||
{
|
||||
/// <summary>
|
||||
/// The main entry point for the application.
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
static void Main()
|
||||
{
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
Application.Run(new Form1());
|
||||
}
|
||||
}
|
||||
}
|
||||
Executable
+36
@@ -0,0 +1,36 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("TestApiClientUI")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("DW")]
|
||||
[assembly: AssemblyProduct("TestApiClientUI")]
|
||||
[assembly: AssemblyCopyright("Copyright © DW 2012")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("b8a613a1-ac11-4582-a67d-33bfd80fc490")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
+63
@@ -0,0 +1,63 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.235
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace TestApiClientUI.Properties {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||
/// </summary>
|
||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the cached ResourceManager instance used by this class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("TestApiClientUI.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the current thread's CurrentUICulture property for all
|
||||
/// resource lookups using this strongly typed resource class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Executable
+117
@@ -0,0 +1,117 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.235
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace TestApiClientUI.Properties {
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
public static Settings Default {
|
||||
get {
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Executable
+7
@@ -0,0 +1,7 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
|
||||
<Profiles>
|
||||
<Profile Name="(Default)" />
|
||||
</Profiles>
|
||||
<Settings />
|
||||
</SettingsFile>
|
||||
Executable
+160
@@ -0,0 +1,160 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
|
||||
<ProductVersion>8.0.30703</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{663CC515-EAAE-47D4-8933-5008C2DA1160}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>TestApiClientUI</RootNamespace>
|
||||
<AssemblyName>TestApiClientUI</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<TargetFrameworkProfile>
|
||||
</TargetFrameworkProfile>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<PublishUrl>publish\</PublishUrl>
|
||||
<Install>true</Install>
|
||||
<InstallFrom>Disk</InstallFrom>
|
||||
<UpdateEnabled>false</UpdateEnabled>
|
||||
<UpdateMode>Foreground</UpdateMode>
|
||||
<UpdateInterval>7</UpdateInterval>
|
||||
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
|
||||
<UpdatePeriodically>false</UpdatePeriodically>
|
||||
<UpdateRequired>false</UpdateRequired>
|
||||
<MapFileExtensions>true</MapFileExtensions>
|
||||
<ApplicationRevision>0</ApplicationRevision>
|
||||
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<CodeAnalysisLogFile>bin\Debug\TestApiClientUI.exe.CodeAnalysisLog.xml</CodeAnalysisLogFile>
|
||||
<CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
|
||||
<CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
|
||||
<CodeAnalysisIgnoreBuiltInRuleSets>true</CodeAnalysisIgnoreBuiltInRuleSets>
|
||||
<CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
|
||||
<CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<CodeAnalysisLogFile>bin\Release\TestApiClientUI.exe.CodeAnalysisLog.xml</CodeAnalysisLogFile>
|
||||
<CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
|
||||
<CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
|
||||
<CodeAnalysisIgnoreBuiltInRuleSets>true</CodeAnalysisIgnoreBuiltInRuleSets>
|
||||
<CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
|
||||
<CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="MtApi, Version=1.0.15.0, Culture=neutral, processorArchitecture=MSIL" />
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Deployment" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Form1.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Form1.Designer.cs">
|
||||
<DependentUpon>Form1.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<EmbeddedResource Include="Form1.resx">
|
||||
<DependentUpon>Form1.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
<DesignTime>True</DesignTime>
|
||||
</Compile>
|
||||
<None Include="app.config" />
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BootstrapperPackage Include=".NETFramework,Version=v4.0,Profile=Client">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>Microsoft .NET Framework 4 Client Profile %28x86 and x64%29</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>Windows Installer 3.1</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
Executable
+3
@@ -0,0 +1,3 @@
|
||||
<?xml version="1.0"?>
|
||||
<configuration>
|
||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration>
|
||||
Reference in New Issue
Block a user