コード例 #1
0
ファイル: seltrg.cpp プロジェクト: xor2003/bob-flight-sim
SelectTarget::SelectTarget(int squad, int tab,int unitdisplaylevel, SelectTargetMode selecttargetmode,CWnd* pParent /*=NULL*/)
	: RowanDialog(SelectTarget::IDD, pParent)
{
#ifndef	BOB_DEMO_VER

	//{{AFX_DATA_INIT(SelectTarget)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT
	MainToolBar().DialoguesVisible(false);
	TitleBarPtr().DialoguesVisible(false);

	currsquad = squad;
	currtab = tab;
	m_pView->m_mapdlg.TargetSelectSink=this;
	m_pView->m_mapdlg.TargetSelectMode=selecttargetmode;
	udl = unitdisplaylevel ;


//DeadCode JIM 26Sep00 	Save_Data_tmp = Save_Data;
//DeadCode JIM 26Sep00 	Save_Data.mapfilters %=	FILT_RAFSAG;		//never want raf on sel trg

//DeadCode JIM 26Sep00 	if (lwonly)
//DeadCode JIM 26Sep00 	{
//DeadCode JIM 26Sep00 		Save_Data.mapfilters = 0;
//DeadCode JIM 26Sep00 		Save_Data.mapfilters|=FILT_LWSAG;
//DeadCode JIM 26Sep00 	}
	m_pView->m_mapdlg.Invalidate();

#endif

}
コード例 #2
0
ファイル: mainfrm.cpp プロジェクト: xor2003/bob-flight-sim
//DEADCODE DAW 07/05/99 void CMainFrame::OnNcPaint() 
//DEADCODE DAW 07/05/99 {
//DEADCODE DAW 07/05/99 //	CDC* pDC=GetWindowDC();
//DEADCODE DAW 07/05/99 //	CRect windrect;
//DEADCODE DAW 07/05/99 //	GetWindowRect(windrect);
//DEADCODE DAW 07/05/99 //	pDC->FillSolidRect(0,0,windrect.Width(),windrect.Height(),RGB(0,0,0));
//DEADCODE DAW 07/05/99 	// Do not call CFrameWnd::OnNcPaint() for painting messages
//DEADCODE DAW 07/05/99 }
void	Campaign::GlobalRefreshData()
{
#ifndef	BOB_DEMO_VER

	MainToolBar().GlobalRefreshData();
	MiscToolBar().GlobalRefreshData();
	TitleBarPtr().GlobalRefreshData();
	((CMainFrame*)AfxGetMainWnd())->m_reportbar.GlobalRefreshData();
#endif
}
コード例 #3
0
ファイル: seltrg.cpp プロジェクト: xor2003/bob-flight-sim
void SelectTarget::OnOK()
{
#ifndef	BOB_DEMO_VER
	m_pView->m_mapdlg.TargetSelectMode=STM_NORMAL;
	m_pView->m_mapdlg.TargetSelectSink=NULL;
	MainToolBar().DialoguesVisible(true);
	TitleBarPtr().DialoguesVisible(true);
//DeadCode JIM 26Sep00 	Save_Data = Save_Data_tmp;
	m_pView->m_mapdlg.Invalidate();
#endif
	OnClickedRbuttonreset() ;
}
コード例 #4
0
ファイル: seltrg.cpp プロジェクト: xor2003/bob-flight-sim
void	SelectTarget::RefreshData(int targetid)
{
#ifndef	BOB_DEMO_VER

	if ((targetid<0))											//DAW 11Jul00
		return;													//DAW 11Jul00

	UniqueIDBand b=Persons2::getbandfromUID((UniqueID)targetid);

	if (b != SagBAND)
	{
		Profile& pk = Todays_Packages.pack[Todays_Packages.hipack];
		if (pk.packagetarget[pk[currsquad].targetindex].currentid != (UniqueID)targetid)
		{
			int i = 0;
			while (			( i <Profile::MAX_TARGETS) 
						&&	(pk.packagetarget[i].currentid != UID_NULL)
						&&	(pk.packagetarget[i].currentid != targetid)
					)
				i++;
			if (i!=Profile::MAX_TARGETS)
			{
			   pk.packagetarget[i] = (UniqueID)targetid;
			   SetTargetIndex(i);
 			}else
				pk.packagetarget[pk[currsquad].targetindex].currentid = (UniqueID)targetid;
		}
//DEADCODE RDH 08/05/00 		MainToolBar().DialoguesVisible(true);
//DEADCODE RDH 08/05/00 		TitleBarPtr().DialoguesVisible(true);

		RDialog*	taskdial = TitleBarPtr().LoggedChild(TitleBar::TASK);
		if (taskdial)
		{
			CRTabs* tab=(CRTabs*)taskdial->fchild->fchild->GetDlgItem(IDJ_TABCTRL);
			tab->SelectTab(currtab);
		}
	}else
	{
		int packnum,sqline;
		if (Todays_Packages.GetACSquadEntry((UniqueID)targetid,packnum,sqline))
		{
			Todays_Packages.pack[Todays_Packages.hipack].ReassignTo((UniqueID)targetid, true);;
		}
	}

	Todays_Packages.SetTaskData();
#endif
	OnOK();

}
コード例 #5
0
ファイル: grpgesch.cpp プロジェクト: xor2003/bob-flight-sim
void GroupGeschwader::OnSelectRlistboxctrl1(long row, long column) 
{
#ifndef	BOB_DEMO_VER

	if (column == 0)
	{
		if (Airfields[row][0])
			TitleBarPtr().OpenTote(Airfields[row][0]);
	}else
	{
		if (Airfields[row][column])
			MainToolBar().OpenACDossier(Airfields[row][column],0);
	}
#endif
}
コード例 #6
0
ファイル: PLTLOGBK.CPP プロジェクト: gondur/BOB_Src
void PilotLogBook::OnSelectRlistboxctrl1(long row, long column) 
{
#ifndef	BOB_DEMO_VER
	
	Diary::Player*	pptr = Squad_Diary.GetFirstPlayer();

	if (row > 0)
	{
 		row--;
		int index = -1;													//RJS 13Nov00
		while(pptr && (index != row))
		{
			SquadronBase*	squad =	Squad_Diary.GetSquadron(pptr);
			if (squad)
			{
				Diary::RaidGroup* raidgroup;
				Diary::RaidPack* raidpack;
				raidgroup = Squad_Diary.GetRaidGroup(squad);
				if (raidgroup)
				{
					raidpack = Squad_Diary.GetRaidPack(raidgroup);
					if (raidpack)
					{
						index++;	  //sets the count to 1 when something is found!
 
					}
				}
 

			}
			pptr = Squad_Diary.GetNextPlayerAll(pptr);



		}

		if (index == row)
			TitleBarPtr().OpenCombatReport(index+1, true);				//RJS 13Nov00
	}	
#endif
}
コード例 #7
0
ファイル: seltrg.cpp プロジェクト: xor2003/bob-flight-sim
void SelectTarget::OnClickedRbuttonreset() 
{
#ifndef	BOB_DEMO_VER

	if (currindex > 0)
	{
		Profile& pk = Todays_Packages.pack[Todays_Packages.hipack];

		TargetGroup* trg = Node_Data[pk.packagetarget[pk[currsquad].targetindex].currentid];

		pk.packagetarget[pk[currsquad].targetindex].currentid = trg->secondaries[currindex -1];
	}
	if (currtab >= 0)
	{
		RDialog*	taskdial = TitleBarPtr().LoggedChild(TitleBar::TASK);
		if (taskdial)
		{
			CRTabs* tab=(CRTabs*)taskdial->fchild->fchild->GetDlgItem(IDJ_TABCTRL);
			tab->SelectTab(currtab);
		}
	}
#endif
	CDialog::OnOK();
}
コード例 #8
0
ファイル: lwtaskfr.cpp プロジェクト: xor2003/bob-flight-sim
void LWTaskFighter::OnSelectRlistboxctrl1(long row, long column) 
{ 	
#ifndef	BOB_DEMO_VER


	PackageList::AMType*	amtype;

	switch	(attackmethod)
	{
		default_neverreferenced;
		case	Profile::AM_DETACHED:
		{
			amtype = &Todays_Packages.taskdata.detached;
			tab = 3;
			break;
		}
		case	Profile::AM_ATTACHED:
		{
			amtype = &Todays_Packages.taskdata.attached;
			tab = 2;
			break;
		}
		case	Profile::AM_RETURNESCORT:
		{
			amtype = &Todays_Packages.taskdata.returned;
			tab = 4;
			break;
		}

	}
	Profile& pk = Todays_Packages.pack[Todays_Packages.hipack];


	if (row > 0)
	{
		if (column == 0)
		{
			if (row > maxunits)
			{	
				if (maxunits == 0)
				{
					Profile::BetterRule	br = pk.FindBetterRule();
					if (Todays_Packages.taskdata.totalfighter.squadnum <3)
						pk.AddSquadron(-1,(Profile::AttackMethod) attackmethod,0,br);
					else
						pk.AddNumerousSquadrons(-3,(Profile::AttackMethod)attackmethod,SQ_ZERO,br);

				}else if 	(amtype->acnum >= 1)
					pk.CompleteSquadron((Profile::AttackMethod) attackmethod);
				else if (amtype->squadnum < 3)
					pk.CompleteGroup((Profile::AttackMethod) attackmethod, amtype->squadnum);
				else
			 		TitleBarPtr().OpenAcUnit(-1,AircraftUnit::TTL_FIGHTER, tab, attackmethod,  unitdisplaylevel);
			}else
				TitleBarPtr().OpenAcUnit(FindSquad(row-1), AircraftUnit::TTL_FIGHTER, tab, attackmethod, unitdisplaylevel);
		}else
		{
//DeadCode JIM 26Sep00 			if ((column == 1) && (row <= maxunits) && (maxunits != 0))
//DeadCode JIM 26Sep00 				TitleBarPtr().OpenSelTrg(FindSquad(row-1), tab, unitdisplaylevel, false);
		}
		pk.ReShareSecondaries();												//JIM 28Aug00
		AttackMethodField	am=pk.ScanAttackMethods();
		pk.ReorderPackage(am);
		pk.CalcRoutePositionsAndTime(pk.primarytargetETA,false);
		Todays_Packages.SetTaskData();
		Refresh();

	}	
#endif
}