private void InitializeContext() { components = new System.ComponentModel.Container(); _notifyIcon = new NotifyIcon(components) { ContextMenuStrip = new ContextMenuStrip(), Icon = _onIcon, Text = Tooltip, Visible = true }; _mainWindow = new AboutBox(); components.Add(_mainWindow); BuildMenu(); _notifyIcon.MouseDown += _notifyIcon_MouseDown; //notifyIcon.ContextMenuStrip.Opening += ContextMenuStrip_Opening; //notifyIcon.DoubleClick += notifyIcon_DoubleClick; //notifyIcon.MouseUp += notifyIcon_MouseUp; _enabled = true; SetChecks(); _timer.Start(); }
private void InitializeComponent() { components = new System.ComponentModel.Container(); // first 8 letters should be unique this.ServiceName = "SampleService"; // if you want to log service event to log registered while installing the service string newLogName = this.ServiceName + "Log"; string newSourceName = this.ServiceName; if (!EventLog.SourceExists(newSourceName)) { EventLog.CreateEventSource(newSourceName, newLogName); } serviceLog = new EventLog(); serviceLog.Source = newSourceName; serviceLog.Log = newLogName; // Causes log to be disposed when the service is disposed components.Add(serviceLog); // Flags set whether or not to handle that specific type of event. this.CanHandlePowerEvent = true; this.CanHandleSessionChangeEvent = true; this.CanPauseAndContinue = true; this.CanShutdown = true; this.CanStop = true; }
public FeatureStructureTreeView(System.ComponentModel.IContainer container) { /// /// Required for Windows.Forms Class Composition Designer support /// container.Add(this); Init(); }
public HMISoundPlayer(System.ComponentModel.IContainer container) : this() { //Required for Windows.Forms Class Composition Designer support if (container != null) { container.Add(this); } }
[System.Diagnostics.DebuggerNonUserCode()] public HostlinkKeyence(System.ComponentModel.IContainer container) : this() { //Required for Windows.Forms Class Composition Designer support if (container != null) { container.Add(this); } }
public MyTopLevelComponent2(System.ComponentModel.IContainer container) : this() { // Requis pour la prise en charge du Concepteur de composition de classes Windows.Forms if (container is object) { container.Add(this); } }
/// <summary> /// Create the instance resources for User Preferences. /// </summary> /// <param name="container">A container that holds this object.</param> public UserPreferences(System.ComponentModel.IContainer container) { // Add this component to the list of components managed by it's client. container.Add(this); // This is used to keep track of the number of references to this shared component. When the count drops to zero, the // external resources (namely the thread) are destroyed. UserPreferences.instanceCount++; }
public StatusItem(System.ComponentModel.IContainer container) : this() { //Required for Windows.Forms Class Composition Designer support if ((container != null)) { container.Add(this); } }
public DropDownObject(System.ComponentModel.IContainer container) { this.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)))); this.Name = "cboDropDownObject"; this.TabIndex = 0; this.TabStop = false; container.Add(this); }
public GlobalEvents(System.ComponentModel.IContainer container) { if (container == null) { throw new ArgumentNullException("container"); } container.Add(this); }
public _MultiColumnComboBox(System.ComponentModel.IContainer container) { /// <summary> /// Required for Windows.Forms Class Composition Designer support /// </summary> container.Add(this); InitializeComponent(); // // TODO: Add any constructor code after InitializeComponent call // }
public TabPageEx(System.ComponentModel.IContainer container) { /// /// Required for Windows.Forms Class Composition Designer support /// container.Add(this); InitializeComponent(); // // TODO: Add any constructor code after InitializeComponent call // }
public NonImageTypeFileSelectedDisplayMessage(System.ComponentModel.IContainer container) { /// /// Required for Windows.Forms Class Composition Designer support /// container.Add(this); InitializeComponent(); // // TODO: Add any constructor code after InitializeComponent call // }
public MetaData(System.ComponentModel.IContainer container, string file) { /// /// Required for Windows.Forms Class Composition Designer support /// container.Add(this); InitializeComponent(); this.imageName = file; image = OpenFileImageExt(file); if (image == IntPtr.Zero) { throw new ApplicationException("Could not open file: " + file); } }
/// <summary> /// Initializes the loader. /// </summary> /// <param name="container">The container for this object.</param> public StylesheetLoader(System.ComponentModel.IContainer container) { /// Required for Windows.Forms Class Composition Designer support container.Add(this); InitializeComponent(); // The user can be forced to enter the connection settings even if preferences have been saved from a previous session. this.ForceLogin = false; // Load the constants from the configuration file. this.Assembly = ConfigurationManager.AppSettings["assembly"]; this.Type = ConfigurationManager.AppSettings["type"]; this.Method = ConfigurationManager.AppSettings["method"]; this.ConfigurationCode = ConfigurationManager.AppSettings["configurationCode"]; }
private void CreateMonitor() { var objectBuilder = new ObjectBuilder(); var sensor = objectBuilder.Create <ISensor>(_configuration.SensorTypeName); (sensor as IConfigurable)?.Configure(_configuration.SensorProperties); var indicator = objectBuilder.Create <IIndicator>(_configuration.IndicatorTypeName, _notifyIcon); (indicator as IConfigurable)?.Configure(_configuration.IndicatorProperties); _monitor = new Monitor(sensor, indicator); components.Add(_monitor); }
} // 1.0.000 #endregion #region ZeroitAyensuTabPage class constructor (and Dispose), etc // public ZeroitAyensuTabPage(System.ComponentModel.IContainer container) // public ZeroitAyensuTabPage() // // protected override void Dispose( bool disposing ) // /// <summary> /// Initializes a new instance of the <see cref="ZeroitAyensuTabPage"/> class. /// </summary> /// <param name="container">The container.</param> public ZeroitAyensuTabPage(System.ComponentModel.IContainer container) // 1.0.000 { Initialize_gblRunModeIs(); // Set [gblRunModeIs_DebugMode] and [gblRunModeIs_DesignMode] // 1.0.000 /// /// Required for Windows.Forms Class Composition Designer support /// if (gblRunModeIs_DesignMode) // 1.0.001 { // 1.0.001 container.Add(this); } // 1.0.001 InitializeComponent(); // // TODO: Add any constructor code after InitializeComponent call // }
public MainWindow() { this.Height = 800; components = new System.ComponentModel.Container(); m_mediator = new Mediator(); CreateSideBarInfoBarAdapter(); if (!(components is FwContainer)) { components = new FwContainer(components); } components.Add(this); SetupSideBarInfoBar(); AddDraftView(); AddVerticalView(); AddVerticalView2(); }
public SnakeGame() { components = new System.ComponentModel.Container(); FormBorderStyle = FormBorderStyle.FixedSingle; Text = $"Snake Score:{_score}"; AutoScaleMode = AutoScaleMode.Font; ClientSize = new Size(800, 450); _gridControl = new GridControl(XLenght, YLenght, new Size(Width - 15, Height - 40)); Controls.Add(_gridControl); KeyPreview = true; Resize += (sender, args) => { _gridControl.Size = new Size(Width - 15, Height - 40); _gridControl.Resize(); }; _timer = new Timer(components) { Interval = 1000 / Speed }; components.Add(_timer); _timer.Tick += GameLoop; NewGame(); }
/// <summary> /// De-persist the specified change summary /// </summary> public System.ComponentModel.IComponent DePersist(System.Data.IDbConnection conn, decimal identifier, System.ComponentModel.IContainer container, SVC.Core.ComponentModel.HealthServiceRecordSiteRoleType?role, bool loadFast) { // TODO: Ensure that when a parent with context conduction exists, to grab contextual data (authors, etc...) from the parent ChangeSummary retVal = new ChangeSummary(); // Configuration service ISystemConfigurationService configService = ApplicationContext.ConfigurationService; //ApplicationContext.Current.GetService(typeof(ISystemConfigurationService)) as ISystemConfigurationService; // Get the health service event IDbCommand cmd = DbUtil.CreateCommandStoredProc(conn, null); try { cmd.CommandText = "get_hsr_crnt_vrsn"; cmd.Parameters.Add(DbUtil.CreateParameterIn(cmd, "hsr_id_in", DbType.Decimal, identifier)); decimal tsId = default(decimal), cdId = default(decimal), rplcVersionId = default(decimal); // Read data IDataReader reader = cmd.ExecuteReader(); try { if (!reader.Read()) { return(null); } retVal.Id = Convert.ToDecimal(reader["hsr_id"]); retVal.VersionIdentifier = Convert.ToDecimal(reader["hsr_vrsn_id"]); retVal.AlternateIdentifier = new VersionedDomainIdentifier() { Domain = configService.OidRegistrar.GetOid(ClientRegistryOids.EVENT_OID).Oid, Identifier = retVal.Id.ToString(), Version = retVal.VersionIdentifier.ToString() }; retVal.LanguageCode = reader["lang_cs"].ToString(); retVal.Timestamp = DateTime.Parse(Convert.ToString(reader["aut_utc"])); retVal.Status = (StatusType)Convert.ToDecimal(reader["status_cs_id"]); tsId = reader["efft_ts_set_id"] == DBNull.Value ? default(decimal) : Convert.ToDecimal(reader["efft_ts_set_id"]); cdId = Convert.ToDecimal(reader["evt_typ_cd_id"]); rplcVersionId = reader["rplc_vrsn_id"] == DBNull.Value ? default(decimal) : Convert.ToDecimal(reader["rplc_vrsn_id"]); } finally { reader.Close(); } // Read codes and times retVal.ChangeType = DbUtil.GetCodedValue(conn, null, cdId); if (tsId != default(decimal)) { retVal.EffectiveTime = DbUtil.GetEffectiveTimestampSet(conn, null, tsId); } if (container != null) { container.Add(retVal); } if (role.HasValue && (role.Value & HealthServiceRecordSiteRoleType.ReplacementOf) == HealthServiceRecordSiteRoleType.ReplacementOf) { ; } else { DbUtil.DePersistComponents(conn, retVal, this, loadFast); } } finally { cmd.Dispose(); } return(retVal); }
public OperatorsData(System.ComponentModel.IContainer container) { container.Add(this); InitializeComponent(); initData(); }
/// <summary> /// Constructor /// </summary> /// <param name="container">Parent container</param> public GlassForm(System.ComponentModel.IContainer container) { container.Add(this); InitializeComponent(); }
public void New(System.ComponentModel.IContainer Container) { //Windows.Forms 类撰写设计器支持所必需的 Container.Add(this); }
public SystemHotkey(System.ComponentModel.IContainer container) { container.Add(this); InitializeComponent(); m_window.ProcessMessage += MessageEvent; }
public EnumDataSourceBase(System.ComponentModel.IContainer container) { container.Add(this); InitializeComponent(); }
public Render(System.ComponentModel.IContainer container) { container.Add(this); InitializeComponent(); }
public NotifyIcon(Main m) { this.m = m; components = new System.ComponentModel.Container(); menu = new ContextMenuStrip(); exit = new ToolStripMenuItem(); settings = new ToolStripMenuItem(); help = new ToolStripMenuItem(); tobase64 = new ToolStripMenuItem(); tolink = new ToolStripMenuItem(); exit.Text = "Quitter"; exit.Image = ScreenShot.Properties.Resources.close.ToBitmap(); exit.BackColor = c; exit.Click += (ob, ev) => { m.Close(); }; help.Text = "Aide"; help.Image = ScreenShot.Properties.Resources.help.ToBitmap(); help.BackColor = c; help.Click += (ob, ev) => { Alert(("-" + CONFIG.XML.PRINT_SCREEN.Key + "+" + CONFIG.XML.PRINT_SCREEN.Modifiers + " : Transforme en lien l'écran actif.\n" + "-" + CONFIG.XML.PRINT_WINDOW.Key + "+" + CONFIG.XML.PRINT_WINDOW.Modifiers + " : Transforme en lien la fenêtre active.\n" + "-" + CONFIG.XML.PRINT_FILE.Key + "+" + CONFIG.XML.PRINT_FILE.Modifiers + " : Transforme en lien le presse-papier.\n" + "-" + CONFIG.XML.PRINT_CROP.Key + "+" + CONFIG.XML.PRINT_CROP.Modifiers + " : Ouvre la fenêtre de découpage.\n") .Replace("Control", "Ctrl").Replace("+None", ""), "Raccourcis", ToolTipIcon.Info, 20000); }; settings.Text = "Options"; settings.Image = ScreenShot.Properties.Resources.settings.ToBitmap(); settings.BackColor = c; settings.Click += (ob, ev) => { if (op == null || op.IsDisposed) { op = new Options(m); op.ShowDialog(); op.Dispose(); } }; tobase64.Text = "Transformer en texte"; tobase64.Image = ScreenShot.Properties.Resources.tobase64.ToBitmap(); tobase64.BackColor = c; tobase64.Click += (ob, ev) => { m.GetBase64(); }; tolink.Text = "Tranformer en lien"; tolink.Image = ScreenShot.Properties.Resources.tolink.ToBitmap(); tolink.BackColor = c; tolink.Click += (ob, ev) => { m.Load_Clipboard(); }; menu.Items.Add(tolink); menu.Items.Add(tobase64); menu.Items.Add(new ToolStripSeparator()); menu.Items.Add(settings); menu.Items.Add(help); menu.Items.Add(new ToolStripSeparator()); menu.Items.Add(exit); components.Add(menu); nIcon = new System.Windows.Forms.NotifyIcon(components); nIcon.Icon = ScreenShot.Properties.Resources.connection; nIcon.Text = "Connexion au serveur.."; nIcon.ContextMenuStrip = menu; nIcon.Visible = true; nIcon.MouseDoubleClick += (ob, ev) => { settings.PerformClick(); }; }
public pub_Procees(System.ComponentModel.IContainer container) { container.Add(this); InitializeComponent(); }
public EthernetIPforCLXCom(System.ComponentModel.IContainer container) : this() { //Required for Windows.Forms Class Composition Designer support container.Add(this); }