public void CheckAndGivingPromotionCodeForSO() { AutorunManager.Startup(null); //SOInfo soInfo = new SOProcessor().CheckAndGivingPromotionCodeForSO(130008136); //soInfo.Merchant = new BizEntity.Common.Merchant() { SysNo = 1 }; SOInfo soInfo = new SOInfo() { SysNo = 130004413, Merchant = new BizEntity.Common.Merchant() { SysNo = 2062 }, BaseInfo = new SOBaseInfo() { CreateTime = new DateTime(2014, 11, 27, 18, 0, 0), CustomerSysNo = 92, SOAmount = 200, }, Items = new List <SOItemInfo>() { new SOItemInfo() { ProductID = "AO_11049_966_0002", ProductSysNo = 98914 }, }, }; new BizInteractAppService().CheckAndGivingPromotionCodeForSO(soInfo); AutorunManager.Shutdown(null); }
private ContextMenuStrip CreateContextMenu() { var menu = new ContextMenuStrip(); var autorunItem = new ToolStripMenuItem("Start application at Windows startup") { Checked = AutorunManager.GetAutorunStatus(AppName, Application.ExecutablePath) }; autorunItem.Click += (sender, e) => { autorunItem.Checked = !autorunItem.Checked; if (autorunItem.Checked) { AutorunManager.AddApplicationToAutorun(AppName, Application.ExecutablePath); } else { AutorunManager.RemoveApplicationFromAutorun(AppName); } }; var exitItem = new ToolStripMenuItem("Exit"); exitItem.Click += (sender, e) => Application.Exit(); menu.Items.Add(autorunItem); menu.Items.Add(new ToolStripSeparator()); menu.Items.Add(exitItem); return(menu); }
protected void Application_Start() { ValueProviderFactories.Factories.Add(new JsonValueProviderFactory()); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); RouteConfig.RegisterRoutes(RouteTable.Routes); AutorunManager.Startup(ex => Logger.WriteLog(ex.ToString(), "ApplicationException")); AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException); }
private void MainForm_Shown(object sender, EventArgs e) { if (_firstShow) { return; } _firstShow = true; if (AutorunManager.ShouldRunSilently()) { Hide(); } }
/// <summary> /// MainForm constructor. /// </summary> public MainForm(AutorunManager autorunManager, KeyboardHookHandler keyboardHookHandler) { // // The InitializeComponent() call is required // for Windows Forms designer support. // InitializeComponent(); _autorunManager = autorunManager; _keyboardHookHandler = keyboardHookHandler; // display a notification on load failure if (_keyboardHookHandler.ExclusionsLoadError) { trayIcon.ShowBalloonTip(29000); } }
protected void Application_Start() { AreaRegistration.RegisterAllAreas(); WebApiConfig.Register(GlobalConfiguration.Configuration); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); RouteConfig.RegisterRoutes(RouteTable.Routes); BundleTable.EnableOptimizations = false; BundleConfig.RegisterBundles(BundleTable.Bundles); AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException); AutorunManager.Startup(ex => HandleStatupException(ex)); }
protected void Application_End(object sender, EventArgs e) { AutorunManager.Shutdown(ex => Logger.WriteLog(ex.ToString(), "ApplicationException")); }
private void startWithWindowsCheckbox_CheckedChanged(object sender) { AutorunManager.SetAutorunning(startWithWindowsCheckbox.Checked); startWithWindowsCheckbox.Checked = AutorunManager.IsAutorunning(); }
private void Form1_Load(object sender, EventArgs e) { sensTrackBar.Value = LsfConfig.Get().StaticSensitivityValue; startWithWindowsCheckbox.Checked = AutorunManager.IsAutorunning(); }
protected void Application_End(object sender, EventArgs e) { AutorunManager.Shutdown(ex => HandleStatupException(ex)); }
protected void Application_Start(object sender, EventArgs e) { AutorunManager.Startup(ex => ExceptionHelper.HandleException(ex)); }