示例#1
0
 public static MessageBoxReturn AskQuestion(string question, string title)
 {
     NimbusMessageBox mb = new NimbusMessageBox(Factory.CurrentTheme);
     mb.lblText.Text = question;
     mb.Text = title;
     mb.ShowDialog();
     return toReturn;
 }
示例#2
0
        public static MessageBoxReturn AskQuestion(string question, string title)
        {
            NimbusMessageBox mb = new NimbusMessageBox(Factory.CurrentTheme);

            mb.lblText.Text = question;
            mb.Text         = title;
            mb.ShowDialog();
            return(toReturn);
        }
示例#3
0
 protected override void OnClosing(CancelEventArgs e)
 {
     if (Factory.Games.IsDownloading())
     {
         MessageBoxReturn mbr = NimbusMessageBox.AskQuestion("Nimbus is currently downloading, are you sure you wish to exit?", "Are you sure");
         if (!mbr.clickedYes)
         {
             e.Cancel = true;
         }
     }
     if (!e.Cancel)
     {
         NativeMethods.AnimateWindow(this.Handle, 200, (int)NativeMethods.AnimateWindowFlags.AW_BLEND | (int)NativeMethods.AnimateWindowFlags.AW_HIDE);
     }
     base.OnClosing(e);
 }
示例#4
0
        private void RenewRegistry()
        {
            if (Factory.Settings.NeverTryRegKey)
            {
                return;
            }

            RegistryKey TestKey = Registry.ClassesRoot.OpenSubKey("Nimbus");

            if (TestKey != null)
            {
                Console.WriteLine("Registry Key exists");
                return;
            }
            else
            {
                Console.WriteLine("Registry Key doesn't exist! Attempting to set.");
                MessageBoxReturn mb = NimbusMessageBox.AskQuestion("The Nimbus registry key does not seem to be set. Would you like to set it now?", "Nimbus Registry Key");
                if (mb.clickedYes)
                {
                    Process          myProcess          = new Process();
                    ProcessStartInfo myProcessStartInfo = new ProcessStartInfo(System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location) + "\\RegistryUpdater.exe");
                    //myProcessStartInfo.UseShellExecute = true;
                    //myProcessStartInfo.Verb = "runas";
                    myProcess.StartInfo = myProcessStartInfo;
                    myProcess.Start();

                    myProcess.WaitForExit();
                }

                Factory.Settings.NeverTryRegKey = mb.checkedBox;
                Factory.Settings.Save();

                TestKey = Registry.ClassesRoot.OpenSubKey("Nexus");
                if (TestKey != null)
                {
                    Console.WriteLine("Success!");
                }
                else
                {
                    Console.WriteLine("FAILED!");
                }
            }
        }
示例#5
0
 void btnFriends_Clicked(object sender, EventArgs e)
 {
     NimbusMessageBox.AskQuestion("Sup dawg", "hell yes");
 }