public frmMainForm() { //// Download data and update to DB //string sDir = @"D:\Stock\Data\iStock", sDownload = @"D:\Stock\Data\Download"; //string sDate = DateTime.Today.Year.ToString() + "-" // + (DateTime.Today.Month.ToString().Length==1 ? "0" + DateTime.Today.Month.ToString():DateTime.Today.Month.ToString()) // + "-" + (DateTime.Today.Day.ToString().Length==1 ? "0" + DateTime.Today.Day.ToString():DateTime.Today.Day.ToString()); ////string sUrl = @"http://istock.vn/GDDDownloader.aspx?id=istock_" + sDate +".zip"; //string sUrl = @"http://istock.vn/GDDDownloader.aspx?id=istock_2009-11-10.zip"; //LibWeb.DownloadWebPage(sUrl,sDownload + @"\test.zip"); //LibTools.Extract("istock_" + sDate +".zip",sDir); //WebLib.iStockPrice(sDir); //Directory.Delete(sDir); // // Required for Windows Form Designer support // PluginManager.Load(Environment.CurrentDirectory + "\\Plugins\\"); PluginManager.OnPluginChanged += new FileSystemEventHandler(OnPluginChange); InitializeComponent(); KeyMessageFilter.AddMessageFilter(ChartControl); DataClient = new EasyChartDataClient(); //new YahooDataClient(); }
private void ObjectDesignerForm_Load(object sender, System.EventArgs e) { LoadCSVFile("MSFT"); Manager = new ObjectManager(Designer, pg, ToolPanel, ObjectTree); Designer.ScaleType = ScaleType.Log; KeyMessageFilter.AddMessageFilter(Designer); }
public Form1() { InitializeComponent(); filter = new KeyMessageFilter(panel1); // add the filter Application.AddMessageFilter(filter); }
/// <summary> /// Initializes a new instance of the CellEditor class with default settings /// </summary> protected CellEditor() { this.control = null; this.cell = null; this.table = null; this.cellPos = CellPos.Empty; this.cellRect = Rectangle.Empty; this.mouseMessageFilter = new MouseMessageFilter(this); this.keyMessageFilter = new KeyMessageFilter(this); }
public DemoForm() { // // Required for Windows Form Designer support // PluginManager.Load(Environment.CurrentDirectory + "\\Plugins\\"); PluginManager.OnPluginChanged += new FileSystemEventHandler(OnPluginChange); InitializeComponent(); KeyMessageFilter.AddMessageFilter(ChartControl); DataClient = new EasyChartDataClient(); //new YahooDataClient(); }
public static void ProcessApplication() { try { try { ProcessCmd.InstallFont(); //安装字体 ProcessCmd.HideWindowDesk(); //隐藏桌面 ProcessCmd.HideLogicalDriver(); //隐藏驱动器 ProcessCmd.NoUsedTaskMgrForm(); //关闭任务管理器 if (ProcessCmd.SetSystytemLoadShell()) //设置启动项目 { ProcessCmd.SetProcessAutoStart(false); //删除重启项目 } else { ProcessCmd.SetProcessAutoStart();//如果设置失败就设置自动启动 } } finally { Process.GetCurrentProcess().PriorityClass = ProcessPriorityClass.RealTime; Application.ThreadException += Application_ThreadException; Application.ApplicationExit += Application_ApplicationExit; Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); keyPad1 = new UI.Ctr.KeyPad(); keyMessage = new KeyMessageFilter(); Application.AddMessageFilter(keyMessage); Common.LoadSysConfigFile(); Application.Run(new MainForm()); Application.RemoveMessageFilter(keyMessage); keyPad1.Close(); } } catch (Exception ex) { MessageBox.Show(ex.ToString()); Common.SystemExit(true, false); } finally { } }
public StagesForm() { InitializeComponent(); FillData(); var keyFilter = new KeyMessageFilter(); keyFilter.EventKeyHandler += KeyFilter_EventKeyHandler; Application.AddMessageFilter(keyFilter); Application.ApplicationExit += Application_ApplicationExit; ReportManagerContext.GetInstance().Fill(); ReportManagerContext.GetInstance().Start(); UpdateStageButtons(); SettingsContext.SettingsLoadingEvent += SettingsContextOnSettingsLoadingEvent; ReportManagerContext.GetInstance().InputDataCreatedStatus += StagesForm_DeviceModelCreatedStatus; ReportManagerContext.GetInstance().Device.OnChangeState += ModbusDevice_OnChangeState; FunctionalSubscribe(); CreateFunctionalControls(); }