当前位置: 首页>>代码示例>>C#>>正文


C# Progress.EndPart方法代码示例

本文整理汇总了C#中Progress.EndPart方法的典型用法代码示例。如果您正苦于以下问题:C# Progress.EndPart方法的具体用法?C# Progress.EndPart怎么用?C# Progress.EndPart使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Progress的用法示例。


在下文中一共展示了Progress.EndPart方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Function

    public void Function()
    {
        string strProjectpath =
            PathMap.SubstitutePath("$(PROJECTPATH)" + @"\");

        Progress progress = new Progress("SimpleProgress");
        progress.BeginPart(100, "");
        progress.SetAllowCancel(true);
        if (!progress.Canceled())
        {
            progress.BeginPart(50,
                "Artikelsummenstückliste wird erstellt...");
            ActionCallingContext labellingContext =
                new ActionCallingContext();
            labellingContext.AddParameter("CONFIGSCHEME",
                "Summarized parts list");
            labellingContext.AddParameter("DESTINATIONFILE",
                strProjectpath + "Artikelsummenstückliste.xls");
            labellingContext.AddParameter("FILTERSCHEME", "");
            labellingContext.AddParameter("LANGUAGE", "de_DE");
            labellingContext.AddParameter("LogMsgActionDone", "true");
            labellingContext.AddParameter("SHOWOUTPUT", "1");
            labellingContext.AddParameter("RECREPEAT", "1");
            labellingContext.AddParameter("SORTSCHEME", "");
            labellingContext.AddParameter("TASKREPEAT", "1");
            new CommandLineInterpreter().Execute("label",
                labellingContext);
            progress.EndPart();
        }
        if (!progress.Canceled())
        {
            progress.BeginPart(50,
                "Betriebsmittelbeschriftung wird erstellt...");
            ActionCallingContext labellingContext1 =
                new ActionCallingContext();
            labellingContext1.AddParameter("CONFIGSCHEME",
                "Device tag list");
            labellingContext1.AddParameter("DESTINATIONFILE",
                strProjectpath + "Betriebsmittelbeschriftung.xls");
            labellingContext1.AddParameter("FILTERSCHEME", "");
            labellingContext1.AddParameter("LANGUAGE", "de_DE");
            labellingContext1.AddParameter("LogMsgActionDone", "true");
            labellingContext1.AddParameter("SHOWOUTPUT", "1");
            labellingContext1.AddParameter("RECREPEAT", "1");
            labellingContext1.AddParameter("SORTSCHEME", "");
            labellingContext1.AddParameter("TASKREPEAT", "1");
            new CommandLineInterpreter().Execute("label",
                labellingContext1);
            progress.EndPart();
        }

        progress.EndPart(true);

        return;
    }
开发者ID:Suplanus,项目名称:EplanElectricP8Automatisieren,代码行数:55,代码来源:01_Beschriftung.cs

示例2: Function

    public void Function()
    {
        string strProjectname = PathMap.SubstitutePath("$(PROJECTNAME)");
        string strFullProjectname = PathMap.SubstitutePath("$(P)");
        string strDestination = strFullProjectname;

        DialogResult Result = MessageBox.Show(
            "Soll eine Sicherung für das Projekt\n'"
            + strProjectname +
            "'\nerzeugt werden?",
            "Datensicherung",
            MessageBoxButtons.YesNo,
            MessageBoxIcon.Question
            );

        if (Result == DialogResult.Yes)

          {

                string myTime = System.DateTime.Now.ToString("yyyy.MM.dd");
                string hour = System.DateTime.Now.Hour.ToString();
                string minute = System.DateTime.Now.Minute.ToString();

                Progress progress = new Progress("SimpleProgress");
                progress.BeginPart(100, "");
                progress.SetAllowCancel(true);

                if (!progress.Canceled())
                {
                    progress.BeginPart(33, "Backup");
                    ActionCallingContext backupContext = new ActionCallingContext();
                    backupContext.AddParameter("BACKUPMEDIA", "DISK");
                    backupContext.AddParameter("BACKUPMETHOD", "BACKUP");
                    backupContext.AddParameter("COMPRESSPRJ", "0");
                    backupContext.AddParameter("INCLEXTDOCS", "1");
                    backupContext.AddParameter("BACKUPAMOUNT", "BACKUPAMOUNT_ALL");
                    backupContext.AddParameter("INCLIMAGES", "1");
                    backupContext.AddParameter("LogMsgActionDone", "true");
                    backupContext.AddParameter("DESTINATIONPATH", strDestination);
                    backupContext.AddParameter("PROJECTNAME", strFullProjectname);
                    backupContext.AddParameter("TYPE", "PROJECT");
                    backupContext.AddParameter("ARCHIVENAME", strProjectname + "_" + myTime + "_" + hour + "." + minute + ".");
                    new CommandLineInterpreter().Execute("backup", backupContext);
                    progress.EndPart();

                }
                progress.EndPart(true);
            }

            return;
    }
开发者ID:nai-r-olf,项目名称:EplanScriptingProjectBySuplanus,代码行数:51,代码来源:BackupOnClosingProject.cs

示例3: PagePdfVoid

    public void PagePdfVoid()
    {
        FolderBrowserDialog fbd = new FolderBrowserDialog();
        CommandLineInterpreter oCLI = new CommandLineInterpreter();
        ActionCallingContext acc = new ActionCallingContext();

        if (fbd.ShowDialog() != DialogResult.OK)
        {
            return;
        }

        Progress oProgress = new Progress("SimpleProgress");
        oProgress.SetAllowCancel(true);
        oProgress.SetAskOnCancel(true);
        oProgress.BeginPart(100, "");
        oProgress.ShowImmediately();

        try
        {
            string strPages = string.Empty;
            acc.AddParameter("TYPE", "PAGES");
            oCLI.Execute("selectionset", acc);
            acc.GetParameter("PAGES", ref strPages);

            foreach (string CurrentPage in strPages.Split(';'))
            {
                if (!oProgress.Canceled())
                {
                    acc.AddParameter("TYPE", "PDFPAGESSCHEME");
                    acc.AddParameter("PAGENAME", CurrentPage);
                    acc.AddParameter("EXPORTFILE", fbd.SelectedPath + @"\" + CurrentPage);
                    acc.AddParameter("EXPORTSCHEME", "EPLAN_default_value");
                    oCLI.Execute("export", acc);
                }
                else
                {
                    oProgress.EndPart(true);
                    return;
                }
            }
            Process.Start(fbd.SelectedPath);
            oProgress.EndPart(true);
        }
        catch (System.Exception ex)
        {
            oProgress.EndPart(true);
            MessageBox.Show("Error", ex.Message, MessageBoxButtons.OK, MessageBoxIcon.Error);
        }
    }
开发者ID:nai-r-olf,项目名称:EplanScriptingProjectBySuplanus,代码行数:49,代码来源:PagePdf.cs

示例4: PrintPagesVoid

    public void PrintPagesVoid()
    {
        CommandLineInterpreter oCLI = new CommandLineInterpreter();
        ActionCallingContext acc = new ActionCallingContext();

        string strPages = string.Empty;
        acc.AddParameter("TYPE", "PAGES");
        oCLI.Execute("selectionset", acc);
        acc.GetParameter("PAGES", ref strPages);

        Progress oProgress = new Progress("SimpleProgress");
        oProgress.SetAllowCancel(true);
        oProgress.SetAskOnCancel(true);
        oProgress.SetNeededSteps(3);
        oProgress.SetTitle("Drucken");
        oProgress.ShowImmediately();

        foreach (string Page in strPages.Split(';'))
        {
            if (!oProgress.Canceled())
            {
                acc.AddParameter("PAGENAME", Page);
                oCLI.Execute("print", acc);
            }
            else
            {
                break;
            }
        }
        oProgress.EndPart(true);

        return;
    }
开发者ID:nai-r-olf,项目名称:EplanScriptingProjectBySuplanus,代码行数:33,代码来源:PrintPages.cs

示例5: Function

    public void Function()
    {
        string strProjectpath =
            PathMap.SubstitutePath("$(PROJECTPATH)");
        string strProjectname = PathMap.SubstitutePath("$(PROJECTNAME)");
        string strFullProjectname = PathMap.SubstitutePath("$(P)");

        string strDate = DateTime.Now.ToString("yyyy-MM-dd");
        string strTime = DateTime.Now.ToString("hh-mm-ss");
        string strBackupDirectory = strProjectpath + @"\Backup\";
        string strBackupFilename = strProjectname + "_Backup_"
            + strDate + "_" + strTime;

        if (!System.IO.Directory.Exists(strBackupDirectory))
        {
            System.IO.Directory.CreateDirectory(strBackupDirectory);
        }

        Progress oProgress = new Progress("SimpleProgress");
        oProgress.SetAllowCancel(true);
        oProgress.SetAskOnCancel(true);
        oProgress.BeginPart(100, "");
        oProgress.SetTitle("Backup");
        oProgress.ShowImmediately();

        if (!oProgress.Canceled())
        {
            CommandLineInterpreter oCLI = new CommandLineInterpreter();
            ActionCallingContext acc = new ActionCallingContext();

            acc.AddParameter("BACKUPMEDIA", "DISK");
            acc.AddParameter("ARCHIVENAME", strBackupFilename);
            acc.AddParameter("BACKUPMETHOD", "BACKUP");
            acc.AddParameter("COMPRESSPRJ", "1");
            acc.AddParameter("INCLEXTDOCS", "1");
            acc.AddParameter("BACKUPAMOUNT", "BACKUPAMOUNT_ALL");
            acc.AddParameter("INCLIMAGES", "1");
            acc.AddParameter("LogMsgActionDone", "true");
            acc.AddParameter("DESTINATIONPATH", strBackupDirectory);
            acc.AddParameter("PROJECTNAME", strFullProjectname);
            acc.AddParameter("TYPE", "PROJECT");

            oCLI.Execute("backup", acc);
        }

        oProgress.EndPart(true);

        MessageBox.Show(
            "Backup wurde erfolgreich erstellt:\n"
            + strBackupFilename,
            "Hinweis",
            MessageBoxButtons.OK,
            MessageBoxIcon.Information
            );

        return;
    }
开发者ID:Suplanus,项目名称:EplanElectricP8Automatisieren,代码行数:57,代码来源:11_Projekt_Backup.cs

示例6: Function

    public void Function()
    {
        CommandLineInterpreter oCLI = new CommandLineInterpreter();

        Progress oProgress = new Progress("EnhancedProgress");
        oProgress.SetAllowCancel(false);
        oProgress.ShowImmediately();

        oProgress.BeginPart(33, "Part 1");
        oCLI.Execute("generate /TYPE:CONNECTIONS");
        oProgress.EndPart();

        oProgress.BeginPart(33, "Part 2");
        oCLI.Execute("reports");
        oProgress.EndPart();

        oProgress.BeginPart(33, "Part 3");
        oCLI.Execute("compress /FILTERSCHEME:Standard");
        oProgress.EndPart();

        oProgress.EndPart(true);

        return;
    }
开发者ID:Suplanus,项目名称:EplanElectricP8Automatisieren,代码行数:24,代码来源:02_EnhancedProgress.cs

示例7: Function

    public void Function()
    {
        string strFullProjectname =
        PathMap.SubstitutePath("$(P)");
        string strProjectpath =
            PathMap.SubstitutePath("$(PROJECTPATH)" + @"\");
        string strProjectname =
            PathMap.SubstitutePath("$(PROJECTNAME)");

        DialogResult Result = MessageBox.Show(
            "Soll ein PDF für das Projekt\n'"
            + strProjectname +
            "'\nerzeugt werden?",
            "PDF-Export",
            MessageBoxButtons.YesNo,
            MessageBoxIcon.Question
            );

        if (Result == DialogResult.Yes)
        {
            Progress oProgress = new Progress("SimpleProgress");
            oProgress.SetAllowCancel(true);
            oProgress.SetAskOnCancel(true);
            oProgress.BeginPart(100, "");
            oProgress.ShowImmediately();

            CommandLineInterpreter oCLI = new CommandLineInterpreter();
            ActionCallingContext acc = new ActionCallingContext();

            acc.AddParameter("TYPE", "PDFPROJECTSCHEME");
            acc.AddParameter("PROJECTNAME", strFullProjectname);
            acc.AddParameter("EXPORTFILE",
                strProjectpath + strProjectname);
            acc.AddParameter("EXPORTSCHEME", "EPLAN_default_value");

            oCLI.Execute("export", acc);

            oProgress.EndPart(true);
        }

        return;
    }
开发者ID:Suplanus,项目名称:EplanElectricP8Automatisieren,代码行数:42,代码来源:03_PDF_beim_Schlie_n_erzeugen.cs

示例8: Function

    public void Function()
    {
        Progress oProgress = new Progress("SimpleProgress");
        oProgress.SetAllowCancel(true);
        oProgress.SetAskOnCancel(true);
        oProgress.SetNeededSteps(3);
        oProgress.SetTitle("Meine Progressbar");
        oProgress.ShowImmediately();

        if (!oProgress.Canceled())
        {
            oProgress.SetActionText("Step 1");
            oProgress.SetTitle("Titelzeile 1");
            oProgress.Step(1);

            Thread.Sleep(1000);
        }

        if (!oProgress.Canceled())
        {
            oProgress.SetActionText("Step 2");
            oProgress.SetTitle("Titelzeile 2");
            oProgress.Step(1);

            Thread.Sleep(1000);
        }

        if (!oProgress.Canceled())
        {
            oProgress.SetActionText("Step 3");
            oProgress.SetTitle("Titelzeile 3");
            oProgress.Step(1);

            Thread.Sleep(1000);
        }

        oProgress.EndPart(true);

        return;
    }
开发者ID:Suplanus,项目名称:EplanElectricP8Automatisieren,代码行数:40,代码来源:01_SimpleProgress.cs

示例9: Function

    public void Function()
    {
        string strProjects =
            PathMap.SubstitutePath("$(MD_PROJECTS)");
        string strFilename = string.Empty;

        OpenFileDialog ofd = new OpenFileDialog();
        ofd.Filter = "ProjectInfo.xml|ProjectInfo.xml";
        ofd.InitialDirectory = strProjects;
        ofd.Title = "Projekteigenschaften auswählen:";
        ofd.ValidateNames = true;

        if (ofd.ShowDialog() == DialogResult.OK)
        {
            strFilename = ofd.FileName;

            Progress oProgress = new Progress("SimpleProgress");
            oProgress.SetAllowCancel(false);
            oProgress.BeginPart(100, "");
            oProgress.SetTitle("Projekteigenschaften importieren");
            oProgress.ShowImmediately();

            CommandLineInterpreter oCLI = new CommandLineInterpreter();
            ActionCallingContext cc = new ActionCallingContext();

            cc.AddParameter("TYPE", "READPROJECTINFO");
            cc.AddParameter("FILENAME", strFilename);
            oCLI.Execute("projectmanagement", cc);

            oProgress.EndPart(true);

            oCLI.Execute("XPrjActionPropertiesEdit");
        }

        return;
    }
开发者ID:Suplanus,项目名称:EplanElectricP8Automatisieren,代码行数:36,代码来源:13_Projekteigenschaften_importieren.cs


注:本文中的Progress.EndPart方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。