public SterMain() { InitializeComponent(); tt.Interval = 1000; tt.Enabled = true; tt.Tick += new EventHandler(tt_Tick); tt.Start(); stiEvents.SetOrderEventsAsStructs(true); stiEvents.OnSTIOrderUpdate += new _ISTIEventsEvents_OnSTIOrderUpdateEventHandler(stiEvents_OnSTIOrderUpdate); stiEvents.OnSTITradeUpdate += new _ISTIEventsEvents_OnSTITradeUpdateEventHandler(stiEvents_OnSTITradeUpdate); stiPos.OnSTIPositionUpdate += new _ISTIPositionEvents_OnSTIPositionUpdateEventHandler(stiPos_OnSTIPositionUpdate); stiQuote.OnSTIQuoteUpdate += new _ISTIQuoteEvents_OnSTIQuoteUpdateEventHandler(stiQuote_OnSTIQuoteUpdate); stiQuote.OnSTIQuoteSnap += new _ISTIQuoteEvents_OnSTIQuoteSnapEventHandler(stiQuote_OnSTIQuoteSnap); stiPos.GetCurrentPositions(); tl.newAcctRequest += new StringDelegate(tl_newAcctRequest); tl.newProviderName = Providers.Sterling; tl.newSendOrderRequest += new OrderDelegate(tl_gotSrvFillRequest); tl.newPosList += new PositionArrayDelegate(tl_gotSrvPosList); tl.newRegisterStocks += new DebugDelegate(tl_RegisterStocks); tl.newOrderCancelRequest += new UIntDelegate(tl_OrderCancelRequest); tl.newFeatureRequest += new MessageArrayDelegate(tl_newFeatureRequest); tl.newUnknownRequest += new UnknownMessageDelegate(tl_newUnknownRequest); tl.newImbalanceRequest += new VoidDelegate(tl_newImbalanceRequest); debug(PROGRAM + Util.TLSIdentity()); FormClosing += new FormClosingEventHandler(SterMain_FormClosing); }
public GBTradeLink() { TrackEnabled = Util.TrackUsage(); Program = PROGRAM; InitializeComponent(); TradeLink.API.TLServer tls; if (Properties.Settings.Default.TLClientAddress == string.Empty) tls = new TradeLink.Common.TLServer_WM(); else tls = new TradeLink.Common.TLServer_IP(Properties.Settings.Default.TLClientAddress, Properties.Settings.Default.TLClientPort); try { GB = new GrayBox(tls,this.lstStatusList,this.bt_Connect); } catch (Exception ex) { const string URL = @"http://code.google.com/p/tradelink/wiki/HoldBrosGrayBox"; debug("problem connecting to graybox..."); debug("please check guide at: " + URL); System.Diagnostics.Process.Start(URL); debug(ex.Message + ex.StackTrace); } UpdateLoginDetails(); FormClosing += new FormClosingEventHandler(GBTradeLink_FormClosing); GB.Start(); this.txtPasword.Focus() ; }
public Gauntlet() { TrackEnabled = Util.TrackUsage(); Program = PROGRAM; InitializeComponent(); debug(Util.TLSIdentity()); args.GotDebug += new DebugDelegate(args_GotDebug); args.ParseArgs(Environment.GetCommandLineArgs()); FormClosing += new FormClosingEventHandler(Gauntlet_FormClosing); debug(RunTracker.CountNewGetPrettyRuns(PROGRAM, Util.PROGRAM)); bw.WorkerSupportsCancellation = true; bw.RunWorkerCompleted += new RunWorkerCompletedEventHandler(bw_RunWorkerCompleted); bw.DoWork += new DoWorkEventHandler(bw_DoWork); getsymwork.WorkerSupportsCancellation = true; getsymwork.DoWork += new DoWorkEventHandler(getsymwork_DoWork); getsymwork.RunWorkerCompleted += new RunWorkerCompletedEventHandler(getsymwork_RunWorkerCompleted); getsymwork.RunWorkerAsync(); getsymwork.RunWorkerCompleted += new RunWorkerCompletedEventHandler(getsymwork_RunWorkerCompleted); if (args.isUnattended) { ordersincsv.Checked = true; //ShowWindow(System.Diagnostics.Process.GetCurrentProcess().MainWindowHandle, SW_MINIMIZE); bindresponseevents(); queuebut_Click(null, null); } else { status("wait while tickdata is loaded..."); UpdateResponses(Util.GetResponseList(args.DllName)); } }
public MainFormGR(PXCMSession session, MainScreen mainScreen) { InitializeComponent(); this.mainScreen = mainScreen; this.session = session; PopulateDeviceMenu(); PopulateModuleMenu(); FormClosing += new FormClosingEventHandler(MainForm_FormClosing); Panel2.Paint += new PaintEventHandler(Panel_Paint); timer.Tick += new EventHandler(timer_Tick); timer.Interval = 2000; timer.Start(); pictures = new Hashtable(); pictures[PXCMGesture.Gesture.Label.LABEL_HAND_CIRCLE] = Properties.Resources.circle; pictures[PXCMGesture.Gesture.Label.LABEL_HAND_WAVE] = Properties.Resources.wave; pictures[PXCMGesture.Gesture.Label.LABEL_NAV_SWIPE_DOWN] = Properties.Resources.swipe_down; pictures[PXCMGesture.Gesture.Label.LABEL_NAV_SWIPE_LEFT] = Properties.Resources.swipe_left; pictures[PXCMGesture.Gesture.Label.LABEL_NAV_SWIPE_RIGHT] = Properties.Resources.swipe_right; pictures[PXCMGesture.Gesture.Label.LABEL_NAV_SWIPE_UP] = Properties.Resources.swipe_up; pictures[PXCMGesture.Gesture.Label.LABEL_POSE_BIG5] = Properties.Resources.big5; pictures[PXCMGesture.Gesture.Label.LABEL_POSE_PEACE] = Properties.Resources.peace; pictures[PXCMGesture.Gesture.Label.LABEL_POSE_THUMB_DOWN] = Properties.Resources.thumb_down; pictures[PXCMGesture.Gesture.Label.LABEL_POSE_THUMB_UP] = Properties.Resources.thumb_up; }
public ServerMBMain() { InitializeComponent(); _msg.SendToBack(); m_ComMgr = new MBTCOMLib.MbtComMgrClass(); m_ComMgr.SilentMode = true; m_ComMgr.EnableSplash(false); m_OrderClient = m_ComMgr.OrderClient; m_Quotes = m_ComMgr.Quotes; ContextMenu = new ContextMenu(); ContextMenu.MenuItems.Add("Messages", new EventHandler(rightmessage)); // tradelink bindings tl.newProviderName = Providers.MBTrading; tl.newFeatureRequest += new MessageArrayDelegate(tl_newFeatureRequest); tl.newSendOrderRequest += new OrderDelegate(tl_newSendOrderRequest); tl.newRegisterStocks += new DebugDelegate(tl_newRegisterStocks); tl.newOrderCancelRequest += new UIntDelegate(tl_newOrderCancelRequest); tl.newAcctRequest += new StringDelegate(tl_newAcctRequest); tl.newPosList += new PositionArrayDelegate(tl_newPosList); // mb bindings m_ComMgr.OnLogonSucceed += new IMbtComMgrEvents_OnLogonSucceedEventHandler(m_ComMgr_OnLogonSucceed); m_ComMgr.OnLogonDeny += new IMbtComMgrEvents_OnLogonDenyEventHandler(m_ComMgr_OnLogonDeny); m_OrderClient.OnSubmit += new _IMbtOrderClientEvents_OnSubmitEventHandler(m_OrderClient_OnSubmit); m_OrderClient.OnRemove += new _IMbtOrderClientEvents_OnRemoveEventHandler(m_OrderClient_OnRemove); m_OrderClient.OnPositionUpdated += new _IMbtOrderClientEvents_OnPositionUpdatedEventHandler(m_OrderClient_OnPositionUpdated); FormClosing += new FormClosingEventHandler(ServerMBMain_FormClosing); }
/// <summary> /// Constructor /// </summary> public Analyzer(string menuItem) { Text = Language.T("Strategy Analyzer"); MaximizeBox = false; Icon = Data.Icon; FormBorderStyle = FormBorderStyle.FixedDialog; AcceptButton = btnClose; FormClosing += new FormClosingEventHandler(Actions_FormClosing); // Button Close btnClose = new Button(); btnClose.Parent = this; btnClose.Text = Language.T("Close"); btnClose.DialogResult = DialogResult.Cancel; btnClose.UseVisualStyleBackColor = true; SetupMenuBar(); SetPanelOptions(); SetPanelOverOptimization(); SetPanelCumulativeStrategy(); ToolStripMenuItem tsMenuItem = new ToolStripMenuItem(); tsMenuItem.Name = menuItem; MainMenu_Click(tsMenuItem, EventArgs.Empty); }
public DASServerMain() { TrackEnabled = Util.TrackUsage(); Program = PROGRAM; InitializeComponent(); FormClosing += new FormClosingEventHandler(DASServerMain_FormClosing); if (Properties.Settings.Default.TLClientAddress == string.Empty) tl = new TradeLink.Common.TLServer_WM(); else tl = new TradeLink.Common.TLServer_IP(Properties.Settings.Default.TLClientAddress, Properties.Settings.Default.TLClientPort); // bindings tl.newProviderName = Providers.DAS; tl.newFeatureRequest += new MessageArrayDelegate(tl_newFeatureRequest); tl.newSendOrderRequest += new OrderDelegateStatus(tl_gotSrvFillRequest); tl.newAcctRequest += new StringDelegate(tl_newAcctRequest); tl.newOrderCancelRequest += new LongDelegate(tl_newOrderCancelRequest); tl.newUnknownRequest += new UnknownMessageDelegate(tl_newUnknownRequest); tl.newRegisterSymbols +=new SymbolRegisterDel(tl_newRegisterSymbols); tl.newPosList += new PositionArrayDelegate(tl_newPosList); }
public kadinamain() { TrackEnabled = Util.TrackUsage(); Program = PROGRAM; _dps = "N" + _dp; SimBroker.UseBidAskFills = Properties.Settings.Default.UseBidAskFills; InitializeComponent(); Text += " " + Util.TLVersion(); initgrids(); debugControl1.NewCreateTicketEvent += new DebugDelegate(debugControl1_NewCreateTicketEvent); sizetabs(); restorerecentfiles(); restorerecentlibs(); restoreskins(); FormClosing += new FormClosingEventHandler(kadinamain_FormClosing); Resize += new EventHandler(kadinamain_Resize); bw.DoWork += new DoWorkEventHandler(Play); bw.WorkerReportsProgress = false; bw.WorkerSupportsCancellation = true; bw.RunWorkerCompleted += new RunWorkerCompletedEventHandler(PlayComplete); bw2.DoWork += new DoWorkEventHandler(bw2_DoWork); bw2.RunWorkerAsync(); debug(Util.TLSIdentity()); debug(RunTracker.CountNewGetPrettyRuns(PROGRAM, Util.PROGRAM)); // grid errors dg.DataError += new DataGridViewDataErrorEventHandler(dg_DataError); ig.DataError += new DataGridViewDataErrorEventHandler(ig_DataError); fg.DataError += new DataGridViewDataErrorEventHandler(fg_DataError); og.DataError += new DataGridViewDataErrorEventHandler(og_DataError); pg.DataError += new DataGridViewDataErrorEventHandler(pg_DataError); }
public Quote() { TrackEnabled = Util.TrackUsage(); Program = PROGRAM; InitializeComponent(); if ((Location.X == 0) && (Location.Y == 0)) { Quotopia.Properties.Settings.Default.location = new Point(300, 300); Quotopia.Properties.Settings.Default.Save(); Refresh(); } debug(Util.TLSIdentity()); QuoteGridSetup(); initfeeds(); statfade.Interval = 3000; statfade.Tick += new EventHandler(statfade_Tick); statfade.Start(); ordergrid.ContextMenuStrip = new ContextMenuStrip(); ordergrid.ContextMenuStrip.Items.Add("Cancel", null, new EventHandler(cancelorder)); FormClosing += new FormClosingEventHandler(Quote_FormClosing); Resize += new EventHandler(Quote_Resize); _tlt_GotConnect(); bw.DoWork += new DoWorkEventHandler(bw_DoWork); if (!bw.IsBusy) bw.RunWorkerAsync(); processcommands(); _constructed = true; }
public TextSplitHotkeys(TextSplitShow TSS) { InitializeComponent(); bCancel.Click += new EventHandler(bCancel_Click); bOK.Click += new EventHandler(bOK_Click); FormClosing += new FormClosingEventHandler(TSH_Closing); this.TSS = TSS; textboxNames = new string[] { "tNext1", "tNext2", "tPrev1", "tPrev2", "tFirst1", "tFirst2", "tLast1", "tLast2" }; tempHotkeys = new ArrayList(); for (int i = 0; i < Properties.Settings.Default.Hotkeys.Count; i++) { tempHotkeys.Add((Keys)Properties.Settings.Default.Hotkeys[i]); } foreach (var c in Controls) { if (c is TextBox) { for (int i = 0; i < textboxNames.Length; i++) { if (((TextBox)c).Name == textboxNames[i]) { ((TextBox)c).Text = ((Keys)tempHotkeys[i]).ToString(); } } ((TextBox)c).GotFocus += new EventHandler(tKeyPrompt_Focus); ((TextBox)c).LostFocus += new EventHandler(tKeyPrompt_LostFocus); ((TextBox)c).KeyDown += new KeyEventHandler(tKeyPrompt_Key); } } }
public frmSearch(SearchPdfHandler callback) { InitializeComponent(); _callback = callback; Load += new EventHandler(frmSearch_Load); FormClosing += new FormClosingEventHandler(frmSearch_FormClosing); }
public MainForm() { InitializeComponent(); // 01. Initialize readonly members var config_dir = Path.Combine( Environment.GetFolderPath( Environment.SpecialFolder.ApplicationData), Application.ProductName ); if (!Directory.Exists(config_dir)) Directory.CreateDirectory(config_dir); mSoundPackListConfigPath = Path.Combine(config_dir, "SoundPackList.config"); mSoundEngineConfigPath = Path.Combine(config_dir, "SoundEngine.config"); mKeysDisplayForm = new KeysDisplayForm(); // 02. Parepare events for MainForm Load += new EventHandler(MainForm_Load); FormClosed += new FormClosedEventHandler(MainForm_FormClosed); FormClosing += new FormClosingEventHandler(MainForm_FormClosing); KeyDisplayEnabledChanged += new EventHandler(MainForm_KeyDisplayEnabledChanged); AppDomain.CurrentDomain.FirstChanceException += (_sender, _e) => { ShowBaloon("初回例外。{0}:{1}\r\n" + "正しく初期化されなかった可能性があります", _e.Exception.Source, _e.Exception.Message); }; }
public BigTradeUI(BigTrades engine) { // save our response engine _engine = engine; // setup grid InitializeComponent(); // here our the columns we'll save for 10ten trades _dt.Columns.Add("Time", typeof(int)); _dt.Columns.Add("Sym"); _dt.Columns.Add("Price", typeof(decimal)); _dt.Columns.Add("TradeSize", typeof(int)); _dt.Columns.Add("Exch"); _dg.MultiSelect = false; // we'll bid the above columns to our grid _bs.DataSource = _dt; _dg.DataSource = _bs; // setup right click ContextMenu = new ContextMenu(); ContextMenu.MenuItems.Add("Buy 100 Market", new EventHandler(butbuy_Click)); ContextMenu.MenuItems.Add("Sell 100 Market", new EventHandler(butsell_Click)); // then the grid to the user Show(); // make sure to invalidate and unsubscribe on form closing // otherwise, it will continue to process in background FormClosing += new FormClosingEventHandler(BigTradeUI_FormClosing); }
/// <summary> /// Initialize the single input form. /// </summary> /// <param name="valueLabel">The label showing name of the input value.</param> public SingleInputForm(string valueLabel) { InitializeComponent(); label1.Text = valueLabel; FormClosing += new FormClosingEventHandler(SingleInputForm_FormClosing); }
public TDServerMain() { TrackEnabled = Util.TrackUsage(); Program = PROGRAM; InitializeComponent(); FormClosing += new FormClosingEventHandler(TDServerMain_FormClosing); if (Properties.Settings.Default.TLClientAddress == string.Empty) tl = new TradeLink.Common.TLServer_WM(); else tl = new TradeLink.Common.TLServer_IP(Properties.Settings.Default.TLClientAddress, Properties.Settings.Default.TLClientPort); // bindings tl.newProviderName = Providers.TDAmeritrade; tl.newFeatureRequest += new MessageArrayDelegate(tl_newFeatureRequest); tl.newSendOrderRequest += new OrderDelegateStatus(tl_gotSrvFillRequest); tl.newAcctRequest += new StringDelegate(tl_gotSrvAcctRequest); tl.newOrderCancelRequest += new LongDelegate(tl_newOrderCancelRequest); tl.newUnknownRequest += new UnknownMessageDelegate(tl_newUnknownRequest); tl.newRegisterSymbols += new SymbolRegisterDel(tl_newRegisterSymbols); tl.newPosList += new PositionArrayDelegate(tl_newPosList); api.rs_LevelOneStreaming = new AmeritradeBrokerAPI.RequestState(); api.rs_LevelOneStreaming.TickWithArgs += new AmeritradeBrokerAPI.EventHandlerWithArgs(rs_LevelOneStreaming_TickWithArgs); api.rs_ActivesStreaming = new AmeritradeBrokerAPI.RequestState(); api.rs_ActivesStreaming.TickWithArgs += new AmeritradeBrokerAPI.EventHandlerWithArgs(rs_ActivesStreaming_TickWithArgs); }
public Gauntlet() { InitializeComponent(); debug(Util.TLSIdentity()); args.GotDebug += new DebugDelegate(args_GotDebug); args.ParseArgs(Environment.GetCommandLineArgs()); FormClosing += new FormClosingEventHandler(Gauntlet_FormClosing); bw.WorkerSupportsCancellation = true; bw.RunWorkerCompleted += new RunWorkerCompletedEventHandler(bw_RunWorkerCompleted); bw.DoWork += new DoWorkEventHandler(bw_DoWork); if (args.isUnattended) { background = true; ordersincsv.Checked = true; //ShowWindow(System.Diagnostics.Process.GetCurrentProcess().MainWindowHandle, SW_MINIMIZE); bindresponseevents(); queuebut_Click(null, null); } else { tickFileFilterControl1.SetSymbols(args.Folder); UpdateResponses(Util.GetResponseList(args.DllName)); debug(Util.TLSIdentity()); } }
public Form1() { InitializeComponent(); xnaDisplay.InitializeHandler += xnaDisplay_Initialize; xnaDisplay.DrawHandler += xnaDisplay_Draw; xnaDisplay.MouseDown += new MouseEventHandler(xnaDisplay_MouseDown); xnaDisplay.MouseUp += new MouseEventHandler(xnaDisplay_MouseUp); xnaDisplay.MouseMove += new MouseEventHandler(xnaDisplay_MouseMove); xnaDisplay.KeyDown += new KeyEventHandler(xnaDisplay_KeyDown); FormClosing += new FormClosingEventHandler(Form1_FormClosing); Application.Idle += delegate { xnaDisplay.Invalidate(); }; NewAnimation(); zoomComboBox.SelectedItem = "100%"; zoomComboBox.SelectedIndexChanged += new EventHandler(zoomComboBox_SelectedIndexChanged); frameRateComboBox.SelectedItem = "25"; frameRateComboBox.SelectedIndexChanged += new EventHandler(frameRateComboBox_SelectedIndexChanged); string[] args = Environment.GetCommandLineArgs(); if (args != null && args.Length > 1 && args[1] != null) { startupAnimation = args[1]; } }
public TextSplitHotkeys(TextSplitShow TSS) { InitializeComponent(); bCancel.Click += new EventHandler(bCancel_Click); bOK.Click += new EventHandler(bOK_Click); FormClosing += new FormClosingEventHandler(TSH_Closing); this.TSS = TSS; textboxNames = new string[] { "tNext1", "tNext2", "tPrev1", "tPrev2", "tFirst1", "tFirst2", "tLast1", "tLast2" }; newHotkeys = new Keys[8]; for (int i = 0; i < newHotkeys.Length; i++) { newHotkeys[i] = TSS.TST.Hotkeys[i]; } foreach (var c in Controls) { if (c is TextBox) { for (int i = 0; i < textboxNames.Length; i++) { if (((TextBox)c).Name == textboxNames[i]) { ((TextBox)c).Text = newHotkeys[i].ToString(); } } ((TextBox)c).GotFocus += new EventHandler(tKeyPrompt_Focus); ((TextBox)c).LostFocus += new EventHandler(tKeyPrompt_LostFocus); ((TextBox)c).KeyDown += new KeyEventHandler(tKeyPrompt_Key); } } }
public EsignalMain() { TLServer tls; if (Properties.Settings.Default.TLClientAddress == string.Empty) tls = new TLServer_WM(); else tls = new TLServer_IP(Properties.Settings.Default.TLClientAddress, Properties.Settings.Default.TLClientPort); TrackEnabled = Util.TrackUsage(); Program = PROGRAM; InitializeComponent(); tl = new EsignalServer(tls); // set defaults tl.isPaperTradeEnabled = Properties.Settings.Default.PaperTrade; tl.isPaperTradeUsingBidAsk = Properties.Settings.Default.PaperTradeUseBidAsk; tl.AllowSendInvalidBars = Properties.Settings.Default.AllowSendOfInvalidBars; tl.DefaultBarsBack = Properties.Settings.Default.DefaultBarsBack; tl.VerboseDebugging = Properties.Settings.Default.VerboseDebugging; tl.ReleaseBarHistoryAfteRequest = Properties.Settings.Default.ReleaseBarHistoryAfterSending; tl.ReleaseDeadSymbols = Properties.Settings.Default.ReleaseDeadSymbols; tl.WaitBetweenEvents = Properties.Settings.Default.WaitBetweenEvents; tl.BarRequestsGetAllData = Properties.Settings.Default.BarRequestsuseAllData; // send debug messages to log file tl.GotDebug += new DebugFullDelegate(debug); debug("Started " + PROGRAM + Util.TLVersion()); // attempt to connect to esignal _ok_Click(null, null); // handle connector exits FormClosing += new FormClosingEventHandler(EsignalMain_FormClosing); }
public Quote() { InitializeComponent(); if ((Location.X == 0) && (Location.Y == 0)) { Quotopia.Properties.Settings.Default.location = new Point(300, 300); Quotopia.Properties.Settings.Default.Save(); Refresh(); } Size = Quotopia.Properties.Settings.Default.wsize; debug(Util.TLSIdentity()); QuoteGridSetup(); statfade.Interval = 3000; statfade.Tick += new EventHandler(statfade_Tick); statfade.Start(); ar.GotTick += new TickDelegate(ar_GotTick); tl.gotTick += new TickDelegate(tl_gotTick); tl.gotFill += new FillDelegate(tl_gotFill); tl.gotOrder += new OrderDelegate(tl_gotOrder); tl.gotOrderCancel += new UIntDelegate(tl_gotOrderCancel); tl.gotPosition += new PositionDelegate(tl_gotPosition); tl.gotAccounts += new DebugDelegate(tl_gotAccounts); ordergrid.ContextMenuStrip = new ContextMenuStrip(); ordergrid.ContextMenuStrip.Items.Add("Cancel", null, new EventHandler(cancelorder)); FormClosing += new FormClosingEventHandler(Quote_FormClosing); Resize += new EventHandler(Quote_Resize); if (tl.LinkType!= TLTypes.NONE) tl.RequestAccounts(); else Util.ExistsNewVersions(tl); }
public RediMain() { TradeLink.API.TLServer tls; if (Properties.Settings.Default.TLClientAddress == string.Empty) tls = new TradeLink.Common.TLServer_WM(); else tls = new TradeLink.Common.TLServer_IP(Properties.Settings.Default.TLClientAddress, Properties.Settings.Default.TLClientPort); tl = new ServerRedi(tls); if (Properties.Settings.Default.AccountsAvailable != string.Empty) { tl.Accounts = Properties.Settings.Default.AccountsAvailable.Split(','); debug("Advertising static accounts: " + tl.Accounts); } TrackEnabled = Util.TrackUsage(); Program = PROGRAM; InitializeComponent(); tl.TickDebugVerbose = Properties.Settings.Default.TickDebuggingVerbose; tl.isAddingFuturesEXSpace = Properties.Settings.Default.isAddingFuturesEXSpace; tl.FuturesEXchanges = new List<string>(Properties.Settings.Default.FuturesEXchanges.Split(',')); tl.isPaperTradeEnabled = Properties.Settings.Default.PaperTrade; tl.isPaperTradeUsingBidAsk = Properties.Settings.Default.PaperTradeBidAsk; tl.VerboseDebugging = Properties.Settings.Default.VerboseDebugging; tl.SendDebug += new TradeLink.API.DebugDelegate(tl_SendDebug); tl.AutoConvertToSmart = Properties.Settings.Default.AutoConvertToSmartForAvailable; FormClosing += new FormClosingEventHandler(RediMain_FormClosing); }
public General() { InitializeComponent(); MessageBox.Show("This is program create for\n\tmedium - 125%\n\tsystem text", "Warning!"); EH = new FormClosingEventHandler(General_FormClosing); this.FormClosing += EH; }
public HostEntryControl() { InitializeComponent(); EventHandler validateOkButton = (s, e) => { this.ValidateOkButton(!this.ipAddress.IsEmpty); this.ValidateOkButton(!string.IsNullOrWhiteSpace(this.hostName.Text)); }; this.ipAddress.IPAddressChanged += validateOkButton; this.hostName.TextChanged += validateOkButton; this.description.TextChanged += validateOkButton; this.enabled.CheckedChanged += validateOkButton; this.dialogClosingDelegate = new FormClosingEventHandler(delegate (object sender, FormClosingEventArgs e) { if (((sender as Form).DialogResult != System.Windows.Forms.DialogResult.OK)) return; if (MessageBox.Show(this, "Do you want to save the Host Entry?", "Save Host Entry?", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == System.Windows.Forms.DialogResult.Yes) HostsFileHelper.SetEntry(this.SelectedItem); }); this.Load += (s, e) => { this.enabledPanel.Visible = !this.SelectedItem.IsNew; this.Title = this.SelectedItem.IsNew ? "Add Host Entry..." : "Edit Host Entry..."; this.ipAddress.DataBindings.Add(new Binding("Value", this.SelectedItem, "IPAddress")); this.description.DataBindings.Add(new Binding("Text", this.SelectedItem, "Description")); this.hostName.DataBindings.Add(new Binding("Text", this.SelectedItem, "Destination")); this.enabled.DataBindings.Add(new Binding("Checked", this.SelectedItem, "Enabled")); }; }
public connectionType() { InitializeComponent(); LocalButton.Click += new EventHandler(LocalButton_click); ServerButton.Click += new EventHandler(ServerButton_click); FormClosing += new FormClosingEventHandler(form_closing); }
public NaoDebugger() { InitializeComponent(); tabControl.SelectedIndex = 2; Load += new EventHandler(NaoDebugger_Load); FormClosing += new FormClosingEventHandler(NaoDebugger_FormClosing); }
public DASServerMain() { TrackEnabled = Util.TrackUsage(); Program = PROGRAM; InitializeComponent(); FormClosing += new FormClosingEventHandler(DASServerMain_FormClosing); if (Properties.Settings.Default.TLClientAddress == string.Empty) tl = new TradeLink.Common.TLServer_WM(); else tl = new TradeLink.Common.TLServer_IP(Properties.Settings.Default.TLClientAddress, Properties.Settings.Default.TLClientPort); // bindings tl.newProviderName = Providers.DAS; tl.newFeatureRequest += new MessageArrayDelegate(tl_newFeatureRequest); tl.newSendOrderRequest += new OrderDelegateStatus(tl_gotSrvFillRequest); //tl.newAcctRequest += new StringDelegate(tl_gotSrvAcctRequest); tl.newOrderCancelRequest += new LongDelegate(tl_newOrderCancelRequest); tl.newUnknownRequest += new UnknownMessageDelegate(tl_newUnknownRequest); tl.newRegisterSymbols +=new SymbolRegisterDel(tl_newRegisterSymbols); tl.newPosList += new PositionAccountArrayDelegate(tl_newPosList); debug(Util.TLSIdentity()); debug("Attempting to start: " + PROGRAM); //api.OnStatusChange += new Axtdaactx.ITDAAPICommEvents_OnStatusChangeEventHandler(api_OnStatusChange); ////api.OnL1Quote += rs_LevelOneStreaming = new AmeritradeBrokerAPI.RequestState(); ////api.rs_LevelOneStreaming.TickWithArgs += new AmeritradeBrokerAPI.EventHandlerWithArgs(rs_LevelOneStreaming_TickWithArgs); ////api.rs_ActivesStreaming = new AmeritradeBrokerAPI.RequestState(); ////api.rs_ActivesStreaming.TickWithArgs += new AmeritradeBrokerAPI.EventHandlerWithArgs(rs_ActivesStreaming_TickWithArgs); //api.OnL1Quote += new Axtdaactx.ITDAAPICommEvents_OnL1QuoteEventHandler(api_LevelOneStreaming); //doLogin(); }
public MainForm(PXCMSession session) { InitializeComponent(); this.session = session; PopulateDeviceMenu(); FormClosing += new FormClosingEventHandler(MainForm_FormClosing); pictureBox1.Paint += new PaintEventHandler(pictureBitmap_Paint); this.comboBoxQualityEstimator.Items.AddRange( new object[] {"ColorClusters" }); this.comboBoxColoringMethod.Items.AddRange( new object[] {"None" , "ByScore" , "ByClusterMeanColor" , "ByClusterMaxColor" , "ByClusterDepth" }); this.cameraSettingsTrackBars = new TrackBar[] { this.trackBarCamDepthCofidenceThreshold, this.trackBarCamIvcamAccuracy, this.trackBarCamIVCAMFilterOption, this.trackBarCamIVCAMLaserPower, this.trackBarCamIVCAMMotionRangeTradeOff }; this.resetAllParams(); }
public SterMain() { TrackEnabled = Util.TrackUsage(); Program = PROGRAM; InitializeComponent(); _dc.Parent = this; _dc.Dock = DockStyle.Fill; ContextMenu = new ContextMenu(); ContextMenu.MenuItems.Add("account", new EventHandler(setaccount)); ContextMenu.MenuItems.Add("report", new EventHandler(report)); try { TradeLink.API.TLServer tls; if (Properties.Settings.Default.TLClientAddress == string.Empty) { tls = new TradeLink.Common.TLServer_WM(); } else tls = new TradeLink.Common.TLServer_IP(Properties.Settings.Default.TLClientAddress, Properties.Settings.Default.TLClientPort); tl = new ServerSterling(tls, Properties.Settings.Default.Sleep,Properties.Settings.Default.OrderSleep,debug); tl.UseServerStops = Properties.Settings.Default.UseServerStops; tl.MinLotSize = Properties.Settings.Default.MinLotSize; tl.PostSymSubscribeWait = Properties.Settings.Default.PostSymbolSubscribeWait; tl.AutoSubscribeOrderSymbol = Properties.Settings.Default.AutosubscribeOrderSym; tl.OversellSplit = Properties.Settings.Default.OversellSplit; tl.RegSHOShorts = Properties.Settings.Default.RegSHOShorts; tl.LimitPositionUpdates = Properties.Settings.Default.PositionUpdateLimit; tl.isPaperTradeUsingBidAsk = Properties.Settings.Default.PaperTradeUseBidAsk; tl.isPaperTradeEnabled = Properties.Settings.Default.PaperTrade; tl.UseXmlMode = Properties.Settings.Default.UseXMLQuotes; tl.AutoCapAccounts = Properties.Settings.Default.AutoCapitilizeAccounts; tl.CoverEnabled = Properties.Settings.Default.CoverEnabled; tl.Accounts = Properties.Settings.Default.defaultaccount.Split(','); tl.CancelWait = Properties.Settings.Default.CancelWait; tl.VerboseDebugging = Properties.Settings.Default.VerboseDebugging; tl.FixOrderDecimalPlace = Properties.Settings.Default.FixOrderDecimalPlaces; tl.IgnoreOutOfOrderTicks = Properties.Settings.Default.IgnoreOutOfOrderTicks; tl.AutosetUnsetId = Properties.Settings.Default.AutoSeUnsetId; tl.SendCancelOnReject = Properties.Settings.Default.SendCancelOnRejects; tl.SendCancelOnError = Properties.Settings.Default.SendCancelOnError; tl.UseSubscribedSymbolForNotify = Properties.Settings.Default.UseSubscribedSymbolForNotify; tl.UseSterlingTickBuffer = Properties.Settings.Default.SterlingTickBuffering; tl.EnableImbalancesAndHalts = Properties.Settings.Default.EnableImbalancesAndHalts; tl.Start(); } catch (Exception ex) { const string URL = @"http://code.google.com/p/tradelink/wiki/SterConfig"; debug("problem connecting to sterling..."); debug("please check guide at: " + URL); System.Diagnostics.Process.Start(URL); debug(ex.Message+ex.StackTrace); } toolStrip1.BackColor = BackColor; FormClosing += new FormClosingEventHandler(SterMain_FormClosing); }
/// <summary> /// Initialize the single input form. /// </summary> /// <param name="valueLabel">The label showing name of the input value.</param> /// <param name="formCaption">The caption of form.</param> public SingleInputForm(string valueLabel,string formCaption) { InitializeComponent(); label1.Text = valueLabel; this.Text = formCaption; FormClosing += new FormClosingEventHandler(SingleInputForm_FormClosing); }
public PlotterGraphSelectCurvesForm() { InitializeComponent(); FormClosing += new FormClosingEventHandler(OnFormClosing); lb_Graphs.SelectedIndexChanged += new EventHandler(OnSelectedGraphIndexChanged); VisibleChanged += new EventHandler(OnVisibleChanged); tb_GraphName.TextChanged += new EventHandler(tb_GraphName_TextChanged); }
/// <summary> /// Função que resume as informações para enviar a classe de negocios para salvar /// </summary> private void salvar() { try { if (ValidarControles().Equals(true)) { objBLL = new BLL_regiaoAtuacao(); if (Convert.ToInt32(txtCodigo.Text).Equals(0)) { //chama a rotina da camada de negocios para efetuar inserção ou update objBLL.inserir(criarTabela()); } else { //chama a rotina da camada de negocios para efetuar inserção ou update objBLL.salvar(criarTabela()); } //conversor para retorno ao formulario que chamou if (formChama.Name.Equals("frmRegiaoBusca")) { ((frmRegiaoBusca)formChama).carregaGrid("Regiao", objEnt.CodRegiao, dataGrid); } FormClosing -= new FormClosingEventHandler(frmRegiao_FormClosing); Close(); FormClosing += new FormClosingEventHandler(frmRegiao_FormClosing); } } catch (ArgumentException ae) { throw new Exception(ae.Message); } catch (SqlException exl) { throw exl; } catch (Exception ex) { throw ex; } }
public frmPOPMain_PRESS_LINE(UserEntity pUserEntity) { InitializeComponent(); _pUserEntity = pUserEntity; _pCORP_CODE = _pUserEntity.USER_CODE; _pUSER_CODE = _pUserEntity.USER_NAME; _pLANGUAGE_TYPE = _pUserEntity.LANGUAGE_TYPE; _pPROCESS_CODE = _pUserEntity.PROCESS_CODE; _pPROCESS_NAME = _pUserEntity.PROCESS_NAME; _pFONT_TYPE = _pUserEntity.FONT_TYPE; _pFONT_SETTING = new Font(pUserEntity.FONT_TYPE, pUserEntity.FONT_SIZE); Activated += new EventHandler(Form_Activated); FormClosing += new FormClosingEventHandler(Form_Closing); FormClosed += new FormClosedEventHandler(Form_FormClosed); Load += new EventHandler(Form_Load); }
public MainForm(PXCMSession session) { InitializeComponent(); this.g_session = session; PopulateDeviceMenu(); PopulateModuleMenu(); cmbGesturesList.Enabled = false; FormClosing += new FormClosingEventHandler(MainForm_FormClosing); Panel2.Paint += new PaintEventHandler(Panel_Paint); timer.Tick += new EventHandler(timer_Tick); timer.Interval = 3000; timer.Start(); NextKaraoke(); this.Start_Click(this, null); }
public Form1() { InitializeComponent(); try { sqlconn = new SqlConnection(constr); sqlconn.Open(); MessageBox.Show("DB 연결 성공"); } catch (Exception ex) { MessageBox.Show(ex.ToString()); } FormClosing += new FormClosingEventHandler(closing); }
private void frmMain_Load(object sender, EventArgs e) { writer = new System.IO.StringWriter(); Console.SetOut(writer); Application.ApplicationExit += new EventHandler(Application_ApplicationExit); FormClosing += new FormClosingEventHandler(frmMain_FormClosing); txtLog.TextChanged += new EventHandler(txtLog_TextChanged); txtMessage.KeyDown += new KeyEventHandler(txtMessage_KeyDown); bot = new Bot(); bot.OnRawMessage += new IrcEventHandler(Bot_OnRawMessage); bot.ConnectAll(); thread = new System.Threading.Thread(new System.Threading.ThreadStart(Log)); thread.Start(); }
public Form1() { InitializeComponent(); sizeChangeCombo.SelectedItem = 12; MouseDown += new System.Windows.Forms.MouseEventHandler(this.Form1_MouseDown); MouseUp += new System.Windows.Forms.MouseEventHandler(this.Form1_MouseUp); MouseMove += new System.Windows.Forms.MouseEventHandler(this.Form1_MouseMove); FormClosing += new FormClosingEventHandler(Form1_FormClosing); HookedKeyboardNofity += new KeyboardHooker.HookedKeyboardUserEventHandler(Form1_HookedKeyboardNofity); videoLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.VideoLabel1_LinkClicked); sizeChangeCombo.SelectedIndexChanged += new System.EventHandler(this.SizeChangeCombo_SelectedIndexChanged); colorChangeCombo.SelectedIndexChanged += new System.EventHandler(this.ColorChangeCombo_SelectedIndexChanged); backColorChangeCombo.SelectedIndexChanged += new System.EventHandler(this.BackColorChangeCombo_SelectedIndexChanged); KeyboardHooker.Hook(HookedKeyboardNofity); }
public ChartMain() { TrackEnabled = Util.TrackUsage(); Program = PROGRAM; InitializeComponent(); stickychartsbox.Checked = Chartographer.Properties.Settings.Default.stickychartson; maxchartbox.Checked = Chartographer.Properties.Settings.Default.maxcharts; try { StartPosition = FormStartPosition.Manual; Location = Chartographer.Properties.Settings.Default.startwindow; } catch (NullReferenceException) { } this.Move += new EventHandler(Form1_Move); Chartographer.Properties.Settings.Default.PropertyChanged += new PropertyChangedEventHandler(Default_PropertyChanged); Text = "Chart " + Util.TLVersion(); FormClosing += new FormClosingEventHandler(ChartMain_FormClosing); }
public frmPOPResult_T50(string part_nm, string part_cd, string order_Id) { InitializeComponent(); Activated += new EventHandler(Form_Activated); FormClosing += new FormClosingEventHandler(Form_Closing); FormClosed += new FormClosedEventHandler(Form_FormClosed); Load += new EventHandler(Form_Load); label2.Text = part_cd; label2.Text = part_nm; FontResize(label2); // FontResize(Good); // FontResize(Bad); // FontResize(Good); // FontResize(Bad); orderid = order_Id; }
public MainForm(PXCMSession session) { InitializeComponent(); this.session = session; PopulateDeviceMenu(); FormClosing += new FormClosingEventHandler(MainForm_FormClosing); MainPanel.Paint += new PaintEventHandler(Panel_Paint); MainPanel.Resize += new EventHandler(Panel_Resize); render.SetHWND(MainPanel); // Configure the default scanning mode. ScanningArea.SelectedIndex = ScanningArea.Items.IndexOf("Object"); // Hide all alerts by default. HideAlerts(); }
public Gauntlet() { TrackEnabled = Util.TrackUsage(); Program = PROGRAM; InitializeComponent(); Text += " " + Util.TLVersion(); debug(Util.TLSIdentity()); args.GotDebug += new DebugDelegate(args_GotDebug); args.ParseArgs(Environment.GetCommandLineArgs()); FormClosing += new FormClosingEventHandler(Gauntlet_FormClosing); debug(RunTracker.CountNewGetPrettyRuns(PROGRAM, Util.PROGRAM)); bw.WorkerSupportsCancellation = true; bw.RunWorkerCompleted += new RunWorkerCompletedEventHandler(bw_RunWorkerCompleted); bw.DoWork += new DoWorkEventHandler(bw_DoWork); getsymwork.WorkerSupportsCancellation = true; getsymwork.DoWork += new DoWorkEventHandler(getsymwork_DoWork); getsymwork.RunWorkerCompleted += new RunWorkerCompletedEventHandler(getsymwork_RunWorkerCompleted); getsymwork.RunWorkerAsync(); getsymwork.RunWorkerCompleted += new RunWorkerCompletedEventHandler(getsymwork_RunWorkerCompleted); if (args.isUnattended) { ordersincsv.Checked = true; if (args.HideWindow) { this.ShowInTaskbar = false; this.WindowState = FormWindowState.Minimized; } //ShowWindow(System.Diagnostics.Process.GetCurrentProcess().MainWindowHandle, SW_MINIMIZE); bindresponseevents(); queuebut_Click(null, null); } else { status("wait while tickdata is loaded..."); UpdateResponses(ResponseLoader.GetResponseList(args.DllName)); } _optdecision.Items.Clear(); _optdecision.Items.AddRange(Optimize.GetDecideable().ToArray()); if (_optdecision.Items.Count > 0) { _optdecision.Text = "NetPL"; } }
public ServerMBMain() { TradeLink.API.TLServer tls; if (Properties.Settings.Default.TLClientAddress == string.Empty) { tls = new TradeLink.Common.TLServer_WM(); } else { tls = new TradeLink.Common.TLServer_IP(Properties.Settings.Default.TLClientAddress, Properties.Settings.Default.TLClientPort); } tl = new ServerMB(tls); TrackEnabled = Util.TrackUsage(); Program = PROGRAM; InitializeComponent(); tl.SendDebugEvent += new DebugDelegate(debug); tl.LoginEvent += new VoidDelegate(tl_LoginEvent); FormClosing += new FormClosingEventHandler(ServerMBMain_FormClosing); }
public chatWindow(string in_his_ip, string in_my_ip, string in_his_name, string in_my_name, Net_class sock) { InitializeComponent(); FormClosing += new FormClosingEventHandler(chatWindow_FormClosing); //注册窗口关闭事件 listView_message.Columns[0].Width = 100; listView_message.Columns[0].TextAlign = HorizontalAlignment.Center; listView_message.Columns[1].Width = listView_message.Width - listView_message.Columns[0].Width; his_ip = in_his_ip; my_ip = in_my_ip; his_name = in_his_name; my_name = in_my_name; Sock_connected = sock; this.Text = "聊天:" + his_name; sock.sock.BeginReceive(buffer_Chat_receive, 0, buffer_Chat_receive.Length, SocketFlags.None, new AsyncCallback(clientChat_receive), sock.sock); //异步接收 }
public FormTrace() { //form events FormClosing += new FormClosingEventHandler(FormTrace_FormClosing); Resize += new EventHandler(FormTrace_Resize); MouseWheel += new MouseEventHandler(FormTrace_MouseWheel); //component events InitializeComponent(); hScrollBarWindow.ValueChanged += new EventHandler(hScrollBarWindow_ValueChanged); pictureBoxEeg.MouseDown += new MouseEventHandler(pictureBoxEeg_MouseDown); pictureBoxEeg.Width = m_picWidth; pictureBoxEeg.Height = m_picHeight; m_picHeightMargin = this.Height - m_picHeight; m_picWidthMargin = this.Width - m_picWidth; setDefaults(); loadSettings(); }
public SecurityMain() { InitializeComponent(); Text += " " + Util.TLVersion(); var tmp = Properties.Settings.Default.programlist.Split(','); if ((tmp.Length > 0)) { _program.AutoCompleteCustomSource.AddRange(tmp); } tsw = new ThreeSharpWrapper(awsid, awskey); FormClosing += new FormClosingEventHandler(SecurityMain_FormClosing); Resize += new EventHandler(SecurityMain_Resize); if (Width > 0) { dw.Width = Width; } debug("For setup help: " + HELPURL); }
public InfoWindow(string XMLInfoFile, WindowPositions winpos) { if (File.Exists(XMLInfoFile)) { _xmlInfoFile = XMLInfoFile; _winpos = winpos; InitializeComponent(); FormClosing += new FormClosingEventHandler(InfoWindow_FormClosing); Paint += new PaintEventHandler(InfoWindow_Paint); Resize += new EventHandler(InfoWindow_Resize); tmr.Interval = 5000; tmr.Tick += new EventHandler(tmr_Tick); btnClose.Click += new EventHandler(btnClose_Click); } }
private void Init() { // add event handlers pbMap.MouseDown += new MouseEventHandler(mapPicBox_MouseDown); pbMap.MouseMove += new MouseEventHandler(mapPicBox_MouseMove); pbMap.MouseUp += new MouseEventHandler(mapPicBox_MouseUp); this.KeyDown += new KeyEventHandler(d2dMapEditor_KeyDown); this.KeyPreview = true; FormClosing += new FormClosingEventHandler(D2DMapEditor_FormClosing); // create tooltips for tools ToolTip toolTips = new ToolTip(); toolTips.AutoPopDelay = 5000; toolTips.InitialDelay = 500; toolTips.ReshowDelay = 500; toolTips.ShowAlways = true; toolTips.SetToolTip(btnToolSelection, "Selection(S)"); toolTips.SetToolTip(btnToolBrush, "Brush(B)"); toolTips.SetToolTip(btnToolEraser, "Eraser(E)"); toolTips.SetToolTip(btnToolFill, "Fill(F)"); toolTips.SetToolTip(btnToolSelectTile, "Select Tile(T)"); toolTips.SetToolTip(btnAddLayer, "Add Layer"); toolTips.SetToolTip(btnDeleteLayer, "Delete Layer"); toolTips.SetToolTip(btnLayerMoveUp, "Move Up"); toolTips.SetToolTip(btnLayerMoveDown, "Move Down"); _map_info = new MapInfo(); // select brush as default tool SelectTool(ToolType.brush); _history = new History(); undoToolStripMenuItem.Enabled = false; redoToolStripMenuItem.Enabled = false; _clipboard = new Clipboard(); pasteToolStripMenuItem.Enabled = false; saveMapToolStripMenuItem.Enabled = false; _tile_library = new Tile[0]; }
private void UserInitialization() { serialPort1.DataReceived += port_DataReceived; FormClosing += new FormClosingEventHandler(Form_FormClosing); btnStop.Enabled = false; btnAcceptWeight.Enabled = false; LoadSetting(); LoadProduct(); LoadLotNo(); lblMessage.Text = Constants.CHOOSE_QUEUE; if (System.Diagnostics.Debugger.IsAttached) { plSimulator.Visible = true; } else { plSimulator.Visible = false; } }
public Form1() { InitializeComponent(); timer = new Timer(); timer.Interval = 2000; timer.Tick += new EventHandler(TimerEventProcessor); Form2 form2 = new Form2(this); form2.Show(); Shown += new EventHandler(Form1_Shown); this.MaximizeBox = false; this.StartPosition = FormStartPosition.CenterScreen; this.MinimumSize = new Size(800, 600); FormClosing += new FormClosingEventHandler(OnClosing); tableLayoutPanel4.BorderStyle = BorderStyle.FixedSingle; }
/// <summary> /// Função que resume as informações para enviar a classe de negocios para salvar /// </summary> private void Salvar() { try { if (ValidarControles(CriarTabela)) { CargoController apiCargo = new CargoController(); if (Convert.ToInt16(txtCodigo.Text).Equals(0)) { //chama a rotina da camada de negocios para efetuar inserção ou update apiCargo.Insert(CriarTabela, out listaCargo); } else { //chama a rotina da camada de negocios para efetuar inserção ou update apiCargo.Update(CriarTabela, out listaCargo); } //conversor para retorno ao formulario que chamou if (formChama.Name.Equals("frmCargoBusca")) { ((frmCargoBusca)formChama).CarregaGrid(listaCargo, dataGrid); } FormClosing -= new FormClosingEventHandler(FrmCargo_FormClosing); Close(); FormClosing += new FormClosingEventHandler(FrmCargo_FormClosing); } } catch (ArgumentException ae) { throw new Exception(ae.Message); } catch (SqlException exl) { throw exl; } catch (Exception ex) { throw ex; } }
public ServerControl() { InitializeComponent(); UpdateServerButtons(); SyncCheckboxSettings(); _authServer.WorkingDirectory = serverPath; _authServer.FileName = serverPath + "\\" + authExe + ".exe"; _worldServer.WorkingDirectory = serverPath; _worldServer.FileName = serverPath + "\\" + worldExe + ".exe"; if (StaleLauncherContext.clientEntryPath == string.Empty) { launchClientToolStripMenuItem.Dispose(); } FormClosing += new FormClosingEventHandler(OnFormExit); }
public ServerDBFXMain() { TradeLink.API.TLServer tl; if (Properties.Settings.Default.TLClientAddress == string.Empty) { tl = new TLServer_WM(); } else { tl = new TLServer_IP(Properties.Settings.Default.TLClientAddress, Properties.Settings.Default.TLClientPort); } _dbfx = new ServerDBFX(tl); TrackEnabled = Util.TrackUsage(); Program = PROGRAM; InitializeComponent(); _dbfx.SendDebug += new TradeLink.API.DebugFullDelegate(_dbfx_SendDebug); FormClosing += new FormClosingEventHandler(ServerDBFXMain_FormClosing); }
public TextSplitExport() { InitializeComponent(); bOK.Click += new EventHandler(bOK_Click); bCancel.Click += new EventHandler(bCancel_Click); bBrowseExport.Click += new EventHandler(bBrowseExport_Click); Load += new EventHandler(TSSettings_Load); cDisplaySlideInfo.CheckedChanged += new EventHandler(cDisplaySlideInfo_Changed); FormClosing += new FormClosingEventHandler(TSExport_Closing); tDelimiter.LostFocus += new EventHandler(tDelimiter_LostFocus); tDelimiter.Text = Properties.Settings.Default.DefaultDelimiter; tInfoText.Text = Properties.Settings.Default.DefaultInfoText; Globals.ToolTip.SetToolTip(tInfoText, "Sets the slide info text that is shown for each slide in the txt file. Use $C$ to refer to the current slide index and $T$ for the total number of slides"); tempDelimiter = tDelimiter.Text; }
private void InitializeEvent() { FormClosing += new FormClosingEventHandler((object sender, FormClosingEventArgs e) => { e.Cancel = Program.DisableCloseButton; if (Program.DisableCloseButton) { return; } if (_NormalMonitorProcess != null) { _NormalMonitorProcess.Abort(); } if (_FileMonitorProcess != null) { _FileMonitorProcess.Abort(); } }); }
private void frmEstatus_Load(object sender, EventArgs e) { objMicrotexto = new clsMicrotexto(); if (!login(ConfigurationManager.AppSettings["userWSLicencias"], ConfigurationManager.AppSettings["passWSLicencias"])) { //MessageBox.Show("Error al conectarse al servidor. Revise su conexión", "AVISO", MessageBoxButtons.OK, MessageBoxIcon.Error); // Close(); FormClosing -= new FormClosingEventHandler(frmEstatus_FormClosing); Application.Exit(); } else { iniciarServer(); // initTCP(); deleteFiles(); timer1.Interval = 5000; timer1.Start(); } }
public Form_StockIssued() { InitializeComponent(); UserSettingsComponent(); LoadSetting(); Shown += Form_Shown; txtBarcodeNo.KeyDown += TxtBarcodeNo_KeyDown; serialPort1.DataReceived += port_DataReceived; FormClosing += new FormClosingEventHandler(Form_FormClosing); btnStart.Enabled = false; btnStop.Enabled = false; if (System.Diagnostics.Debugger.IsAttached) { plSimulator.Visible = true; } else { plSimulator.Visible = false; } }
public MainForm(PXCMSession session) { InitializeComponent(); this.m_session = session; streaming.RenderFrame += new EventHandler <RenderFrameEventArgs>(RenderFrameHandler); FormClosing += new FormClosingEventHandler(FormClosingHandler); picbox_Main.Paint += new PaintEventHandler(PaintHandler); picbox_Main.Resize += new EventHandler(ResizeHandler); render.SetHWND(picbox_Main); streaming.File = "record.rssdk"; streaming.MarkAsRecord(); button_stop.Enabled = false; }
public FormStateChangesEditor(AnimationEditor editor, AnimationNode animation, WadStateChange newStateChange = null) { InitializeComponent(); _editor = editor; dgvControls.CreateNewRow = () => new WadStateChangeRow() { StateName = TrCatalog.GetStateName(_editor.Tool.DestinationWad.GameVersion, _editor.Moveable.Id.TypeId, 0) }; dgvControls.DataGridView = dgvStateChanges; dgvControls.Enabled = true; Initialize(animation, newStateChange); _editor.Tool.EditorEventRaised += Tool_EditorEventRaised; // Set window property handlers Configuration.LoadWindowProperties(this, _editor.Tool.Configuration); FormClosing += new FormClosingEventHandler((s, e) => Configuration.SaveWindowProperties(this, _editor.Tool.Configuration)); }
private void UserInitialization() { serialPort1.DataReceived += port_DataReceived; FormClosing += new FormClosingEventHandler(Form_FormClosing); btnStart.Enabled = false; btnStop.Enabled = false; btnAcceptWeight.Enabled = false; LoadSetting(); var reportPath = Application.StartupPath; doc.Load(Constants.REPORT_FILE); if (System.Diagnostics.Debugger.IsAttached) { plSimulator.Visible = true; } else { plSimulator.Visible = false; } }
/// <summary> /// Função que resume as informações para enviar a classe de negocios para salvar /// </summary> private void salvar() { try { if (ValidarControles().Equals(true)) { if (ValidarSenha().Equals(true)) { objBLL = new BLL_usuario(); //chama a rotina da camada de negocios para efetuar inserção ou update objBLL.salvarSenha(criarTabela()); //conversor para retorno ao formulario que chamou if (formChama.Name.Equals("frmUsuario")) { buscarUsuario(txtCodUsuario.Text); ((frmUsuario)formChama).preencher(listaUsuario); } FormClosing -= new FormClosingEventHandler(frmSenha_FormClosing); Close(); FormClosing += new FormClosingEventHandler(frmSenha_FormClosing); } } } catch (ArgumentException ae) { throw new Exception(ae.Message); } catch (SqlException exl) { throw exl; } catch (Exception ex) { throw ex; } }
public GBTradeLink() { TrackEnabled = Util.TrackUsage(); Program = PROGRAM; InitializeComponent(); TradeLink.API.TLServer tls; if (Properties.Settings.Default.TLClientAddress == string.Empty) { tls = new TradeLink.Common.TLServer_WM(); } else { tls = new TradeLink.Common.TLServer_IP(Properties.Settings.Default.TLClientAddress, Properties.Settings.Default.TLClientPort); } try { GB = new GrayBox(tls, this.lstStatusList, this.bt_Connect); } catch (Exception ex) { const string URL = @"http://code.google.com/p/tradelink/wiki/HoldBrosGrayBox"; debug("problem connecting to graybox..."); debug("please check guide at: " + URL); System.Diagnostics.Process.Start(URL); debug(ex.Message + ex.StackTrace); } UpdateLoginDetails(); FormClosing += new FormClosingEventHandler(GBTradeLink_FormClosing); GB.Start(); this.txtPasword.Focus(); }