示例#1
0
        private void btnNewProfile_Click(object sender, RoutedEventArgs e)
        {
            var dialog = new NewProfilDialog(this);

            if (dialog.ShowDialog() == true)
            {
                // MessageBox.Show("You select Profilename: " + dialog.txtProfileName);
                KonfigurationParameter newprofile = new KonfigurationParameter(new KonfigurationIx("arcPath", "ixUrl", "user", "pwd", false, "maskName", "package"),
                                                                               new KonfigurationOneNote("notebook", "ignoreTags", true, "lang",
                                                                                                        new KonfigurationOneNoteTags("expandedTag", "importantTag", "criticalTag", "warningTag", "cautionTag", "thumbnailTag")),
                                                                               new KonfigurationCmd("gitpullall.cmd", "", "E:\\Git\\solutions"),
                                                                               new KonfigurationCmd("powershell.exe", "E:\\Git\\solutions\\learning.git\\elopullunittests.ps1", "E:\\Git\\solutions\\learning.git"),
                                                                               new KonfigurationCmd("powershell.exe", "E:\\Git\\solutions\\learning.git\\elopreparelearning.ps1", "E:\\Git\\solutions\\learning.git"),
                                                                               new KonfigurationCmd("powershell.exe", "E:\\Git\\solutions\\learning.git\\elopulllearning.ps1", "E:\\Git\\solutions\\learning.git")
                                                                               );
                string newprofilename = dialog.txtProfileName.Text;
                if (!profiles.ContainsKey(newprofilename))
                {
                    profiles.Add(newprofilename, newprofile);
                    SetValues(newprofile);
                    SaveKonfigurations();

                    InitKonfigurations(newprofilename);
                }
            }
            else
            {
                // MessageBox.Show("Dialog has been cancelled: ");
            }
        }
示例#2
0
        private KonfigurationParameter GetValues()
        {
            KonfigurationParameter profile = new KonfigurationParameter(new KonfigurationIx(txtArcPath.Text, txtIxUrl.Text, txtUser.Text, txtPwd.Password, (bool)chkExportReferences.IsChecked, txtMaskName.Text, txtPackage.Text),
                                                                        new KonfigurationOneNote(txtNotebook.Text, txtIgnoreTags.Text, (bool)chkRenderImages.IsChecked, txtLang.Text,
                                                                                                 new KonfigurationOneNoteTags(txtExpandedTag.Text, txtImportantTag.Text, txtCriticalTag.Text, txtWarningTag.Text, txtCautionTag.Text, txtThumbnailTag.Text)),
                                                                        new KonfigurationCmd(txtGitPullAllCmd.Text, "", txtGitPullAllDir.Text),
                                                                        new KonfigurationCmd(txtEloPullUnittestCmd.Text, txtEloPullUnittestArgs.Text, txtEloPullUnittestDir.Text),
                                                                        new KonfigurationCmd(txtEloPrepareCmd.Text, txtEloPrepareArgs.Text, txtEloPrepareDir.Text),
                                                                        new KonfigurationCmd(txtEloPullPackageCmd.Text, txtEloPullPackageArgs.Text, txtEloPullPackageDir.Text)
                                                                        );

            return(profile);
        }
示例#3
0
        private void SetValues(KonfigurationParameter profile)
        {
            txtUser.Text    = profile.ixConf.user;
            txtArcPath.Text = profile.ixConf.arcPath;
            txtIxUrl.Text   = profile.ixConf.ixUrl;
            txtPwd.Password = profile.ixConf.pwd;
            chkExportReferences.IsChecked = profile.ixConf.exportReferences;
            txtMaskName.Text = profile.ixConf.maskName;
            txtPackage.Text  = profile.ixConf.package;

            txtNotebook.Text          = profile.onenoteConf.notebook;
            txtIgnoreTags.Text        = profile.onenoteConf.ignoreTags;
            chkRenderImages.IsChecked = profile.onenoteConf.renderImages;
            txtLang.Text = profile.onenoteConf.lang;

            txtExpandedTag.Text  = profile.onenoteConf.onenoteTags.expandedTag;
            txtImportantTag.Text = profile.onenoteConf.onenoteTags.importantTag;
            txtCriticalTag.Text  = profile.onenoteConf.onenoteTags.criticalTag;
            txtWarningTag.Text   = profile.onenoteConf.onenoteTags.warningTag;
            txtCautionTag.Text   = profile.onenoteConf.onenoteTags.cautionTag;
            txtThumbnailTag.Text = profile.onenoteConf.onenoteTags.thumbnailTag;

            txtGitPullAllCmd.Text = profile.cmdGitPullAllConf.cmdCommand;
            txtGitPullAllDir.Text = profile.cmdGitPullAllConf.cmdWorkingDir;

            txtEloPullUnittestCmd.Text  = profile.cmdEloPullUnittestConf.cmdCommand;
            txtEloPullUnittestArgs.Text = profile.cmdEloPullUnittestConf.cmdArguments;
            txtEloPullUnittestDir.Text  = profile.cmdEloPullUnittestConf.cmdWorkingDir;

            txtEloPrepareCmd.Text  = profile.cmdEloPrepareConf.cmdCommand;
            txtEloPrepareArgs.Text = profile.cmdEloPrepareConf.cmdArguments;
            txtEloPrepareDir.Text  = profile.cmdEloPrepareConf.cmdWorkingDir;

            txtEloPullPackageCmd.Text  = profile.cmdEloPullPackageConf.cmdCommand;
            txtEloPullPackageArgs.Text = profile.cmdEloPullPackageConf.cmdArguments;
            txtEloPullPackageDir.Text  = profile.cmdEloPullPackageConf.cmdWorkingDir;
        }