public TimerSettingForm(IDataProvider dataProvider) { InitializeComponent(); this.dataProvider = dataProvider; IInterface interf = Core.GetGlobal("Interface") as IInterface; if (interf != null) { if (interf.GetMainForm() != null) { this.MdiParent = interf.GetMainForm(); } } data = Core.GetGlobal("data") as IDataManager; if (data == null) { l.Error("data == null"); } timer = new System.Timers.Timer(500); timer.Elapsed += new System.Timers.ElapsedEventHandler(timer_Elapsed); }
public HandTickForm(IDataProvider plugin) { InitializeComponent(); this.plugin = plugin; IInterface interf = Core.GetGlobal("Interface") as IInterface; if (interf != null) { if (interf.GetMainForm() != null) { this.MdiParent = interf.GetMainForm(); } } }
static void Main() { Application.EnableVisualStyles(); //Application.SetCompatibleTextRenderingDefault(false); IInterface i = Core.GetGlobal("Interface") as IInterface; if (i != null) { Form f = i.GetMainForm(); if (f != null) { l.Debug("start Application.Run"); Application.Run(f); l.Debug("stop Application.Run"); } else { l.Error("IInterface.GetMainForm == null"); } } else { l.Error("GetGlobal(\"Interface\") == null"); } }
void item1_Click(object sender, EventArgs e) { if (interf == null) { return; } this.MdiParent = interf.GetMainForm(); Show(); }
void menu_Export(object sender, EventArgs e) { ExportForm f = new ExportForm(); IInterface interf = Core.GetGlobal("Interface") as IInterface; if (interf != null) { f.MdiParent = interf.GetMainForm(); } f.Show(); }
void menu_Click(object sender, EventArgs e) { if (interf == null) { l.Error("Не найден объект, реализующий интерфейс"); return; } BacktestForm bf = new BacktestForm(); bf.MdiParent = interf.GetMainForm(); bf.Show(); Core.Data.GetMarket("test4"); }
void menu_LoadFromFinam(object sender, EventArgs e) { if (interf == null) { l.Error("Не найден объект, реализующий интерфейс"); return; } if ((fDownloaderForm == null) || (fDownloaderForm.IsDisposed)) { fDownloaderForm = new FDownloaderForm(); fDownloaderForm.MdiParent = interf.GetMainForm(); fDownloaderForm.Show(); } }