• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# MainForm类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中MainForm的典型用法代码示例。如果您正苦于以下问题:C# MainForm类的具体用法?C# MainForm怎么用?C# MainForm使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



MainForm类属于命名空间,在下文中一共展示了MainForm类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: Check

        protected override void Check(MainForm form, string ext, RegistryKey rk, DataEntry[] de)
        {
            RegistryKey r = null;

            using (r = Registry.ClassesRoot.OpenSubKey(string.Format(CultureInfo.InvariantCulture, "{0}\\ShellEx\\{1}", ext, ShellExGuid)))
            {
                CheckValue(form, r, null, new string[] { ThumnailCacheGuid }, de);
            }

            if (r == null)
            {
                using (r = Registry.ClassesRoot.OpenSubKey(string.Format(CultureInfo.InvariantCulture, "SystemFileAssociations\\{0}\\ShellEx\\{1}", ext, ShellExGuid)))
                {
                    CheckValue(form, r, null, new string[] { ThumnailCacheGuid }, de);
                }
            }

            if (r == null)
            {
                string type = CheckStringValue(form, rk, PerceivedType, de);

                using (r = OpenSubKey(form, Registry.ClassesRoot, string.Format(CultureInfo.InstalledUICulture, "SystemFileAssociations\\{0}\\ShellEx\\{1}", type, ShellExGuid), de))
                {
                    CheckValue(form, r, null, new string[] { ThumnailCacheGuid }, de);
                }
            }
        }
开发者ID:eakova,项目名称:resizer,代码行数:27,代码来源:ThumnailCacheIntegrationRule.cs


示例2: ConfigDocument

 public ConfigDocument(MainForm form)
 {
     InitializeComponent();
     ShowHint = DockState.Document;
     Show(form.DockPanel);
     SetEditor(GetEditor());
 }
开发者ID:mausch,项目名称:NHWorkbench,代码行数:7,代码来源:ConfigDocument.cs


示例3: SilkroadTunnel

        public SilkroadTunnel(SilkroadProxy silkroadProxy, List<SilkroadTunnel> tunnels, MainForm mainForm)
        {
            _remoteIP = "123.30.200.6";
            _remotePort = 15779;

            _silkroadProxy = silkroadProxy;

            _localContext = new Context();
            _localContext.MySecurity.GenerateSecurity(true, true, true);

            _remoteContext = new Context();

            _localContext.MyRelaySecurity = _remoteContext.MySecurity;
            _remoteContext.MyRelaySecurity = _localContext.MySecurity;

            _contexts = new List<Context>();
            _contexts.Add(_localContext);
            _contexts.Add(_remoteContext);

            _tunnels = tunnels;

            _mainForm = mainForm;

            if (_mainForm != null)
            {
                _charracter = new Charracter(_mainForm);
            }
        }
开发者ID:dawnoble,项目名称:blackcatproject,代码行数:28,代码来源:SilkroadTunnel.cs


示例4: Main

        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            try
            {
                InitializeTraceLevel();

                AppContainer container = new AppContainer();
                MainForm form = new MainForm();
                container.Add(form);

                logger.Info("Starting CodeBuilder");
                Application.Run(form);
                logger.Info("CodeBuilder Exit");
            }
            catch (Exception ex)
            {
                logger.Error("Startup", ex);
                MessageBoxHelper.DisplayFailure(ex.Message);
            }

            InternalTrace.Close();
        }
开发者ID:peterchen,项目名称:CodeBuilder,代码行数:25,代码来源:Program.cs


示例5: Search

 public Search(MainForm.CheckInstallDirsCB checkInstallDirsCB, MainForm.updateProgressCallback updateProgressCB, MainForm.listViewAddCallBack listViewAddCB)
     : this()
 {
     this.checkInstallDirsCB = checkInstallDirsCB;
     this.updateProgressCB = updateProgressCB;
     this.listViewAddCB = listViewAddCB;
 }
