예제 #1
0
        public void TryPrint()
        {
            if (ActivationWindow.CheckLicense() == false)
            {
                return;
            }

            if (NavFrame.CurrentSource.ToString().Contains("TileContentPage"))
            {
                TileContentPage.Current.PrintContent();
            }
            else
            {
                MessageBox.Show("当前没有可以打印的内容。", DesktopClient.Properties.Resources.AppName, MessageBoxButton.OK, MessageBoxImage.Information);
            }
        }
예제 #2
0
        public void ToggleFullscreen()
        {
            if (ActivationWindow.CheckLicense() == false)
            {
                return;
            }

            if (!IsFullscreen)
            {
                Fullscreen();
            }
            else
            {
                ExitFullscreen();
            }
        }
예제 #3
0
        public static void Save()
        {
            if (ActivationWindow.CheckLicense() == false)
            {
                return;
            }

            if (DocumentManager.CurrentDocument.FileName == string.Empty)
            {
                SaveAs();
            }
            else
            {
                DocumentManager.CurrentDocument.Save();
                MessageBox.Show("保存成功。", "提示");
            }
        }
예제 #4
0
        public static void SaveAs()
        {
            if (ActivationWindow.CheckLicense() == false)
            {
                return;
            }

            Microsoft.Win32.SaveFileDialog sfd = new Microsoft.Win32.SaveFileDialog();
            sfd.Filter = "CIIPP Document (*.ciipp)|*.ciipp|数据交换版Excel (*.xlsx)|*.xlsx";
            if (sfd.ShowDialog() == true)
            {
                if (sfd.FileName.Substring(sfd.FileName.LastIndexOf('.') + 1).ToLower() == "ciipp")
                {
                    DocumentManager.CurrentDocument.SaveAs(sfd.FileName);
                    MainWindow.Current.SetTitle();
                }
                else if (sfd.FileName.Substring(sfd.FileName.LastIndexOf('.') + 1).ToLower() == "xlsx")
                {
                    ExportExcel.ExportExcelT(sfd.FileName);
                    MessageBox.Show("已保存!", "提示");
                }
            }
        }