コード例 #1
0
        internal static void LaunchPageant()
        {
            var puttyBinaryPath = GetBinaryPath(PAGEANT_BINARY);

            // todo launch only, if pageant isnt running otherwise it shows a message in case the key file doesnt exist.
            ExternalLinks.OpenPath(puttyBinaryPath);
        }
コード例 #2
0
            private static void SpecialItem_Click(object sender, EventArgs e)
            {
                var specialItem = (ToolStripItem)sender;
                var command     = (SpecialCommandConfigurationElement)specialItem.Tag;

                ExternalLinks.Launch(command);
            }
コード例 #3
0
 private void CreateTerminalTab(IFavorite origin, IFavorite configured)
 {
     ExternalLinks.CallExecuteBeforeConnected(this.settings);
     ExternalLinks.CallExecuteBeforeConnected(configured.ExecuteBeforeConnect);
     TerminalTabControlItem terminalTabPage = CreateTerminalTabPageByFavoriteName(configured);
     this.TryConnectTabPage(origin, configured, terminalTabPage);
 }
コード例 #4
0
 private string GetAttributeValue(string relationship)
 {
     if (ExternalLinks != null && ExternalLinks.Any(x => x.Relationship == relationship))
     {
         return(ExternalLinks.First(x => x.Relationship == relationship).Value);
     }
     return(null);
 }
コード例 #5
0
        internal void CreateTerminalTab(IFavorite favorite)
        {
            ExternalLinks.CallExecuteBeforeConnected(this.settings);
            ExternalLinks.CallExecuteBeforeConnected(favorite.ExecuteBeforeConnect);
            TerminalTabControlItem terminalTabPage = CreateTerminalTabPageByFavoriteName(favorite);

            this.TryConnectTabPage(favorite, terminalTabPage);
        }
コード例 #6
0
        private void AuthorizeFlickrButton_Click(object sender, EventArgs e)
        {
            Flickr flickr = CaptureManager.Capture.CreateFlickerInstance();

            this.tempFrob = flickr.AuthGetFrob();
            String flickrUrl = flickr.AuthCalcUrl(this.tempFrob, AuthLevel.Write);

            ExternalLinks.OpenPath(flickrUrl);
            CompleteAuthButton.Enabled = true;
        }
コード例 #7
0
 public ApprenticeshipsController(
     IOptions <ExternalLinks> externalLinks,
     IOptions <FatWebsite> fatConfig,
     IMediator mediator,
     ILogger <ApprenticeshipsController> logger)
 {
     _externalLinks  = externalLinks.Value;
     _fatConfig      = fatConfig.Value;
     _mediator       = mediator;
     _paramValidator = new ApprenticeshipsParameterValidator();
     _logger         = logger;
 }
コード例 #8
0
ファイル: Executables.cs プロジェクト: zivalin/Terminals
        private static Process[] EnsurePageantProcessRunning()
        {
            var pageantProcesses = Process.GetProcessesByName(PAGEANT);

            if (pageantProcesses.Any())
            {
                return(pageantProcesses);
            }

            var pagenatBinary = GetBinaryPath(PAGEANT_BINARY);

            ExternalLinks.OpenPath(pagenatBinary);
            return(Process.GetProcessesByName(PAGEANT));
        }
コード例 #9
0
 private void StopCaptureButton_Click(object sender, EventArgs e)
 {
     this.CaptureButton.Enabled       = false;
     this.StopCaptureButton.Enabled   = false;
     this.RedPicture.Visible          = true;
     this.GreenPicture.Visible        = false;
     this.AmberPicture.Visible        = false;
     this.DumpToFileCheckbox.Enabled  = true;
     this.promiscuousCheckbox.Enabled = true;
     ThreadPool.QueueUserWorkItem(this.StopCapture, this.dev);
     if (this.DumpToFileCheckbox.Checked)
     {
         ExternalLinks.OpenFileInNotepad(this.DumpFile);
     }
 }
コード例 #10
0
ファイル: PacketCapture.cs プロジェクト: zoroz/Terminals
 private void StopCaptureButton_Click(object sender, EventArgs e)
 {
     CaptureButton.Enabled       = false;
     StopCaptureButton.Enabled   = false;
     RedPicture.Visible          = true;
     GreenPicture.Visible        = false;
     AmberPicture.Visible        = false;
     DumpToFileCheckbox.Enabled  = true;
     promiscuousCheckbox.Enabled = true;
     System.Threading.ThreadPool.QueueUserWorkItem(new System.Threading.WaitCallback(StopCapture), dev);
     if (DumpToFileCheckbox.Checked)
     {
         ExternalLinks.OpenFileInNotepad(this.DumpFile);
     }
 }
