コード例 #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
ファイル: Tutorial.cs プロジェクト: jithuin/infogeezer
		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
ファイル: frmBuild.cs プロジェクト: jithuin/infogeezer
        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
ファイル: Tutorial.cs プロジェクト: jithuin/infogeezer
        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
ファイル: frmInfoTree.cs プロジェクト: jithuin/infogeezer
        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
ファイル: frmBuild.cs プロジェクト: jithuin/infogeezer
		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
ファイル: sciTree.cs プロジェクト: jithuin/infogeezer
		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
ファイル: frmInfoTree.cs プロジェクト: jithuin/infogeezer
		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;
			}
		}