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

C# IMainForm类代码示例

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

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



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

示例1: LoadPlugin

 public static void LoadPlugin(string FileName, IMainForm Parent, bool ShowError)
 {
     try
     {
         Assembly pluginAssembly = Assembly.LoadFrom(FileName);
         Type[] types = pluginAssembly.GetTypes();
         foreach (Type type in types)
         {
             if (type.Name.Equals("Plugin"))
             {
                 IPlugin inst = (IPlugin)pluginAssembly.CreateInstance(type.FullName);
                 PluginType add = new PluginType(inst.Name, FileName, inst.Version);
                 if (!Plugins.Contains(add))
                 {
                     Plugins.Add(add);
                     inst.Initialize(Parent);
                     Parent.LoadPlugin(inst);
                 }
                 else if (ShowError) MessageBox.Show("This plugin is already loaded!", "Error");
                 pluginAssembly = null;
                 inst = null;
                 add = null;
                 return;
             }
         }
         if (ShowError) MessageBox.Show("This is not valid plugin!", "Error");
     }
     catch (Exception ex)
     {
         if (ShowError) MessageBox.Show(ex.Message, "Error");
     }
 }
开发者ID:NikolayIT,项目名称:NStudio,代码行数:32,代码来源:PluginManager.cs


示例2: RichToolTip

		public RichToolTip(IMainForm mainForm)
		{
			// panel
			toolTip = new Panel();
			toolTip.Location = new System.Drawing.Point(0,0);
            toolTip.BackColor = System.Drawing.SystemColors.Info;
            toolTip.ForeColor = System.Drawing.SystemColors.InfoText;
			toolTip.BorderStyle = BorderStyle.FixedSingle;
			toolTip.Visible = false;
			(mainForm as Form).Controls.Add(toolTip);
			// text
			toolTipRTB = new System.Windows.Forms.RichTextBox();
			toolTipRTB.Location = new System.Drawing.Point(2,1);
            toolTipRTB.BackColor = System.Drawing.SystemColors.Info;
            toolTipRTB.ForeColor = System.Drawing.SystemColors.InfoText;
			toolTipRTB.BorderStyle = BorderStyle.None;
			toolTipRTB.ScrollBars = RichTextBoxScrollBars.None;
            toolTipRTB.DetectUrls = false;
			toolTipRTB.ReadOnly = true;
			toolTipRTB.WordWrap = false;
			toolTipRTB.Visible = true;
			toolTipRTB.Text = "";
			toolTip.Controls.Add(toolTipRTB);

			// rtf cache
			rtfCache = new Dictionary<String, String>();
			rtfCacheList = new List<String>();
		}
开发者ID:heon21st,项目名称:flashdevelop,代码行数:28,代码来源:RichToolTip.cs


示例3: PublicResultForm

 public PublicResultForm(QueryResult resultSet, MainForm owner)
 {
     InitializeComponent();
     FormsConn fc = new FormsConn(resultSet);
     imainForm = (IMainForm)fc;
     m_mainForm = owner;
 }
开发者ID:SuperMap,项目名称:iClient-DotNet-Example,代码行数:7,代码来源:PublicResultForm.cs


示例4: LoadLanguage

 public static void LoadLanguage(string aName, IMainForm parent, bool ShowError)
 {
     if (aName == "English")
     {
         Language = new LanguageBase();
         Settings.Settings.Language = "English";
         parent.ChangeLanguage();
         return;
     }
     try
     {
         Assembly pluginAssembly = Assembly.LoadFrom(Path + "\\Languages\\" + aName + ".dll");
         Type[] types = pluginAssembly.GetTypes();
         foreach (Type type in types)
         {
             if (type.Name.Equals("Language"))
             {
                 Language = (LanguageBase)pluginAssembly.CreateInstance(type.FullName);
             }
         }
         pluginAssembly = null;
     }
     catch (FileNotFoundException ex)
     {
         if (ShowError) MessageBox.Show(ex.Message, "Error");
         Language = new LanguageBase();
         Settings.Settings.Language = "English";
         parent.ChangeLanguage();
         return;
     }
     Settings.Settings.Language = aName;
     parent.ChangeLanguage();
 }
开发者ID:NikolayIT,项目名称:NStudio,代码行数:33,代码来源:Global.cs


示例5: MainFormController

        public MainFormController(IMainForm mainForm)
        {
            MainForm = mainForm;
            EngineCache = new EngineCache();

            LoadSettings();
        }
开发者ID:BenHall,项目名称:ironeditor,代码行数:7,代码来源:MainFormController.cs


