private void ExecuteAboutCommand() { var view = new AboutView(); view.Owner = _view.Window; view.ShowDialog(); }
/// <summary> /// Open About screen. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void aboutToolStripMenuItem_Click(object sender, EventArgs e) { AboutView view = new AboutView(); view.ShowDialog(); view.Close(); }
public override void ViewDidLoad() { base.ViewDidLoad(); prepareViews(); Title = ViewModel.Title; VersionLabel.Text = ViewModel.Version; LoggingOutView.Hidden = true; SendFeedbackSuccessView.Hidden = true; this.Bind(ViewModel.Email, EmailLabel.Rx().Text()); this.Bind(ViewModel.IsSynced, SyncedView.Rx().IsVisible()); this.Bind(ViewModel.WorkspaceName, WorkspaceLabel.Rx().Text()); this.Bind(ViewModel.DurationFormat, DurationFormatLabel.Rx().Text()); this.Bind(ViewModel.IsRunningSync, SyncingView.Rx().IsVisible()); this.Bind(ViewModel.DateFormat, DateFormatLabel.Rx().Text()); this.Bind(ViewModel.BeginningOfWeek, BeginningOfWeekLabel.Rx().Text()); this.Bind(ViewModel.IsFeedbackSuccessViewShowing, SendFeedbackSuccessView.Rx().AnimatedIsVisible()); this.BindVoid(ViewModel.LoggingOut, () => { LoggingOutView.Hidden = false; SyncingView.Hidden = true; SyncedView.Hidden = true; }); this.Bind(HelpView.Rx().Tap(), ViewModel.OpenHelpView); this.Bind(LogoutButton.Rx().Tap(), ViewModel.TryLogout); this.Bind(AboutView.Rx().Tap(), ViewModel.OpenAboutView); this.Bind(FeedbackView.Rx().Tap(), ViewModel.SubmitFeedback); this.Bind(DateFormatView.Rx().Tap(), ViewModel.SelectDateFormat); this.Bind(WorkspaceView.Rx().Tap(), ViewModel.PickDefaultWorkspace); this.Bind(DurationFormatView.Rx().Tap(), ViewModel.SelectDurationFormat); this.BindVoid(ManualModeSwitch.Rx().Changed(), ViewModel.ToggleManualMode); this.Bind(BeginningOfWeekView.Rx().Tap(), ViewModel.SelectBeginningOfWeek); this.Bind(CalendarSettingsView.Rx().Tap(), ViewModel.OpenCalendarSettingsAction); this.BindVoid(SendFeedbackSuccessView.Rx().Tap(), ViewModel.CloseFeedbackSuccessView); this.Bind(NotificationSettingsView.Rx().Tap(), ViewModel.OpenNotificationSettingsAction); this.Bind(TwentyFourHourClockSwitch.Rx().Changed(), ViewModel.ToggleUseTwentyFourHourClock); UIApplication.Notifications .ObserveWillEnterForeground((sender, e) => startAnimations()) .DisposedBy(DisposeBag); if (!ViewModel.CalendarSettingsEnabled) { hideCalendarSettingsSection(); } ViewModel.IsManualModeEnabled .FirstAsync() .Subscribe(isEnabled => ManualModeSwitch.SetState(isEnabled, false)) .DisposedBy(DisposeBag); ViewModel.UseTwentyFourHourFormat .FirstAsync() .Subscribe(useTwentyFourHourFormat => TwentyFourHourClockSwitch.SetState(useTwentyFourHourFormat, false)) .DisposedBy(DisposeBag); }
private void OpenAbout() { //TODO: I hate interacting with a view from within a view-model. AboutView aboutView = new AboutView(); aboutView.ShowDialog(); }
private void About() { ClearWindow(); about = new AboutView(51); about.Ok += ExitAbout; Win.Add(about); }
protected override void OnStartup(StartupEventArgs e) { LogTo.Information("Starting the application..."); DXSplashScreen.Show(o => AboutView.AsSplashScreen(), null, null, null); base.OnStartup(e); LogTo.Information("Application startup finished."); }
private void AboutMenuItem_Click(object sender, RoutedEventArgs e) { //Set AboutPage as home screen. AboutView about = new AboutView(); ContentControl.Content = about; }
public void ShowAboutView() { AboutView aboutView = new AboutView(); aboutView.Owner = Application.Current.MainWindow; aboutView.ShowDialog(); }
private void __ShowAboutWindow() { var Window = new AboutView(); var VM = new AboutViewModel(); __OpenChildWindow(Window, VM); }
public void InitializeNavigation() { try { SettingsView = new SettingsView(); SettingsViewModel = new SettingsViewModel(ApplicationModel); SettingsView.DataContext = SettingsViewModel; DownloadView = new DownloadView(); DownloadsViewModel = new DownloadsViewModel(ApplicationModel); DownloadView.DataContext = DownloadsViewModel; SpotifyView = new SpotifyView(); SpotifyViewModel = new SpotifyViewModel(ApplicationModel); SpotifyView.DataContext = SpotifyViewModel; YouTubeView = new YouTubeView(); YouTubeViewModel = new YouTubeViewModel(ApplicationModel); YouTubeView.DataContext = YouTubeViewModel; AboutView = new AboutView(); AboutViewModel = new AboutViewModel(ApplicationModel); AboutView.DataContext = AboutViewModel; ContentWindow = SpotifyView; } catch (Exception ex) { new LogException(ex); } }
public OptionsView(Session session) { this._session = session; _settingsView = new SettingsView(_session); _aboutView = new AboutView(); _resultsView = new ResultsView(_session); InitializeComponent(); }
private void ExecuteOpenAbout(object parameter) { var view = new AboutView(); view.DataContext = this.ApplicationVM; base.ShowDialog(Translator.Translate("UI_ABOUT"), view); }
/// <summary> /// Event handler for the about menu item clicked /// </summary> private void Menu_About_Click(object sender, RoutedEventArgs e) { var about = new AboutView { Owner = this }; about.Show(); }
/// <summary> /// The CreateView. /// This method is already in UI Thread. /// </summary> /// <returns>The <see cref="UIElement"/>.</returns> protected override UIElement CreateView() { var aboutView = new AboutView { DataContext = this.AboutViewModel }; return(aboutView); }
public override void ViewDidLoad() { base.ViewDidLoad(); var size = (SizeF)this.View.Frame.Size; var width = size.Width; var height = size.Height; var ImageScheme = new UIImageView(); ImageScheme.Frame = new CGRect(size.Width * 0.35f, size.Height * 0.1f, size.Width * 0.3f, size.Height * 0.07f); ImageScheme.Image = new UIImage("Lightscheme.png"); AboutView.AddSubview(ImageScheme); var ImageSchemeMain = new UIImageView(); ImageSchemeMain.Frame = new CGRect((size.Width - size.Height * 0.5f * 0.75f) / 2, size.Height * 0.22f, size.Height * 0.5f * 0.75f, size.Height * 0.5f); ImageSchemeMain.Image = new UIImage("LogoScheme.png"); AboutView.AddSubview(ImageSchemeMain); UILabel Label = new UILabel(); Label.Frame = new CGRect(width * 0.15f, height * 0.74f, width * 0.7f, height * 0.08f); Label.TextAlignment = UITextAlignment.Center; Label.Font = UIFont.FromName("Arial", height * 0.035f); Label.TextColor = UIColor.FromRGB(23, 32, 42);//FromRGB(102, 207, 120); Label.Text = "Copyright© 2018 Lighting Scheme"; AboutView.AddSubview(Label); UILabel Label1 = new UILabel(); Label1.Frame = new CGRect(width * 0.15f, height * 0.78f, width * 0.7f, height * 0.08f); Label1.TextAlignment = UITextAlignment.Center; Label1.Font = UIFont.FromName("Arial", height * 0.035f); Label1.TextColor = UIColor.FromRGB(23, 32, 42);//FromRGB(102, 207, 120); Label1.Text = "Lighting Scheme All Rights Reserved"; AboutView.AddSubview(Label1); UILabel Label2 = new UILabel(); Label2.Frame = new CGRect(width * 0.15f, height * 0.82f, width * 0.7f, height * 0.08f); Label2.TextAlignment = UITextAlignment.Center; Label2.Font = UIFont.FromName("Arial", height * 0.035f); Label2.TextColor = UIColor.FromRGB(23, 32, 42);//FromRGB(102, 207, 120); Label2.Text = "© BS GROUP"; AboutView.AddSubview(Label2); var ButtonMenu = new UIButton(); ButtonMenu.SetImage(new UIImage("baseline_menu_black_36pt_2x.png"), UIControlState.Normal); ButtonMenu.Frame = new CGRect(height * 0.02f, height * 0.04f, width * 0.08f, width * 0.06f); ButtonMenu.TintColor = UIColor.FromRGB(247, 220, 111); AboutView.AddSubview(ButtonMenu); ButtonMenu.TouchUpInside += (sender, e) => { PerformSegue("ShowMenuAbout", this); }; }
public MainWindow() { InitializeComponent(); //Set AboutPage as home screen. AboutView about = new AboutView(); ContentControl.Content = about; }
public void ShowAboutDialog() { UIServices.SetBusyState(); var aboutView = new AboutView(); var aboutViewModel = new AboutViewModel(); dialogService.ShowDialogWindow("About SigmaNEST ROI Calculator", null, null, aboutView, aboutViewModel, false); }
/// <summary> /// The Test. /// </summary> /// <param name="testWindow">The testWindow<see cref="Window"/>.</param> protected override void Test(Window testWindow) { var viewModel = new AboutViewModel(); var view = new AboutView { DataContext = viewModel }; WindowFactory.CreateAndShow(view, testWindow); }
private void MenuItem_Click(object sender, RoutedEventArgs e) { AboutView view = new AboutView(); view.Owner = this; // Afiche une fenetre de dialigue modal view.ShowDialog(); }
public void Show_AboutView() { var viewModel = new AboutViewModel(); var view = new AboutView { DataContext = viewModel }; WindowFactory.CreateAndShow(view); }
/// <summary> /// About画面を開きます。 /// </summary> public void OpenAboutView() { _aboutView = new AboutView(); _aboutView.Closed += (o, args) => { _loggingService.Logs.Add("About画面を閉じました。"); _aboutView = null; }; _aboutView.ShowDialog(); }
private void überToolStripMenuItem1_Click(object sender, EventArgs e) { var aboutView = new AboutView() { RepoUrl = "https://github.com/100prznt/Hue2Json", AuthorEmail = "*****@*****.**" }; aboutView.ShowDialog(); }
private void AboutMenuItem_OnClick(object sender, RoutedEventArgs e) { var about = new AboutView() { WindowStartupLocation = WindowStartupLocation.CenterOwner, Owner = this, }; about.ShowDialog(); }
private void OpenAboutWindow() { AboutViewModel viewModel = new AboutViewModel(); AboutView view = new AboutView() { DataContext = viewModel, }; view.Show(); }
static void StartPixelCapture() { var pixelCatcherView = new PixelCatcherView(); var aboutInformation = new AboutInformation(); var aboutView = new AboutView(); var pixelCatcherPresenter = new PixelCatcherPresenter(aboutView, pixelCatcherView, aboutInformation); Application.Run(pixelCatcherView); }
private void About(object obj) { var aboutDialog = new AboutView { Owner = Application.Current.MainWindow }; var aboutViewModel = new AboutViewModel(aboutDialog); aboutViewModel.FillReleaseNotes(); aboutDialog.DataContext = aboutViewModel; aboutDialog.ShowDialog(); }
private void bti_About_ItemClick(object sender, ItemClickEventArgs e) { AboutView av = new AboutView(LoginView.WMSName); string sysVersion = "1.0.15"; string aboutStr = "版本:" + sysVersion + " \r\n \r\n" + "日期:" + "2019-5-12" + "\r\n \r\n" + "(Copyright)深圳捷创嘉智能物流装备有限公司"; av.SetVersion(aboutStr); av.ShowDialog(); }
/// <summary>Initializes a new instance of the <see cref="AboutViewModel"/> class.</summary> /// <param name="owner">The owner.</param> public AboutViewModel(AboutView owner) { CloseCommand = new CloseCommand(owner); SendMailCommand = new RelayCommand(o => Process.Start("mailto:[email protected];[email protected];[email protected]")); OpenGitHubCommand = new RelayCommand(o => Process.Start("https://github.com/artiso-solutions/TfsBuildMonitor")); var assemblyName = typeof(AboutViewModel).Assembly.GetName(); Version = assemblyName.Version.ToString(); Product = assemblyName.Name; ReleaseNotes = new ObservableCollection <ReleaseNote>(); }
public MainPresenter CreateMainPresenter() { ToolbarView toolbarView = new ToolbarView(); TextInputView textInputView = new TextInputView(); WordCounterView wordCounterView = new WordCounterView(); StatusBarView statusBarView = new StatusBarView(); ToolbarModel toolbarModel = new ToolbarModel(); //ToolbarPresenter toolbarPresenter = new ToolbarPresenter(toolbarView, toolbarModel); IModalDialogBuilder modalDialogBuilder = new ModalDialogBuilder(); IFileSelectionView fileSelectionView = new FileSelectionView(); FileSelectionModel fileSelectionModel = new FileSelectionModel(); FileSelectionPresenter openFilePresenter = new FileSelectionPresenter(fileSelectionView, fileSelectionModel); TextInputModel textInputModel = new TextInputModel(fileSelectionModel); TextInputPresenter textInputPresenter = new TextInputPresenter(textInputView, textInputModel); WordFrequencyCounter wordFrequencyCounter = new WordFrequencyCounter(); WordCounterModel wordCounterModel = new WordCounterModel(wordFrequencyCounter); WordCounterPresenter wordCounterPresenter = new WordCounterPresenter(wordCounterView, wordCounterModel); RunButtonNavigator runButtonNavigator = new RunButtonNavigator(toolbarView, wordCounterModel); MainView mainView = new MainView(toolbarView, textInputView, wordCounterView, statusBarView); MainModel mainModel = new MainModel(); MainPresenter mainPresenter = new MainPresenter(mainView, mainModel); AboutView aboutView = new AboutView(); AboutModel aboutModel = new AboutModel(); AboutPresenter aboutPresenter = new AboutPresenter(aboutView, aboutModel); RunButtonNavigator navigation = new RunButtonNavigator(toolbarView, wordCounterModel); AboutButtonNavigator aboutButtonNavigator = new AboutButtonNavigator(toolbarView, aboutView); TextSynchronizer modelConnector = new TextSynchronizer(wordCounterModel, textInputModel); IFileSelectionDisplay fileSelectionDisplay = new FileSelectionDisplay(fileSelectionModel); ILoadTextFromFile loadTextFromFile = new LoadTextFromFile(fileSelectionDisplay); LoadTextFromFileToTextInput loadTextFromFileToTextInput = new LoadTextFromFileToTextInput(loadTextFromFile, textInputModel); FileSelectionNavigator openFileButtonNavigator = new FileSelectionNavigator(toolbarView, loadTextFromFileToTextInput); TextInputLoader textInputLoader = new TextInputLoader(textInputModel, fileSelectionModel); /* * Wyświetlanie MsgBox * Obsługa błędów otwarcia pliku */ return(mainPresenter); }
public static void SetEntry(Panel container) { if (container == null) { throw new ArgumentNullException("container"); } AboutViewModel viewModel = new AboutViewModel(); AboutView view = new AboutView(); view.DataContext = viewModel; container.Children.Add(view); }
public ActionResult Create(AboutView pNewAboutView) { About pNewAbout = new About(); try { pNewAbout.Name = pNewAboutView.Name; pNewAbout.Descritp = pNewAboutView.Descritp; pNewAbout.Content = pNewAboutView.Content; pNewAbout.OrderDisplay = pNewAboutView.OrderDisplay; pNewAbout.Image = pNewAboutView.Image; pNewAbout.IsActive = pNewAboutView.IsActive; if(pNewAboutView.LangId=="Tiếng Việt") { pNewAbout.LangId = 0; } else { pNewAbout.LangId = 1; } pNewAbout.CreatedBy = account.Id; pNewAbout.CreatedDate = DateTime.Now; pNewAbout.EditBy = account.Id; pNewAbout.EditDate = DateTime.Now; var check = new AboutModel().Create(pNewAbout); if(check==true) { return RedirectToAction("Index"); } else { return View(pNewAboutView); } } catch { return View(pNewAboutView); } }
public AboutPresenterImpl(AboutView view, string versionNumber) { this.versionNumber = versionNumber; this.view = view; }
public ActionResult Edit(int id) { var pNewAboutView = new AboutView(); var Object = new AboutModel().GetAboutById(id); pNewAboutView.Name = Object.Name; pNewAboutView.Descritp = Object.Descritp; pNewAboutView.Content = Object.Content; pNewAboutView.OrderDisplay = Object.OrderDisplay; pNewAboutView.IsActive = Object.IsActive; pNewAboutView.Image = Object.Image; if (Object.LangId == 0) { pNewAboutView.LangId = "Tiếng Việt"; } else { pNewAboutView.LangId = "Tiếng Anh"; } return View(pNewAboutView); }
public AboutView() { InitializeComponent(); View = this; }
/// <summary> /// Initializes a new instance of the <see cref="StringTableEditorViewModel"/> class. /// </summary> public StringTableEditorViewModel() { TemplateMaster.Instance.Load("templates.xml"); this.violationsBackgroundWorker = new BackgroundWorker { WorkerSupportsCancellation = true, WorkerReportsProgress = true }; this.violationsBackgroundWorker.DoWork += this.violationsBackgroundWorker_DoWork; this.violationsBackgroundWorker.RunWorkerCompleted += this.violationsBackgroundWorker_RunWorkerCompleted; this.searchBackgroundWorker = new BackgroundWorker { WorkerSupportsCancellation = true, WorkerReportsProgress = true }; this.searchBackgroundWorker.DoWork += this.searchBackgroundWorker_DoWork; this.searchBackgroundWorker.RunWorkerCompleted += this.searchBackgroundWorker_RunWorkerCompleted; this.replaceBackgroundWorker = new BackgroundWorker { WorkerSupportsCancellation = true, WorkerReportsProgress = true }; this.replaceBackgroundWorker.DoWork += this.replaceBackgroundWorker_DoWork; this.replaceBackgroundWorker.RunWorkerCompleted += this.replaceBackgroundWorker_RunWorkerCompleted; this.Violations = new ObservableCollection<IViolation>(); this.AboutCommand = ReactiveCommand.Create(); this.AboutCommand.Subscribe(_ => { var aboutV = new AboutView(); aboutV.ShowDialog(); }); this.UnloadProjectCommand = ReactiveCommand.Create(); this.UnloadProjectCommand.Subscribe(_ => this.UnloadProjectCommandExecute()); this.OpenCommand = ReactiveCommand.Create(); this.OpenCommand.Subscribe(_ => this.OpenCommandExecute()); this.OpenFolderCommand = ReactiveCommand.Create(); this.OpenFolderCommand.Subscribe(_ => this.OpenFolderCommandExecute()); var canSave = this.WhenAny(x => x.Projects, x => x.Value.Count >= 1); this.SaveCommand = ReactiveCommand.Create(canSave); this.SaveCommand.Subscribe(_ => this.QuickSaveCommandExecute()); var canSaveAs = this.WhenAny(x => x.Projects, x => x.Value.Count == 1); this.SaveAsCommand = ReactiveCommand.Create(canSaveAs); this.SaveAsCommand.Subscribe(_ => this.SaveAsCommandExecute()); this.StringTableConvertCommand = ReactiveCommand.Create(); this.StringTableConvertCommand.Subscribe(_ => this.StringTableConvertCommandExecute()); var canFill = this.WhenAny(x => x.Keys, x => x.Value.Count > 0); this.FillMissingCommand = ReactiveCommand.Create(canFill); this.FillMissingCommand.Subscribe(_ => this.FillMissingInSelectionCommandExecute()); this.WipeCommand = ReactiveCommand.Create(canFill); this.WipeCommand.Subscribe(_ => this.WipeCommandExecute()); var canFindInTree = this.WhenAny(x => x.SelectedKey, x => x.Value != null); this.FindInTreeCommand = ReactiveCommand.Create(canFindInTree); this.FindInTreeCommand.Subscribe(_ => { this.SelectedNode = this.SelectedKey; }); this.WhenAny(vm => vm.SelectedNode, vm => vm.Value != null).Subscribe(async _ => { await Task.Run(() => this.RecomputeGridKeys()); this.RunViolationsCheck(); }); // display the violation keys this.WhenAny(vm => vm.SelectedViolation, vm => vm.Value != null).Subscribe(_ => { if (this.SelectedViolation != null) { this.Keys = this.SelectedViolation.Keys; } }); this.EditProjectCommand = ReactiveCommand.Create(); this.EditProjectCommand.Subscribe(_ => this.ExecuteEditProjectCommand()); this.AddPackageCommand = ReactiveCommand.Create(); this.AddPackageCommand.Subscribe(_ => this.ExecuteAddPackageCommand()); this.EditPackageCommand = ReactiveCommand.Create(); this.EditPackageCommand.Subscribe(_ => this.ExecuteEditPackageCommand()); this.RemovePackageCommand = ReactiveCommand.Create(); this.RemovePackageCommand.Subscribe(_ => this.ExecuteRemovePackageCommand()); this.AddContainerCommand = ReactiveCommand.Create(); this.AddContainerCommand.Subscribe(_ => this.ExecuteAddContainerCommand()); this.EditContainerCommand = ReactiveCommand.Create(); this.EditContainerCommand.Subscribe(_ => this.ExecuteEditContainerCommand()); this.RemoveContainerCommand = ReactiveCommand.Create(); this.RemoveContainerCommand.Subscribe(_ => this.ExecuteRemoveContainerCommand()); this.AddKeyCommand = ReactiveCommand.Create(); this.AddKeyCommand.Subscribe(_ => this.ExecuteAddKeyCommand()); this.DuplicateKeyCommand = ReactiveCommand.Create(); this.DuplicateKeyCommand.Subscribe(_ => this.ExecuteDuplicateKeyCommand()); this.RemoveKeyCommand = ReactiveCommand.Create(); this.RemoveKeyCommand.Subscribe(_ => this.ExecuteRemoveKeyCommand()); this.TemplatesCommand = ReactiveCommand.Create(); this.TemplatesCommand.Subscribe(_ => this.ExecuteTemplatesCommand()); var canSearch = this.WhenAny(x => x.SearchString, x => !string.IsNullOrEmpty(x.Value)); this.SearchCommand = ReactiveCommand.Create(canSearch); this.SearchCommand.Subscribe(_ => this.ExecuteSearchCommand()); this.ReplaceCommand = ReactiveCommand.Create(canSearch); this.ReplaceCommand.Subscribe(_ => this.ExecuteReplaceCommand()); this.ConfigScannerVm = new ConfigScannerViewModel { ParentViewModel = this }; this.SetPropertis(); }