示例#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);
            });
        }