Exemple #1
0
        private void newMinerInfoBtn__Click(object sender, RoutedEventArgs e)
        {
            Window           w = new Window();
            MinerRigInfoView v = new MinerRigInfoView();
            MinerRigInfo     newMinerRigInfo = new MinerRigInfo();

            v.setViewModel(newMinerRigInfo);

            w.Content = v;

            if (w.ShowDialog() == true)
            {
                this.ViewModel_.MinerRigList_.Add(newMinerRigInfo.GetMinerRig());
                this.ViewModel_.MinerRig_save();
            }
        }
Exemple #2
0
        private void minerDataGrid__PreviewMouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            MinerRig selected_minerRig = e.Source as MinerRig;

            if (selected_minerRig != null)
            {
                MinerRigInfoView v = new MinerRigInfoView();

                v.setViewModel(selected_minerRig.MinerRigInfo_);

                Window w = new Window();
                w.Content = v;
                if (w.ShowDialog() == true)
                {
                    selected_minerRig.reset_minerRigInfo(selected_minerRig.MinerRigInfo_);

                    this.ViewModel_.MinerRig_save();
                }
            }
        }