Exemplo n.º 1
0
        private void btnOpenNetwork_Click(object sender, RoutedEventArgs e)
        {
            logger.Trace("btnOpenNetwork Clicked.");

            BrowseNetworkWindow browseNetworkWindow = new BrowseNetworkWindow(true);

            browseNetworkWindow.SetResultHandler(
                minerMachines =>
            {
                AddToMachineList(minerMachines);
                needRefreshMachineConnections = true;
            });

            browseNetworkWindow.ShowDialog();
        }
        private void btnStepOneBrowse_Click(object sender, RoutedEventArgs e)
        {
            logger.Trace("btnStepOneBrowse Clicked.");

            BrowseNetworkWindow browseNetworkWindow = new BrowseNetworkWindow(false);

            browseNetworkWindow.SetResultHandler(
                minerMachines =>
            {
                if (minerMachines != null && minerMachines.Count == 1)
                {
                    this.txtMachineName.Text = minerMachines.FirstOrDefault()?.FullName;
                }
            });

            browseNetworkWindow.ShowDialog();
        }