本文整理汇总了C#中System.Windows.Forms.Control.Show方法的典型用法代码示例。如果您正苦于以下问题:C# Control.Show方法的具体用法?C# Control.Show怎么用?C# Control.Show使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Windows.Forms.Control
的用法示例。
在下文中一共展示了Control.Show方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SetCurrentPage
// Set current page
private void SetCurrentPage(int n)
{
OnPageChanging(n);
// hide previous page
if (currentControl != null)
{
currentControl.Hide();
}
//
currentPage = n;
// update dialog text
//this.Text = title + " - Page " + ((int)(n + 1)).ToString() + " of " + panel主体.Controls.Count.ToString();
// show new page
currentControl = panel主体.Controls[currentPage];
IWizardPage page = (IWizardPage)currentControl;
currentControl.Show();
// description
lb介绍.Text = page.PageDescription;
// notify the page
page.Display();
// update conrol buttons
UpdateControlButtons();
}
示例2: SeriesChangesWhenFunctionBindingListChanges
public void SeriesChangesWhenFunctionBindingListChanges()
{
IFunction function = new Function();
IVariable yVariable = new Variable<double>("y");
IVariable xVariable = new Variable<double>("x");
function.Arguments.Add(xVariable);
function.Components.Add(yVariable);
function[1.0] = 2.0;
function[2.0] = 5.0;
function[3.0] = 1.0;
ILineChartSeries ls = ChartSeriesFactory.CreateLineSeries();
ls.YValuesDataMember = function.Components[0].DisplayName;
ls.XValuesDataMember = function.Arguments[0].DisplayName;
var synchronizeObject = new Control();
synchronizeObject.Show();
var functionBindingList = new FunctionBindingList(function) { SynchronizeInvoke = synchronizeObject };
ls.DataSource = functionBindingList;
//a change in the function should change the series
function[1.0] = 20.0;
while(functionBindingList.IsProcessing)
{
Application.DoEvents();
}
Assert.AreEqual(20, ls.YValues[0]);
}
示例3: Shows
private static void Shows(Control frm)
{
//frm.BeginInvoke((MethodInvoker)delegate {
frm.Show();
load.Show();
// });
}
示例4: AddToPage
// ADD CONTROL TO GIVEN TAB PAGE
public void AddToPage(Control control, int tab)
{
control.Parent = mainView.tabPanels.TabPages[tab];
mainView.tabPanels.SuspendLayout();
mainView.tabPanels.TabPages[tab].Controls.Add(control);
mainView.tabPanels.ResumeLayout();
control.Show();
control.Dock = DockStyle.Fill;
mainView.Refresh();
}
示例5: EnsureControlDisplaysCorrectlyByAddingItToAHiddenForm
public static void EnsureControlDisplaysCorrectlyByAddingItToAHiddenForm(Form hidden, Control controlUnderTest)
{
AddToParent(hidden, controlUnderTest);
hidden.ShowInTaskbar = false;
hidden.AllowTransparency = true;
hidden.Opacity = 0;
hidden.Show();
controlUnderTest.Show();
}
示例6: ConfigureInnerDisplay
public static void ConfigureInnerDisplay(Form hidden, Control controlUnderTest)
{
AddToParent(hidden, controlUnderTest);
hidden.ShowInTaskbar = false;
hidden.AllowTransparency = true;
hidden.Opacity = 0;
hidden.Show();
controlUnderTest.Show();
}
示例7: CargarControl
public void CargarControl(Control oControl)
{
if (!this.panelContenedor.Controls.Contains(oControl))
{
oControl.Dock = DockStyle.Fill;
this.panelContenedor.Controls.Add(oControl);
}
this.panelContenedor.Tag = oControl;
oControl.BringToFront();
oControl.Show();
}
示例8: Show
public static Control Show(Control parent) {
Control o = new Control();
o.Location = Point.Empty;
o.Size = parent.ClientSize;
o.Parent = parent;
o.BackgroundImage = Resources.ExpirationHS;
o.BackgroundImageLayout = ImageLayout.Center;
o.BackColor = Color.WhiteSmoke;
o.Show();
o.BringToFront();
return o;
}
示例9: random1
/// <summary>
/// Show or Hide control
/// </summary>
/// <param name="control1"></param>
public void random1(Control control1)
{
if (brandom1==true)
{
control1.Show();
brandom1 = false;
}
else
{
control1.Hide();
brandom1 = true;
}
}
示例10: Init
public void Init(int width, int height)
{
_ViewForm = new ViewForm();
InputState.Init(_ViewForm);
Sound.Init(_ViewForm);
Graphics.Init(_ViewForm, width, height);
_ViewForm.Show();
_Running = true;
_Timer = new Timer();
}
示例11: MainFrame
public MainFrame(Robot R)
{
m_Robot = R;
InitializeComponent();
DeviceList L = Manager.GetDevices(DeviceType.Joystick, EnumDevicesFlags.AllDevices);
L.MoveNext();
if (L.Current == null)
{
JoystickControl.Enabled = false;
}
else
{
DeviceInstance DevInstance = (DeviceInstance)L.Current;
m_JoystickDevice = new Device(DevInstance.InstanceGuid);
m_JoystickDevice.SetCooperativeLevel(this, CooperativeLevelFlags.NonExclusive | CooperativeLevelFlags.Background);
foreach (DeviceObjectInstance doi in m_JoystickDevice.Objects)
{
if ((doi.ObjectId & (int)DeviceObjectTypeFlags.Axis) != 0)
m_JoystickDevice.Properties.SetRange(ParameterHow.ById, doi.ObjectId, new InputRange(-2550, 2550));
}
m_JoystickDevice.Properties.AxisModeAbsolute = true;
}
UpdateFields();
FastRefreshTimer.Enabled = true;
//m_ImageViewer = new ImageViewer();
//m_ImageViewer.Show();
//m_RangeImageViewer = new RangeImageViewer(m_Robot);
//m_RangeImageViewer.Show();
m_Control = new Control(m_Robot);
m_Control.Show();
//m_SphereRecognitionView = new SphereRecognitionView(m_Robot);
//m_SphereRecognitionView.Show();
//m_Navigation = new Navigation(m_Robot);
//m_Navigation.Show();
}
示例12: ShowTopLevelControl
private static void ShowTopLevelControl(Control control,bool modal)
{
bool wasShown = false;
control.VisibleChanged += delegate
{
if (control.Visible)
{
wasShown = true;
}
try
{
if (formShown != null)
{
formShown(control is Form ? (Form)control : form);
}
}
catch (Exception e)
{
exception = e;
}
};
control.Show();
if (IsBuildServer)
{
Application.DoEvents();
if (exception != null)
{
throw exception;
}
}
else while (modal && control.Visible)
{
Application.DoEvents();
if (exception != null)
{
throw exception;
}
}
while (!wasShown && !control.Visible) // wait until control is shown
{
Application.DoEvents();
}
}
示例13: changeControlShow
private void changeControlShow(Control control, bool show)
{
if (control.InvokeRequired)
{
control.Invoke(controlChange, control, show);
}
else
{
if (show) control.Show();
else control.Hide();
}
}
示例14: Run
/// <summary>
/// Runs the specified main loop for the specified windows form.
/// </summary>
/// <param name="form">The form.</param>
/// <param name="renderCallback">The rendering callback.</param>
/// <param name="useApplicationDoEvents">if set to <c>true</c> indicating whether the render loop should use the default <see cref="Application.DoEvents"/> instead of a custom window message loop lightweight for GC. Default is false.</param>
/// <exception cref="System.ArgumentNullException">form
/// or
/// renderCallback</exception>
public static void Run(Control form, RenderCallback renderCallback, bool useApplicationDoEvents = false)
{
if(form == null) throw new ArgumentNullException("form");
if(renderCallback == null) throw new ArgumentNullException("renderCallback");
form.Show();
using (var renderLoop = new RenderLoop(form) { UseApplicationDoEvents = useApplicationDoEvents })
{
while(renderLoop.NextFrame())
{
renderCallback();
}
}
}
示例15: InitializeAndShowStep
private void InitializeAndShowStep(Control wizardstep)
{
wizardstep.SetBounds(0, 0, pnlMain.Width, pnlMain.Height);
HideAllSteps();
btnNext.Text = "&Next";
switch (wizardstep.Name)
{
case "pnlStep_PivotalLogin":
{
break;
}
case "pnlStep_PivotalDetails":
{
PopulatePivotalIterationsCombo();
PopulatePivotalProjectsCombo();
break;
}
case "pnlStep_TFSLogins":
{
break;
}
case "pnlStep_TFSDetails":
{
PopulateTfsIterationsCombo(cboTFSProjects.SelectedText);
break;
}
case "pnlStep_Summary":
{
btnNext.Text = "&Finish";
break;
}
}
wizardstep.Show();
}