protected void ClearAll()
    {
        try
        {
            LblMsg.Text = "";

            HidFldId.Value = "";

            DDLClientName.Items.Clear();
            DDLClientName.DataSource     = BLayer.FillClient();
            DDLClientName.DataTextField  = "ClientName";
            DDLClientName.DataValueField = "ClientId";
            DDLClientName.DataBind();
            DDLClientName.Items.Insert(0, new ListItem("---Select Client---", "0"));

            TxtPrjName.Text   = "";
            TxtStartDate.Text = "";
            TxtEndDate.Text   = "";

            ddlPrjStatus.SelectedIndex = 0;
            TxtRemark.Text             = "";

            GridModule.DataSource = null;
            GridModule.DataBind();
        }
        catch (Exception ex)
        {
            Response.Write(ex.ToString());
        }
    }
Beispiel #2
0
 private void FrmUdfMaster_Load(object sender, EventArgs e)
 {
     GridModule.Focus();
     ControlEnableDisable(true, false);
     AddFieldTypeList();
     ClearFld();
     CmbFieldType.SelectedIndex = 0;
     LoadModules();
 }
Beispiel #3
0
    public void Start()
    {
        Debug.Log($"{MODULE_TAG} start");
        Debug.Assert(TableBackground != null, $"{MODULE_TAG} TableBackground object is null.");

        _gridModule = GetComponentInChildren <GridModule>();
        Debug.Assert(_gridModule != null, $"{MODULE_TAG} GameTable doesn't contain GridModule object.");

        _state = GameTableState.ReadyToInitialization;
    }
        public ActionResult ApplyFixedAssetAddView()
        {
            GridModule gs = new GridModule();
            GridPanel  gm = gs.gf;

            gm.AddTo(this.GetCmp <FormPanel>("storeform"));
            this.GetCmp <FormPanel>("storeform").SetActive(true);
            ViewBag.audit = cw.SetCombox(checkname);
            return(View());
        }
        public void Tick()
        {
            int improvement = GridModule.FindDriverStatic(driver.Driver.CarIndex).Position - driver.PositionLive;

            if (improvement < 0)
            {
                Improved.Text       = (-improvement).ToString("0");
                ImprovedBg.Fill     = lostBrush;
                ImpAngle.Angle      = lostAngle;
                ImpTriangle.Fill    = blackBrush;
                Improved.Foreground = blackBrush;
            }
            else if (improvement == 0)
            {
                Improved.Text       = "0";
                ImprovedBg.Fill     = neutralBrush;
                ImpAngle.Angle      = neutralAngle;
                ImpTriangle.Fill    = whiteBrush;
                Improved.Foreground = whiteBrush;
            }
            else
            {
                Improved.Text       = improvement.ToString("0");
                ImprovedBg.Fill     = improvedBrush;
                ImpAngle.Angle      = improvedAngle;
                ImpTriangle.Fill    = whiteBrush;
                Improved.Foreground = whiteBrush;
            }

            if (driver.GapLaps > 0)
            {
                if (driver.GapLaps == 1)
                {
                    Gap.Text = "+1 Lap";
                }
                else
                {
                    Gap.Text = "+" + driver.GapLaps.ToString("0") + " Laps";
                }
            }
            else
            {
                if (driver.PositionLive == 1)
                {
                    Gap.Text = "Leader";
                }
                else
                {
                    Gap.Text = "+" + driver.GapLiveLeader.ConvertToTimeString();
                }
            }
        }
    protected void FillModuleData()
    {
        try
        {
            if (int.Parse(HidFldId.Value) != 0)
            {
                StrSql        = new StringBuilder();
                StrSql.Length = 0;

                StrSql.AppendLine("Select Id,ProjectId,ModuleName");
                StrSql.AppendLine(",CONVERT(Varchar(10),StartDate,103) As StartDate ");
                StrSql.AppendLine(",CONVERT(Varchar(10),EndDate,103) As EndDate ");
                StrSql.AppendLine(",Case When IsNull(ModuleStatus,'')='D' Then 'Done'");
                StrSql.AppendLine("      When IsNull(ModuleStatus,'')='P' Then 'Pending'");
                StrSql.AppendLine("      When IsNull(ModuleStatus,'')='C' Then 'Cancle' Else '0' End As ModuleStatus");
                StrSql.AppendLine(",Remark  ");
                StrSql.AppendLine("From Project_Module ");
                StrSql.AppendLine("Where ProjectId=" + int.Parse(HidFldId.Value));
                StrSql.AppendLine("Order By StartDate");

                ds = new DataSet();
                ds = SqlFunc.ExecuteDataSet(StrSql.ToString());

                if (ds.Tables[0].Rows.Count != 0)
                {
                    GridModule.DataSource = ds;
                    GridModule.DataBind();
                    ModulePanel.Visible = true;
                }
                else
                {
                    ds.Tables[0].Rows.Add(ds.Tables[0].NewRow());
                    GridModule.DataSource = ds;
                    GridModule.DataBind();
                    int columncount = GridModule.Rows[0].Cells.Count;
                    GridModule.Rows[0].Cells.Clear();
                    GridModule.Rows[0].Cells.Add(new TableCell());
                    GridModule.Rows[0].Cells[0].ColumnSpan = columncount;
                    GridModule.Rows[0].Cells[0].Text       = "No Records Found";
                }
            }
        }
        catch (Exception ex)
        {
            Response.Write(ex.ToString());
        }
    }
