protected override void OnInitialized(EventArgs e)
        {
            base.OnInitialized(e);

            this.Details = DetailsType.Progress;
            // Refresh(ExecutionEngineType.Retrival);
        }
        private DetailsType CreateDetails()
        {
            DetailsType details = new DetailsType();

            details.Items = new object[] { CreateTableRows() };
            return(details);
        }
 public UserActivityViewModel([NotNull] ISystemDispatcher dispatcher, [NotNull] StatisticsService statistics,
                              [NotNull] AsyncDataProvider dataProvider, [NotNull] IStringsProvider stringsProvider,
                              [NotNull] IPhoneTasks tasks, int userId,
                              DetailsType detailsType)
     : base(dispatcher)
 {
     if (statistics == null)
     {
         throw new ArgumentNullException("statistics");
     }
     if (dataProvider == null)
     {
         throw new ArgumentNullException("dataProvider");
     }
     if (stringsProvider == null)
     {
         throw new ArgumentNullException("stringsProvider");
     }
     if (tasks == null)
     {
         throw new ArgumentNullException("tasks");
     }
     _statistics      = statistics;
     _dataProvider    = dataProvider;
     _stringsProvider = stringsProvider;
     _tasks           = tasks;
     _userId          = userId;
     _detailsType     = detailsType;
     _statistics.PublishActivityPageLoaded(_detailsType == DetailsType.Questions);
     LoadMoreCommand = new RelayCommand(_ => LoadNext());
     LoadNext();
 }
 public ReplaceImageCommand(DetailsType detailsType, int detailsId, ImageType imageType, string imageExtension, Stream imageStream)
 {
     DetailsType    = detailsType;
     DetailsId      = detailsId;
     ImageType      = imageType;
     ImageExtension = imageExtension;
     ImageStream    = imageStream;
 }
