예제 #1
0
 private void TitleAndDescription_ShowStep(object sender, TSWizards.ShowStepEventArgs e)
 {
     this.textBoxTitle.Focus();
     if (showType)
     {
         ComboBoxType.Items.Clear();
         try
         {
             String repository = this.Wizard.Data[SelectCategory.REPOSITORY_ID].ToString();
             foreach (ContentType type in OfficeApplication.OfficeApplicationProxy.getContentTypes(repository))
             {
                 this.ComboBoxType.Items.Add(type);
             }
             if (this.ComboBoxType.Items.Count > 0)
             {
                 this.ComboBoxType.SelectedIndex = 0;
             }
         }
         catch (Exception ue)
         {
             OfficeApplication.WriteError(ue);
         }
         ContentType    contentType    = (ContentType)this.ComboBoxType.SelectedItem;
         String         repositoryName = this.Wizard.Data[SelectCategory.REPOSITORY_ID].ToString();
         PropertyInfo[] props          = OfficeApplication.OfficeDocumentProxy.getContentProperties(repositoryName, contentType.id);
         if (props == null || props.Length == 0)
         {
             this.Wizard.changeToFinish();
         }
         else
         {
             this.Wizard.changeToNext();
         }
     }
 }
예제 #2
0
        private void SummaryNew_ShowStep(object sender, TSWizards.ShowStepEventArgs e)
        {
            string contentId = this.Wizard.Data[TitleAndDescription.CONTENT_ID].ToString();
            string rep       = this.Wizard.Data[SelectCategory.REPOSITORY_ID].ToString();

            loadVersions(contentId, rep);
            this.Wizard.BackEnabled = false;
        }
예제 #3
0
        private void ViewProperties_ShowStep(object sender, TSWizards.ShowStepEventArgs e)
        {
            string repositoryName = this.Wizard.Data[SelectVersionToPublish.REPOSITORY_ID_NAME].ToString();
            string contentID      = this.Wizard.Data[SelectVersionToPublish.CONTENT_ID_NAME].ToString();

            PropertyInfo[] properties = OfficeApplication.OfficeDocumentProxy.getResourceProperties(repositoryName, contentID);
            this.propertyEditor1.Properties = properties;
        }
예제 #4
0
        private void ContentProperties_ShowStep(object sender, TSWizards.ShowStepEventArgs e)
        {
            String      repositoryName = this.Wizard.Data[SelectCategory.REPOSITORY_ID].ToString();
            ContentType type           = ((ContentType)this.Wizard.Data[TitleAndDescription.NODE_TYPE]);

            PropertyInfo[] props = OfficeApplication.OfficeDocumentProxy.getContentProperties(repositoryName, type.id);
            this.propertyEditor1.Properties = props;
        }
예제 #5
0
 private void SelectWebPageID_ShowStep(object sender, TSWizards.ShowStepEventArgs e)
 {
     if (String.IsNullOrEmpty(this.textBoxID.Text))
     {
         String title = (String)Wizard.Data[TitleAndDecriptionCratePage.TITLE];
         this.textBoxID.Text = getId(title);
     }
 }
예제 #6
0
파일: Step5.cs 프로젝트: lypvc/TSWizard
        private void Step5_ShowStep(object sender, TSWizards.ShowStepEventArgs e)
        {
            Step2 step2 = Wizard.GetStep("Step2") as Step2;

            System.Collections.Specialized.StringCollection order = step2.GetOrder();

            itemsPrepared.Items.Clear();

            foreach (string str in order)
            {
                itemsPrepared.Items.Add(str);
            }
        }
예제 #7
0
        private void Finish_ShowStep(object sender, TSWizards.ShowStepEventArgs e)
        {
            string[] lines = new string[Setup.Log.Count];

            for (int i = 0; i < lines.Length; i++)
            {
                // Issue 10 - Update the code to Net Framework 3.5 - http://code.google.com/p/pandorasbox3/issues/detail?id=10 - Smjert
                lines[i] = Setup.Log[i];
                // Issue 10 - End
            }

            tx.Lines = lines;
        }
예제 #8
0
        private void pwStep4Folder_ShowStep(object sender, TSWizards.ShowStepEventArgs e)
        {
            ProfileWizard wiz = Wizard as ProfileWizard;

            if (wiz.Profile.MulManager.DefaultFolder == null)
            {
                // No folder found
                labMessage.Text = ProfileWizard.TextProvider["WizProfile.FolderNotFound"];
            }
            else
            {
                // Folder found
                labMessage.Text = ProfileWizard.TextProvider["WizProfile.FolderFound"];
                labFolder.Text  = wiz.Profile.MulManager.DefaultFolder;
            }
        }
