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


C# MainForm类代码示例

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


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


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