Beispiel #7
0
        public void FadeIn(DriverInfoMode mode)
        {
            if (cameraModule == null)
            {
                cameraModule = TMTVO.Controller.TMTVO.Instance.Api.FindModule("CameraModule") as CameraModule;
            }

            if (standingsModule == null)
            {
                standingsModule = TMTVO.Controller.TMTVO.Instance.Api.FindModule("LiveStandings") as LiveStandingsModule;
            }

            if (sessionTimer == null)
            {
                sessionTimer = TMTVO.Controller.TMTVO.Instance.Api.FindModule("SessionTimer") as SessionTimerModule;
            }

            if (Active)
            {
                return;
            }

            int camIndex = cameraModule.FollowedDriver;

            driver = standingsModule.FindDriver(camIndex);
            if (driver == null)
            {
                return;
            }

            Active    = true;
            this.mode = mode;

            DriversName.Text   = driver.Driver.LastUpperName;
            TeamCarName.Text   = Controller.TMTVO.Instance.Cars.GetValue(driver.Driver.Car.CarName);
            DriversNumber.Text = driver.Driver.Car.CarNumber;
            NumberPlate.Fill   = new SolidColorBrush(driver.Driver.LicColor);

            Storyboard sb = FindResource("FadeInName") as Storyboard;

            sb.Begin();

            if (mode != DriverInfoMode.NameOnly)
            {
                int position = 0;
                if (mode == DriverInfoMode.QualiTimeOnly || mode == DriverInfoMode.QualiTimeWithGap)
                {
                    position = GridModule.FindDriverStatic(driver).Position;
                }
                else
                {
                    position = driver.PositionLive;
                }

                if (position == 1)
                {
                    BackgroundLeader.Visibility = Visibility.Visible;
                }
                else
                {
                    BackgroundLeader.Visibility = Visibility.Hidden;
                }

                Position.Text = position.ToString("0");
                (FindResource("FadeInPosition") as Storyboard).Begin();
                pActive = true;
            }

            if (mode == DriverInfoMode.Improvements)
            {
                BestTime.Text = driver.FastestLapTime.ConvertToTimeString();
                LastTime.Text = driver.LastLapTime.ConvertToTimeString();

                int improvement = GridModule.FindDriverStatic(camIndex).Position - driver.PositionLive;
                if (improvement < 0)
                {
                    Improvement.Text = (-improvement).ToString("0");
                    ImpAngle.Angle   = lostAngle;
                    ImpTriangle.Fill = lostBrush;
                }
                else if (improvement == 0)
                {
                    Improvement.Text = "0";
                    ImpAngle.Angle   = neutralAngle;
                    ImpTriangle.Fill = neutralBrush;
                }
                else
                {
                    Improvement.Text = improvement.ToString("0");
                    ImpAngle.Angle   = improvedAngle;
                    ImpTriangle.Fill = improvedBrush;
                }

                (FindResource("FadeInImprovements") as Storyboard).Begin();
                bActive = true;
            }

            if (mode == DriverInfoMode.FastestLapTimeOnly || mode == DriverInfoMode.FastestLapTimeWithGap || mode == DriverInfoMode.QualiTimeOnly || mode == DriverInfoMode.QualiTimeWithGap)
            {
                FastestTime.Text = ((mode == DriverInfoMode.QualiTimeOnly || mode == DriverInfoMode.QualiTimeWithGap) ? GridModule.FindDriverStatic(camIndex).QualiTime : driver.FastestLapTime).ConvertToTimeString();
                (FindResource("FadeInFastestLap") as Storyboard).Begin();
                fActive = true;
            }

            if (mode == DriverInfoMode.FastestLapTimeWithGap || mode == DriverInfoMode.QualiTimeWithGap)
            {
                if (mode == DriverInfoMode.FastestLapTimeWithGap)
                {
                    Gap.Text = "+" + (driver.FastestLapTime - standingsModule.Leader.FastestLapTime).ConvertToTimeString();
                }
                else
                {
                    Gap.Text = "+" + (GridModule.FindDriverStatic(camIndex).QualiTime - GridModule.GetLeader().QualiTime).ConvertToTimeString();
                }

                (FindResource("FadeInGap") as Storyboard).Begin();
                gActive = true;
            }
        }
