public CacheInitalizer(IMainWindowModel mainWindowHandle, ISqliteControler sqliteControler, ISettingsHandler settings, ILogger logger) { _mainWindowHandle = mainWindowHandle; _sqliteControler = sqliteControler; _settings = settings; _logger = logger; }
public SqliteDataFinder(ILogger logger, ISettingsHandler settings, IMainWindowModel mainWindowHandle, ISqliteControler sqLiteControler) { _mainWindowHandle = mainWindowHandle; _settingsHandle = settings; _sqliteControler = sqLiteControler; Start(logger); }
public MainWindowViewModel(IMainWindowModel model) { if (model is null) { return; } _disposables = new CompositeDisposable(); _model = model; if (_model is IDisposable disposableModel) { _disposables.Add(disposableModel); } StartupShortcuts = _model.StartupShortcuts .Select(x => x?.Select(i => new ShortcutForDisplay(i)).ToList()) .ToReadOnlyReactivePropertySlim(new List <ShortcutForDisplay>()) .AddTo(_disposables); AddCommand .Subscribe(AddShortcut) .AddTo(_disposables); RemoveCommand .Subscribe(RemoveShortcut) .AddTo(_disposables); OpenExplorerCommand .Subscribe(OpenExplorer) .AddTo(_disposables); }
/// <summary> /// Constructor /// </summary> public VMMainWindow() { m_modelWindow = new MainWindowModel(); m_modelWindow.PropertyChanged += delegate(Object sender, PropertyChangedEventArgs e) { NotifyPropertyChanged("VM_" + e.PropertyName); }; }
public SqliteDataFinder(ILogger logger, ISettings settings, IMainWindowModel mainWindowHandle, IDatabaseController databaseController) { _mainWindowHandle = mainWindowHandle; _settings = settings; _databaseController = databaseController; Start(logger); }
public Updater(ILogger logger, IMainWindowModel mainWindowHandle) { _logger = logger; _mainWindowHandle = mainWindowHandle; _mainWindowHandle.OnUpdateTextClicked += _mainWindowHandle_OnUpdateTextClicked; Start(logger); }
private void SetApplicationView(ApplicationView view) { menuViewConversation.IsChecked = false; menuViewGraph.IsChecked = false; switch (view) { case ApplicationView.ConversationView: menuViewConversation.IsChecked = true; menuEditCopy.Command = CopyConversationTextCommand.CopyConversationText; _mainWindowModel = _conversationWindowModel; break; case ApplicationView.GraphView: menuViewGraph.IsChecked = true; menuEditCopy.Command = CopyGraphCommand.CopyGraph; _mainWindowModel = _graphWindowModel; break; default: throw new ArgumentException("Invalid conversation view."); } _currentView = view; }
public CacheInitalizer(IMainWindowModel mainWindowHandle, IDatabaseController databaseControler, ISettings settings, ILogger logger) { _mainWindowHandle = mainWindowHandle; _databaseControler = databaseControler; _settings = settings; _logger = logger; }
public static AddressRetrieveViewModel FillAddressByDefault(IMainWindowModel model) { var resultModel = new AddressRetrieveViewModel(); switch (GetLangByKey(model.SelectLanguage)) { case "DE": resultModel.Name = "Zusammenschluss \"pronovem\""; resultModel.Street = "c/o pronovem - Office Van Malderen Avenue Josse Goffin 158"; resultModel.City = "Brüssel"; break; case "FR": resultModel.Name = "Group de mandataire \"pronovem\""; resultModel.Street = "c/o pronovem - Office Van Malderen Avenue Josse Goffin 158"; resultModel.City = "Bruxelles"; break; case "NL": resultModel.Name = "Vertegenwoordiger groep \"pronovem\""; resultModel.Street = "c/o pronovem - Office Van Malderen Avenue Josse Goffin 158"; resultModel.City = "Brussel"; break; } resultModel.Country = "BE"; resultModel.PostCode = "1082"; resultModel.Fax = "02 426 37 60"; resultModel.Phone = "02 426 38 10"; resultModel.Email = "*****@*****.**"; return(resultModel); }
public MainWindowViewModel(IMainWindowModel model) { _model = model; DisplayMenuItem = _model.GetDisplayMenuItem; CommonButtons = _model.GetCommonButtons; _model.ModuleInitialize(); }
public MainWindowViewModel(IMainWindowModel model) { this.mainWindowModel = model; this.mainWindowModel.PropertyChanged += delegate(Object sender, PropertyChangedEventArgs e) { NotifyPropertyChanged("VM_" + e.PropertyName); }; }
public void SetDataBindings(IMainWindowModel bindingSource) { NowPlaying.DataBindings.Add(AsyncBindingHelper.GetBinding(NowPlaying, "Text", bindingSource, "NowPlaying")); UpdateText.DataBindings.Add(AsyncBindingHelper.GetBinding(UpdateText, "Text", bindingSource, "UpdateText")); BeatmapsLoaded.DataBindings.Add(AsyncBindingHelper.GetBinding(BeatmapsLoaded, "Text", bindingSource, "BeatmapsLoaded")); OnUpdateTextClicked += bindingSource.UpdateTextClicked; }
public MainWindowViewModel() { this.model = new MainWindowModel(); this.model.PropertyChanged += delegate(object sender, PropertyChangedEventArgs e) { NotifyPropertyChanged("VM_" + e.PropertyName); }; }
public MainWindowViewModel(IMainWindowModel model) { _model = model; PageButtons = _model.GetPageButtons; CommonButtons = _model.GetCommonButtons; ContentPages = _model.GetContentPages; _model.ModelInitialize(); }
public MainWindowVM() { this.model = new MainWindowModel(); WindowCloseCommand = new DelegateCommand(() => { Console.WriteLine("In closeWindow Command"); this.model.SendCloseCommandToService(); } ); }
/// <summary> /// Creates a new main window view model instance. /// </summary> public MainWindowVM() { mainWindowModel = new MainWindowModel(); mainWindowModel.PropertyChanged += delegate(Object sender, PropertyChangedEventArgs e) { NotifyPropertyChanged("VM_" + e.PropertyName); }; CloseCommand = new DelegateCommand <object>(OnClose, CanClose); }
public MainWindowViewModel(IMainWindowModel model) { this.mainWindowModel = model; this.mainWindowModel.PropertyChanged += delegate(Object sender, PropertyChangedEventArgs e) { NotifyPropertyChanged("VM_" + e.PropertyName); }; //this.CloseCommand = new DelegateCommand<object>(this.OnClose, this.CanClose); }
/// <summary> /// Initializes a new instance of the <see cref="MainWindowViewModel"/> class. /// </summary> public MainWindowViewModel() { this.model = new MainWindowModel(); this.discCommand = new DelegateCommand <object>(this.OnDisconnect, this.CanDisconnect); this.model.PropertyChanged += delegate(object sender, PropertyChangedEventArgs e) { NotifyPropertyChanged("VM_" + e.PropertyName); }; }
/// <summary> /// c'tor /// </summary> public MainWindowVm() { this.model = new MainWindowModel(); model.PropertyChanged += delegate(Object sender, PropertyChangedEventArgs e) { NotifyPropertyChanged("VM_" + e.PropertyName); }; this.CloseCommand = new DelegateCommand <object>(this.OnClose, this.CanClose); // close the gui }
public MainWindow(IMainWindowModel viewModel) { DataContext = viewModel; Loaded += (sender, args) => { BoundsListView.SelectedIndex = 0; BoundsListView.Focus(); }; InitializeComponent(); }
public void Model_PropertyChanged(object sender, PropertyChangedEventArgs e) { IMainWindowModel m = sender as IMainWindowModel; if (m != null && m == model) { if (e.PropertyName.Equals("Degree")) { // Degree = model.Degree; } } }
public MainWindow(ISettingsHandler settings, IMainWindowModel mainWindowHandle, IEnumerable <ISettingsProvider> settingsProviders, Delegates.Exit exitAction) { _settings = settings; _mainWindowHandle = mainWindowHandle; _exitAction = exitAction; _settingsList = settingsProviders.ToList(); if (!_settings.Get <bool>(_names.StartHidden)) { ShowWindow(); } }
public MainWindowViewModel(IMainWindowModel mainWindowModel) { if (mainWindowModel == null) { throw new ArgumentNullException(nameof(mainWindowModel)); } _mainWindowModel = mainWindowModel; _startClickCommand = new CommandHandler(OnStartButtonClick, true); _stopClickCommand = new CommandHandler(OnStopButtonClick, false); }
/// <summary> /// MainWindowViewModel constructor /// </summary> public MainWindowViewModel() { //Creates a new main window model this.main_window_model = new MainWindowModel(); this.cmd = new DelegateCommand <object>(this.OnDisconnect, this.CanDisconnect); //Sets property change delegation this.main_window_model.PropertyChanged += delegate(object sender, PropertyChangedEventArgs e) { NotifyPropertyChanged("VM_" + e.PropertyName); }; }
public MainWindow(IMainWindowModel data, ISettings settings) { SourceInitialized += Window_SourceInitialized; _settings = settings; RenderOptions.ProcessRenderMode = RenderMode.SoftwareOnly; InitializeComponent(); SetTheme(_settings.Get <string>(MainWindowPlugin.Theme)); Style = (Style)FindResource(typeof(Window)); DataContext = data; StateChanged += OnStateChanged; }
public MainWindowPlugin(ISettings settings, IMainWindowModel mainWindowModel, IEnumerable <ISettingsSource> settingsSources, Delegates.Exit exitAction) { _settings = settings; _settings.SettingUpdated += SettingUpdated; _mainWindowModel = mainWindowModel; _exitAction = exitAction; _settingsList = settingsSources.ToList(); _settingsList.Add(this); if (!_settings.Get <bool>(_names.StartHidden)) { ShowWindow(); } _notifyIcon = CreateNotifyIcon(); }
public MainWindowViewModel(IMainWindowModel mainWindowModel) { try { if (mainWindowModel == null) { throw new ArgumentNullException(nameof(mainWindowModel)); } _MainWindowModel = mainWindowModel; SendStatusUpdate(Utils.Status_Ready); } catch (Exception ex) { //Logging Here } }
public MainWindowViewModel(IMainWindowModel model) { _model = model; TextProgress = new DebugViewItem() { MenuName = "Please wait processing....", MenuStyle = Application.Current.Resources["BaseTextBoxStyle"] as Style, MenuVisibility = true }; ViewProgressBar = new ProgressBarViewItem() { MenuName = "50", MenuMinValue = "0", MenuMaxValue = "100", MenuStyle = Application.Current.Resources["CustomProgressBar"] as Style, }; var resu = StartEntireProgress(); CommonUILib.PrismDemoPubSubEvent <bool> .Instance.Subscribe(OnModuleLoaded); }
private static List <RetrieveDocModel> GetOriginalDecDomPdf(IMainWindowModel model, SettingsConfigModel configModel) { SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["PatlabConnection"].ConnectionString); try { conn.Open(); var exePath = Directory.GetCurrentDirectory(); var sqlPath = Path.Combine(exePath, "SQL", CommonConst.RetrieveSqlName); string query = File.ReadAllText(sqlPath); List <RetrieveDocModel> lstRetrieve = null; query = query.Replace("@MatterId", model.MatterId); using (var cmd = new SqlCommand(query, conn)) { cmd.Parameters.Clear(); cmd.Parameters.AddWithValue("@Category_Id", configModel.CategoryId); using (var dt = new DataTable { TableName = "TableRetrieve" }) { dt.Load(cmd.ExecuteReader()); lstRetrieve = dt.DataTableMapTo <RetrieveDocModel>(); } } return(lstRetrieve); } finally { if (conn.State == ConnectionState.Open) { conn.Close(); } } }
// ------------------------------------- // [CONSTRUCTOR] // ------------------------------------- public DocumentViewModel(IMainWindowModel mainWindowModel) { _mainWindowModel = mainWindowModel; ChordLinesView.CollectionChanged += new System.Collections.Specialized.NotifyCollectionChangedEventHandler(ChordLinesView_CollectionChanged); }
public void GetMainWindowHandle(IMainWindowModel mainWindowHandle) { _mainWindowHandle = mainWindowHandle; }
public virtual void SetMainWindowModel(IMainWindowModel mainModel) { _mainWindowModel = mainModel; }