Beispiel #5
0
        //const string Title_Norm = "Norm Setting:";
        //const string Title_Tex_Format_Recommend_IOS     = "Rec Format IOS";
        //const string Title_Tex_Format_Forbid_IOS = "Fbd Format IOS";
        //const string Title_Tex_Format_Recommend_Android = "Rec Format Android";
        //const string Title_Tex_Format_Forbid_Android = "Fbd Format Android";
        //const string Title_Tex_Max_Size = "Max Texture Size";
        //const string Title_Tex_Recommend_Size = "Rec Texture Size";
        //const string Title_Mesh_Max_TrisNum = "Max Mesh Tris Num";
        //const string Title_Mesh_Recommend_TrisNum = "Rec Mesh Tris Num";
        //const string Title_Shader_Forbid = "Fbd Shader";

        //const string Button_Default = "Default";
        //const string Button_Save = "Save";

        void OnGUI()
        {
            EditorGUILayout.Space();
            EditorGUI.BeginChangeCheck();
            DetailsType old = currSelectDetailsType;

            currSelectDetailsType = (DetailsType)GUILayout.Toolbar((int)currSelectDetailsType, DetailsStrings);
            if (EditorGUI.EndChangeCheck() && old != currSelectDetailsType)
            {
                switch (currSelectDetailsType)
                {
                case DetailsType.Textures:
                    FetchAllTextures();
                    break;

                case DetailsType.Materials:
                    FetchAllMaterials();
                    break;

                case DetailsType.Meshes:
                    FetchAllModels();
                    break;

                case DetailsType.Audios:
                    FetchAllSounds();
                    break;
                }
            }
            EditorGUILayout.Space();
            switch (currSelectDetailsType)
            {
            case DetailsType.Textures:
                OptimizeTextures();
                textureTree.OnGUI();
                break;

            case DetailsType.Materials:
                materialTree.OnGUI();
                break;

            case DetailsType.Meshes:
                modelTree.OnGUI();
                break;

            case DetailsType.Audios:
                audioTree.OnGUI();
                break;
            }
        }
        public async Task <IActionResult> SetImage(
            [FromForm, Required] DetailsType detailsType,
            [FromForm, Required] ImageType imageType,
            [FromForm, Required] int detailsId,
            [Required] IFormFile image)
        {
            var imageExtension = Path.GetExtension(image.FileName);

            await using var imageStream = image.OpenReadStream();
            var ok = await _eventDispatcher.Dispatch(new ReplaceImageCommand(detailsType, detailsId, imageType, imageExtension, imageStream));

            if (!ok)
            {
                return(BadRequest());
            }
            return(Ok());
        }
    public static DataTable GetUserStatis(DetailsType Type)
    {
        /* * * * * * * * * * * * * * * * * * * * * * * * * * * *
        *  Procedure Name : Matrimonials_MemberStatis
        * * * * * * * * * * * * * * * * * * * * * * * * * * * *
        *  Type: SELECT
        * * * * * * * * * * * * * * * * * * * * * * * * * * * *
        *  RESULT :
        * * * * * * * * * * * * * * * * * * * * * * * * * * * *
        *            @Flag Tyniint
        * * * * * * * * * * * * * * * * * * * * * * * * * * * */

        using (SqlConnection objConnection = DBConnection.GetSqlConnection())
        {
            try
            {
                SqlCommand objCommand = new SqlCommand("Matrimonials_MemberStatis", objConnection);
                objCommand.CommandType = CommandType.StoredProcedure;
                switch (Type)
                {
                case DetailsType.PaidMember:
                    objCommand.Parameters.Add(new SqlParameter("@Flag", SqlDbType.TinyInt));
                    objCommand.Parameters["@Flag"].Value = 1;
                    break;

                case DetailsType.Sales:
                    objCommand.Parameters.Add(new SqlParameter("@Flag", SqlDbType.TinyInt));
                    objCommand.Parameters["@Flag"].Value = 2;
                    break;
                }
                objConnection.Open();
                DataSet objDataSet = new DataSet();
                new SqlDataAdapter(objCommand).Fill(objDataSet, "UserStatis");
                return(objDataSet.Tables["UserStatis"]);
            }
            catch (Exception EX)
            {
                ErrorLog.WriteErrorLog("MatrimonialSales.GetMatrimonialUserStatis", EX);
                return(null);
            }
        }
    }
        private void ToggleQueueButton_Click(object sender, RoutedEventArgs e)
        {
            this.Details = DetailsType.Queue;

            if (object.ReferenceEquals(this.TabControlMain.SelectedItem, RetrivalDocumentPane))
            {
                Refresh(ExecutionEngineType.Retrival);
            }
            else if (object.ReferenceEquals(this.TabControlMain.SelectedItem, GeneratorDocumentPane))
            {
                Refresh(ExecutionEngineType.Generator);
            }
            else if (object.ReferenceEquals(this.TabControlMain.SelectedItem, PublisherDocumentPane))
            {
                Refresh(ExecutionEngineType.Publisher);
            }
            else if (object.ReferenceEquals(this.TabControlMain.SelectedItem, EventsDocumentPane))
            {
                Refresh(ExecutionEngineType.Events);
            }
        }
        public List <int> GetCarDetails(DetailsType detail)
        {
            var detailsList   = new List <int>();
            var listOfElement = _driver.FindElements(By.CssSelector("div.list__item__content"));

            foreach (var car in listOfElement)
            {
                var      text       = car.Text;
                string[] carDetails = text.Replace("\r", string.Empty).Replace("cm3", string.Empty).Split('\n');

                try
                {
                    detailsList.Add(GetNumericCarDetails(carDetails[(int)detail]));
                }
                catch (Exception)
                {
                    detailsList.Add(0);
                }
            }

            return(detailsList);
        }
        public async void ProcessAsync_Should_Set_Standard_Details_Type_ClassAttribute(DetailsType type)
        {
            _tagHelper.DetailsType = type;
            await _tagHelper.ProcessAsync(_tagHelperContext, _tagHelperOutput);

            Assert.Equal(CssClasses.NhsUkDetails, _tagHelperOutput.Attributes[HtmlAttributes.ClassAttribute].Value);
        }
 public BaseViewModel Create(int id, DetailsType detailsType)
 {
     return(new UserActivityViewModel(_systemDispatcher, _statistics, _dataProvider, _stringsProvider,
                                      _phoneTasks, id, detailsType));
 }