//, FiddleYardMip50SettingsForm FYMip50SettingsForm) /*#--------------------------------------------------------------------------#*/ /* Description: FiddleYardForm * Constructor * * * * Input(s) : * * Output(s) : * * Returns : * * Pre.Cond. : * * Post.Cond. : * * Notes : */ /*#--------------------------------------------------------------------------#*/ public FiddleYardForm(iFiddleYardApplication iFYApp) { InitializeComponent(); //m_FYMip50SettingsForm = FYMip50SettingsForm; //m_FYMip50SettingsForm.Hide(); m_iFYApp = iFYApp; #region Indicator init // size of window resolution on Modeltrain PC is 1920; 1200 // Size of window on Modeltrain PC is 960; 1085 // Placed on 0; 85 SeinGreen270.RotateFlip(RotateFlipType.Rotate270FlipNone); SeinRed270.RotateFlip(RotateFlipType.Rotate270FlipNone); Train90.RotateFlip(RotateFlipType.Rotate90FlipNone); Train270.RotateFlip(RotateFlipType.Rotate270FlipNone); HalfTrain270.RotateFlip(RotateFlipType.Rotate270FlipNone); HalfWagon90.RotateFlip(RotateFlipType.Rotate90FlipNone); GWinX = 5; // The X location of Gwin border line. GWinY = 32; // The X location of Gwin border line. GWinHalf = 740 / 2 + GWinY; // The Height of GWin devided by 2 plus the offset in Y is the center line of GWin Track6LocY = GWinHalf;// - 8; Track6LocX = GWinX + 170; GWin.Size = new Size (940,740); GWin.Location = new System.Drawing.Point(GWinX, GWinY); // was 5, 32 LLed_F10.Size = new Size (30, 16); LLed_F10.Location = new System.Drawing.Point(GWinX + 10, GWinHalf - 8); LLed_F10_2_TOP.Size = new Size(30, 16); LLed_F10_2_TOP.Location = new System.Drawing.Point(GWinX + 900, GWinHalf - 8); LLed_Block6.Size = new Size(100, 16); LLed_Block6.Location = new System.Drawing.Point(GWinX + 50, GWinHalf - 8); LLed_Block6In.Size = new Size(26, 14); LLed_Block6In.Location = new System.Drawing.Point(GWinX + 50 + (100 / 2 - 26 / 2), GWinHalf - 7 + 25); //LLed_Block6In.Location = new System.Drawing.Point(GWinX + 50 + (100 / 2 - 26 / 2), GWinHalf -7); LLed_Block6In.Hide(); PB_Block6In.Location = new System.Drawing.Point(GWinX + 50 + (100 / 2 - 26 / 2 - 4), GWinHalf - 7 + 20); PB_Block6In.Image = SeinRed; PB_Block6In.Enabled = false; LLed_Block5B.Size = new Size(16, 250); LLed_Block5B.Location = new System.Drawing.Point(GWinX + 50, GWinHalf - 18 - 250); LLed_Block5BIn.Size = new Size(14, 26); LLed_Block5BIn.Location = new System.Drawing.Point(GWinX + 50 + 16 + 10, GWinHalf - 18 - (250 / 2 + 26 / 2)); //LLed_Block5BIn.Location = new System.Drawing.Point(GWinX + 50 + 1, GWinHalf - 18 - (250/2 + 26/2)); LLed_Block5BIn.Hide(); PB_Block5BIn.Location = new System.Drawing.Point(GWinX + 50 + 16, GWinHalf - 20 - (250 / 2 + 26 / 2)); PB_Block5BIn.Image = SeinRed; PB_Block5BIn.Enabled = false; LLed_FYPLATE_TOP.Size = new Size(620, 368); LLed_FYPLATE_TOP.Location = new System.Drawing.Point(GWinX + 160, GWinHalf - 368 / 2); LLed_F13.Size = new Size(30, 14); LLed_F13.Location = new System.Drawing.Point(GWinX + 180, GWinHalf - 7); LLed_F11.Size = new Size(30, 14); LLed_F11.Location = new System.Drawing.Point(GWinX + 580, GWinHalf - 7); LLed_TrackPower.Size = new Size(100, 14); LLed_TrackPower.Location = new System.Drawing.Point(GWinX + 620, GWinHalf - 7); LLed_F12.Size = new Size(30, 14); LLed_F12.Location = new System.Drawing.Point(GWinX + 730, GWinHalf - 7); LLed_Block7.Size = new Size(121,16); LLed_Block7.Location = new System.Drawing.Point(GWinX + 769, GWinHalf - 8); LLed_Block7In.Size = new Size(26, 14); LLed_Block7In.Location = new System.Drawing.Point(GWinX + 790 + (100 / 2 - 26 / 2), GWinHalf - 7 + 25); //LLed_Block7In.Location = new System.Drawing.Point(GWinX + 790 + (100 / 2 - 26 / 2), GWinHalf - 7); LLed_Block7In.Hide(); PB_Block7In.Location = new System.Drawing.Point(GWinX + 790 + (100 / 2 - 26 / 2 - 4), GWinHalf - 7 + 20); PB_Block7In.Image = SeinRed; PB_Block7In.Enabled = false; LLed_Block8A.Size = new Size(16, 250); LLed_Block8A.Location = new System.Drawing.Point(GWinX + 790 + (100 - 16), GWinHalf - 250 - 18); //----------------------------------------------------------------------------------------------------------------------------// LLed_Track1.Size = new Size(600, FYTrackHeight); PB_Tr1_Train.Size = new Size(Train.Width, Train.Height); PB_Tr1_Train.Image = null; PB_Tr1_Train.Show(); PB_Tr1_Inline.Size = new Size(Inline.Width, Inline.Height); PB_Tr1_Inline.Image = Inline; PB_Tr1_Inline.Hide(); PB_Tr1_Active.Size = new Size(Active.Width, Active.Height); PB_Tr1_Active.Image = Active; //----------------------------------------------------------------------------------------------------------------------------// LLed_Track2.Size = new Size(600, FYTrackHeight); PB_Tr2_Train.Size = new Size(Train.Width, Train.Height); PB_Tr2_Train.Image = null; PB_Tr2_Train.Show(); PB_Tr2_Inline.Size = new Size(Inline.Width, Inline.Height); PB_Tr2_Inline.Image = Inline; PB_Tr2_Inline.Hide(); PB_Tr2_Active.Size = new Size(Active.Width, Active.Height); PB_Tr2_Active.Image = Active; //----------------------------------------------------------------------------------------------------------------------------// LLed_Track3.Size = new Size(600, FYTrackHeight); PB_Tr3_Train.Size = new Size(Train.Width, Train.Height); PB_Tr3_Train.Image = null; PB_Tr3_Train.Show(); PB_Tr3_Inline.Size = new Size(Inline.Width, Inline.Height); PB_Tr3_Inline.Image = Inline; PB_Tr3_Inline.Hide(); PB_Tr3_Active.Size = new Size(Active.Width, Active.Height); PB_Tr3_Active.Image = Active; //----------------------------------------------------------------------------------------------------------------------------// LLed_Track4.Size = new Size(600, FYTrackHeight); PB_Tr4_Train.Size = new Size(Train.Width, Train.Height); PB_Tr4_Train.Image = null; PB_Tr4_Train.Show(); PB_Tr4_Inline.Size = new Size(Inline.Width, Inline.Height); PB_Tr4_Inline.Image = Inline; PB_Tr4_Inline.Hide(); PB_Tr4_Active.Size = new Size(Active.Width, Active.Height); PB_Tr4_Active.Image = Active; //----------------------------------------------------------------------------------------------------------------------------// LLed_Track5.Size = new Size(600, FYTrackHeight); PB_Tr5_Train.Size = new Size(Train.Width, Train.Height); PB_Tr5_Train.Image = null; PB_Tr5_Train.Show(); PB_Tr5_Inline.Size = new Size(Inline.Width, Inline.Height); PB_Tr5_Inline.Image = Inline; PB_Tr5_Inline.Hide(); PB_Tr5_Active.Size = new Size(Active.Width, Active.Height); PB_Tr5_Active.Image = Active; //----------------------------------------------------------------------------------------------------------------------------// LLed_Track6.Size = new Size(600, FYTrackHeight); PB_Tr6_Train.Size = new Size(Train.Width, Train.Height); PB_Tr6_Train.Image = null; PB_Tr6_Train.Show(); PB_Tr6_Inline.Size = new Size(Inline.Width, Inline.Height); PB_Tr6_Inline.Image = Inline; PB_Tr6_Inline.Hide(); PB_Tr6_Active.Size = new Size(Active.Width, Active.Height); PB_Tr6_Active.Image = Active; //----------------------------------------------------------------------------------------------------------------------------// LLed_Track7.Size = new Size(600, FYTrackHeight); PB_Tr7_Train.Size = new Size(Train.Width, Train.Height); PB_Tr7_Train.Image = null; PB_Tr7_Train.Show(); PB_Tr7_Inline.Size = new Size(Inline.Width, Inline.Height); PB_Tr7_Inline.Image = Inline; PB_Tr7_Inline.Hide(); PB_Tr7_Active.Size = new Size(Active.Width, Active.Height); PB_Tr7_Active.Image = Active; //----------------------------------------------------------------------------------------------------------------------------// LLed_Track8.Size = new Size(600, FYTrackHeight); PB_Tr8_Train.Size = new Size(Train.Width, Train.Height); PB_Tr8_Train.Image = null; PB_Tr8_Train.Show(); PB_Tr8_Inline.Size = new Size(Inline.Width, Inline.Height); PB_Tr8_Inline.Image = Inline; PB_Tr8_Inline.Hide(); PB_Tr8_Active.Size = new Size(Active.Width, Active.Height); PB_Tr8_Active.Image = Active; //----------------------------------------------------------------------------------------------------------------------------// LLed_Track9.Size = new Size(600, FYTrackHeight); PB_Tr9_Train.Size = new Size(Train.Width, Train.Height); PB_Tr9_Train.Image = null; PB_Tr9_Train.Show(); PB_Tr9_Inline.Size = new Size(Inline.Width, Inline.Height); PB_Tr9_Inline.Image = Inline; PB_Tr9_Inline.Hide(); PB_Tr9_Active.Size = new Size(Active.Width, Active.Height); PB_Tr9_Active.Image = Active; //----------------------------------------------------------------------------------------------------------------------------// LLed_Track10.Size = new Size(600, FYTrackHeight); PB_Tr10_Train.Size = new Size(Train.Width, Train.Height); PB_Tr10_Train.Image = null; PB_Tr10_Train.Show(); PB_Tr10_Inline.Size = new Size(Inline.Width, Inline.Height); PB_Tr10_Inline.Image = Inline; PB_Tr10_Inline.Hide(); PB_Tr10_Active.Size = new Size(Active.Width, Active.Height); PB_Tr10_Active.Image = Active; //----------------------------------------------------------------------------------------------------------------------------// LLed_Track11.Size = new Size(600, FYTrackHeight); PB_Tr11_Train.Size = new Size(Train.Width, Train.Height); PB_Tr11_Train.Image = null; PB_Tr11_Train.Show(); PB_Tr11_Inline.Size = new Size(Inline.Width, Inline.Height); PB_Tr11_Inline.Image = Inline; PB_Tr11_Inline.Hide(); PB_Tr11_Active.Size = new Size(Active.Width, Active.Height); PB_Tr11_Active.Image = Active; //----------------------------------------------------------------------------------------------------------------------------// PB_Bk5_Train.Size = new Size(Train90.Width, Train90.Height); PB_Bk5_Train.Location = new System.Drawing.Point(LLed_Block5B.Location.X + 1, LLed_Block5B.Location.Y + LLed_Block5B.Location.Y / 2 + PB_Bk5_Train.Height / 2); PB_Bk5_Train.Image = Train90; PB_Bk5_Train.Show(); //----------------------------------------------------------------------------------------------------------------------------// PB_Bk6_Train.Size = new Size(Train.Width, Train.Height); PB_Bk6_Train.Location = new System.Drawing.Point(LLed_Block6.Location.X + PB_Bk6_Train.Width / 2, LLed_Block6.Location.Y + 2); PB_Bk6_Train.Image = HalfTrain; PB_Bk6_Train.Show(); //----------------------------------------------------------------------------------------------------------------------------// PB_Bk7_Train.Size = new Size(Train.Width, Train.Height); PB_Bk7_Train.Location = new System.Drawing.Point(LLed_Block7.Location.X + PB_Bk7_Train.Width / 2, LLed_Block7.Location.Y + 2); PB_Bk7_Train.Image = Train; PB_Bk7_Train.Show(); //----------------------------------------------------------------------------------------------------------------------------// PB_Bk8A_Train.Size = new Size(Train270.Width, Train270.Height); PB_Bk8A_Train.Location = new System.Drawing.Point(LLed_Block8A.Location.X + 2, LLed_Block8A.Location.Y + LLed_Block8A.Location.Y / 2 + PB_Bk8A_Train.Height / 2); PB_Bk8A_Train.Image = HalfTrain270; PB_Bk8A_Train.Show(); //----------------------------------------------------------------------------------------------------------------------------// LLed_EOS11.Size = new Size(50, 16); LLed_EOS11.Location = new System.Drawing.Point(GWinX + 180, GWinHalf - 360); LLed_EOS10.Size = new Size(50, 16); LLed_EOS10.Location = new System.Drawing.Point(GWinX + 180, GWinHalf + 360 - 16); Btn_Bezet5BOn_TOP.Size = new Size(32, 24); Btn_Bezet5BOn_TOP.Location = new System.Drawing.Point(GWinX + 50 + 16 + 30, GWinHalf - 18 - (250 / 2) - (23 / 2)); //Btn_Bezet5BOn_TOP.Location = new System.Drawing.Point(GWinX + 50 + 16 + 10, GWinHalf - 18 - (250/2) - (23/2) ); Btn_Bezet6On_TOP.Size = new Size(32, 24); Btn_Bezet6On_TOP.Location = new System.Drawing.Point(GWinX + 100 - (32 / 2), GWinHalf + 8 + 40); //Btn_Bezet6On_TOP.Location = new System.Drawing.Point(GWinX + 100 - (32/2), GWinHalf + 8 + 10); Btn_Bezet7On_TOP.Size = new Size(32, 24); Btn_Bezet7On_TOP.Location = new System.Drawing.Point(GWinX + 840 - (32 / 2), GWinHalf + 8 + 40); //Btn_Bezet7On_TOP.Location = new System.Drawing.Point(GWinX + 840 - (32/2), GWinHalf + 8 + 10); LabelBlock6.Size = new Size(44, 13); LabelBlock6.Location = new System.Drawing.Point(GWinX + 100 - (44 / 2), GWinHalf - 8 - 10 - 13); LabelBlock7.Size = new Size(44, 13); LabelBlock7.Location = new System.Drawing.Point(GWinX + 840 - (44 / 2), GWinHalf - 8 - 10 - 13); LabelBlock5B.Size = new Size(44, 13); LabelBlock5B.Location = new System.Drawing.Point(GWinX + 60 + 8, GWinHalf - 18 - 250); LabelBlock8A.Size = new Size(44, 13); LabelBlock8A.Location = new System.Drawing.Point(GWinX + 790 + (100 - 16) - 10 - 50, GWinHalf - 18 - 250); LLed_15VTrackPower.Size = new Size(88, 16); LLed_15VTrackPower.Location = new System.Drawing.Point(GWinX + 835, GWinHalf - 360); LLed_Heart.Size = new Size(60, 16); LLed_Heart.Location = new System.Drawing.Point(GWinX + 15, GWinHalf + 360 - 16); LLed_M10.Size = new Size(50, 16); LLed_M10.Location = new System.Drawing.Point(GWinX + 270, GWinHalf + 360 - 16); LLed_Resistor.Size = new Size(100, 16); LLed_Resistor.Location = new System.Drawing.Point(GWinX + 620, GWinHalf + 360 - 16); Btn_Reset_TOP.Size = new Size(80, 32); Btn_Reset_TOP.Location = new System.Drawing.Point(GWinX + 10, GWinHalf - 360); //LLed_Alive.Size = new Size(16, 16); //LLed_Alive.Location = new System.Drawing.Point(GWinX + 880, GWinHalf + 360 - 16); SimulationMode.Visible = false; alwaysOnTopToolStripMenuItem.Checked = true; this.TopMost = true; mIP50SettingsToolStripMenuItem.Enabled = false; checkBoxTrack1.Checked = false; checkBoxTrack2.Checked = false; checkBoxTrack3.Checked = false; checkBoxTrack4.Checked = false; checkBoxTrack5.Checked = false; checkBoxTrack6.Checked = false; checkBoxTrack7.Checked = false; checkBoxTrack8.Checked = false; checkBoxTrack9.Checked = false; checkBoxTrack10.Checked = false; checkBoxTrack11.Checked = false; checkBoxToggle.Checked = false; #endregion Indicator init Btn_Stop_Fiddle_TOP.Enabled = false; }
/*#--------------------------------------------------------------------------#*/ /* Description: FiddleYardAppInit() * Constructor * * * Input(s) : * * Output(s) : * * Returns : * * Pre.Cond. : * * Post.Cond. : * * Notes : */ /*#--------------------------------------------------------------------------#*/ public FiddleYardAppInit(iFiddleYardApplication iFYApp) { m_iFYApp = iFYApp; FiddleYardInitStarted = new MessageUpdater(); State_Machine = State.Idle; }