本文整理汇总了C#中System.ComponentModel.Container类的典型用法代码示例。如果您正苦于以下问题:C# System.ComponentModel.Container类的具体用法?C# System.ComponentModel.Container怎么用?C# System.ComponentModel.Container使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
System.ComponentModel.Container类属于命名空间,在下文中一共展示了System.ComponentModel.Container类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
}
示例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;
}
示例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);
}
示例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();
}
示例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;
}
示例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;
}
示例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;
}
示例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();
}
示例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);
}
示例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);
}
示例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;
}
示例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();
}
示例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);
}
示例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";
}
示例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;
}