コード例 #1
0
        private void ContextOpenRemoteWith_Click(object sender, EventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            string fileName = GetFileName();

            fileName = GetShortFileName(fileName);

            fileName = Path.GetTempPath() + fileName;

            Module.HandleConflictsSaveSide(GetFileName(), fileName, "REMOTE");

            OsShellUtil.OpenAs(fileName);
            Cursor.Current = Cursors.Default;
        }
コード例 #2
0
        private void OpenSideWith(string side)
        {
            Cursor.Current = Cursors.WaitCursor;
            string fileName = GetFileName();

            fileName = GetShortFileName(fileName);

            fileName = Path.GetTempPath() + fileName;

            if (!Module.HandleConflictsSaveSide(GetFileName(), fileName, side))
            {
                MessageBox.Show(this, _failureWhileOpenFile.Text);
            }

            OsShellUtil.OpenAs(fileName);
            Cursor.Current = Cursors.Default;
        }
コード例 #3
0
        protected override void OnHelpButtonClicked(CancelEventArgs e)
        {
            // If we show the Help button but we have failed to specify where the docs are -> hide the button, and exit
            if (string.IsNullOrWhiteSpace(ManualSectionAnchorName) || string.IsNullOrWhiteSpace(ManualSectionSubfolder))
            {
                HelpButton = false;
                e.Cancel   = true;
                return;
            }

            base.OnHelpButtonClicked(e);

            string url = UserManual.UserManual.UrlFor(ManualSectionSubfolder, ManualSectionAnchorName);

            OsShellUtil.OpenUrlInDefaultBrowser(url);

            // We've handled the event
            e.Cancel = true;
        }
コード例 #4
0
        private void openWithToolStripMenuItem_Click(object sender, EventArgs e)
        {
            string fileName = GetFileName();

            OsShellUtil.OpenAs(Path.Combine(Module.WorkingDir, fileName));
        }
コード例 #5
0
 private void OnRegisterGravatarClick(object sender, EventArgs e)
 {
     OsShellUtil.OpenUrlInDefaultBrowser(@"https://www.gravatar.com");
 }