コード例 #11
0
        private void PacketCapture_Load(object sender, EventArgs e)
        {
            try
            {
                this.promiscuousCheckbox.Enabled = true;
                this.DumpToFileCheckbox.Enabled  = true;
                this.StopCaptureButton.Enabled   = false;
                this.AmberPicture.Visible        = true;
                this.GreenPicture.Visible        = false;
                this.RedPicture.Visible          = false;
                this.updater     = this.UpdateUI;
                this.stopUpdater = this.PcapStopped;
                this.devices     = SharpPcap.GetAllDevices();
                foreach (PcapDevice device in this.devices)
                {
                    this.comboBox1.Items.Add(device.PcapDescription);
                }
                if (this.devices.Count > 0)
                {
                    this.comboBox1.SelectedIndex = 1;
                }
                this.webBrowser1.DocumentStream = new MemoryStream(Encoding.Default.GetBytes(Resources.Filtering));
            }
            catch (Exception exc)
            {
                this.Enabled = false;
                if (exc is BadImageFormatException)
                {
                    Logging.Info(
                        "Terminals Packet Capture is not configured to work with this system (Bad Image Format Exception)",
                        exc);
                    MessageBox.Show(
                        "Terminals Packet Capture is not configured to work with this system (Bad Image Format Exception)");
                }
                else if (exc is DllNotFoundException)
                {
                    Logging.Info("WinpPcap was not installed", exc);
                    ExternalLinks.ShowWinPCapPage();
                }
                else
                {
                    Logging.Info("WinpPcap was not installed correctly", exc);
                }
            }

            this.PacketCapture_Resize(null, null);
        }
        private async void OnOpenLink(ExternalLinks linkToOpen)
        {
            Uri uriToOpen = null;

            switch (linkToOpen)
            {
            case ExternalLinks.TruliteHomePage:
                uriToOpen = new Uri(Constants.TRULITE_HOME_URL);
                break;

            case ExternalLinks.Locations:
                uriToOpen = new Uri(Constants.TRULITE_LOCATION_URL);
                break;

            case ExternalLinks.ContactUs:
                uriToOpen = new Uri(Constants.TRULITE_CONTACT_US_URL);
                break;

            default:
                throw new ArgumentOutOfRangeException(nameof(linkToOpen), linkToOpen, null);
            }

            await Launcher.OpenAsync(uriToOpen);
        }
コード例 #13
0
ファイル: FavsList.cs プロジェクト: limaolm/Terminals
        private void SystemInformationToolStripMenuItem_Click(object sender, EventArgs e)
        {
            IFavorite favorite = this.GetSelectedFavorite();

            ExternalLinks.StartMsInfo32(favorite);
        }
コード例 #14
0
ファイル: ExtendedLink.cs プロジェクト: notis-LLC/anotis
 public ExtendedLink(ExternalLinks link, long lastUpdate)
 {
     Link       = link;
     LastUpdate = lastUpdate;
 }
コード例 #15
0
 public ErrorController(ILogger <ErrorController> logger, IOptions <ExternalLinks> externalLinks)
 {
     _logger        = logger;
     _externalLinks = externalLinks.Value;
 }
コード例 #16
0
ファイル: FavsList.cs プロジェクト: limaolm/Terminals
        private void ComputerManagementMmcToolStripMenuItem_Click(object sender, EventArgs e)
        {
            IFavorite favorite = this.GetSelectedFavorite();

            ExternalLinks.StartMsManagementConsole(favorite);
        }
コード例 #17
0
        internal static void LaunchPutty()
        {
            var puttyBinaryPath = GetPuttyBinaryPath();

            ExternalLinks.OpenPath(puttyBinaryPath);
        }
コード例 #18
0
 public ExternalLinksService(IConfiguration configuration)
 {
     _externalLinks = new ExternalLinks();
     configuration.GetSection(Constants.ExternalLinks).Bind(_externalLinks);
 }
コード例 #19
0
ファイル: Capture.cs プロジェクト: gbachs/Terminals
 public void Show()
 {
     ExternalLinks.OpenPath(this.FilePath);
 }
コード例 #20
0
ファイル: AboutForm.cs プロジェクト: zoroz/Terminals
 private void LblTerminals_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
 {
     ExternalLinks.ShowReleasePage();
 }
コード例 #21
0
ファイル: AboutForm.cs プロジェクト: zoroz/Terminals
 private void LinkLabel4_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
 {
     ExternalLinks.OpenAuthorPage();
 }
コード例 #22
0
        private static string[] GetAllowableDestinations(OidcConfiguration authConfig, ExternalLinks linksConfig)
        {
            var destinations = new List <string>();

            if (!string.IsNullOrWhiteSpace(authConfig?.Authority))
            {
                destinations.Add(new Uri(authConfig.Authority).GetLeftPart(UriPartial.Authority));
            }

            if (!string.IsNullOrWhiteSpace(linksConfig?.AccountsHomePage))
            {
                destinations.Add(new Uri(linksConfig.AccountsHomePage).GetLeftPart(UriPartial.Authority));
            }

            if (!string.IsNullOrWhiteSpace(linksConfig?.AccountsDashboardPage))
            {
                destinations.Add(new Uri(linksConfig.AccountsDashboardPage).GetLeftPart(UriPartial.Authority));
            }

            if (!string.IsNullOrWhiteSpace(linksConfig?.AccountsRegistrationPage))
            {
                destinations.Add(new Uri(linksConfig.AccountsRegistrationPage).GetLeftPart(UriPartial.Authority));
            }

            return(destinations.ToArray());
        }
コード例 #23
0
        private void EditSessinsButton_Click(object sender, EventArgs e)
        {
            var puttyBinaryPath = PuttyConnection.GetPuttyBinaryPath();

            ExternalLinks.OpenPath(puttyBinaryPath);
        }