Пример #1
0
        void ToolButton_Click(object sender, RoutedEventArgs e)
        {
            var toolBtn = e.Source as Button;

            if (toolBtn != null)
            {
                ToolButtonItem item = toolBtn.DataContext as ToolButtonItem;
                if (item != null)
                {
                    switch (item.Name)
                    {
                    case "BTCaculate":
                        CaculateScore();
                        break;

                    case "BTSaveScore":
                        SaveScoreInfo();
                        if (PageParent != null)
                        {
                            PageParent.ShowPanel(S3102Consts.PANEL_NAME_SCOREDETAIL, false);
                            PageParent.ReloadScoreSheetList();
                        }
                        break;
                    }
                }
            }
        }
Пример #2
0
        private void ToolButton_Click(object sender, RoutedEventArgs e)
        {
            var btn = e.Source as Button;

            if (btn != null)
            {
                var item = btn.DataContext as ToolButtonItem;
                if (item != null)
                {
                    switch (item.Name)
                    {
                    case "BT" + "Save":
                        SaveRecordMemo();
                        if (PageParent != null)
                        {
                            PageParent.ShowPanel(S3102Consts.PANEL_NAME_MEMO, false);
                            PageParent.ShowPanel(S3102Consts.PANEL_NAME_PLAYBOX, false);
                        }
                        SetMemoInfoToT_21_001();
                        break;
                    }
                }
            }
        }