コード例 #1
0
        // Copy to clipboard
        private void button2_Click(object sender, EventArgs e)
        {
            ListView    listView1 = (ListView)tabControl1.TabPages[tabControl1.SelectedIndex].Controls[0];
            RichTextBox textBox   = new RichTextBox();

            foreach (ListViewItem item in listView1.Items)
            {
                textBox.Text += item.Text + ": " + item.SubItems[1].Text + "\n";
            }
            textBox.SelectAll();
            textBox.Copy();
            ManagedMessageBox.ShowMessage(Program.ResourceManager.GetString("Message_Done"));
        }
コード例 #2
0
 private void Form_Detect_FormClosing(object sender, FormClosingEventArgs e)
 {
     if (mainThread != null && !finished)
     {
         if (mainThread.IsAlive)
         {
             ManagedMessageBoxResult res = ManagedMessageBox.ShowMessage(
                 Program.ResourceManager.GetString("Message_AreYouSureYouWantToStopCurrentProgress"),
                 Program.ResourceManager.GetString("MessageCaption_Detect"),
                 new string[] { Program.ResourceManager.GetString("Button_Yes"), Program.ResourceManager.GetString("Button_No") }, 1, ManagedMessageBoxIcon.Question, false, false, "");
             if (res.ClickedButtonIndex == 0)// Yes
             {
                 mainThread.Abort();
             }
             else
             {
                 e.Cancel = true; return;
             }
         }
     }
 }
コード例 #3
0
        private void CloseAfterFinish1()
        {
            finished = true;
            ManagedMessageBoxResult res = ManagedMessageBox.ShowMessage(
                Program.ResourceManager.GetString("Message_Done") + ", " +
                Program.ResourceManager.GetString("Message_LogFileSavedTo") + " '" + logPath + "'",
                Program.ResourceManager.GetString("MessageCaption_DetectAndDownloadFromTheGamesDB"), new string[] {
                Program.ResourceManager.GetString("Button_Ok"),
                Program.ResourceManager.GetString("Button_OpenLog")
            },
                0, null, ManagedMessageBoxIcon.Info);

            if (res.ClickedButtonIndex == 1)
            {
                try { Process.Start(HelperTools.GetFullPath(logPath)); }
                catch (Exception ex)
                { ManagedMessageBox.ShowErrorMessage(ex.Message); }
            }

            this.Close();
        }
コード例 #4
0
        // Remove folder
        private void button2_Click(object sender, EventArgs e)
        {
            if (listView1.SelectedItems.Count == 0)
            {
                return;
            }
            ManagedMessageBoxResult res = ManagedMessageBox.ShowMessage(
                Program.ResourceManager.GetString("Message_AreYouSureYouWantToDeleteSelectedFodlers"),
                Program.ResourceManager.GetString("MessageCaption_Detect"),
                new string[] { Program.ResourceManager.GetString("Button_Yes"), Program.ResourceManager.GetString("Button_No") }, 1, ManagedMessageBoxIcon.Question, false, false, "");

            if (res.ClickedButtonIndex == 0)// Yes
            {
                for (int i = 0; i < listView1.Items.Count; i++)
                {
                    if (listView1.Items[i].Selected)
                    {
                        listView1.Items.RemoveAt(i);
                        i = -1;
                    }
                }
            }
        }