public override void BestAskQuote(AskInfo oInfo) { StringBuilder sb = new StringBuilder(); oInfo.Dump(sb); Console.Out.Write(sb); }
public override void AskQuote(AskInfo oInfo) { StringBuilder sb = new StringBuilder(); oInfo.Dump(sb); debug(sb); }
private void button2_Click(object sender, RibbonControlEventArgs e) { var priv = ThisAddIn.Wallets.FirstOrDefault(x => x.Address == ThisAddIn.Menu.WalletCombo.Text); if (priv == null) { return; } var actdoc = this.application.ActiveDocument.FullName; var plainFile = $"{this.application.ActiveDocument.FullName}"; this.application.ActiveDocument.Close(); string address = "net.pipe://localhost/ShareFileService"; NetNamedPipeBinding binding = new NetNamedPipeBinding(NetNamedPipeSecurityMode.None); EndpointAddress ep = new EndpointAddress(address); IServiceContract channel = ChannelFactory <IServiceContract> .CreateChannel(binding, ep); channel.ShareFile(plainFile, "pepito", "Marianico"); this.application.Documents.Open(plainFile); var w = new AskInfo() { Title = "Paste your private key" }; w.BtOk.Click += (o, args) => { w.Close(); }; }
public List <AskInfo> GetList1(int pageSize, int pageIndex) { int start = (pageIndex - 1) * pageSize + 1; int end = pageIndex * pageSize; string sql = @" select * from (select * from( select ROW_NUMBER()over(order by t3.numbers desc) as FakeId, * from (select * from (select 0 as numbers, * from ask where id in (select id from ask except (select a.id from ask a join Answer An on a.Id=An.askId group by a.id) ))t1 UNION ALL SELECT * FROM (select s.numbers ,ask.id,ask.title,ask.content,ask.userId,ask.createTime,ask.picturePath,ask.questiontypeAskId from ask join (select count(1)as numbers,a.id from ask a join Answer An on a.Id=An.askId group by a.id) s on ask.Id=s.Id)t2)t3 )newTable where FakeId between @start and @end)temp join [User] on [User].id=temp.UserId "; SqlParameter[] p = { new SqlParameter("@start", start), new SqlParameter("end", end), }; List <AskInfo> list = new List <AskInfo>(); var x = DBHelper.GetDataTable(sql, p); for (int i = 0; i < x.Rows.Count; i++) { string t = x.Rows[i]["title"].ToString(); string c = x.Rows[i]["content"].ToString(); string Tcontent = c.Length > 230 ? c.Substring(0, 230) + "..." : c; string Ttitle = t.Length > 50 ? t.Substring(0, 50) + "..." : t; AskInfo temp = new AskInfo(); temp.name = x.Rows[i]["name"].ToString(); temp.title = Ttitle; temp.email = x.Rows[i]["email"].ToString(); temp.picturepath = x.Rows[i]["picturepath"].ToString(); temp.headImgpath = x.Rows[i]["headImgpath"].ToString(); temp.content = Tcontent; temp.createtime = (DateTime)x.Rows[i]["createtime"]; temp.Id = (int)x.Rows[i]["id"]; list.Add(temp); } return(list); }
public override void BestAskQuote(AskInfo oInfo) { StringBuilder sb = new StringBuilder(); oInfo.Dump(sb); debug(sb); Tick k = TickImpl.NewAsk(oInfo.Symbol, (decimal)oInfo.Price, oInfo.Size); k.be = oInfo.Exchange; k.date = Util.ToTLDate(); k.time = Util.ToTLTime(); tl.newTick(k); }
public List <AskInfo> GetList(int pageSize, int pageIndex) { int start = (pageIndex - 1) * pageSize + 1; int end = pageIndex * pageSize; string sql = @" select * from (select * from( select ROW_NUMBER()over(order by id desc) as FakeId, * from Ask )newTable where FakeId between @start and @end)temp join [User] on [User].id=temp.UserId "; SqlParameter[] p = { new SqlParameter("@start", start), new SqlParameter("end", end), }; List <AskInfo> list = new List <AskInfo>(); var x = DBHelper.GetDataTable(sql, p); for (int i = 0; i < x.Rows.Count; i++) { string t = x.Rows[i]["title"].ToString(); string c = x.Rows[i]["content"].ToString(); string Tcontent = c.Length > 230?c.Substring(0, 230) + "...":c; string Ttitle = t.Length > 50? t.Substring(0, 50) + "...": t; AskInfo temp = new AskInfo(); temp.name = x.Rows[i]["name"].ToString(); temp.title = Ttitle; temp.email = x.Rows[i]["email"].ToString(); temp.picturepath = x.Rows[i]["picturepath"].ToString(); temp.headImgpath = x.Rows[i]["headImgpath"].ToString(); temp.content = Tcontent; temp.createtime = (DateTime)x.Rows[i]["createtime"]; temp.Id = (int)x.Rows[i]["id"]; list.Add(temp); } return(list); }
private void ImportBtn_Click(object sender, RibbonControlEventArgs e) { var w = new AskInfo() { Title = "Paste your private key", Question = "Paste your private key" }; w.BtOk.Click += (o, args) => { if (string.IsNullOrEmpty(w.Answer)) { return; } var kGen = ThisAddIn._kernel.Get <IKeyGeneration>(); var account = kGen.GenerateNewWallet(w.Answer); ThisAddIn.Wallets.Add(account); w.Close(); }; w.ShowDialog(); }
public override void AskQuote(AskInfo info) { _client.AskQuote.WithDump(_receiver).WithError(MarketDataError).SafeInvoke(info); }
public override void BestBidAskQuote(BidInfo oBid, AskInfo oAsk) { }
private void SessionHolderOnAskQuote(AskInfo info) { }
public override void BestAskQuote(AskInfo oInfo) { StringBuilder sb = new StringBuilder(); oInfo.Dump(sb); debug(sb); Tick k = TickImpl.NewBid(oInfo.Symbol, (decimal)oInfo.Price, oInfo.Size); k.be = oInfo.Exchange; k.date = Util.ToTLDate(); k.time = Util.ToTLTime(); tl.newTick(k); }
private void SessionHolderOnBestAskQuote(AskInfo info) { ProcessBestQuote(info.Symbol, info.Exchange, info.Price, info.Size, info.NumOrders, info.UpdateType, info.Ssboe, info.Usecs, Level1Fields.BestAskPrice, Level1Fields.BestAskVolume); }