상속: System.Windows.Forms.Form, IMainForm
예제 #1
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            MainForm form = new MainForm();
            MessageService service = new MessageService();
            FileManager manager = new FileManager();

            MainPresenter presenter = new MainPresenter(form, manager, service);
            Application.Run(form);
        }
예제 #2
0
파일: Program.cs 프로젝트: Diamur/C-
		private static void Main(string[] args)
		{
			Application.EnableVisualStyles();
			Application.SetCompatibleTextRenderingDefault(false);
			
			//---собственный код----
			MainForm form = new MainForm();
			MessageService service = new MessageService();
			FileManager manager = new FileManager();
			
			Presenter presenter = new Presenter(form, manager, service );
			//----------------------
						
			Application.Run(form);
		}
예제 #3
0
파일: Program.cs 프로젝트: viticm/pap2
        /// <summary>
        /// 编辑数据
        /// </summary>
        /// <param name="table">输入数据</param>
        /// <return>是否编辑成功</return>
        public override bool EditData(Hashtable table)
        {
            bool editSuccess = false;
            string content = table["data"] as string;
            if(content == null)
            {
                content = "请输入编辑内容";
            }
            MainForm mainForm = new MainForm(content);
            DialogResult result = mainForm.ShowDialog();
            if(result == DialogResult.OK)
            {
                text = mainForm.Content;
                data = mainForm.Content;                
                editSuccess = true;
            }

            return editSuccess;
        }