private static void Main(string[] args) { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); var datenbank = new FakeDatenbank(); if (args.Contains("--legacyview")) { var viewMain = new ViewMain(); var controllerMain = new ControllerMain(); var modelMain = new ModelMain(datenbank); viewMain.Controller = controllerMain; controllerMain.ModelMain = modelMain; modelMain.ViewMain = viewMain; Application.Run(viewMain); } else { var viewMain = new Main.ViewMain(); var controllerMain = new Main.ControllerMain(); var modelMain = new Main.ModelMain(datenbank); viewMain.Controller = controllerMain; controllerMain.ModelMain = modelMain; modelMain.ViewMain = viewMain; Application.Run(viewMain); } }
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); IModel _modelMain = new ModelMain(); ViewMain _viewMain = new ViewMain(); ViewAddProject _viewAddProject = new ViewAddProject(); ViewEvaluation _viewEvaluation = new ViewEvaluation(); IController cnt = new ControllerMain(_modelMain, _viewMain, _viewAddProject, _viewEvaluation); Application.Run(_viewMain); }
protected override void OnContentRendered(EventArgs e) { base.OnContentRendered(e); if (_shown) { return; } _shown = true; var modelMain = new ModelMain(); modelMain.SetTaskbarJumpListAsync(MainWindowPointer, null); }
private void DropCall(object sender, DragEventArgs e) { ModelMain modelMain = (ModelMain)DataContext; // Note that you can have more than one file. string[] files = (string[])e.Data.GetData(DataFormats.FileDrop); if (files.Length == 1) { if (files[0].Substring(files[0].Length - 3, 3).ToLower().Equals("pdf")) { modelMain.LoadPDF(files[0]); } } }
/// <summary> /// конструктор /// </summary> /// <param name="view">ViewModel для главного окна</param> public MainPresenter(IMainView view) { this.view = view; mm = new ModelMain(); }
//Form Main public static bool infoMail_Controller() { return(ModelMain.InfoMail(idUsuario)); }
ModelMain model;// = new ModelMain(App.Token); public ChatMainWindowViewModel() { model = new ModelMain(App.Token); model.Connect(); }