Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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();
                }
            }
        }
Ejemplo n.º 3
0
        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");
            }
        }
Ejemplo n.º 4
0
 void item1_Click(object sender, EventArgs e)
 {
     if (interf == null)
     {
         return;
     }
     this.MdiParent = interf.GetMainForm();
     Show();
 }
Ejemplo n.º 5
0
        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();
        }
Ejemplo n.º 6
0
        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");
        }
Ejemplo n.º 7
0
        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();
            }
        }