Beispiel #1
0
    private void ExportToolStripMenuItem_Click(object sender, EventArgs e)
    {
        ExportForm form = new ExportForm();

        form.Initialize(_databaseOperation, dataViewUserControl1.GetDataViewer(), dataViewUserControl1.GetDataViewerParameters());
        form.ShowDialog();
    }
        public void FileCompile()
        {
            ExportForm form = new ExportForm();

            form.Document = _document;
            form.ShowDialog();
        }
Beispiel #3
0
        void ShowExportWindow(object sender, EventArgs e)
        {
            var model = sender.GetContextMenuModel <dnModuleModel>();
            var form  = new ExportForm(model.Module);

            form.ShowDialog();
        }
        public static void ExportToFile(ConnectionInfo selectedNode, ConnectionTreeModel connectionTreeModel)
        {
            try
            {
                var saveFilter = new SaveFilter();

                using (var exportForm = new ExportForm())
                {
                    if (selectedNode?.GetTreeNodeType() == TreeNodeType.Container)
                    {
                        exportForm.SelectedFolder = selectedNode as ContainerInfo;
                    }
                    else if (selectedNode?.GetTreeNodeType() == TreeNodeType.Connection)
                    {
                        if (selectedNode.Parent.GetTreeNodeType() == TreeNodeType.Container)
                        {
                            exportForm.SelectedFolder = selectedNode.Parent;
                        }
                        exportForm.SelectedConnection = selectedNode;
                    }

                    if (exportForm.ShowDialog(FrmMain.Default) != DialogResult.OK)
                    {
                        return;
                    }

                    ConnectionInfo exportTarget;
                    switch (exportForm.Scope)
                    {
                    case ExportForm.ExportScope.SelectedFolder:
                        exportTarget = exportForm.SelectedFolder;
                        break;

                    case ExportForm.ExportScope.SelectedConnection:
                        exportTarget = exportForm.SelectedConnection;
                        break;

                    default:
                        exportTarget = connectionTreeModel.RootNodes.First(node => node is RootNodeInfo);
                        break;
                    }

                    saveFilter.SaveUsername     = exportForm.IncludeUsername;
                    saveFilter.SavePassword     = exportForm.IncludePassword;
                    saveFilter.SaveDomain       = exportForm.IncludeDomain;
                    saveFilter.SaveInheritance  = exportForm.IncludeInheritance;
                    saveFilter.SaveCredentialId = exportForm.IncludeAssignedCredential;

                    SaveExportFile(exportForm.FileName, exportForm.SaveFormat, saveFilter, exportTarget);
                }
            }
            catch (Exception ex)
            {
                Runtime.MessageCollector.AddExceptionMessage("App.Export.ExportToFile() failed.", ex);
            }
        }
Beispiel #5
0
        public void _0007_ShowDialg()
        {
            ExportForm  ef    = new ExportForm();
            ExportTable table = TestExportTable();

            ef.ExportTableSource = table;
            ef.FileName          = "Demo";
            ef.Directory         = "Könyvtár";
            ef.ShowDialog();
        }
Beispiel #6
0
    private void ExportToolStripMenuItem_Click(object sender, EventArgs e)
    {
        ExportForm form = new ExportForm();

        form.DisableExportSql();
        form.DisableExportPtt();
        form.DisableExportSession();
        form.Initialize(_databaseOperation, dataViewer1, _dataViewerParametersDataViewer1);
        form.ShowDialog();
    }
Beispiel #7
0
        public static void ExportToFile(TreeNode rootTreeNode, TreeNode selectedTreeNode)
        {
            try
            {
                TreeNode      exportTreeNode = default(TreeNode);
                Security.Save saveSecurity   = new Security.Save();

                using (ExportForm exportForm = new ExportForm())
                {
                    if (Tree.ConnectionTreeNode.GetNodeType(selectedTreeNode) == Tree.TreeNodeType.Container)
                    {
                        exportForm.SelectedFolder = selectedTreeNode;
                    }
                    else if (Tree.ConnectionTreeNode.GetNodeType(selectedTreeNode) == Tree.TreeNodeType.Connection)
                    {
                        if (Tree.ConnectionTreeNode.GetNodeType(selectedTreeNode.Parent) == Tree.TreeNodeType.Container)
                        {
                            exportForm.SelectedFolder = selectedTreeNode.Parent;
                        }
                        exportForm.SelectedConnection = selectedTreeNode;
                    }

                    if (exportForm.ShowDialog(frmMain.Default) != DialogResult.OK)
                    {
                        return;
                    }

                    switch (exportForm.Scope)
                    {
                    case mRemoteNG.Forms.ExportForm.ExportScope.SelectedFolder:
                        exportTreeNode = exportForm.SelectedFolder;
                        break;

                    case mRemoteNG.Forms.ExportForm.ExportScope.SelectedConnection:
                        exportTreeNode = exportForm.SelectedConnection;
                        break;

                    default:
                        exportTreeNode = rootTreeNode;
                        break;
                    }

                    saveSecurity.Username    = exportForm.IncludeUsername;
                    saveSecurity.Password    = exportForm.IncludePassword;
                    saveSecurity.Domain      = exportForm.IncludeDomain;
                    saveSecurity.Inheritance = exportForm.IncludeInheritance;

                    SaveExportFile(exportForm.FileName, exportForm.SaveFormat, exportTreeNode, saveSecurity);
                }
            }
            catch (Exception ex)
            {
                Runtime.MessageCollector.AddExceptionMessage(message: "App.Export.ExportToFile() failed.", ex: ex, logOnly: true);
            }
        }
 public void Export()
 {
     try
     {
         using (var modal = new ExportForm())
         {
             modal.ShowDialog();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "OperationError".GetUiTranslation(), MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Beispiel #9
0
        public void _0006_ShowDialg()
        {
            ExportForm  ef    = new ExportForm();
            ExportTable table = TestExportTable();

            var uniqueFileName = "Exported File " + Guid.NewGuid().ToString();

            ef.ExportTableSource = table;
            ef.FileName          = uniqueFileName;
            ef.Directory         = "Könyvtár";

            ef.ShowDialog();

            Assert.IsTrue(System.IO.File.Exists(Environment.CurrentDirectory + "\\" + ef.Directory + "\\" + ef.FileName + ".csv"), "A fájl nem jött létre.");
        }
Beispiel #10
0
        private void Btn_Export_Click(object sender, RibbonControlEventArgs e)
        {
            if (AppsSettings.GetInstance().IsRepresentativeSplit == true)
            {
                mExportForm.LoadingData();
                DialogResult dialogResult = mExportForm.ShowDialog();

                if (dialogResult == DialogResult.OK)
                {
                    NotificationFactor.InfoNotification("Xuất bản thành công");
                }
                else if (dialogResult == DialogResult.No)
                {
                    NotificationFactor.ErrorNotification("Xuất bản thất bại");
                }
            }
            else
            {
                CreateInformationDialog.CreateWarningBox("Bạn chưa tách lời đại biểu. Tách lời đại biểu trước khi xuất bản.",
                                                         "cảnh báo");
            }
        }
Beispiel #11
0
 private void ExportToFileToolStripMenuItem_Click(object sender, EventArgs e)
 {
     using (var frm = new ExportForm(this.persistence, this.connectionManager, this.favoriteIcons))
         frm.ShowDialog();
 }