Beispiel #1
0
        public static void DisplayPrivacyPolicy()
        {
            var path = GetBundledFilePath(Resources.PrivacyPolicyFilename);

            if (path != null)
            {
                PremadeDialogs.StartProcessSafely(path);
            }
        }
Beispiel #2
0
        public static void DisplayLicense()
        {
            var path = GetBundledFilePath(Resources.LicenceFilename);

            if (path != null)
            {
                PremadeDialogs.StartProcessSafely(path);
            }
        }
Beispiel #3
0
 private void runCommandToolStripMenuItem_Click(object sender, EventArgs e)
 {
     foreach (var command in Selection)
     {
         if (!PremadeDialogs.StartProcessSafely(command.Command))
         {
             break;
         }
     }
 }
 private void FacebookStatusButton_Click(object sender, EventArgs e)
 {
     if (!string.IsNullOrEmpty(TargetSite))
     {
         PremadeDialogs.StartProcessSafely(@"https://www.facebook.com/sharer/sharer.php?u=" + TargetSite);
     }
     else
     {
         throw new InvalidOperationException("TargetSite is null or empty");
     }
 }
Beispiel #5
0
 private void FacebookStatusButton_Click(object sender, EventArgs e)
 {
     if (!string.IsNullOrEmpty(MessageText))
     {
         PremadeDialogs.StartProcessSafely(@"https://twitter.com/intent/tweet?text=" +
                                           MessageText.Replace(' ', '+'));
     }
     else if (!string.IsNullOrEmpty(TargetSite))
     {
         PremadeDialogs.StartProcessSafely(@"https://twitter.com/intent/tweet?text=" +
                                           "Check+out+this+cool+app+I+found!+" + TargetSite);
     }
     else
     {
         throw new InvalidOperationException("TargetSite and MessageText are both null or empty");
     }
 }
Beispiel #6
0
 private void OpenContactForm(object sender, LinkLabelLinkClickedEventArgs e)
 {
     PremadeDialogs.StartProcessSafely(Resources.ContactUrl);
 }
Beispiel #7
0
 private void linkLabel8_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
 {
     PremadeDialogs.StartProcessSafely(@"https://github.com/TestStack/White");
 }
Beispiel #8
0
 private void linkLabel7_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
 {
     PremadeDialogs.StartProcessSafely(@"http://taskscheduler.codeplex.com/");
 }
Beispiel #9
0
 private void linkLabel6_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
 {
     PremadeDialogs.StartProcessSafely(@"http://dotnetzip.codeplex.com/");
 }
Beispiel #10
0
 private void linkLabel2_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
 {
     PremadeDialogs.StartProcessSafely(
         @"http://www.codeproject.com/Articles/20917/Creating-a-Custom-Settings-Provider");
 }
Beispiel #11
0
 private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
 {
     PremadeDialogs.StartProcessSafely(@"http://objectlistview.sourceforge.net");
 }
Beispiel #12
0
 private void linkLabel4_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
 {
     PremadeDialogs.StartProcessSafely(Path.Combine(Program.AssemblyLocation.FullName, Resources.PrivacyPolicyFilename));
 }
 public static void DisplayHelp()
 {
     PremadeDialogs.StartProcessSafely(Path.Combine(Program.AssemblyLocation.FullName, Resources.HelpFilename));
 }
Beispiel #14
0
 private void OpenHomepage(object sender, LinkLabelLinkClickedEventArgs e)
 {
     PremadeDialogs.StartProcessSafely(Resources.HomepageUrl);
 }
Beispiel #15
0
 private void linkLabel3_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
 {
     PremadeDialogs.StartProcessSafely(@"https://github.com/Templarian/WindowsIcons/");
 }
            private void InitializeInterface()
            {
                _trayIcon      = new NotifyIcon();
                _trayMenuStrip = new ContextMenu();

                _trayIcon.Icon         = Resources.trayicon;
                _trayIcon.Text         = "Automatic Volume Mixer";
                _trayIcon.ContextMenu  = _trayMenuStrip;
                _trayIcon.Visible      = true;
                _trayIcon.DoubleClick += OpenConfigManager;

                _importDialog = new OpenFileDialog
                {
                    Multiselect     = false,
                    CheckFileExists = true,
                    Title           = "Import AVM events...",
                    Filter          = "XML files|*.xml",
                    DefaultExt      = "xml"
                };
                _exportDialog = new SaveFileDialog
                {
                    ValidateNames = true,
                    Title         = "Export AVM events...",
                    Filter        = "XML files|*.xml",
                    DefaultExt    = "xml"
                };

                var disableBehaviours = new MenuItem("Disable AVM");

                disableBehaviours.Click += (sender, args) =>
                {
                    disableBehaviours.Checked         = !disableBehaviours.Checked;
                    _automaticMixer.BehavioursEnabled = !disableBehaviours.Checked;
                };
                //_trayMenuStrip.Popup += (sender, args) => disableBehaviours.Checked = !_automaticMixer.BehavioursEnabled;

                _trayMenuStrip.MenuItems.Add(new MenuItem("Automatic Volume Mixer")
                {
                    Enabled = false
                });
                _trayMenuStrip.MenuItems.Add("-");
                var openMain = new MenuItem("Open event manager")
                {
                    DefaultItem = true
                };

                openMain.Click += OpenConfigManager;
                _trayMenuStrip.MenuItems.Add(openMain);
                //_trayMenuStrip.MenuItems.Add(new MenuItem("Open normalization manager", OpenConfigManager));
                _trayMenuStrip.MenuItems.Add("View audio sessions", OpenSessionPreview);
                _trayMenuStrip.MenuItems.Add("View variables", OpenVariablePreview);
                _trayMenuStrip.MenuItems.Add("-");
                //TODO _trayMenuStrip.MenuItems.Add(disableBehaviours);

                _trayMenuStrip.MenuItems.Add("Reset volumes of running audio sessions",
                                             (sender, args) => _automaticMixer.ResetSessionVolumes());
                _trayMenuStrip.MenuItems.Add("Settings", OpenSettings);
                _trayMenuStrip.MenuItems.Add("-");

                var linkMenu = new MenuItem("Links");

                _trayMenuStrip.MenuItems.Add(linkMenu);
                linkMenu.MenuItems.Add("Homepage", (x, y) => PremadeDialogs.StartProcessSafely(@"https://github.com/Klocman/Automatic-Volume-Mixer"));
                linkMenu.MenuItems.Add("Send feedback", (x, y) => PremadeDialogs.StartProcessSafely(@"http://klocmansoftware.weebly.com/feedback--contact.html"));
                linkMenu.MenuItems.Add("Bug reports", (x, y) => PremadeDialogs.StartProcessSafely(@"https://github.com/Klocman/Automatic-Volume-Mixer/issues"));
                linkMenu.MenuItems.Add("Help", (x, y) => PremadeDialogs.StartProcessSafely(@"https://github.com/Klocman/Automatic-Volume-Mixer"));

                _trayMenuStrip.MenuItems.Add("Donate", (x, y) => PremadeDialogs.StartProcessSafely(@"https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=TB9DA2P8KQX52"));
                _trayMenuStrip.MenuItems.Add("About", (x, y) => new AboutBox().Show());
                //_trayMenuStrip.MenuItems.Add(linkMenu);
                _trayMenuStrip.MenuItems.Add("-");
                _trayMenuStrip.MenuItems.Add("Shut down Automatic Volume Mixer", (sender, args) => Application.Exit());
            }
Beispiel #17
0
 private void linkLabel9_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
 {
     PremadeDialogs.StartProcessSafely(@"https://www.voidtools.com/");
 }