开发者ID:dd-dk,项目名称:sims3tools,代码行数:7,代码来源:Search.cs


示例6: DataTablePropertiesDialog

 /// <summary>
 /// Default constructor for the class
 /// </summary>
 public DataTablePropertiesDialog(MainForm frm, Project currentProject, View view)
     : base(frm)
 {
     InitializeComponent();
     project = currentProject;
     currentView = view;
 }
开发者ID:NALSS,项目名称:epiinfo-82474,代码行数:10,代码来源:DataTablePropertiesDialog.cs


示例7: CreateObjectChooser

        public static ObjectChooser CreateObjectChooser(MainForm.DoWaitCallback doWaitCB, MainForm.StopWaitCallback stopWaitCB,
            MainForm.updateProgressCallback updateProgressCB, MainForm.listViewAddCallBack listViewAddCB, CatalogType resourceType,
            EventHandler<MainForm.SelectedIndexChangedEventArgs> selectedIndexChangedHandler,
            EventHandler<MainForm.ItemActivateEventArgs> itemActivateHandler)
        {
            ObjectChooser res;
            if (!objectChooserCache.ContainsKey(resourceType))
            {
                res = new ObjectChooser(doWaitCB, stopWaitCB, updateProgressCB, listViewAddCB, resourceType);
                res.SelectedIndexChanged += selectedIndexChangedHandler;
                res.ItemActivate += itemActivateHandler;
                return res;
            }

            res = objectChooserCache[resourceType];
            res.SelectedIndexChanged = null;
            res.SelectedItem = null;
            res.listView1.SelectedItems.Clear();
            res.SelectedIndexChanged += selectedIndexChangedHandler;

            res.ItemActivate = null;
            res.ItemActivate += itemActivateHandler;

            return res;
        }
开发者ID:dd-dk,项目名称:sims3tools,代码行数:25,代码来源:ObjectChooser.cs


示例8: ConfigForm

 public ConfigForm(MainForm fmMain)
 {
     InitializeComponent();
     this.fmMain = fmMain;
     cbDbs.Text = MainForm.myCmdMgr.Config.local;
     btnOK.Focus();
 }
开发者ID:pzaro,项目名称:qwinapt,代码行数:7,代码来源:ConfigForm.cs


示例9: DailyScheduleView

        public static void DailyScheduleView(DataGridView view, MainForm mainForm)
        {
            if (view.DataSource == null)
            {
                return;
            }

            view.ColumnHeadersVisible = false;
            view.RowHeadersVisible = false;
            view.DefaultCellStyle.WrapMode = DataGridViewTriState.True;
            view.AutoResizeColumns();
            view.AutoResizeRows();
            view.AllowUserToResizeColumns = false;
            view.AllowUserToResizeRows = false;

            // LessonId
            view.Columns[0].Visible = false;
            view.Columns[0].Width = 0;

            // Ring
            view.Columns[1].Width = 56;
            view.Columns[1].DefaultCellStyle.Font = new Font(view.DefaultCellStyle.Font.FontFamily, 14);
            view.Columns[1].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;

            // LessonSummary
            // view.Columns[2].Width = Percent(88, view.Width);
            view.Columns[2].Width = view.Width - view.Columns[1].Width - 20;
        }
开发者ID:BesuglovS,项目名称:NUDispSchedule,代码行数:28,代码来源:FormatMainView.cs


示例10: Main

    static void Main()
    {
        if (Control.ModifierKeys == (Keys.Control | Keys.Shift))
        {
            Globals.EDITION = Edition.Research;
        }
        else if (Control.ModifierKeys == Keys.Shift)
        {
            Globals.EDITION = Edition.Lite;
        }
        else if (Control.ModifierKeys == Keys.Control)
        {
            Globals.EDITION = Edition.Grammar;
        }
        else // default
        {
            Globals.EDITION = Edition.Standard;
        }

        Application.EnableVisualStyles();
        Application.SetCompatibleTextRenderingDefault(false);
        MainForm form = new MainForm();

        // disable the X close button of the form
        //IntPtr system_menu_handle = GetSystemMenu(form.Handle, false);
        //DisableCloseIcon(system_menu_handle);

        Application.Run(form);
    }
