本文整理汇总了C#中System.ComponentModel.Container类的典型用法代码示例。如果您正苦于以下问题:C# System.ComponentModel.Container类的具体用法?C# System.ComponentModel.Container怎么用?C# System.ComponentModel.Container使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
System.ComponentModel.Container类属于命名空间,在下文中一共展示了System.ComponentModel.Container类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: frmLogin
public frmLogin()
{
InitializeComponent();
this.btnExit.Image = FWImageDic.EXIT_IMAGE16;
this.btnConfig.Image = FWImageDic.CONFIG_IMAGE16;
this.btnLogin.Image = FWImageDic.LOGIN_IMAGE16;
this.Icon = FrameworkParams.ApplicationIcon;
components = new System.ComponentModel.Container();
user = new User();
user.loadCookies();
txtUsername.EditValue = user.username;
txtPassword.EditValue = user.password;
if (user.savePass == "Y") chkRememberPwd.Checked = true;
if (user.isAutoLogin == "Y") chkAutoLogin.Checked = true;
if (chkAutoLogin.Checked) FrameworkParams.isSkipLogin = true;
// init skin
FrameworkParams.currentSkin = new PLSkin(this.components);
FrameworkParams.option = new Option();
FrameworkParams.option.load();
Application.CurrentCulture = ApplyFormatAction.GetCultureInfo();
FrameworkParams.currentSkin.SelectSkin(HelpNumber.ParseInt32(FrameworkParams.option.Skin));
this.Shown += new EventHandler(frmLogin_Shown);
}
开发者ID:khanhdtn,项目名称:my-fw-win,代码行数:25,代码来源:frmLogin.cs
示例2: ClipBoardDgv
public ClipBoardDgv()
{
System.ComponentModel.IContainer components = new System.ComponentModel.Container();
ContextMenuStrip contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(components);
ToolStripMenuItem copyToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
ToolStripMenuItem pasteCtrlVToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
copyToolStripMenuItem,
pasteCtrlVToolStripMenuItem});
contextMenuStrip1.Name = "contextMenuStrip1";
contextMenuStrip1.Size = new System.Drawing.Size(145, 48);
copyToolStripMenuItem.Name = "copyToolStripMenuItem";
copyToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.C)));
copyToolStripMenuItem.Size = new System.Drawing.Size(144, 22);
copyToolStripMenuItem.Text = "&Copy";
copyToolStripMenuItem.Click += new System.EventHandler(CopyToolStripMenuItem_Click);
pasteCtrlVToolStripMenuItem.Name = "pasteCtrlVToolStripMenuItem";
pasteCtrlVToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.V)));
pasteCtrlVToolStripMenuItem.Size = new System.Drawing.Size(144, 22);
pasteCtrlVToolStripMenuItem.Text = "Paste";
pasteCtrlVToolStripMenuItem.Click += new System.EventHandler(PasteCtrlVToolStripMenuItem_Click);
ContextMenuStrip = contextMenuStrip1;
}
开发者ID:WimReddingius,项目名称:SourceLiveTimer,代码行数:27,代码来源:ClipBoardDgv.cs
示例3: TurnOn
public ActionResult TurnOn()
{
var components = new System.ComponentModel.Container();
var arduinoPort = new System.IO.Ports.SerialPort(components) {PortName = "COM7"};
arduinoPort.Open();
string on = "H";
arduinoPort.WriteLine(on);
arduinoPort.Close();
return new HttpStatusCodeResult(HttpStatusCode.OK);
}
开发者ID:martycochrane,项目名称:ArduinoASPMVCApp,代码行数:11,代码来源:ArduinoController.cs
示例4: TerrainForm
// constructor
public TerrainForm()
{
this.components = new System.ComponentModel.Container();
this.Size = new System.Drawing.Size(SCREEN_SIZE, SCREEN_SIZE);
this.Text = "Terrain Viewer";
this.SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.Opaque, true);
this.Icon = TerrainGenerator.Properties.Resources.Ico;
this.CenterToScreen();
terrainSettings = new TerrainSettings();
heightMap = new HeightMap();
}
开发者ID:TrentSterling,项目名称:TerrainGenerator,代码行数:13,代码来源:TerrainForm.cs
示例5: GraphControl
public GraphControl()
{
// This is mostly just for the right-click menu now... We probably
// no longer need to derive from HyperGraph.GraphControl -- instead, just turn this
// into a helper class.
// But, then again, maybe even HyperGraph.GraphControl could be split into several
// small pieces using the ATF AdaptableControl type stuff...?
_components = new System.ComponentModel.Container();
_nodeMenu = CreateNodeMenu();
_emptySpaceMenu = CreateEmptySpaceMenu();
ConnectorDoubleClick += OnConnectorDoubleClick;
ShowElementMenu += OnShowElementMenu;
}
开发者ID:coreafive,项目名称:XLE,代码行数:13,代码来源:GraphControl.cs
示例6: InitializeContext
private void InitializeContext()
{
components = new System.ComponentModel.Container();
notifyIcon = new NotifyIcon(components)
{
ContextMenuStrip = new ContextMenuStrip(),
Icon = new Icon("../../" + IconFileName),
Text = DefaultTooltip,
Visible = true
};
notifyIcon.ContextMenuStrip.Opening += ContextMenuStrip_Opening;
//notifyIcon.DoubleClick += notifyIcon_DoubleClick;
}
开发者ID:jameshruby,项目名称:Csharp,代码行数:14,代码来源:TrayApplicationContext.cs
示例7: SystemTrayApplicationContext
public SystemTrayApplicationContext()
{
components = new System.ComponentModel.Container();
notifyIcon = new NotifyIcon(components)
{
ContextMenuStrip = new ContextMenuStrip(),
Text = Application.ProductName,
Visible = true
};
notifyIcon.ContextMenuStrip.Opening += ContextMenuStrip_Opening;
notifyIcon.DoubleClick += notifyIcon_DoubleClick;
//notifyIcon.Click += notifyIcon_Click;
notifyIcon.MouseUp += notifyIcon_MouseUp;
}
开发者ID:wyldphyre,项目名称:KaomojiTray,代码行数:14,代码来源:SystemTrayApplicationContext.cs
示例8: InitializeContext
private void InitializeContext()
{
components = new System.ComponentModel.Container();
notifyIcon = new NotifyIcon(components)
{
ContextMenuStrip = new ContextMenuStrip(),
Icon = Properties.Resources.bike,
Text = DefaultTooltip,
Visible = true
};
notifyIcon.ContextMenuStrip.Opening += ContextMenuStrip_Opening;
notifyIcon.DoubleClick += showCycliAgentForm_DblClick;
// Start the data sender
CycliInterface.Instance().Initialise();
}
开发者ID:Cycli,项目名称:Cycli,代码行数:16,代码来源:CustomApplicationContext.cs
示例9: InitializeComponent
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Program));
this.notifyIcon1 = new System.Windows.Forms.NotifyIcon(this.components);
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
this.btnStop = new System.Windows.Forms.ToolStripMenuItem();
//this.btnStartAutomatically = new System.Windows.Forms.ToolStripMenuItem();
this.contextMenuStrip1.SuspendLayout();
//
// notifyIcon1
//
this.notifyIcon1.ContextMenuStrip = this.contextMenuStrip1;
Stream imgStream = Assembly.GetExecutingAssembly().GetManifestResourceStream("WallpaperChange.favicon.ico");
Icon ico = new Icon(imgStream);
this.notifyIcon1.Icon = ico;//((System.Drawing.Icon)(resources.GetObject("favicon.ico")));
this.notifyIcon1.Tag = "WallpaperChanger";
this.notifyIcon1.Text = "WallpaperChanger";
this.notifyIcon1.Visible = true;
//
// contextMenuStrip1
//
this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.btnStop });
//this.btnStartAutomatically,
this.contextMenuStrip1.Name = "contextMenuStrip1";
this.contextMenuStrip1.Size = new System.Drawing.Size(176, 76);
//
// toolStripMenuItem1
//
this.btnStop.Name = "btnStop";
this.btnStop.Size = new System.Drawing.Size(175, 22);
this.btnStop.Text = "Stop";
this.btnStop.Click += new System.EventHandler(this.btnStop_Click);
//
// btnStartAutomatically
//
//this.btnStartAutomatically.CheckOnClick = true;
//this.btnStartAutomatically.Name = "btnStartAutomatically";
//this.btnStartAutomatically.Size = new System.Drawing.Size(175, 22);
//this.btnStartAutomatically.Text = "Start Automatically";
//this.btnStartAutomatically.Click += new System.EventHandler(this.btnStartAutomatically_Click);
//
// Changer
//
this.contextMenuStrip1.ResumeLayout(false);
}
开发者ID:gabr,项目名称:WallpaperChange,代码行数:46,代码来源:Program.cs
示例10: InitializeComponent
//NOTE: The following procedure is required by the Windows Form Designer
//It can be modified using the Windows Form Designer.
//Do not modify it using the code editor.
[System.Diagnostics.DebuggerStepThrough()]private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.ErrorNotify = new System.Windows.Forms.ErrorProvider(this.components);
this.DockingContextMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
this.ToolStripMenuItem1 = new System.Windows.Forms.ToolStripSeparator();
this.mnuClose = new System.Windows.Forms.ToolStripMenuItem();
this.mnuClose.Click += new System.EventHandler(mnuClose_Click);
((System.ComponentModel.ISupportInitialize) this.ErrorNotify).BeginInit();
this.DockingContextMenu.SuspendLayout();
this.SuspendLayout();
//
//ErrorNotify
//
this.ErrorNotify.ContainerControl = this;
//
//DockingContextMenu
//
this.DockingContextMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {this.ToolStripMenuItem1, this.mnuClose});
this.DockingContextMenu.Name = "DockingContextMenu";
this.DockingContextMenu.Size = new System.Drawing.Size(151, 32);
//
//ToolStripMenuItem1
//
this.ToolStripMenuItem1.Name = "ToolStripMenuItem1";
this.ToolStripMenuItem1.Size = new System.Drawing.Size(147, 6);
//
//mnuClose
//
this.mnuClose.Name = "mnuClose";
this.mnuClose.Size = new System.Drawing.Size(150, 22);
this.mnuClose.Text = "&Close Window";
//
//DockableForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6.0, 13.0);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(335, 278);
this.KeyPreview = true;
this.Name = "DockableForm";
this.TabPageContextMenuStrip = this.DockingContextMenu;
((System.ComponentModel.ISupportInitialize) this.ErrorNotify).EndInit();
this.DockingContextMenu.ResumeLayout(false);
this.ResumeLayout(false);
}
开发者ID:okyereadugyamfi,项目名称:softlogik,代码行数:49,代码来源:DockableForm.Designer.cs
示例11: GetTurnLed
public String GetTurnLed(Boolean OnOrOff)
{
var components = new System.ComponentModel.Container();
var arduinoPort = new System.IO.Ports.SerialPort(components) { PortName = "COM7" };
arduinoPort.Open();
string on;
if (OnOrOff == true)
{
on = "H";
}
else
{
on = "L";
}
arduinoPort.WriteLine(on);
arduinoPort.Close();
return message;
}
开发者ID:martycochrane,项目名称:ArduinoASPWebAPIApp,代码行数:19,代码来源:ArduinoController.cs
示例12: CustomApplicationContext
public CustomApplicationContext()
{
components = new System.ComponentModel.Container();
notifyIcon = new NotifyIcon(components)
{
ContextMenuStrip = CreateContextMenuStrip(),
Icon = Properties.Resources.Clock,
Text = "Work Track Lite",
Visible = true
};
//notifyIcon.DoubleClick += notifyIcon_DoubleClick;
notifyIcon.BalloonTipClicked += new EventHandler(notifyIcon_BalloonTipClicked);
settings = Properties.Settings.Default;
dataStore = new DataStore();
timer = new Timer(components);
timer.Tick += new EventHandler(timer_Tick);
ConfigureInitialTimer();
}
开发者ID:helgihaf,项目名称:Alpha,代码行数:20,代码来源:CustomApplicationContext.cs
示例13: InitializeContext
/// <summary>
/// Initializes the context.
/// </summary>
private void InitializeContext()
{
string DefaultTooltip = "Pandora Tray";
_Components = new System.ComponentModel.Container();
_NotifyIcon = new NotifyIcon(_Components)
{
ContextMenuStrip = new ContextMenuStrip(),
Icon = Properties.Resources.Metro_Keyboard_Blue,
BalloonTipIcon = ToolTipIcon.Info,
BalloonTipText = "Control PandoraOne with the media keys on your keyboard!",
BalloonTipTitle = DefaultTooltip,
Text = DefaultTooltip,
Visible = true
};
_NotifyIcon.DoubleClick += new EventHandler(notifyIcon_DoubleClick);
_NotifyIcon.ShowBalloonTip(1000);
}
开发者ID:BenjaminWLarson,项目名称:pandora-tray,代码行数:23,代码来源:SystemTrayApplicationContext.cs
示例14: InitializeComponent
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(frmIcons));
this.m_imgListOfIcons = new System.Windows.Forms.ImageList(this.components);
//
//m_imgListOfIcons
//
this.m_imgListOfIcons.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit;
this.m_imgListOfIcons.ImageSize = new System.Drawing.Size(16, 16);
this.m_imgListOfIcons.ImageStream = (System.Windows.Forms.ImageListStreamer) (resources.GetObject("m_imgListOfIcons.ImageStream"));
this.m_imgListOfIcons.TransparentColor = System.Drawing.Color.Transparent;
//
//frmIcons
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(219, 34);
this.Name = "frmIcons";
this.Text = "frmIcons";
}
开发者ID:nguyendanhtu,项目名称:bki-quan-ly-du-toan,代码行数:20,代码来源:frmIcons.cs
示例15: ArduinoPressureSensor
public ArduinoPressureSensor()
{
System.ComponentModel.IContainer components = new System.ComponentModel.Container();
serialPort1 = new System.IO.Ports.SerialPort(components);
serialPort1.PortName = "COM3";
serialPort1.BaudRate = 9600;
serialPort1.Open();
if (!serialPort1.IsOpen)
{
Console.WriteLine("Arudino Serial Failed to Open");
return;
}
// this turns on !
serialPort1.DtrEnable = true;
// callback for text coming back from the arduino
serialPort1.DataReceived += OnReceived;
}
开发者ID:MorgThom,项目名称:robosub,代码行数:20,代码来源:ArduinoPressureSensor.cs
示例16: UpdateAyam
private void UpdateAyam()
{
try
{
System.ComponentModel.IContainer components = new System.ComponentModel.Container();
myport = new SerialPort(components);
myport.BaudRate = 9600;
myport.PortName = portname;
myport.Open();
string RXstring = myport.ReadLine();
myport.WriteLine("5");
ayam.suhu = RXstring + " °C";
myport.WriteLine("6");
RXstring = myport.ReadLine();
ayam.kelembaban = RXstring + " %";
}
catch (Exception)
{
}
}
开发者ID:indam-m,项目名称:SCATS,代码行数:21,代码来源:AyamController.cs
示例17: _Add_System_ComponentModel_Container_System_ComponentModel_IComponent_System_String
public static bool _Add_System_ComponentModel_Container_System_ComponentModel_IComponent_System_String( )
{
//class object
System.ComponentModel.Container _System_ComponentModel_Container = new System.ComponentModel.Container();
//Parameters
System.ComponentModel.IComponent component = null;
System.String name = null;
//Exception
System.Exception exception_Real = null;
System.Exception exception_Intercepted = null;
InterceptionMaintenance.disableInterception( );
try
{
_System_ComponentModel_Container.Add(component,name);
}
catch( System.Exception e )
{
exception_Real = e;
}
InterceptionMaintenance.enableInterception( );
try
{
_System_ComponentModel_Container.Add(component,name);
}
catch( System.Exception e )
{
exception_Intercepted = e;
}
return( ( exception_Real.Message == exception_Intercepted.Message ));
}
开发者ID:uvbs,项目名称:Holodeck,代码行数:39,代码来源:System.ComponentModel.Container.Add(IComponent,+String).cs
示例18: Initialize
private void Initialize()
{
var iconStream = typeof(TrayItemController).Assembly.GetManifestResourceStream("BlackMesa.PreferenceManagement.Assets.Coffee.ico");
_components = new System.ComponentModel.Container();
_notifyIcon = new NotifyIcon(_components)
{
ContextMenuStrip = new ContextMenuStrip(),
Icon = new Icon(iconStream),
Text = "Kewl",
Visible = true
};
_notifyIcon.ContextMenu = new ContextMenu();
var j = new MenuItem("Shutdown");
j.Click += j_Click;
_notifyIcon.ContextMenu.MenuItems.Add(j);
var i = new MenuItem("Configure");
i.Click += i_Click;
_notifyIcon.ContextMenu.MenuItems.Add(i);
}
开发者ID:tomkuijsten,项目名称:black-mesa,代码行数:22,代码来源:TrayItemController.cs
示例19: CustomApplicationContext
//private ViewHostDialog activitiesDialog;
//private ViewHostDialog usersDialog;
//private ViewHostDialog editWorkDialog;
public CustomApplicationContext()
{
CreateToolStripItems();
components = new System.ComponentModel.Container();
notifyIcon = new NotifyIcon(components)
{
ContextMenuStrip = new ContextMenuStrip(),
Icon = Properties.Resources.ClockProcessing,
Text = "Work Track",
Visible = true
};
var connectionInfo = SettingsToConnectionInfo(Properties.Settings.Default);
if (!string.IsNullOrEmpty(connectionInfo.ServerName))
{
var failMessage = InitializeConnection(connectionInfo);
if (failMessage != null)
{
notifyIcon.Icon = Properties.Resources.ClockDisconnected;
string msg = "There was an error connecting to the WorkTrack database. " + failMessage;
notifyIcon.ShowBalloonTip(balloonTimeoutMs, "WorkTrack", msg, ToolTipIcon.Error);
}
else
{
notifyIcon.Icon = Properties.Resources.Clock;
}
}
else
{
notifyIcon.Icon = Properties.Resources.ClockDisconnected;
string msg = "Database connection has not been defined.";
notifyIcon.ShowBalloonTip(balloonTimeoutMs, "WorkTrack", msg, ToolTipIcon.Warning);
}
notifyIcon.ContextMenuStrip.Opening += new System.ComponentModel.CancelEventHandler(ContextMenuStrip_Opening);
//notifyIcon.DoubleClick += notifyIcon_DoubleClick;
}
开发者ID:helgihaf,项目名称:Alpha,代码行数:42,代码来源:CustomApplicationContext.cs
示例20: CCSListView
public CCSListView()
{
// this.ColumnReordered;
this.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint , true);
this.SetStyle(ControlStyles.EnableNotifyMessage , true);
ColumnFormatList = new List<ColumnFormat>();
sortedId = 0;
dir = direction.ASCENDING;
this.SmallImageList = new ImageList();
// this.SmallImageList.Images.Add("ASCENDING", AppStatus.Properties.Resources.sortAscending);
//this.SmallImageList.Images.Add("DESCENDING", AppStatus.Properties.Resources.sortDescending);
listBox1 = new ListBox();
listBox1.Anchor = AnchorStyles.Bottom;
listBox1.ResumeLayout(false);
// this.Controls.Add(listBox1);
System.ComponentModel.IContainer components;
components = new System.ComponentModel.Container();
components.Add(listBox1);
}
开发者ID:vvFiCKvv,项目名称:CCDetector,代码行数:22,代码来源:CCSListView.cs
注:本文中的System.ComponentModel.Container类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论