예제 #9
0
        private void S4_Modules_ShowStep(object sender, TSWizards.ShowStepEventArgs e)
        {
            tree.BeginUpdate();
            tree.Nodes.Clear();

            foreach (BoxModule module in Setup.Modules)
            {
                TreeNode node = new TreeNode(module.Name);
                node.Tag     = module;
                node.Checked = true;

                tree.Nodes.Add(node);
            }

            tree.EndUpdate();
        }
예제 #10
0
        private void SelectVersionToOpen_ShowStep(object sender, TSWizards.ShowStepEventArgs e)
        {
            string contentID  = ((ContentInfo)this.Wizard.Data[Search.CONTENT]).id;
            string repository = this.Wizard.Data[Search.REPOSITORY_ID].ToString();

            this.listView1.Items.Clear();
            foreach (VersionInfo version in OfficeApplication.OfficeDocumentProxy.getVersions(repository, contentID))
            {
                ListViewItem item = new ListViewItem(version.nameOfVersion);
                item.Tag = version;
                String date = String.Format(OfficeApplication.iso8601dateFormat, version.created);
                item.SubItems.Add(date);
                item.SubItems.Add(version.user);
                this.listView1.Items.Add(item);
            }
        }
예제 #11
0
        private void SelectVersionToPublish_ShowStep(object sender, TSWizards.ShowStepEventArgs e)
        {
            String contentID  = document.CustomProperties[OfficeDocument.CONTENT_ID_NAME];
            string repository = document.CustomProperties[OfficeDocument.REPOSITORY_ID_NAME];

            this.Wizard.Data[CONTENT_ID_NAME]    = contentID;
            this.Wizard.Data[REPOSITORY_ID_NAME] = repository;
            this.listViewVersions.Items.Clear();
            foreach (VersionInfo version in OfficeApplication.OfficeDocumentProxy.getVersions(repository, contentID))
            {
                ListViewItem item = new ListViewItem(version.nameOfVersion);
                item.Tag = version;
                String date = String.Format(OfficeApplication.iso8601dateFormat, version.created);
                item.SubItems.Add(date);
                item.SubItems.Add(version.user);
                this.listViewVersions.Items.Add(item);
            }
        }
예제 #12
0
        private void onShowStep(object sender, TSWizards.ShowStepEventArgs e)
        {
            Step2 step2 = Wizard.GetStep("Step2") as Step2;

            step2.SetProgressBar(0);
            step2.SetMaximumProgressBar(m_hosts.Count);
            _progress = new Progress <string>(data => step2.IncrementProgressBar(0));

            onDoWorkAsync();
            //if (backgroundWorker1.IsBusy != true)
            //{
            //    backgroundWorker1.RunWorkerAsync();
            //}

            //int nofExistingDirectories = 0;
            //Step2 step2 = Wizard.GetStep("Step2") as Step2;

            //// TODO: Add parallel for loop calculation
            //for (int i = 0; i < m_hosts.Count; i++)
            //{
            //    if (CheckNetworkDrive(m_hosts[i]))
            //    {
            //        nofExistingDirectories++;

            //        float percent = (float)i / (float)m_hosts.Count * 100.0f;
            //        step2.SetProgressBar((int)percent);
            //        step2.SetResult(nofExistingDirectories);
            //    }
            //}


            //Parallel.For(0, m_hosts.Count,
            //    index =>
            //    {
            //        if (CheckNetworkDrive(m_hosts[index]))
            //        {
            //            nofExistingDirectories++;

            //            float percent = (float)index / (float)m_hosts.Count * 100.0f;
            //            step2.SetProgressBar((int)percent);
            //            step2.SetResult(nofExistingDirectories);
            //        }
            //    });
        }
예제 #13
0
        private void Step3_ShowStep(object sender, TSWizards.ShowStepEventArgs e)
        {
            System.Text.StringBuilder sb = new System.Text.StringBuilder();

            Step2 step2 = Wizard.GetStep("Step2") as Step2;

            if (step2 == null)
            {
                throw new ApplicationException("Step2 of the wizard wasn't really step2");
            }

            StringCollection order = step2.GetOrder();

            foreach (string item in order)
            {
                sb.AppendFormat("{0},\r\n", item);
            }

            orderConfirm.Text = sb.ToString();
        }
예제 #14
0
		private void Step4_ShowStep(object sender, TSWizards.ShowStepEventArgs e)
		{
			MethodInvoker mi = new MethodInvoker( this.DoWork );

			mi.BeginInvoke(new AsyncCallback(DonePreparing), null);
		}
