Exemple #1
0
        private void OptionClicked(object sender, RoutedEventArgs e)
        {
            MenuItem mi = sender as MenuItem;

            if (mi != null)
            {
                if (mi.Header.Equals("_Details"))
                {
                    try
                    {
                        string details = Annual.GetAnnualDetails(this.annualTargetList);

                        统计信息 info = new 统计信息(loginedUser.UserFolder, details);

                        info.ShowDialog();
                    }
                    catch (InvalidOperationException ioe)
                    {
                        return;
                    }
                    catch (Exception ex)
                    {
                        return;
                    }
                }
                else if (mi.Header.Equals("_Developer Options"))
                {
                    SetParams set = new SetParams(this.staticAccountCollection[1],
                                                  this.staticAccountCollection[2],
                                                  this.staticAccountCollection[3],
                                                  this.staticAccountCollection[0]);

                    set.ShowDialog();
                }
                else if (mi.Header.Equals("_ScrollBack"))
                {
                    /*SetParams set = new SetParams(this.staticAccountCollection[1],
                     *  this.staticAccountCollection[2],
                     *  this.staticAccountCollection[3]);
                     *
                     * set.ShowDialog();*/
                    MessageBox.Show("未找到备份文件");
                }
                else if (mi.Header.Equals("_Import History Record"))
                {
                    ImportOpMsgs();
                }
            }
        }