Example #1
0
        private void InitializeShapes()
        {
            //Get list from server
            var serverTemplist = serviceHandler.CallService <List <Shape> >(@"QueryShapes");
            //get local list
            var localTempList = dataHandler.QueryShapes();

            if (serverTemplist != null && localTempList != null)
            {
                if (serverTemplist.Count != localTempList.Count)
                {
                    //Empty local list
                    dataHandler.ClearShapes();
                    //And refill it with the fresh ones
                    foreach (var item in serverTemplist)
                    {
                        dataHandler.InsertShape(item);
                    }
                }
            }
        }