当前位置: 首页>>代码示例>>C#>>正文


C# Control.Show方法代码示例

本文整理汇总了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();
        }
开发者ID:xlgwr,项目名称:SmartVision,代码行数:32,代码来源:新增向导模板.cs

示例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]);
            
        }
开发者ID:lishxi,项目名称:_SharpMap,代码行数:33,代码来源:SeriesTest.cs

示例3: Shows

 private static void Shows(Control frm)
 {
     //frm.BeginInvoke((MethodInvoker)delegate {
         frm.Show();
         load.Show();
   //  });
     
   
 }
开发者ID:ainma007,项目名称:UcasProject,代码行数:9,代码来源:Operation.cs

示例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();
 }
开发者ID:e11en,项目名称:Cellen-Tellen,代码行数:11,代码来源:MainViewController.cs

示例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();
        }
开发者ID:EamonNerbonne,项目名称:ApprovalTests.Net,代码行数:11,代码来源:WinFormsUtils.cs

示例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();
        }
开发者ID:EamonNerbonne,项目名称:ApprovalTests.Net,代码行数:11,代码来源:WinFormsUtils.cs

示例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();
 }
开发者ID:moisesiq,项目名称:aupaga,代码行数:11,代码来源:Principal.cs

示例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;
 }
开发者ID:windrobin,项目名称:kumpro,代码行数:12,代码来源:WIP.cs

示例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;
     }
 }
开发者ID:tranquangchau,项目名称:cshap-2008-2013,代码行数:17,代码来源:Class1.cs

示例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();
        }
开发者ID:DJSymBiotiX,项目名称:MX-Engine,代码行数:13,代码来源:Engine.cs

示例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();
        }
开发者ID:anareboucas,项目名称:nanook,代码行数:47,代码来源:Main.cs

示例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();
            }
        }
开发者ID:lishxi,项目名称:_SharpMap,代码行数:50,代码来源:WindowsFormsTestHelper.cs

示例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();
     }
 }
开发者ID:CCluv,项目名称:JiaowuHelper,代码行数:12,代码来源:FormMain.cs

示例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();
                }
            }
        }
开发者ID:QuantumDeveloper,项目名称:SharpDX,代码行数:23,代码来源:RenderLoop.cs

示例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();
        }
开发者ID:ricred,项目名称:PivotalTFS,代码行数:35,代码来源:frmWizard.cs


注:本文中的System.Windows.Forms.Control.Show方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。