开发者ID:ATouhou,项目名称:QuranCode,代码行数:29,代码来源:Program.cs


示例11: AppContext

 public AppContext()
 {
     this.f1 = new MainForm();
     this.f1.manualOnLoad();
     this.f1.Visible = false;
     this.f1.VisibleChanged += new EventHandler(this.f1_VisibleChanged);
 }
开发者ID:dchapkine,项目名称:nodepool,代码行数:7,代码来源:AppContext.cs


示例12: SledGotoService

 public SledGotoService(
     MainForm mainForm,
     IControlHostService controlHostService)
 {
     m_mainForm = mainForm;
     m_controlHostService = controlHostService;
 }
开发者ID:arsaccol,项目名称:SLED,代码行数:7,代码来源:SledGotoService.cs


示例13: RestoreForm

        public override void RestoreForm(MainForm form)
        {
            if (form.Opacity == 0.0)
                form.Opacity = 1.0;

            form.Show();
        }
开发者ID:eried,项目名称:OnTopReplica,代码行数:7,代码来源:WindowsSeven.cs


示例14: TrafficVolumeForm

        /// <summary>
        /// Constructor
        /// </summary>
        public TrafficVolumeForm(VerkehrSteuerung steuerung, MainForm mainForm, NodeSteuerung nodeController)
        {
            this.m_steuerung = steuerung;
            this.m_mainForm = mainForm;
            this.m_nodeController = nodeController;

            InitializeComponent();
            this.splitContainer1.Panel2MinSize = 260;

            UpdateListboxLayout();
            GetTrafficVolume();

            this.m_steuerung.StartPointsChanged += new VerkehrSteuerung.StartPointsChangedEventHandler(m_steuerung_StartPointsChanged);
            this.m_steuerung.DestinationPointsChanged += new VerkehrSteuerung.DestinationPointsChangedEventHandler(m_steuerung_DestinationPointsChanged);
            this.m_steuerung.GlobalTrafficMultiplierChanged += new VerkehrSteuerung.GlobalTrafficMultiplierChangedEventHandler(m_steuerung_GlobalTrafficMultiplierChanged);
            this.m_steuerung.CarTargetVelocityChanged += new VerkehrSteuerung.CarTargetVelocityChangedEventHandler(m_steuerung_CarTargetVelocityChanged);
            this.m_steuerung.TruckTargetVelocityChanged += new VerkehrSteuerung.TruckTargetVelocityChangedEventHandler(m_steuerung_TruckTargetVelocityChanged);
            this.m_steuerung.BusTargetVelocityChanged += new VerkehrSteuerung.BusTargetVelocityChangedEventHandler(m_steuerung_BusTargetVelocityChanged);
            this.m_steuerung.TramTargetVelocityChanged += new VerkehrSteuerung.TramTargetVelocityChangedEventHandler(m_steuerung_TramTargetVelocityChanged);

            renderOptions.renderLineNodes = false;
            renderOptions.renderNodeConnections = true;
            renderOptions.renderVehicles = false;
            renderOptions.performClipping = false;
            renderOptions.clippingRect = new Rectangle(0, 0, 10000, 10000);
            renderOptions.renderIntersections = false;
            renderOptions.renderLineChangePoints = false;
            renderOptions.renderLineNodeDebugData = false;
            renderOptions.renderNodeConnectionDebugData = false;
            renderOptions.renderVehicleDebugData = false;
        }
开发者ID:alopezag,项目名称:CityTrafficSimulator,代码行数:34,代码来源:TrafficVolumeForm.cs


示例15: MainController

 public MainController()
 {
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(false);
     cypher = new Cypher();
     form = new MainForm(this);
 }
开发者ID:edarkzero,项目名称:cyphsteps,代码行数:7,代码来源:MainController.cs


