public virtual void OnSellShareEnd(BuySellEventArgs e) { EventHandler<BuySellEventArgs> h = SellShareEnd; if (h != null) { h(this, e); } }
public virtual void OnBuyShare(BuySellEventArgs e) { EventHandler<BuySellEventArgs> h = BuyShare; if (h != null) { h(this, e); } }
/// <summary> /// 株売る通知処理. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void CVM_SellShare(object sender, BuySellEventArgs e) { // CatalogでContainerを作成 SellShareVMFactory aSellShareVMFactory = new SellShareVMFactory(); var container = new CompositionContainer(CVM.AggregateCatalog); container.ComposeExportedValue("SellShareVM.aUri", CVM.MyUri); container.ComposeExportedValue("SellShareVM.aCommonVM", CVM); container.ComposeExportedValue("SellShareVM.aColumn", 0); container.ComposeExportedValue("SellShareVM.aRow", 3); container.ComposeExportedValue("SellShareVM.aCode", e.Code); container.ComposeParts(aSellShareVMFactory); SellShareVM = aSellShareVMFactory.SellShareVM; SellShareVM.WebBrowserAdd(TmpGrid); System.Threading.Timer timer = new System.Threading.Timer((state) => { CVM.Dispatcher.BeginInvoke(new Action(() => { SellShareVM.WB.Navigate(CVM.MyUri); })); }, null, 500, System.Threading.Timeout.Infinite); }
/// <summary> /// 株売終了通知処理. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void CVM_SellShareEnd(object sender, BuySellEventArgs e) { if (e.IsSuccess) { this.CheckShareWBVM.MyStatus = Status.Watching; } else { System.Windows.MessageBox.Show("株売失敗:" + e.Code); } SellShareVM.WebBrowserRemove(); SellShareVM.Dispose(); SellShareVM = null; }
/// <summary> /// 株買終了通知処理. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void CVM_BuyShareEnd(object sender, BuySellEventArgs e) { if (e.IsSuccess) { this.CheckShareWBVM.MyStatus = Status.HaveShares; } else { System.Windows.MessageBox.Show("株買失敗:" + e.Code); } BuyShareVM.WebBrowserRemove(); BuyShareVM.Dispose(); BuyShareVM = null; }