예제 #15
0
 private void pwStep6bServer_ShowStep(object sender, TSWizards.ShowStepEventArgs e)
 {
     linkLabel1.Text = ProfileWizard.TextProvider["WizProfile.PassSecurity"];
 }
예제 #16
0
 private void SelectCategory_ShowStep(object sender, TSWizards.ShowStepEventArgs e)
 {
     loadTree();
 }
예제 #17
0
파일: Search.cs 프로젝트: Yellllllow/swb
 private void Search_ShowStep(object sender, TSWizards.ShowStepEventArgs e)
 {
     this.textBoxTitle.Focus();
 }
예제 #18
0
        private void SelectDirectory_ShowStep(object sender, TSWizards.ShowStepEventArgs e)
        {
            this.Wizard.NextEnabled = false;
            this.treedir.Nodes.Clear();
            String[] drives = System.IO.Directory.GetLogicalDrives();
            foreach (String drive in drives)
            {
                System.IO.DirectoryInfo d = new System.IO.DirectoryInfo(drive);
                int       tempType        = getDriveType(drive);
                string    tempName        = GetDriveName(drive);
                DriveInfo tempInfo        = new DriveInfo(drive, tempType, tempName);
                int       type            = tempInfo.Type;
                TreeNode  raiz            = this.treedir.Nodes.Add(tempInfo.Name + " (" + drive + ")");
                raiz.Tag = d;
                //TreeNode raiz=this.treedir.Nodes.Add(drive);

                /*if(name=="My Computer")return 0;
                 * if(type==5)return 3;//cd
                 * if(type==3)return 2;//fixed
                 * if(type==2)return 1;//removable
                 * if(type==4)return 4;//remote disk
                 * if(type==6)return 5;//ram disk
                 * return 6;//unknown*/
                switch (tempInfo.Icon)
                {
                case 1:
                    raiz.ImageIndex         = 3;
                    raiz.SelectedImageIndex = 3;
                    break;

                case 2:
                    raiz.ImageIndex         = 2;
                    raiz.SelectedImageIndex = 2;
                    break;

                case 3:
                    raiz.ImageIndex         = 4;
                    raiz.SelectedImageIndex = 4;
                    break;

                case 4:
                    raiz.ImageIndex         = 5;
                    raiz.SelectedImageIndex = 5;
                    break;

                case 5:
                    raiz.ImageIndex         = 2;
                    raiz.SelectedImageIndex = 2;
                    break;

                default:
                    raiz.ImageIndex         = 2;
                    raiz.SelectedImageIndex = 2;
                    break;
                }
                raiz.Nodes.Add("");
            }
            if (lastpath != null)
            {
                DirectoryInfo lastdir = new DirectoryInfo(lastpath);
                if (lastdir.Exists)
                {
                    List <DirectoryInfo> dirsinicio = new List <DirectoryInfo>();
                    dirsinicio.Add(lastdir);
                    while (lastdir.Parent != null)
                    {
                        dirsinicio.Add(lastdir.Parent);
                        lastdir = lastdir.Parent;
                    }
                    List <DirectoryInfo> dirs = new List <DirectoryInfo>();
                    for (int i = dirsinicio.Count - 1; i >= 0; i--)
                    {
                        dirs.Add(dirsinicio[i]);
                    }
                    lastdir = new DirectoryInfo(lastpath);
                    if (dirs.Count > 0)
                    {
                        TreeNode root = null;
                        foreach (TreeNode node in this.treedir.Nodes)
                        {
                            if (node.Tag is DirectoryInfo)
                            {
                                DirectoryInfo dirroot = (DirectoryInfo)node.Tag;
                                if (dirroot.FullName == ((DirectoryInfo)dirs[0]).FullName)
                                {
                                    root = node;
                                }
                            }
                        }
                        if (root != null)
                        {
                            foreach (DirectoryInfo dir in dirs)
                            {
                                root = BuscaNodo(root, dir);
                                if (root != null)
                                {
                                    this.treedir.SelectedNode = root;
                                    root.Expand();
                                }
                                else
                                {
                                    return;
                                }
                            }
                        }
                    }
                }
            }
        }
예제 #19
0
 private void S2_BoxFolder_ShowStep(object sender, TSWizards.ShowStepEventArgs e)
 {
     FolderBrowser.SelectedPath = Path.Combine(Setup.RunUOFolder, "Scripts");
 }
예제 #20
0
 private void pwStep3Name_ShowStep(object sender, TSWizards.ShowStepEventArgs e)
 {
     txProfileName.Focus();
 }