UpdateText() public method

public UpdateText ( ) : void
return void
示例#1
0
        public MainWindow(MainWindowModel model)
        {
            _model = model;
            this.Closing += OnClosing;

            InitializeComponent();
            this.DataContext = _model;
            var version = Assembly.GetExecutingAssembly().GetName().Version;
            _model.WindowTitle = "GTA V Eye Tracking Mod Installer " + version.Major + "." + version.Minor + "." + version.Build;
            _model.UpdateText();

            Task.Run(() =>
            {
                _model.CheckForUpdates();
            });
        }
示例#2
0
        public MainWindow(MainWindowModel model)
        {
            _model        = model;
            this.Closing += OnClosing;

            InitializeComponent();
            this.DataContext = _model;
            var version = Assembly.GetExecutingAssembly().GetName().Version;

            _model.WindowTitle = "GTA V Eye Tracking Mod Installer " + version.Major + "." + version.Minor + "." + version.Build;
            _model.UpdateText();

            Task.Run(() =>
            {
                _model.CheckForUpdates();
            });
        }
示例#3
0
        private void Browse_OnClick(object sender, RoutedEventArgs e)
        {
            var openFileDialog = new OpenFileDialog {
                DefaultExt = ".exe", Filter = "GTA5.exe|GTA5.exe"
            };
            var showDialog = openFileDialog.ShowDialog();

            if (!showDialog.HasValue)
            {
                return;
            }

            var gtaExePath = openFileDialog.FileName;

            if (File.Exists(gtaExePath) && Path.GetFileName(gtaExePath).Equals("gta5.exe", StringComparison.OrdinalIgnoreCase))
            {
                _model.SetGtaPath(Path.GetDirectoryName(gtaExePath));
                _model.UpdateText();
                Task.Run(() =>
                {
                    _model.CheckForUpdates();
                });
            }
        }