示例#1
0
        private void DoubleClick(object sender, MouseButtonEventArgs e)
        {
            if (e.Source == button0)
            {
                Record.startTime = DateTimeOffset.Now.ToUnixTimeMilliseconds();
                Record.addToOperationList("Open PDF File A", "0");
                PDF pdf = new PDF(0);

                //pdf.Check += value => subOperation=value;
                //pdf.CheckTarget += value => subTarget = value;
                //addToOperationList(subOperation, subTarget);

                pdf.Show();
                pdf.Activate();
                pdf.Focus();
                pdf.Topmost = true;
            }
            else if (e.Source == button1)
            {
                Record.addToOperationList("Open PDF File A", "1");
                PDF pdf = new PDF(1);

                //pdf.Check += value => subOperation = value;
                //pdf.CheckTarget += value => subTarget = value;
                //addToOperationList(subOperation, subTarget);
                pdf.Show();
                pdf.Activate();
                pdf.Focus();
                pdf.Topmost = true;
            }
            else if (e.Source == button2)
            {
                Record.addToOperationList("Open PDF File A", "2");
                PDF pdf = new PDF(2);

                //pdf.Check += value => subOperation = value;
                //pdf.CheckTarget += value => subTarget = value;
                //addToOperationList(subOperation, subTarget);
                pdf.Show();
                pdf.Activate();
                pdf.Focus();
                pdf.Topmost = true;
            }
            else if (e.Source == button3)
            {
                Record.addToOperationList("Open PDF File A", "3");
                PDF pdf = new PDF(3);

                //pdf.Check += value => subOperation = value;
                //pdf.CheckTarget += value => subTarget = value;
                //addToOperationList(subOperation, subTarget);
                pdf.Show();
                pdf.Activate();
                pdf.Focus();
                pdf.Topmost = true;
            }
            else if (e.Source == button4)
            {
                Record.addToOperationList("Open PDF File A", "4");
                PDF pdf = new PDF(4);

                //pdf.Check += value => subOperation = value;
                //pdf.CheckTarget += value => subTarget = value;
                //addToOperationList(subOperation, subTarget);
                pdf.Show();
                pdf.Activate();
                pdf.Focus();
                pdf.Topmost = true;
            }
            else if (e.Source == button5)
            {
                Record.addToOperationList("Open PDF File A", "5");
                PDF pdf = new PDF(5);

                //pdf.Check += value => subOperation = value;
                //pdf.CheckTarget += value => subTarget = value;
                //addToOperationList(subOperation, subTarget);
                pdf.Show();
                pdf.Activate();
                pdf.Focus();
                pdf.Topmost = true;
            }

            else if (e.Source == button6)
            {
                Record.addToOperationList("Open PDF File A", "6");
                PDF pdf = new PDF(6);

                //pdf.Check += value => subOperation = value;
                //pdf.CheckTarget += value => subTarget = value;
                //addToOperationList(subOperation, subTarget);
                pdf.Show();
                pdf.Activate();
                pdf.Focus();
                pdf.Topmost = true;
            }
            else if (e.Source == button7)
            {
                Record.addToOperationList("Open PDF File A", "7");
                PDF pdf = new PDF(7);

                //pdf.Check += value => subOperation = value;
                //pdf.CheckTarget += value => subTarget = value;
                //addToOperationList(subOperation, subTarget);
                pdf.Show();
                pdf.Activate();
                pdf.Focus();
                pdf.Topmost = true;
            }
            else if (e.Source == button8)
            {
                Record.addToOperationList("Open PDF File A", "8");
                PDF pdf = new PDF(8);

                //pdf.Check += value => subOperation = value;
                //pdf.CheckTarget += value => subTarget = value;
                //addToOperationList(subOperation, subTarget);
                pdf.Show();
                pdf.Activate();
                pdf.Focus();
                pdf.Topmost = true;
            }
            else if (e.Source == button9)
            {
                Record.addToOperationList("Open PDF File A", "9");
                PDF pdf = new PDF(9);

                //pdf.Check += value => subOperation = value;
                //pdf.CheckTarget += value => subTarget = value;
                //addToOperationList(subOperation, subTarget);
                pdf.Show();
                pdf.Activate();
                pdf.Focus();
                pdf.Topmost = true;
            }
            else
            {
                Record.addToOperationList("Open TXT File", "Untitiled");
                txt = new Text();

                //txt.TXTcheck += value => newOperationTXT = value;

                //Console.WriteLine("******"+newOperationTXT);
                txt.Show();
                txt.Activate();
                txt.Focus();
                txt.Topmost = true;
                //addToOperationList(newOperationTXT, "Untitiled.txt");
            }
            //for (int i = 0; i < 20; i++)
            //{
            //    for (int j = 0; j < 2; j++)
            //    {
            //        if (operations[i, j] != "Null")
            //        {
            //            Console.Write(operations[i, j]+"; ");

            //        }


            //    }
            //}
            //Console.WriteLine();
            //back0.Fill = Brushes.Black;
            //PDF pdf = new PDF();
            //pdf.Show();
            //pdf.Activate();
            //pdf.Focus();
            //pdf.Topmost = true;
            //{
            //    i += 1;
            //    DispatcherTimer timer = new DispatcherTimer();
            //    timer.Interval = new TimeSpan(0, 0, 0, 0, 300);
            //    timer.Tick += (s, e1) => { timer.IsEnabled = false; i = 0; };
            //    timer.IsEnabled = true;
            //    if (i == 2)
            //    {
            //        timer.IsEnabled = false;
            //        i = 0;
            //        /*button0.Background = myBrush;*/
            //    }
            //}
        }