Beispiel #8
0
        public void Tick()
        {
            int index = cameraModule.FollowedDriver;
            LiveStandingsItem driver = standingsModule.FindDriver(index);

            if (driver == null)
            {
                FadeOut();
                return;
            }

            DriversName.Text   = driver.Driver.LastUpperName;
            TeamCarName.Text   = Controller.TMTVO.Instance.Cars.GetValue(driver.Driver.Car.CarName);
            DriversNumber.Text = driver.Driver.Car.CarNumber;
            NumberPlate.Fill   = new SolidColorBrush(driver.Driver.LicColor);

            if (pActive)
            {
                int position = 0;
                if (mode == DriverInfoMode.QualiTimeOnly || mode == DriverInfoMode.QualiTimeWithGap)
                {
                    position = GridModule.FindDriverStatic(driver).Position;
                }
                else
                {
                    position = driver.PositionLive;
                }

                if (position == 1)
                {
                    BackgroundLeader.Visibility = Visibility.Visible;
                }
                else
                {
                    BackgroundLeader.Visibility = Visibility.Hidden;
                }

                Position.Text = position.ToString("0");
            }

            if (fActive)
            {
                if (mode == DriverInfoMode.FastestLapTimeOnly || mode == DriverInfoMode.FastestLapTimeWithGap)
                {
                    FastestTime.Text = driver.FastestLapTime.ConvertToTimeString();
                }
                else if (mode == DriverInfoMode.QualiTimeOnly || mode == DriverInfoMode.QualiTimeWithGap)
                {
                    FastestTime.Text = GridModule.FindDriverStatic(driver).QualiTime.ConvertToTimeString();
                }
            }

            if (gActive)
            {
                if (mode == DriverInfoMode.FastestLapTimeWithGap)
                {
                    if ((sessionTimer.SessionType == SessionType.LapRace || sessionTimer.SessionType == SessionType.TimeRace) && (sessionTimer.SessionState == SessionState.Racing || sessionTimer.SessionState == SessionState.Checkered || sessionTimer.SessionState == SessionState.Cooldown))
                    {
                        if (driver.GapLaps == 0)
                        {
                            Gap.Text = "+" + driver.GapTime.ConvertToTimeString();
                        }
                        else if (driver.GapLive == 1)
                        {
                            Gap.Text = "+1 Lap";
                        }
                        else
                        {
                            Gap.Text = "+" + driver.GapLaps.ToString("0") + " Laps";
                        }
                    }
                    else
                    {
                        Gap.Text = "+" + (driver.FastestLapTime - standingsModule.Leader.FastestLapTime).ConvertToTimeString();
                    }
                }
                else
                {
                    Gap.Text = "+" + (GridModule.FindDriverStatic(driver).QualiTime - GridModule.GetLeader().QualiTime).ConvertToTimeString();
                }
            }

            if (bActive)
            {
                BestTime.Text = driver.FastestLapTime.ConvertToTimeString();
                LastTime.Text = driver.LastLapTime.ConvertToTimeString();

                int improvement = GridModule.FindDriverStatic(driver).Position - driver.PositionLive;
                if (improvement < 0)
                {
                    Improvement.Text = (-improvement).ToString("0");
                    ImpAngle.Angle   = lostAngle;
                    ImpTriangle.Fill = lostBrush;
                }
                else if (improvement == 0)
                {
                    Improvement.Text = "0";
                    ImpAngle.Angle   = neutralAngle;
                    ImpTriangle.Fill = neutralBrush;
                }
                else
                {
                    Improvement.Text = improvement.ToString("0");
                    ImpAngle.Angle   = improvedAngle;
                    ImpTriangle.Fill = improvedBrush;
                }
            }
        }