Пример #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="hWndOwner"></param>
        /// <returns></returns>
        protected override bool RunDialog(IntPtr hWndOwner)
        {
            TargetVersionDialogBox dialogInstance = null;
            bool okTriggered = false;

            try
            {
                dialogInstance       = new TargetVersionDialogBox();
                dialogInstance.Owner = (Form.FromHandle(hWndOwner) as Form);
                dialogInstance.Cases = this.cases;
                if (dialogInstance.ShowDialog() == DialogResult.OK)
                {
                    okTriggered = true;
                    this.cases  = dialogInstance.Cases;
                    this.Save(this, new TargetVersionDialogBoxSaveEventArgs(cases));
                    //this.Reset(); // reset the entry after it's been finished with
                }
            }

            finally
            {
                if (dialogInstance != null)
                {
                    dialogInstance.Dispose();
                }
            }
            return(okTriggered);
        }
Пример #2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="cases"></param>
        public void SetCases(TargetVersionCases cases)
        {
            // TODO: this

            /*if (entry.ChangeLog.Count == 0)
             * {
             *  entry.ChangeLog.Add(new ModHistoryChangeLog(), "en");
             * }
             * //TODO:
             * //textBoxEntry.Text = entry.HistoryChanges.GetValue().Replace("\r","").Replace("\n", "\r\n");
             * MODVersionMajor.Value = entry.Version.Major;
             * MODVersionMinor.Value = entry.Version.Minor;
             * MODVersionRevision.Value = entry.Version.Revision;
             * MODVersionRelease.Text = entry.Version.Release.ToString();
             * MODHistorydtp.Value = entry.Date;
             *
             * comboBoxLanguages.Items.Clear();
             * comboBoxLanguages.Text = "";
             * foreach (DictionaryEntry de in entry.ChangeLog)
             * {
             *  comboBoxLanguages.Items.Add((string)de.Key);
             *  if (comboBoxLanguages.Items.Count == 1)
             *  {
             *      comboBoxLanguages.SelectedIndex = 0;
             *      listViewModChanges.Clear();
             *      foreach (string change in ((ModHistoryChangeLog)de.Value))
             *      {
             *          listViewModChanges.Items.Add(change.Split('\n')[0]);
             *      }
             *  }
             * }*/
            this.textBoxTargetVersionPrimary.Text = cases.Primary;
            listViewTargetVersionCases.Items.Clear();
            foreach (TargetVersionCase tvc in cases)
            {
                string[] tempItem;
                if (tvc.Stage != VersionStage.Stable)
                {
                    tempItem = new string[] { tvc.Part.ToString(), tvc.Comparisson.ToString(), tvc.Stage.ToString() + " " + tvc.GetValue };
                }
                else
                {
                    tempItem = new string[] { tvc.Part.ToString(), tvc.Comparisson.ToString(), tvc.GetValue };
                }
                listViewTargetVersionCases.Items.Add(new ListViewItem(tempItem));
            }
            this.cases = cases;
        }
Пример #3
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="phpbbVersion"></param>
 public void SetPhpbbVersion(TargetVersionCases phpbbVersion)
 {
     if (phpbbVersion.Primary.StartsWith("3"))
     {
         LoadPhpbb3FileList();
     }
     else
     {
         LoadPhpbb2FileList();
     }
     listBoxFiles.Items.Clear();
     for (int i = 0; i < PhpbbFileList.Length; i++)
     {
         listBoxFiles.Items.Add(PhpbbFileList[i]);
     }
 }
Пример #4
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="cases"></param>
 public TargetVersionDialogBoxSaveEventArgs(TargetVersionCases cases)
 {
     this.Cases = cases;
 }
Пример #5
0
 /// <summary>
 ///
 /// </summary>
 public override void Reset()
 {
     this.cases = new TargetVersionCases();
 }
Пример #6
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="projectName"></param>
 /// <param name="projectPath"></param>
 /// <param name="phpbbVersion"></param>
 public NewProjectDialogBoxSaveNewEventArgs(string projectName, string projectPath, TargetVersionCases phpbbVersion)
 {
     this.ProjectName  = projectName;
     this.ProjectPath  = projectPath;
     this.PhpbbVersion = phpbbVersion;
 }