示例#1
0
        private void cmdInfo_Click(object sender, EventArgs e)
        {
            frmInfo fi = new frmInfo(enums.infoType.techno, curTechno);

            string oldText = this.Text;

            this.Text = "";
            fi.ShowDialog();
            this.Text = oldText;
        }
示例#2
0
		public static void show( Form parent, order ind)
		{
			if ( 
				mode &&
				!alreadySeen[ (int)ind ] 
				)
			{
				string title = parent.Text; // S:\pH\Pocket Humanity\forms\
				parent.Text = "";

				frmInfo fi = new frmInfo( enums.infoType.tutorial, (int)ind );
				fi.ShowDialog();
				alreadySeen[ (int)ind ] = true;

				parent.Text = title;
			}
		}
示例#3
0
        private void butInfo_Click(object sender, EventArgs e)
        {
            enums.infoType type = enums.infoType.units;
            //if ( list[ lbPossibilities.SelectedIndex ].type == 1 )
            //		type = enums.infoType.units;

            /*else if ( list[ lbPossibilities.SelectedIndex ].type == 2 )
             *      type = (byte)enums.infoType.;
             *               else*/

            if (list[lbPossibilities.SelectedIndex] is Stat.Unit)
            {
                type = enums.infoType.units;
            }
            else if (list[lbPossibilities.SelectedIndex] is Stat.Building)
            {
                type = enums.infoType.buildings;
            }
            else if (list[lbPossibilities.SelectedIndex] is Stat.SmallWonder)
            {
                type = enums.infoType.buildings;
            }
            else if (list[lbPossibilities.SelectedIndex] is Stat.Wonder)
            {
                type = enums.infoType.buildings;
            }

            frmInfo fi;

            if (list[lbPossibilities.SelectedIndex] is Stat.Wealth)
            {
                fi = new frmInfo(
                    enums.infoType.misc,
                    0                     // wealth type
                    );
            }
            else
            {
                fi = new frmInfo(
                    type,
                    list[lbPossibilities.SelectedIndex].type
                    );
            }

            fi.ShowDialog();
        }
示例#4
0
        public static void show(Form parent, order ind)
        {
            if (
                mode &&
                !alreadySeen[(int)ind]
                )
            {
                string title = parent.Text;                 // S:\pH\Pocket Humanity\forms\
                parent.Text = "";

                frmInfo fi = new frmInfo(enums.infoType.tutorial, (int)ind);
                fi.ShowDialog();
                alreadySeen[(int)ind] = true;

                parent.Text = title;
            }
        }
示例#5
0
        private void tvInfo_AfterSelect(object sender, TreeViewEventArgs e)
        {
            if (tvInfo.SelectedNode.Nodes.Count == 0)
            {
                string title = this.Text;
                platformSpec.manageWindows.prepareForDialog(this);                   //this.Text = "";

                try
                {
                    frmInfo fi = new frmInfo((enums.infoType)Convert.ToInt32(tvInfo.SelectedNode.Parent.Tag), Convert.ToInt32(tvInfo.SelectedNode.Tag));
                    fi.ShowDialog();
                }
                catch
                {
                    MessageBox.Show("Error within encyclopedia, some items aren't completed.", "Known bug");
                }

                this.Text = title;
            }
        }
示例#6
0
		private void butInfo_Click(object sender, EventArgs e)
		{
			enums.infoType type = enums.infoType.units;
			//if ( list[ lbPossibilities.SelectedIndex ].type == 1 )
		//		type = enums.infoType.units;
			/*else if ( list[ lbPossibilities.SelectedIndex ].type == 2 )
				type = (byte)enums.infoType.;
					 else*/

			if ( list[ lbPossibilities.SelectedIndex ] is Stat.Unit )
				type = enums.infoType.units;
			else if ( list[ lbPossibilities.SelectedIndex ] is Stat.Building )
				type = enums.infoType.buildings;
			else if ( list[ lbPossibilities.SelectedIndex ] is Stat.SmallWonder )
				type = enums.infoType.buildings;
			else if ( list[ lbPossibilities.SelectedIndex ] is Stat.Wonder )
				type = enums.infoType.buildings;

			frmInfo fi;
			if ( list[ lbPossibilities.SelectedIndex ] is Stat.Wealth )
			{
				fi = new frmInfo( 
					enums.infoType.misc,
					0 // wealth type
					);
			}
			else
				fi = new frmInfo( 
					type,
					list[ lbPossibilities.SelectedIndex ].type
					);

			fi.ShowDialog();
		}
示例#7
0
		private void cmdInfo_Click(object sender, EventArgs e)
		{
			frmInfo fi = new frmInfo( enums.infoType.techno, curTechno );

			string oldText = this.Text;
			this.Text = "";
			fi.ShowDialog();
			this.Text = oldText;
		}
示例#8
0
		private void tvInfo_AfterSelect(object sender, TreeViewEventArgs e)
		{
			if ( tvInfo.SelectedNode.Nodes.Count == 0 )
			{
				string title = this.Text;
				platformSpec.manageWindows.prepareForDialog( this ); //this.Text = "";

				try
				{
					frmInfo fi = new frmInfo( (enums.infoType)Convert.ToInt32( tvInfo.SelectedNode.Parent.Tag ), Convert.ToInt32( tvInfo.SelectedNode.Tag ) );
					fi.ShowDialog();
				}
				catch
				{
					MessageBox.Show( "Error within encyclopedia, some items aren't completed.", "Known bug" );
				}

				this.Text = title;
			}
		}