public CommandGenerate(VideoPreviewModel value, SerialPort port, string movie) { // var res = GetHexCode("1"); movieName = movie; var list = ConfigureHelper.GetSerialNodeList(); InitializeComponent(); videoPreviewModel = value; serialPort = port; if (port != null) { port.DataReceived += SPort_DataReceived; } this.Loaded += MainWindow_Loaded; _viewModel = new ViewModel.MainViewModel(); foreach (var item in list) { _viewModel.Page2ImagemModelList.Add(new Model.Page2ImageModel() { Key = item.key, Content = item.Content, IsChecked = false }); } if (value.CurrentFlow != null) { _viewModel.CommandList = new ObservableCollection <Model.Instruction>(value.CurrentFlow.Instructions.Where(u => u.T时间 == value.CurrentPos).ToList()); } this.DataContext = _viewModel; }
public MainView() { InitializeComponent(); ViewModel.MainViewModel vm = new ViewModel.MainViewModel(); this.DataContext = vm; vm.CloseAction = new Action(() => this.Close()); }
public MainPage() { InitializeComponent(); var vm = new ViewModel.MainViewModel(); this.BindingContext = vm; }
public MainMasterPageMaster() { InitializeComponent(); NavigationPage.SetHasNavigationBar(this, false); BindingContext = new ViewModel.MainViewModel(); ListView = MenuItemsListView; }
public MainWindow() { InitializeComponent(); DataContext = new ViewModel.MainViewModel() { //Repository = new Providers.DemoProvider() Repository = new Providers.CsvProvider() //Repository = new Providers.WebProvider("http://localhost:5866/") }; }
protected override void OnNavigatedTo(NavigationEventArgs e) { if (e.NavigationMode == NavigationMode.New) { var vm = e.Parameter as MainViewModel; cts = new CancellationTokenSource(); VM = vm; _app.EnterFullScreen(); Bindings.Update(); #pragma warning disable CS4014 // Because this call is not awaited, execution of the current method continues before the call is completed //fire and forgot ListenForProgressChange(cts.Token); #pragma warning restore CS4014 // Because this call is not awaited, execution of the current method continues before the call is completed } base.OnNavigatedTo(e); }
protected override void OnStartup(StartupEventArgs e) { base.OnStartup(e); Views.MenuView menu = new Views.MenuView(); ViewModel.MenuViewModel menuVM = new ViewModel.MenuViewModel(); menuVM.NewGameEvent += new EventHandler(Menu_New); menuVM.LoadGameEvent += new EventHandler(Menu_Load); menuVM.QuitGameEvent += new EventHandler(Menu_Quit); menu.DataContext = menuVM; _mainViewModel = new ViewModel.MainViewModel(menu); _mainWindow = new View.MainWindow(); _mainWindow.DataContext = _mainViewModel; _mainWindow.Show(); }
private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e) { ViewModel.MainViewModel mvm = (ViewModel.MainViewModel)DataContext; bool result = mvm.CanClosed; if (result) { MessageBoxResult dr = MessageBox.Show("Есть несохраненные элементы. Все равно закрыть?", "Внимание!", MessageBoxButton.YesNo); if (dr == MessageBoxResult.Yes) { e.Cancel = false; } else { e.Cancel = true; } } }
public MainWindow() { InitializeComponent(); DataContext = vm = new ViewModel.MainViewModel(); ViewModel.SynchronisationHelper.RegisterParentWindow(this); }
private void MainView_DataContextChanged(object sender, DependencyPropertyChangedEventArgs e) { vm = this.DataContext as ViewModel.MainViewModel; vm.PositionChanged += Vm_PositionChanged; }
// Constructor public MainPage() { InitializeComponent(); this.DataContext = ViewModel = new ViewModel.MainViewModel(); }
public MainWindow() { InitializeComponent(); model = new ViewModel.MainViewModel(); this.DataContext = model; }
public PageMedia(ViewModel.MainViewModel parent) { InitializeComponent(); this.DataContext = new ViewModel.PageMedia(parent); }
public GlobalView(ViewModel.MainViewModel mainViewModel) { InitializeComponent(); DataContext = mainViewModel; }
public MainWindow() { InitializeComponent(); ViewModel.MainViewModel vm = new ViewModel.MainViewModel(); this.DataContext = vm; }
internal BottomPanel(ViewModel.MainViewModel mainViewModel) { InitializeComponent(); DataContext = mainViewModel; }
internal Player(ViewModel.MainViewModel mainViewModel) { InitializeComponent(); DataContext = mainViewModel; }
public MainWindow() { InitializeComponent(); DataContext = new ViewModel.MainViewModel(); }
internal Hall(ViewModel.MainViewModel mainViewModel) { InitializeComponent(); DataContext = mainViewModel; mainViewModel.RefreshLastGame(); }
private void Window_Closed(object sender, EventArgs e) { ViewModel.MainViewModel mvm = FindResource("mainViewModel") as ViewModel.MainViewModel; mvm.FinishWork(); }
internal Registration(ViewModel.MainViewModel mainViewModel) { InitializeComponent(); DataContext = mainViewModel; }
public Accueil(ViewModel.MainViewModel parent) { InitializeComponent(); base.DataContext = new ViewModel.Accueil(parent); }
public MainPage() { InitializeComponent(); BindingContext = new ViewModel.MainViewModel(); //cargarTablaAsync(); }
public Locator() { this.Main = new ViewModel.MainViewModel(); }
private void MainView_DataContextChanged(object sender, DependencyPropertyChangedEventArgs e) { vm = this.DataContext as ViewModel.MainViewModel; vm.GridProjectChanged += Vm_GridProjectChanged; selectedItems = vm.SelectedItems; }
public Liste(ViewModel.MainViewModel parent) { InitializeComponent(); this.DataContext = new ViewModel.Liste(parent); }
public TreeView() { InitializeComponent(); ViewModel.MainViewModel TreeView = new ViewModel.MainViewModel(); DataContext = new ViewModel.MainViewModel(); }
internal Authorization(ViewModel.MainViewModel mainViewModel) { InitializeComponent(); DataContext = mainViewModel; }