示例16: CoreEnvelopeDesignForm

        public CoreEnvelopeDesignForm(MainForm main_Form)
        {
            InitializeComponent();
            dataGridViewParaInput.Columns[1].ValueType = System.Type.GetType("System.Decimal");

            mainForm = main_Form;
        }
开发者ID:algz,项目名称:DesignAndEstimateSoft,代码行数:7,代码来源:CoreEnvelopeDesignForm.cs


示例17: Initialize

 private static void Initialize()
 {
     mainForm = new MainForm();
     globalHook = new globalKeyboardHook();
     globalHook.HookedKeys.Add(Keys.Home);
     globalHook.KeyDown += OnGlobalKeyDown;
 }
开发者ID:AntonPashkowskiy,项目名称:Labs,代码行数:7,代码来源:Program.cs


示例18: FirstLoginProvForm

        public FirstLoginProvForm(DataRow row,MainForm mainW,int user)
        {
            InitializeComponent();
            //bindeos

            this.currentDataRow = row;
            this.mainWindow = mainW;
            this.corporateName.Text = this.currentDataRow[0].ToString();
            this.txt1 = this.corporateName.Text;
            this.Mail.Text = this.currentDataRow[1].ToString();
            this.txt2 = this.Mail.Text;
            this.Phone.Text = this.currentDataRow[2].ToString();
            this.txt3 = this.Phone.Text;
            this.address.Text = this.currentDataRow[3].ToString();
            this.txt4 = this.address.Text;
            this.postalCode.Text = this.currentDataRow[4].ToString();
            this.txt5 = this.postalCode.Text;
            this.City.Text = this.currentDataRow[5].ToString();
            this.txt6 = this.City.Text;
            this.Cuit.Text = this.currentDataRow[6].ToString();
            this.txt7 = this.Cuit.Text;
            this.entry.Text = this.currentDataRow[7].ToString();
            this.txt8 = this.entry.Text;

                this.ContactNumber.Text = this.currentDataRow[8].ToString();
                this.txt9 = this.ContactNumber.Text;

            this.userid = user;
        }
开发者ID:nuxlic,项目名称:2012-2c-transa-sql,代码行数:29,代码来源:FirstLoginProvForm.cs


示例19: VariableDefinitionDialog

 /// <summary>
 /// Constructor of the Variable Definition dialog
 /// </summary>
 /// <param name="frm">The main form</param>
 public VariableDefinitionDialog(MainForm frm)
     : base(frm)
 {
     // This call is required by the Windows Form Designer.
     InitializeComponent();
     LoadVarTypes();
 }
开发者ID:NALSS,项目名称:epiinfo-82474,代码行数:11,代码来源:VariableDefinitionDialog.cs


示例20: GetStrategy

        public CaptureStrategy GetStrategy(CaptureType captureType, MainForm mainForm)
        {
            CaptureStrategy strategy = null;

            switch (captureType)
            {
                case CaptureType.Screen:
                    strategy = new CaptureScreen(mainForm);
                    break;
                case CaptureType.ActiveWindow:
                    strategy = new CaptureActiveWindow(mainForm);
                    break;
                case CaptureType.ActiveMonitor:
                    strategy = new CaptureActiveMonitor(mainForm);
                    break;
                case CaptureType.Rectangle:
                case CaptureType.RectangleWindow:
                case CaptureType.Polygon:
                case CaptureType.Freehand:
                    strategy = new CaptureRegion(mainForm);
                    break;
                case CaptureType.CustomRegion:
                    strategy = new CaptureCustomRegion(mainForm);
                    break;
                case CaptureType.LastRegion:
                    strategy = new CaptureLastRegion(mainForm);
                    break;
            }
            return strategy;
        }
开发者ID:harley1011,项目名称:ShareX,代码行数:30,代码来源:CaptureFactory.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# MainMenu类代码示例发布时间:2022-05-24
下一篇:
C# Main类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap