Пример #1
0
        /// <summary>
        /// コンストラクタ
        /// </summary>
        /// <param name="top">メインウィンドウ表示するTopからの座標</param>
        /// <param name="left">メインウィンドウ表示するLeftからの座標</param>
        public ControlViewModel(double top, double left)
        {
            // これで表示する座標を決める
            Top.Value  = top;
            Left.Value = left;

            _ = ClickCommand.Subscribe(_ => MessageBox.Show($"test{Top.Value},{Left.Value}")).AddTo(Disposable);
        }
Пример #2
0
        public VideoFeedViewModel(string url, string title, IBitmap image = null)
        {
            _url   = url;
            _title = title;
            _image = image;

            ClickCommand = ReactiveCommand.Create();

            ClickCommand.Subscribe(_ => {
                System.Diagnostics.Process.Start(url);
            });
        }
Пример #3
0
        public RecentProjectViewModel(string name, string location)
        {
            _name     = name;
            _location = location;

            ClickCommand = ReactiveCommand.Create();

            ClickCommand.Subscribe(_ =>
            {
                var shell = IoC.Get <IShell>();

                shell.OpenSolutionAsync(_location);
            });
        }
Пример #4
0
        public MainViewModel()
        {
            ClickCommand = ReactiveCommand.Create();
            ClickCommand.Subscribe(o =>
            {
                // Do Something
            });

            ButtonClickEventCommand = ReactiveCommand.Create();
            ButtonClickEventCommand.Subscribe(o =>
            {
                // Do Something
            });
        }
Пример #5
0
        public NewsFeedViewModel(string url, string content, string category, string author, string title)
        {
            _url      = url;
            _content  = content;
            _category = category;
            _author   = author;
            _title    = title;

            ClickCommand = ReactiveCommand.Create();

            ClickCommand.Subscribe(_ => {
                System.Diagnostics.Process.Start(url);
            });
        }
Пример #6
0
        public RecentProjectViewModel(string name, string location)
        {
            this._name     = name;
            this._location = location;

            ClickCommand = ReactiveCommand.Create();

            ClickCommand.Subscribe(_ => {
                var shell = IoC.Get <IShell>();

                var path = Path.Combine(location, name + ".asln");

                shell.OpenSolution(path);
            });
        }