示例6: MainFormPresenter

        public MainFormPresenter(IMainForm view)
        {
            _view = view;

              view.NewPlanClick += (s, e) => OnNewPlanClick();
              view.OpenPlanClick += (s, e) => OnOpenPlanClick();
              view.OpenSpecificPlanClick += (s, e) => LoadTrainingPlan(e);
              view.ClosePlanClick += (s, e) => OnClosePlanClick();
              view.AddWorkoutClick += (s, e) => OnAddWorkoutClick();
              view.EditWorkoutClick += (s, e) => OnEditWorkoutClick(e);
              view.DeleteWorkoutClick += (s, e) => OnDeleteWorkoutClick(e);
              view.ManageWorkoutsClick += (s, e) => OnManageWorkoutsClick();
              view.AddWorkoutCategoryClick += (s, e) => OnAddWorkoutCategoryClick();
              view.EditWorkoutCategoryClick += (s, e) => OnEditWorkoutCategoryClick(e);
              view.DeleteWorkoutCategoryClick += (s, e) => OnDeleteWorkoutCategoryClick(e);
              view.ManageWorkoutCategoriesClick += (s, e) => OnManageWorkoutCategoriesClick();
              view.ConfigurePacesClick += (s, e) => OnConfigurePacesClick();
              view.InfoClick += (s, e) => OnInfoClick();

              view.WeeklyPlanChanged += (s, e) => Data.UpdateTrainingPlan(e.Value);

              // automatically load last plan on startup
              var recentPlans = Misc.Default.LastTrainingPlans.Split(';');
              if (recentPlans.Length <= 0)
              {
            return;
              }
              LoadTrainingPlan(recentPlans[0]);
        }
开发者ID:furgerf,项目名称:TrainingPlanner,代码行数:29,代码来源:MainFormPresenter.cs


示例7: Initialize

 /// <summary>
 /// Activates if the sender is MainForm
 /// </summary>
 public static void Initialize(IMainForm sender)
 {
     if (sender.GetType().ToString() == "FlashDevelop.MainForm")
     {
         instance = sender;
     }
 }
开发者ID:zpLin,项目名称:flashdevelop,代码行数:10,代码来源:PluginBase.cs


示例8: FDMenus

		public FDMenus(IMainForm mainForm)
		{
			// modify the view menu
			CommandBarMenu viewMenu = mainForm.GetCBMenu("ViewMenu");
			View = new CommandBarButton("&Project Explorer");
			View.Image = Icons.Project.Img;
			viewMenu.Items.Add(View);

			// modify the tools menu - add a nice GUI classpath editor
			GlobalClasspaths = new CommandBarButton("&Global Classpaths...");
			GlobalClasspaths.Shortcut = Keys.F9 | Keys.Control;

			mainForm.IgnoredKeys.Add(GlobalClasspaths.Shortcut);

			CommandBarMenu toolsMenu = mainForm.GetCBMenu("ToolsMenu");
			toolsMenu.Items.AddSeparator();
			toolsMenu.Items.Add(GlobalClasspaths);

			ProjectMenu = new ProjectMenu();

			CommandBar mainMenu = mainForm.GetCBMainMenu();
			mainMenu.Items.Insert(5, ProjectMenu);

			RecentComboBox = RecentComboBox.Create();

			CommandBar toolBar = mainForm.GetCBToolbar();

			if (toolBar != null) // you might have turned off the toolbar
			{
				toolBar.Items.AddSeparator();
				toolBar.Items.Add(ProjectMenu.TestMovie);
				toolBar.Items.Add(RecentComboBox);
			}
		}
开发者ID:heon21st,项目名称:flashdevelop,代码行数:34,代码来源:FDMenus.cs


示例9: XnaGame

        public XnaGame( IMainForm mainForm )
        {
            _mainForm = mainForm ;

            _drawSurface = _mainForm.GetHandle( ) ;

            Logger.Instance.log("Game1 creation started.");

            _graphics = new GraphicsDeviceManager( this )
                {
                    PreferredBackBufferWidth = 800,
                    PreferredBackBufferHeight = 600
                } ;

            Content.RootDirectory = "Content";

            _graphics.PreparingDeviceSettings += graphics_PreparingDeviceSettings;

            _winform = (Form)Form.FromHandle(Window.Handle);

            _winform.VisibleChanged += game1VisibleChanged;
            _winform.Size = new Size(10, 10);

            Mouse.WindowHandle = _drawSurface;

            Size pictureBoxSize = _mainForm.CanvasSize ;

            ResizeBackBuffer( pictureBoxSize.Width, pictureBoxSize.Height ) ;

            _winform.Hide();
        }
开发者ID:WinterGroveProductions,项目名称:Gleed2D,代码行数:31,代码来源:XnaGame.cs


示例10: RichToolTip

        public RichToolTip(IMainForm mainForm)
        {
            EventManager.AddEventHandler(this, EventType.ApplyTheme);
            // panel
            toolTip = new Panel();
            toolTip.Location = new Point(0,0);
            toolTip.BackColor = SystemColors.Info;
            toolTip.ForeColor = SystemColors.InfoText;
            toolTip.BorderStyle = BorderStyle.FixedSingle;
            toolTip.Visible = false;
            (mainForm as Form).Controls.Add(toolTip);
            // text
            toolTipRTB = new RichTextBox();
            toolTipRTB.Font = PluginBase.Settings.DefaultFont;
            toolTipRTB.BackColor = SystemColors.Info;
            toolTipRTB.ForeColor = SystemColors.InfoText;
            toolTipRTB.BorderStyle = BorderStyle.None;
            toolTipRTB.ScrollBars = RichTextBoxScrollBars.None;
            toolTipRTB.DetectUrls = false;
            toolTipRTB.ReadOnly = true;
            toolTipRTB.WordWrap = false;
            toolTipRTB.Visible = true;
            toolTipRTB.Text = "";
            toolTip.Controls.Add(toolTipRTB);

            // rtf cache
            rtfCache = new Dictionary<String, String>();
            rtfCacheList = new List<String>();
        }
开发者ID:JoeRobich,项目名称:flashdevelop,代码行数:29,代码来源:RichToolTip.cs


示例11: Browser

 public Browser(IMainForm aParent, string url)
 {
     parent = aParent;
     InitializeComponent();
     AfterInit();
     webBrowser1.Navigate(url);
 }
开发者ID:NikolayIT,项目名称:NStudio,代码行数:7,代码来源:Browser.cs


示例12: DocumentPage

 public DocumentPage(IMainForm main_form, string fileExtension)
 {
     InitializeComponent();
     MainForm = main_form;
     Text = "NewFile";
     CreateTextBox(fileExtension);
     //this.ImageIndex = 0;
 }
开发者ID:roboshepherd,项目名称:myro-epuck,代码行数:8,代码来源:DocumentPage.cs


示例13: Download

     public Download (IMainForm mainForm, IStorage store)
     {
 		
         this.MainForm = mainForm;
 		
         this.Storage = store;
 		
     }
开发者ID:AnonymousUser200102010,项目名称:Youtube-Download-Helper,代码行数:8,代码来源:Download.cs


示例14: SpentInDiffDaysView

 public SpentInDiffDaysView(IHistoryDataProvider historyDataProvider, IMainForm mainForm)
 {
     this.historyDataProvider = historyDataProvider;
     this.mainForm = mainForm;
     InitializeComponent();
     if(historyDataProvider!=null)
         this.daySpentDataGrid.DataSource = this.historyDataProvider.Data;
 }
开发者ID:gayancc,项目名称:lazycure-code,代码行数:8,代码来源:SpentInDiffDaysView.cs


示例15: Storage

 public Storage(IMainForm mainForm, IValidation valid)
 {
 	
 	this.IMainForm = mainForm;
 	
 	this.Validation = valid;
 	
 }
开发者ID:AnonymousUser200102010,项目名称:Youtube-Download-Helper,代码行数:8,代码来源:Storage.cs


示例16: frmChangeDatabase

 public frmChangeDatabase(IMainForm parent, ISystemDataProvider systemDataProvider)
 {
     InitializeComponent();
     this.parent = parent;
     gvDatabases.TableElement.AlternatingRowColor = System.Drawing.Color.BlanchedAlmond;
     SystemDataProvider = systemDataProvider;
     LoadDatabases();
 }
开发者ID:chuckfrazier,项目名称:DataPlatform,代码行数:8,代码来源:frmChangeDatabase.cs


示例17: Init

		static public void Init(IMainForm mainForm)
		{
			Flex2Shell.mainForm = mainForm;
			if (!mainForm.MainSettings.HasKey(KEY_FLEX2SDK))
				mainForm.MainSettings.AddValue(KEY_FLEX2SDK, "c:\\flex_2_sdk");
			
			UpdateSettings();
		}
开发者ID:heon21st,项目名称:flashdevelop,代码行数:8,代码来源:Flex2Shell.cs


示例18: BuildActions

		public BuildActions(IMainForm mainForm)
		{
			this.mainForm = mainForm;
			this.missingClasspaths = new ArrayList();

			// setup FDProcess helper class
			fdProcess = new FDProcessRunner(mainForm);
		}
开发者ID:heon21st,项目名称:flashdevelop,代码行数:8,代码来源:BuildActions.cs


示例19: MainFormController

        public MainFormController(IMainForm form)
        {
            MainForm = form;

            MainForm.NodeCollapsing += MainForm_NodeCollapsing;
            MainForm.NodeExpanding += MainForm_NodeExpanding;
            MainForm.NodeSelected += MainForm_NodeSelected;
        }
开发者ID:sujithkp,项目名称:Rex,代码行数:8,代码来源:MainFormController.cs


示例20: WorkClass

        public WorkClass(IMainForm iMainForm, IReadWrite iReadWrite, IMessage iMessage)
        {
            _iMainForm = iMainForm;
            _iReadWrite = iReadWrite;
            _iMessage = iMessage;

            subscribeToAllEvent();
        }
开发者ID:kraew2006,项目名称:DrawTest,代码行数:8,代码来源:WorkClass.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# IMainWindow类代码示例发布时间:2022-05-24
下一篇:
C# IMailService类代码示例发布时间: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